@googleapis/discoveryengine 28.0.0 → 28.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1.d.ts +691 -17
- package/build/v1.js +198 -0
- package/build/v1.js.map +1 -1
- package/build/v1alpha.d.ts +1136 -406
- package/build/v1alpha.js +198 -0
- package/build/v1alpha.js.map +1 -1
- package/build/v1beta.d.ts +720 -36
- package/build/v1beta.js +198 -0
- package/build/v1beta.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +1554 -382
- package/v1alpha.ts +1483 -256
- package/v1beta.ts +1561 -379
package/v1beta.ts
CHANGED
|
@@ -4047,7 +4047,7 @@ export namespace discoveryengine_v1beta {
|
|
|
4047
4047
|
*/
|
|
4048
4048
|
orderBy?: string | null;
|
|
4049
4049
|
/**
|
|
4050
|
-
* Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.PageInfo.page_category. This field is the equivalent of the query for browse (navigation) queries. It's used by the browse model when the query is empty. If the field is empty, it will not be used by the browse model. To represent full path of a category, use '\>' character to separate different hierarchies. If '\>' is part of the category name, replace it with other character(s). For example, `Graphics Cards \> RTX\>4090 \> Founders Edition` where "RTX \> 4090" represents one level, can be rewritten as `Graphics Cards \> RTX_4090 \> Founders Edition`
|
|
4050
|
+
* Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.PageInfo.page_category. This field is the equivalent of the query for browse (navigation) queries. It's used by the browse model when the query is empty. If the field is empty, it will not be used by the browse model. If the field contains more than one element, only the first element will be used. To represent full path of a category, use '\>' character to separate different hierarchies. If '\>' is part of the category name, replace it with other character(s). For example, `Graphics Cards \> RTX\>4090 \> Founders Edition` where "RTX \> 4090" represents one level, can be rewritten as `Graphics Cards \> RTX_4090 \> Founders Edition`
|
|
4051
4051
|
*/
|
|
4052
4052
|
pageCategories?: string[] | null;
|
|
4053
4053
|
/**
|
|
@@ -4086,12 +4086,16 @@ export namespace discoveryengine_v1beta {
|
|
|
4086
4086
|
* The Unicode country/region code (CLDR) of a location, such as "US" and "419". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.
|
|
4087
4087
|
*/
|
|
4088
4088
|
regionCode?: string | null;
|
|
4089
|
+
/**
|
|
4090
|
+
* Optional. The granular relevance filtering specification. If not specified, the global `relevance_threshold` will be used for all sub-searches. If specified, this overrides the global `relevance_threshold` to use thresholds on a per sub-search basis. This feature is currently supported only for custom and site search.
|
|
4091
|
+
*/
|
|
4092
|
+
relevanceFilterSpec?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpec;
|
|
4089
4093
|
/**
|
|
4090
4094
|
* Optional. The specification for returning the relevance score.
|
|
4091
4095
|
*/
|
|
4092
4096
|
relevanceScoreSpec?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceScoreSpec;
|
|
4093
4097
|
/**
|
|
4094
|
-
* The relevance threshold of the search results.
|
|
4098
|
+
* The global relevance threshold of the search results. Defaults to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information. If more granular relevance filtering is required, use the `relevance_filter_spec` instead. This feature is not supported for healthcare search.
|
|
4095
4099
|
*/
|
|
4096
4100
|
relevanceThreshold?: string | null;
|
|
4097
4101
|
/**
|
|
@@ -4530,6 +4534,32 @@ export namespace discoveryengine_v1beta {
|
|
|
4530
4534
|
*/
|
|
4531
4535
|
pinUnexpandedResults?: boolean | null;
|
|
4532
4536
|
}
|
|
4537
|
+
/**
|
|
4538
|
+
* Relevance filtering specification.
|
|
4539
|
+
*/
|
|
4540
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpec {
|
|
4541
|
+
/**
|
|
4542
|
+
* Optional. Relevance filtering threshold specification for keyword search.
|
|
4543
|
+
*/
|
|
4544
|
+
keywordSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
4545
|
+
/**
|
|
4546
|
+
* Optional. Relevance filtering threshold specification for semantic search.
|
|
4547
|
+
*/
|
|
4548
|
+
semanticSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
4549
|
+
}
|
|
4550
|
+
/**
|
|
4551
|
+
* Specification for relevance filtering on a specific sub-search.
|
|
4552
|
+
*/
|
|
4553
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec {
|
|
4554
|
+
/**
|
|
4555
|
+
* Pre-defined relevance threshold for the sub-search.
|
|
4556
|
+
*/
|
|
4557
|
+
relevanceThreshold?: string | null;
|
|
4558
|
+
/**
|
|
4559
|
+
* Custom relevance threshold for the sub-search. The value must be in [0.0, 1.0].
|
|
4560
|
+
*/
|
|
4561
|
+
semanticRelevanceThreshold?: number | null;
|
|
4562
|
+
}
|
|
4533
4563
|
/**
|
|
4534
4564
|
* The specification for returning the document relevance score.
|
|
4535
4565
|
*/
|
|
@@ -10693,7 +10723,7 @@ export namespace discoveryengine_v1beta {
|
|
|
10693
10723
|
*/
|
|
10694
10724
|
orderBy?: string | null;
|
|
10695
10725
|
/**
|
|
10696
|
-
* Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.PageInfo.page_category. This field is the equivalent of the query for browse (navigation) queries. It's used by the browse model when the query is empty. If the field is empty, it will not be used by the browse model. To represent full path of a category, use '\>' character to separate different hierarchies. If '\>' is part of the category name, replace it with other character(s). For example, `Graphics Cards \> RTX\>4090 \> Founders Edition` where "RTX \> 4090" represents one level, can be rewritten as `Graphics Cards \> RTX_4090 \> Founders Edition`
|
|
10726
|
+
* Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.PageInfo.page_category. This field is the equivalent of the query for browse (navigation) queries. It's used by the browse model when the query is empty. If the field is empty, it will not be used by the browse model. If the field contains more than one element, only the first element will be used. To represent full path of a category, use '\>' character to separate different hierarchies. If '\>' is part of the category name, replace it with other character(s). For example, `Graphics Cards \> RTX\>4090 \> Founders Edition` where "RTX \> 4090" represents one level, can be rewritten as `Graphics Cards \> RTX_4090 \> Founders Edition`
|
|
10697
10727
|
*/
|
|
10698
10728
|
pageCategories?: string[] | null;
|
|
10699
10729
|
/**
|
|
@@ -10732,12 +10762,16 @@ export namespace discoveryengine_v1beta {
|
|
|
10732
10762
|
* The Unicode country/region code (CLDR) of a location, such as "US" and "419". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.
|
|
10733
10763
|
*/
|
|
10734
10764
|
regionCode?: string | null;
|
|
10765
|
+
/**
|
|
10766
|
+
* Optional. The granular relevance filtering specification. If not specified, the global `relevance_threshold` will be used for all sub-searches. If specified, this overrides the global `relevance_threshold` to use thresholds on a per sub-search basis. This feature is currently supported only for custom and site search.
|
|
10767
|
+
*/
|
|
10768
|
+
relevanceFilterSpec?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpec;
|
|
10735
10769
|
/**
|
|
10736
10770
|
* Optional. The specification for returning the relevance score.
|
|
10737
10771
|
*/
|
|
10738
10772
|
relevanceScoreSpec?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceScoreSpec;
|
|
10739
10773
|
/**
|
|
10740
|
-
* The relevance threshold of the search results.
|
|
10774
|
+
* The global relevance threshold of the search results. Defaults to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information. If more granular relevance filtering is required, use the `relevance_filter_spec` instead. This feature is not supported for healthcare search.
|
|
10741
10775
|
*/
|
|
10742
10776
|
relevanceThreshold?: string | null;
|
|
10743
10777
|
/**
|
|
@@ -11172,6 +11206,32 @@ export namespace discoveryengine_v1beta {
|
|
|
11172
11206
|
*/
|
|
11173
11207
|
pinUnexpandedResults?: boolean | null;
|
|
11174
11208
|
}
|
|
11209
|
+
/**
|
|
11210
|
+
* Relevance filtering specification.
|
|
11211
|
+
*/
|
|
11212
|
+
export interface Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpec {
|
|
11213
|
+
/**
|
|
11214
|
+
* Optional. Relevance filtering threshold specification for keyword search.
|
|
11215
|
+
*/
|
|
11216
|
+
keywordSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
11217
|
+
/**
|
|
11218
|
+
* Optional. Relevance filtering threshold specification for semantic search.
|
|
11219
|
+
*/
|
|
11220
|
+
semanticSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
11221
|
+
}
|
|
11222
|
+
/**
|
|
11223
|
+
* Specification for relevance filtering on a specific sub-search.
|
|
11224
|
+
*/
|
|
11225
|
+
export interface Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec {
|
|
11226
|
+
/**
|
|
11227
|
+
* Pre-defined relevance threshold for the sub-search.
|
|
11228
|
+
*/
|
|
11229
|
+
relevanceThreshold?: string | null;
|
|
11230
|
+
/**
|
|
11231
|
+
* Custom relevance threshold for the sub-search. The value must be in [0.0, 1.0].
|
|
11232
|
+
*/
|
|
11233
|
+
semanticRelevanceThreshold?: number | null;
|
|
11234
|
+
}
|
|
11175
11235
|
/**
|
|
11176
11236
|
* The specification for returning the document relevance score.
|
|
11177
11237
|
*/
|
|
@@ -12497,7 +12557,7 @@ export namespace discoveryengine_v1beta {
|
|
|
12497
12557
|
*/
|
|
12498
12558
|
eventType?: string | null;
|
|
12499
12559
|
/**
|
|
12500
|
-
* 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.
|
|
12560
|
+
* Optional. 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.
|
|
12501
12561
|
*/
|
|
12502
12562
|
filter?: string | null;
|
|
12503
12563
|
/**
|
|
@@ -13289,6 +13349,10 @@ export namespace discoveryengine_v1beta {
|
|
|
13289
13349
|
* Immutable. Identifier. 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.
|
|
13290
13350
|
*/
|
|
13291
13351
|
name?: string | null;
|
|
13352
|
+
/**
|
|
13353
|
+
* Optional. Configuration for Natural Language Query Understanding.
|
|
13354
|
+
*/
|
|
13355
|
+
naturalLanguageQueryUnderstandingConfig?: Schema$GoogleCloudDiscoveryengineV1NaturalLanguageQueryUnderstandingConfig;
|
|
13292
13356
|
/**
|
|
13293
13357
|
* Optional. Stores serving config at DataStore level.
|
|
13294
13358
|
*/
|
|
@@ -14125,6 +14189,15 @@ export namespace discoveryengine_v1beta {
|
|
|
14125
14189
|
*/
|
|
14126
14190
|
subscriptionTier?: string | null;
|
|
14127
14191
|
}
|
|
14192
|
+
/**
|
|
14193
|
+
* Configuration for Natural Language Query Understanding.
|
|
14194
|
+
*/
|
|
14195
|
+
export interface Schema$GoogleCloudDiscoveryengineV1NaturalLanguageQueryUnderstandingConfig {
|
|
14196
|
+
/**
|
|
14197
|
+
* Mode of Natural Language Query Understanding. If this field is unset, the behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED.
|
|
14198
|
+
*/
|
|
14199
|
+
mode?: string | null;
|
|
14200
|
+
}
|
|
14128
14201
|
/**
|
|
14129
14202
|
* Metadata and configurations for a Google Cloud project in the service.
|
|
14130
14203
|
*/
|
|
@@ -25910,7 +25983,7 @@ export namespace discoveryengine_v1beta {
|
|
|
25910
25983
|
}
|
|
25911
25984
|
|
|
25912
25985
|
/**
|
|
25913
|
-
*
|
|
25986
|
+
* Creates a ServingConfig. Note: The Google Cloud console works only with the default serving config. Additional ServingConfigs can be created and managed only via the API. A maximum of 100 ServingConfigs are allowed in an Engine, otherwise a RESOURCE_EXHAUSTED error is returned.
|
|
25914
25987
|
* @example
|
|
25915
25988
|
* ```js
|
|
25916
25989
|
* // Before running the sample:
|
|
@@ -25943,10 +26016,42 @@ export namespace discoveryengine_v1beta {
|
|
|
25943
26016
|
*
|
|
25944
26017
|
* // Do the magic
|
|
25945
26018
|
* const res =
|
|
25946
|
-
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.
|
|
26019
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.create(
|
|
25947
26020
|
* {
|
|
25948
|
-
* // Required.
|
|
25949
|
-
*
|
|
26021
|
+
* // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
26022
|
+
* parent:
|
|
26023
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
|
|
26024
|
+
* // Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
26025
|
+
* servingConfigId: 'placeholder-value',
|
|
26026
|
+
*
|
|
26027
|
+
* // Request body metadata
|
|
26028
|
+
* requestBody: {
|
|
26029
|
+
* // request body parameters
|
|
26030
|
+
* // {
|
|
26031
|
+
* // "answerGenerationSpec": {},
|
|
26032
|
+
* // "boostControlIds": [],
|
|
26033
|
+
* // "createTime": "my_createTime",
|
|
26034
|
+
* // "displayName": "my_displayName",
|
|
26035
|
+
* // "dissociateControlIds": [],
|
|
26036
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
26037
|
+
* // "embeddingConfig": {},
|
|
26038
|
+
* // "filterControlIds": [],
|
|
26039
|
+
* // "genericConfig": {},
|
|
26040
|
+
* // "ignoreControlIds": [],
|
|
26041
|
+
* // "mediaConfig": {},
|
|
26042
|
+
* // "modelId": "my_modelId",
|
|
26043
|
+
* // "name": "my_name",
|
|
26044
|
+
* // "onewaySynonymsControlIds": [],
|
|
26045
|
+
* // "personalizationSpec": {},
|
|
26046
|
+
* // "promoteControlIds": [],
|
|
26047
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
26048
|
+
* // "redirectControlIds": [],
|
|
26049
|
+
* // "replacementControlIds": [],
|
|
26050
|
+
* // "solutionType": "my_solutionType",
|
|
26051
|
+
* // "synonymsControlIds": [],
|
|
26052
|
+
* // "updateTime": "my_updateTime"
|
|
26053
|
+
* // }
|
|
26054
|
+
* },
|
|
25950
26055
|
* },
|
|
25951
26056
|
* );
|
|
25952
26057
|
* console.log(res.data);
|
|
@@ -25990,38 +26095,38 @@ export namespace discoveryengine_v1beta {
|
|
|
25990
26095
|
* @param callback - Optional callback that handles the response.
|
|
25991
26096
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
25992
26097
|
*/
|
|
25993
|
-
|
|
25994
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26098
|
+
create(
|
|
26099
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
25995
26100
|
options: StreamMethodOptions
|
|
25996
26101
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
25997
|
-
|
|
25998
|
-
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26102
|
+
create(
|
|
26103
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
25999
26104
|
options?: MethodOptions
|
|
26000
26105
|
): Promise<
|
|
26001
26106
|
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26002
26107
|
>;
|
|
26003
|
-
|
|
26004
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26108
|
+
create(
|
|
26109
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
26005
26110
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
26006
26111
|
callback: BodyResponseCallback<Readable>
|
|
26007
26112
|
): void;
|
|
26008
|
-
|
|
26009
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26113
|
+
create(
|
|
26114
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
26010
26115
|
options:
|
|
26011
26116
|
| MethodOptions
|
|
26012
26117
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>,
|
|
26013
26118
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26014
26119
|
): void;
|
|
26015
|
-
|
|
26016
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26120
|
+
create(
|
|
26121
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
26017
26122
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26018
26123
|
): void;
|
|
26019
|
-
|
|
26124
|
+
create(
|
|
26020
26125
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26021
26126
|
): void;
|
|
26022
|
-
|
|
26127
|
+
create(
|
|
26023
26128
|
paramsOrCallback?:
|
|
26024
|
-
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26129
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create
|
|
26025
26130
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26026
26131
|
| BodyResponseCallback<Readable>,
|
|
26027
26132
|
optionsOrCallback?:
|
|
@@ -26039,13 +26144,13 @@ export namespace discoveryengine_v1beta {
|
|
|
26039
26144
|
>
|
|
26040
26145
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
26041
26146
|
let params = (paramsOrCallback ||
|
|
26042
|
-
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26147
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create;
|
|
26043
26148
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
26044
26149
|
|
|
26045
26150
|
if (typeof paramsOrCallback === 'function') {
|
|
26046
26151
|
callback = paramsOrCallback;
|
|
26047
26152
|
params =
|
|
26048
|
-
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26153
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create;
|
|
26049
26154
|
options = {};
|
|
26050
26155
|
}
|
|
26051
26156
|
|
|
@@ -26059,15 +26164,18 @@ export namespace discoveryengine_v1beta {
|
|
|
26059
26164
|
const parameters = {
|
|
26060
26165
|
options: Object.assign(
|
|
26061
26166
|
{
|
|
26062
|
-
url: (rootUrl + '/v1beta/{+
|
|
26063
|
-
|
|
26167
|
+
url: (rootUrl + '/v1beta/{+parent}/servingConfigs').replace(
|
|
26168
|
+
/([^:]\/)\/+/g,
|
|
26169
|
+
'$1'
|
|
26170
|
+
),
|
|
26171
|
+
method: 'POST',
|
|
26064
26172
|
apiVersion: '',
|
|
26065
26173
|
},
|
|
26066
26174
|
options
|
|
26067
26175
|
),
|
|
26068
26176
|
params,
|
|
26069
|
-
requiredParams: ['
|
|
26070
|
-
pathParams: ['
|
|
26177
|
+
requiredParams: ['parent'],
|
|
26178
|
+
pathParams: ['parent'],
|
|
26071
26179
|
context: this.context,
|
|
26072
26180
|
};
|
|
26073
26181
|
if (callback) {
|
|
@@ -26083,7 +26191,7 @@ export namespace discoveryengine_v1beta {
|
|
|
26083
26191
|
}
|
|
26084
26192
|
|
|
26085
26193
|
/**
|
|
26086
|
-
*
|
|
26194
|
+
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
26087
26195
|
* @example
|
|
26088
26196
|
* ```js
|
|
26089
26197
|
* // Before running the sample:
|
|
@@ -26116,24 +26224,16 @@ export namespace discoveryengine_v1beta {
|
|
|
26116
26224
|
*
|
|
26117
26225
|
* // Do the magic
|
|
26118
26226
|
* const res =
|
|
26119
|
-
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.
|
|
26227
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.delete(
|
|
26120
26228
|
* {
|
|
26121
|
-
* //
|
|
26122
|
-
*
|
|
26123
|
-
* // Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.
|
|
26124
|
-
* pageToken: 'placeholder-value',
|
|
26125
|
-
* // Required. Full resource name of the parent resource. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
26126
|
-
* parent:
|
|
26127
|
-
* 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
|
|
26229
|
+
* // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
26230
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
26128
26231
|
* },
|
|
26129
26232
|
* );
|
|
26130
26233
|
* console.log(res.data);
|
|
26131
26234
|
*
|
|
26132
26235
|
* // Example response
|
|
26133
|
-
* // {
|
|
26134
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
26135
|
-
* // "servingConfigs": []
|
|
26136
|
-
* // }
|
|
26236
|
+
* // {}
|
|
26137
26237
|
* }
|
|
26138
26238
|
*
|
|
26139
26239
|
* main().catch(e => {
|
|
@@ -26148,62 +26248,54 @@ export namespace discoveryengine_v1beta {
|
|
|
26148
26248
|
* @param callback - Optional callback that handles the response.
|
|
26149
26249
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
26150
26250
|
*/
|
|
26151
|
-
|
|
26152
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26251
|
+
delete(
|
|
26252
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
26153
26253
|
options: StreamMethodOptions
|
|
26154
26254
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
26155
|
-
|
|
26156
|
-
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26255
|
+
delete(
|
|
26256
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
26157
26257
|
options?: MethodOptions
|
|
26158
|
-
): Promise<
|
|
26159
|
-
|
|
26160
|
-
|
|
26161
|
-
list(
|
|
26162
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
26258
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
26259
|
+
delete(
|
|
26260
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
26163
26261
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
26164
26262
|
callback: BodyResponseCallback<Readable>
|
|
26165
26263
|
): void;
|
|
26166
|
-
|
|
26167
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26168
|
-
options:
|
|
26169
|
-
|
|
26170
|
-
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>,
|
|
26171
|
-
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26172
|
-
): void;
|
|
26173
|
-
list(
|
|
26174
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
26175
|
-
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26264
|
+
delete(
|
|
26265
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
26266
|
+
options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
|
|
26267
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
26176
26268
|
): void;
|
|
26177
|
-
|
|
26178
|
-
|
|
26269
|
+
delete(
|
|
26270
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
26271
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
26179
26272
|
): void;
|
|
26180
|
-
|
|
26273
|
+
delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
26274
|
+
delete(
|
|
26181
26275
|
paramsOrCallback?:
|
|
26182
|
-
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26183
|
-
| BodyResponseCallback<Schema$
|
|
26276
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete
|
|
26277
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
26184
26278
|
| BodyResponseCallback<Readable>,
|
|
26185
26279
|
optionsOrCallback?:
|
|
26186
26280
|
| MethodOptions
|
|
26187
26281
|
| StreamMethodOptions
|
|
26188
|
-
| BodyResponseCallback<Schema$
|
|
26282
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
26189
26283
|
| BodyResponseCallback<Readable>,
|
|
26190
26284
|
callback?:
|
|
26191
|
-
| BodyResponseCallback<Schema$
|
|
26285
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
26192
26286
|
| BodyResponseCallback<Readable>
|
|
26193
26287
|
):
|
|
26194
26288
|
| void
|
|
26195
|
-
| Promise<
|
|
26196
|
-
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26197
|
-
>
|
|
26289
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
|
|
26198
26290
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
26199
26291
|
let params = (paramsOrCallback ||
|
|
26200
|
-
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26292
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete;
|
|
26201
26293
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
26202
26294
|
|
|
26203
26295
|
if (typeof paramsOrCallback === 'function') {
|
|
26204
26296
|
callback = paramsOrCallback;
|
|
26205
26297
|
params =
|
|
26206
|
-
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26298
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete;
|
|
26207
26299
|
options = {};
|
|
26208
26300
|
}
|
|
26209
26301
|
|
|
@@ -26217,34 +26309,29 @@ export namespace discoveryengine_v1beta {
|
|
|
26217
26309
|
const parameters = {
|
|
26218
26310
|
options: Object.assign(
|
|
26219
26311
|
{
|
|
26220
|
-
url: (rootUrl + '/v1beta/{+
|
|
26221
|
-
|
|
26222
|
-
'$1'
|
|
26223
|
-
),
|
|
26224
|
-
method: 'GET',
|
|
26312
|
+
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
26313
|
+
method: 'DELETE',
|
|
26225
26314
|
apiVersion: '',
|
|
26226
26315
|
},
|
|
26227
26316
|
options
|
|
26228
26317
|
),
|
|
26229
26318
|
params,
|
|
26230
|
-
requiredParams: ['
|
|
26231
|
-
pathParams: ['
|
|
26319
|
+
requiredParams: ['name'],
|
|
26320
|
+
pathParams: ['name'],
|
|
26232
26321
|
context: this.context,
|
|
26233
26322
|
};
|
|
26234
26323
|
if (callback) {
|
|
26235
|
-
createAPIRequest<Schema$
|
|
26324
|
+
createAPIRequest<Schema$GoogleProtobufEmpty>(
|
|
26236
26325
|
parameters,
|
|
26237
26326
|
callback as BodyResponseCallback<unknown>
|
|
26238
26327
|
);
|
|
26239
26328
|
} else {
|
|
26240
|
-
return createAPIRequest<Schema$
|
|
26241
|
-
parameters
|
|
26242
|
-
);
|
|
26329
|
+
return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
|
|
26243
26330
|
}
|
|
26244
26331
|
}
|
|
26245
26332
|
|
|
26246
26333
|
/**
|
|
26247
|
-
*
|
|
26334
|
+
* Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.
|
|
26248
26335
|
* @example
|
|
26249
26336
|
* ```js
|
|
26250
26337
|
* // Before running the sample:
|
|
@@ -26277,41 +26364,10 @@ export namespace discoveryengine_v1beta {
|
|
|
26277
26364
|
*
|
|
26278
26365
|
* // Do the magic
|
|
26279
26366
|
* const res =
|
|
26280
|
-
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.
|
|
26367
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.get(
|
|
26281
26368
|
* {
|
|
26282
|
-
* //
|
|
26369
|
+
* // Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
26283
26370
|
* name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
26284
|
-
* // Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.
|
|
26285
|
-
* updateMask: 'placeholder-value',
|
|
26286
|
-
*
|
|
26287
|
-
* // Request body metadata
|
|
26288
|
-
* requestBody: {
|
|
26289
|
-
* // request body parameters
|
|
26290
|
-
* // {
|
|
26291
|
-
* // "answerGenerationSpec": {},
|
|
26292
|
-
* // "boostControlIds": [],
|
|
26293
|
-
* // "createTime": "my_createTime",
|
|
26294
|
-
* // "displayName": "my_displayName",
|
|
26295
|
-
* // "dissociateControlIds": [],
|
|
26296
|
-
* // "diversityLevel": "my_diversityLevel",
|
|
26297
|
-
* // "embeddingConfig": {},
|
|
26298
|
-
* // "filterControlIds": [],
|
|
26299
|
-
* // "genericConfig": {},
|
|
26300
|
-
* // "ignoreControlIds": [],
|
|
26301
|
-
* // "mediaConfig": {},
|
|
26302
|
-
* // "modelId": "my_modelId",
|
|
26303
|
-
* // "name": "my_name",
|
|
26304
|
-
* // "onewaySynonymsControlIds": [],
|
|
26305
|
-
* // "personalizationSpec": {},
|
|
26306
|
-
* // "promoteControlIds": [],
|
|
26307
|
-
* // "rankingExpression": "my_rankingExpression",
|
|
26308
|
-
* // "redirectControlIds": [],
|
|
26309
|
-
* // "replacementControlIds": [],
|
|
26310
|
-
* // "solutionType": "my_solutionType",
|
|
26311
|
-
* // "synonymsControlIds": [],
|
|
26312
|
-
* // "updateTime": "my_updateTime"
|
|
26313
|
-
* // }
|
|
26314
|
-
* },
|
|
26315
26371
|
* },
|
|
26316
26372
|
* );
|
|
26317
26373
|
* console.log(res.data);
|
|
@@ -26355,38 +26411,38 @@ export namespace discoveryengine_v1beta {
|
|
|
26355
26411
|
* @param callback - Optional callback that handles the response.
|
|
26356
26412
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
26357
26413
|
*/
|
|
26358
|
-
|
|
26359
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26414
|
+
get(
|
|
26415
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
26360
26416
|
options: StreamMethodOptions
|
|
26361
26417
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
26362
|
-
|
|
26363
|
-
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26418
|
+
get(
|
|
26419
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
26364
26420
|
options?: MethodOptions
|
|
26365
26421
|
): Promise<
|
|
26366
26422
|
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26367
26423
|
>;
|
|
26368
|
-
|
|
26369
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26424
|
+
get(
|
|
26425
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
26370
26426
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
26371
26427
|
callback: BodyResponseCallback<Readable>
|
|
26372
26428
|
): void;
|
|
26373
|
-
|
|
26374
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26429
|
+
get(
|
|
26430
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
26375
26431
|
options:
|
|
26376
26432
|
| MethodOptions
|
|
26377
26433
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>,
|
|
26378
26434
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26379
26435
|
): void;
|
|
26380
|
-
|
|
26381
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26436
|
+
get(
|
|
26437
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
26382
26438
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26383
26439
|
): void;
|
|
26384
|
-
|
|
26440
|
+
get(
|
|
26385
26441
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26386
26442
|
): void;
|
|
26387
|
-
|
|
26443
|
+
get(
|
|
26388
26444
|
paramsOrCallback?:
|
|
26389
|
-
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26445
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get
|
|
26390
26446
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26391
26447
|
| BodyResponseCallback<Readable>,
|
|
26392
26448
|
optionsOrCallback?:
|
|
@@ -26404,13 +26460,13 @@ export namespace discoveryengine_v1beta {
|
|
|
26404
26460
|
>
|
|
26405
26461
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
26406
26462
|
let params = (paramsOrCallback ||
|
|
26407
|
-
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26463
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get;
|
|
26408
26464
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
26409
26465
|
|
|
26410
26466
|
if (typeof paramsOrCallback === 'function') {
|
|
26411
26467
|
callback = paramsOrCallback;
|
|
26412
26468
|
params =
|
|
26413
|
-
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
26469
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get;
|
|
26414
26470
|
options = {};
|
|
26415
26471
|
}
|
|
26416
26472
|
|
|
@@ -26425,7 +26481,372 @@ export namespace discoveryengine_v1beta {
|
|
|
26425
26481
|
options: Object.assign(
|
|
26426
26482
|
{
|
|
26427
26483
|
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
26428
|
-
method: '
|
|
26484
|
+
method: 'GET',
|
|
26485
|
+
apiVersion: '',
|
|
26486
|
+
},
|
|
26487
|
+
options
|
|
26488
|
+
),
|
|
26489
|
+
params,
|
|
26490
|
+
requiredParams: ['name'],
|
|
26491
|
+
pathParams: ['name'],
|
|
26492
|
+
context: this.context,
|
|
26493
|
+
};
|
|
26494
|
+
if (callback) {
|
|
26495
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>(
|
|
26496
|
+
parameters,
|
|
26497
|
+
callback as BodyResponseCallback<unknown>
|
|
26498
|
+
);
|
|
26499
|
+
} else {
|
|
26500
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>(
|
|
26501
|
+
parameters
|
|
26502
|
+
);
|
|
26503
|
+
}
|
|
26504
|
+
}
|
|
26505
|
+
|
|
26506
|
+
/**
|
|
26507
|
+
* Lists all ServingConfigs linked to this dataStore.
|
|
26508
|
+
* @example
|
|
26509
|
+
* ```js
|
|
26510
|
+
* // Before running the sample:
|
|
26511
|
+
* // - Enable the API at:
|
|
26512
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
26513
|
+
* // - Login into gcloud by running:
|
|
26514
|
+
* // ```sh
|
|
26515
|
+
* // $ gcloud auth application-default login
|
|
26516
|
+
* // ```
|
|
26517
|
+
* // - Install the npm module by running:
|
|
26518
|
+
* // ```sh
|
|
26519
|
+
* // $ npm install googleapis
|
|
26520
|
+
* // ```
|
|
26521
|
+
*
|
|
26522
|
+
* const {google} = require('googleapis');
|
|
26523
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
26524
|
+
*
|
|
26525
|
+
* async function main() {
|
|
26526
|
+
* const auth = new google.auth.GoogleAuth({
|
|
26527
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
26528
|
+
* scopes: [
|
|
26529
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
26530
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
26531
|
+
* ],
|
|
26532
|
+
* });
|
|
26533
|
+
*
|
|
26534
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
26535
|
+
* const authClient = await auth.getClient();
|
|
26536
|
+
* google.options({auth: authClient});
|
|
26537
|
+
*
|
|
26538
|
+
* // Do the magic
|
|
26539
|
+
* const res =
|
|
26540
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.list(
|
|
26541
|
+
* {
|
|
26542
|
+
* // 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.
|
|
26543
|
+
* pageSize: 'placeholder-value',
|
|
26544
|
+
* // Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.
|
|
26545
|
+
* pageToken: 'placeholder-value',
|
|
26546
|
+
* // Required. Full resource name of the parent resource. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
26547
|
+
* parent:
|
|
26548
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
|
|
26549
|
+
* },
|
|
26550
|
+
* );
|
|
26551
|
+
* console.log(res.data);
|
|
26552
|
+
*
|
|
26553
|
+
* // Example response
|
|
26554
|
+
* // {
|
|
26555
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
26556
|
+
* // "servingConfigs": []
|
|
26557
|
+
* // }
|
|
26558
|
+
* }
|
|
26559
|
+
*
|
|
26560
|
+
* main().catch(e => {
|
|
26561
|
+
* console.error(e);
|
|
26562
|
+
* throw e;
|
|
26563
|
+
* });
|
|
26564
|
+
*
|
|
26565
|
+
* ```
|
|
26566
|
+
*
|
|
26567
|
+
* @param params - Parameters for request
|
|
26568
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
26569
|
+
* @param callback - Optional callback that handles the response.
|
|
26570
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
26571
|
+
*/
|
|
26572
|
+
list(
|
|
26573
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
26574
|
+
options: StreamMethodOptions
|
|
26575
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
26576
|
+
list(
|
|
26577
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
26578
|
+
options?: MethodOptions
|
|
26579
|
+
): Promise<
|
|
26580
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26581
|
+
>;
|
|
26582
|
+
list(
|
|
26583
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
26584
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
26585
|
+
callback: BodyResponseCallback<Readable>
|
|
26586
|
+
): void;
|
|
26587
|
+
list(
|
|
26588
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
26589
|
+
options:
|
|
26590
|
+
| MethodOptions
|
|
26591
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>,
|
|
26592
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26593
|
+
): void;
|
|
26594
|
+
list(
|
|
26595
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
26596
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26597
|
+
): void;
|
|
26598
|
+
list(
|
|
26599
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26600
|
+
): void;
|
|
26601
|
+
list(
|
|
26602
|
+
paramsOrCallback?:
|
|
26603
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List
|
|
26604
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26605
|
+
| BodyResponseCallback<Readable>,
|
|
26606
|
+
optionsOrCallback?:
|
|
26607
|
+
| MethodOptions
|
|
26608
|
+
| StreamMethodOptions
|
|
26609
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26610
|
+
| BodyResponseCallback<Readable>,
|
|
26611
|
+
callback?:
|
|
26612
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26613
|
+
| BodyResponseCallback<Readable>
|
|
26614
|
+
):
|
|
26615
|
+
| void
|
|
26616
|
+
| Promise<
|
|
26617
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
26618
|
+
>
|
|
26619
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
26620
|
+
let params = (paramsOrCallback ||
|
|
26621
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List;
|
|
26622
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
26623
|
+
|
|
26624
|
+
if (typeof paramsOrCallback === 'function') {
|
|
26625
|
+
callback = paramsOrCallback;
|
|
26626
|
+
params =
|
|
26627
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List;
|
|
26628
|
+
options = {};
|
|
26629
|
+
}
|
|
26630
|
+
|
|
26631
|
+
if (typeof optionsOrCallback === 'function') {
|
|
26632
|
+
callback = optionsOrCallback;
|
|
26633
|
+
options = {};
|
|
26634
|
+
}
|
|
26635
|
+
|
|
26636
|
+
const rootUrl =
|
|
26637
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
26638
|
+
const parameters = {
|
|
26639
|
+
options: Object.assign(
|
|
26640
|
+
{
|
|
26641
|
+
url: (rootUrl + '/v1beta/{+parent}/servingConfigs').replace(
|
|
26642
|
+
/([^:]\/)\/+/g,
|
|
26643
|
+
'$1'
|
|
26644
|
+
),
|
|
26645
|
+
method: 'GET',
|
|
26646
|
+
apiVersion: '',
|
|
26647
|
+
},
|
|
26648
|
+
options
|
|
26649
|
+
),
|
|
26650
|
+
params,
|
|
26651
|
+
requiredParams: ['parent'],
|
|
26652
|
+
pathParams: ['parent'],
|
|
26653
|
+
context: this.context,
|
|
26654
|
+
};
|
|
26655
|
+
if (callback) {
|
|
26656
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>(
|
|
26657
|
+
parameters,
|
|
26658
|
+
callback as BodyResponseCallback<unknown>
|
|
26659
|
+
);
|
|
26660
|
+
} else {
|
|
26661
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>(
|
|
26662
|
+
parameters
|
|
26663
|
+
);
|
|
26664
|
+
}
|
|
26665
|
+
}
|
|
26666
|
+
|
|
26667
|
+
/**
|
|
26668
|
+
* Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
26669
|
+
* @example
|
|
26670
|
+
* ```js
|
|
26671
|
+
* // Before running the sample:
|
|
26672
|
+
* // - Enable the API at:
|
|
26673
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
26674
|
+
* // - Login into gcloud by running:
|
|
26675
|
+
* // ```sh
|
|
26676
|
+
* // $ gcloud auth application-default login
|
|
26677
|
+
* // ```
|
|
26678
|
+
* // - Install the npm module by running:
|
|
26679
|
+
* // ```sh
|
|
26680
|
+
* // $ npm install googleapis
|
|
26681
|
+
* // ```
|
|
26682
|
+
*
|
|
26683
|
+
* const {google} = require('googleapis');
|
|
26684
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
26685
|
+
*
|
|
26686
|
+
* async function main() {
|
|
26687
|
+
* const auth = new google.auth.GoogleAuth({
|
|
26688
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
26689
|
+
* scopes: [
|
|
26690
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
26691
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
26692
|
+
* ],
|
|
26693
|
+
* });
|
|
26694
|
+
*
|
|
26695
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
26696
|
+
* const authClient = await auth.getClient();
|
|
26697
|
+
* google.options({auth: authClient});
|
|
26698
|
+
*
|
|
26699
|
+
* // Do the magic
|
|
26700
|
+
* const res =
|
|
26701
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch(
|
|
26702
|
+
* {
|
|
26703
|
+
* // Immutable. Fully qualified name `projects/{project\}/locations/{location\}/collections/{collection_id\}/engines/{engine_id\}/servingConfigs/{serving_config_id\}`
|
|
26704
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
26705
|
+
* // Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.
|
|
26706
|
+
* updateMask: 'placeholder-value',
|
|
26707
|
+
*
|
|
26708
|
+
* // Request body metadata
|
|
26709
|
+
* requestBody: {
|
|
26710
|
+
* // request body parameters
|
|
26711
|
+
* // {
|
|
26712
|
+
* // "answerGenerationSpec": {},
|
|
26713
|
+
* // "boostControlIds": [],
|
|
26714
|
+
* // "createTime": "my_createTime",
|
|
26715
|
+
* // "displayName": "my_displayName",
|
|
26716
|
+
* // "dissociateControlIds": [],
|
|
26717
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
26718
|
+
* // "embeddingConfig": {},
|
|
26719
|
+
* // "filterControlIds": [],
|
|
26720
|
+
* // "genericConfig": {},
|
|
26721
|
+
* // "ignoreControlIds": [],
|
|
26722
|
+
* // "mediaConfig": {},
|
|
26723
|
+
* // "modelId": "my_modelId",
|
|
26724
|
+
* // "name": "my_name",
|
|
26725
|
+
* // "onewaySynonymsControlIds": [],
|
|
26726
|
+
* // "personalizationSpec": {},
|
|
26727
|
+
* // "promoteControlIds": [],
|
|
26728
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
26729
|
+
* // "redirectControlIds": [],
|
|
26730
|
+
* // "replacementControlIds": [],
|
|
26731
|
+
* // "solutionType": "my_solutionType",
|
|
26732
|
+
* // "synonymsControlIds": [],
|
|
26733
|
+
* // "updateTime": "my_updateTime"
|
|
26734
|
+
* // }
|
|
26735
|
+
* },
|
|
26736
|
+
* },
|
|
26737
|
+
* );
|
|
26738
|
+
* console.log(res.data);
|
|
26739
|
+
*
|
|
26740
|
+
* // Example response
|
|
26741
|
+
* // {
|
|
26742
|
+
* // "answerGenerationSpec": {},
|
|
26743
|
+
* // "boostControlIds": [],
|
|
26744
|
+
* // "createTime": "my_createTime",
|
|
26745
|
+
* // "displayName": "my_displayName",
|
|
26746
|
+
* // "dissociateControlIds": [],
|
|
26747
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
26748
|
+
* // "embeddingConfig": {},
|
|
26749
|
+
* // "filterControlIds": [],
|
|
26750
|
+
* // "genericConfig": {},
|
|
26751
|
+
* // "ignoreControlIds": [],
|
|
26752
|
+
* // "mediaConfig": {},
|
|
26753
|
+
* // "modelId": "my_modelId",
|
|
26754
|
+
* // "name": "my_name",
|
|
26755
|
+
* // "onewaySynonymsControlIds": [],
|
|
26756
|
+
* // "personalizationSpec": {},
|
|
26757
|
+
* // "promoteControlIds": [],
|
|
26758
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
26759
|
+
* // "redirectControlIds": [],
|
|
26760
|
+
* // "replacementControlIds": [],
|
|
26761
|
+
* // "solutionType": "my_solutionType",
|
|
26762
|
+
* // "synonymsControlIds": [],
|
|
26763
|
+
* // "updateTime": "my_updateTime"
|
|
26764
|
+
* // }
|
|
26765
|
+
* }
|
|
26766
|
+
*
|
|
26767
|
+
* main().catch(e => {
|
|
26768
|
+
* console.error(e);
|
|
26769
|
+
* throw e;
|
|
26770
|
+
* });
|
|
26771
|
+
*
|
|
26772
|
+
* ```
|
|
26773
|
+
*
|
|
26774
|
+
* @param params - Parameters for request
|
|
26775
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
26776
|
+
* @param callback - Optional callback that handles the response.
|
|
26777
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
26778
|
+
*/
|
|
26779
|
+
patch(
|
|
26780
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
26781
|
+
options: StreamMethodOptions
|
|
26782
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
26783
|
+
patch(
|
|
26784
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
26785
|
+
options?: MethodOptions
|
|
26786
|
+
): Promise<
|
|
26787
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26788
|
+
>;
|
|
26789
|
+
patch(
|
|
26790
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
26791
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
26792
|
+
callback: BodyResponseCallback<Readable>
|
|
26793
|
+
): void;
|
|
26794
|
+
patch(
|
|
26795
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
26796
|
+
options:
|
|
26797
|
+
| MethodOptions
|
|
26798
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>,
|
|
26799
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26800
|
+
): void;
|
|
26801
|
+
patch(
|
|
26802
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
26803
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26804
|
+
): void;
|
|
26805
|
+
patch(
|
|
26806
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26807
|
+
): void;
|
|
26808
|
+
patch(
|
|
26809
|
+
paramsOrCallback?:
|
|
26810
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch
|
|
26811
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26812
|
+
| BodyResponseCallback<Readable>,
|
|
26813
|
+
optionsOrCallback?:
|
|
26814
|
+
| MethodOptions
|
|
26815
|
+
| StreamMethodOptions
|
|
26816
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26817
|
+
| BodyResponseCallback<Readable>,
|
|
26818
|
+
callback?:
|
|
26819
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26820
|
+
| BodyResponseCallback<Readable>
|
|
26821
|
+
):
|
|
26822
|
+
| void
|
|
26823
|
+
| Promise<
|
|
26824
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
26825
|
+
>
|
|
26826
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
26827
|
+
let params = (paramsOrCallback ||
|
|
26828
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch;
|
|
26829
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
26830
|
+
|
|
26831
|
+
if (typeof paramsOrCallback === 'function') {
|
|
26832
|
+
callback = paramsOrCallback;
|
|
26833
|
+
params =
|
|
26834
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch;
|
|
26835
|
+
options = {};
|
|
26836
|
+
}
|
|
26837
|
+
|
|
26838
|
+
if (typeof optionsOrCallback === 'function') {
|
|
26839
|
+
callback = optionsOrCallback;
|
|
26840
|
+
options = {};
|
|
26841
|
+
}
|
|
26842
|
+
|
|
26843
|
+
const rootUrl =
|
|
26844
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
26845
|
+
const parameters = {
|
|
26846
|
+
options: Object.assign(
|
|
26847
|
+
{
|
|
26848
|
+
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
26849
|
+
method: 'PATCH',
|
|
26429
26850
|
apiVersion: '',
|
|
26430
26851
|
},
|
|
26431
26852
|
options
|
|
@@ -26690,6 +27111,7 @@ export namespace discoveryengine_v1beta {
|
|
|
26690
27111
|
* // "rankingExpression": "my_rankingExpression",
|
|
26691
27112
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
26692
27113
|
* // "regionCode": "my_regionCode",
|
|
27114
|
+
* // "relevanceFilterSpec": {},
|
|
26693
27115
|
* // "relevanceScoreSpec": {},
|
|
26694
27116
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
26695
27117
|
* // "safeSearch": false,
|
|
@@ -26909,6 +27331,7 @@ export namespace discoveryengine_v1beta {
|
|
|
26909
27331
|
* // "rankingExpression": "my_rankingExpression",
|
|
26910
27332
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
26911
27333
|
* // "regionCode": "my_regionCode",
|
|
27334
|
+
* // "relevanceFilterSpec": {},
|
|
26912
27335
|
* // "relevanceScoreSpec": {},
|
|
26913
27336
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
26914
27337
|
* // "safeSearch": false,
|
|
@@ -27246,6 +27669,27 @@ export namespace discoveryengine_v1beta {
|
|
|
27246
27669
|
*/
|
|
27247
27670
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryRequest;
|
|
27248
27671
|
}
|
|
27672
|
+
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create extends StandardParameters {
|
|
27673
|
+
/**
|
|
27674
|
+
* Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
27675
|
+
*/
|
|
27676
|
+
parent?: string;
|
|
27677
|
+
/**
|
|
27678
|
+
* Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
27679
|
+
*/
|
|
27680
|
+
servingConfigId?: string;
|
|
27681
|
+
|
|
27682
|
+
/**
|
|
27683
|
+
* Request body metadata
|
|
27684
|
+
*/
|
|
27685
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaServingConfig;
|
|
27686
|
+
}
|
|
27687
|
+
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete extends StandardParameters {
|
|
27688
|
+
/**
|
|
27689
|
+
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
27690
|
+
*/
|
|
27691
|
+
name?: string;
|
|
27692
|
+
}
|
|
27249
27693
|
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get extends StandardParameters {
|
|
27250
27694
|
/**
|
|
27251
27695
|
* Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
@@ -38263,7 +38707,7 @@ export namespace discoveryengine_v1beta {
|
|
|
38263
38707
|
}
|
|
38264
38708
|
|
|
38265
38709
|
/**
|
|
38266
|
-
*
|
|
38710
|
+
* Creates a ServingConfig. Note: The Google Cloud console works only with the default serving config. Additional ServingConfigs can be created and managed only via the API. A maximum of 100 ServingConfigs are allowed in an Engine, otherwise a RESOURCE_EXHAUSTED error is returned.
|
|
38267
38711
|
* @example
|
|
38268
38712
|
* ```js
|
|
38269
38713
|
* // Before running the sample:
|
|
@@ -38296,10 +38740,42 @@ export namespace discoveryengine_v1beta {
|
|
|
38296
38740
|
*
|
|
38297
38741
|
* // Do the magic
|
|
38298
38742
|
* const res =
|
|
38299
|
-
* await discoveryengine.projects.locations.collections.engines.servingConfigs.
|
|
38743
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.create(
|
|
38300
38744
|
* {
|
|
38301
|
-
* // Required.
|
|
38302
|
-
*
|
|
38745
|
+
* // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
38746
|
+
* parent:
|
|
38747
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine',
|
|
38748
|
+
* // Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
38749
|
+
* servingConfigId: 'placeholder-value',
|
|
38750
|
+
*
|
|
38751
|
+
* // Request body metadata
|
|
38752
|
+
* requestBody: {
|
|
38753
|
+
* // request body parameters
|
|
38754
|
+
* // {
|
|
38755
|
+
* // "answerGenerationSpec": {},
|
|
38756
|
+
* // "boostControlIds": [],
|
|
38757
|
+
* // "createTime": "my_createTime",
|
|
38758
|
+
* // "displayName": "my_displayName",
|
|
38759
|
+
* // "dissociateControlIds": [],
|
|
38760
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
38761
|
+
* // "embeddingConfig": {},
|
|
38762
|
+
* // "filterControlIds": [],
|
|
38763
|
+
* // "genericConfig": {},
|
|
38764
|
+
* // "ignoreControlIds": [],
|
|
38765
|
+
* // "mediaConfig": {},
|
|
38766
|
+
* // "modelId": "my_modelId",
|
|
38767
|
+
* // "name": "my_name",
|
|
38768
|
+
* // "onewaySynonymsControlIds": [],
|
|
38769
|
+
* // "personalizationSpec": {},
|
|
38770
|
+
* // "promoteControlIds": [],
|
|
38771
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
38772
|
+
* // "redirectControlIds": [],
|
|
38773
|
+
* // "replacementControlIds": [],
|
|
38774
|
+
* // "solutionType": "my_solutionType",
|
|
38775
|
+
* // "synonymsControlIds": [],
|
|
38776
|
+
* // "updateTime": "my_updateTime"
|
|
38777
|
+
* // }
|
|
38778
|
+
* },
|
|
38303
38779
|
* },
|
|
38304
38780
|
* );
|
|
38305
38781
|
* console.log(res.data);
|
|
@@ -38343,38 +38819,38 @@ export namespace discoveryengine_v1beta {
|
|
|
38343
38819
|
* @param callback - Optional callback that handles the response.
|
|
38344
38820
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
38345
38821
|
*/
|
|
38346
|
-
|
|
38347
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38822
|
+
create(
|
|
38823
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
38348
38824
|
options: StreamMethodOptions
|
|
38349
38825
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
38350
|
-
|
|
38351
|
-
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38826
|
+
create(
|
|
38827
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
38352
38828
|
options?: MethodOptions
|
|
38353
38829
|
): Promise<
|
|
38354
38830
|
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38355
38831
|
>;
|
|
38356
|
-
|
|
38357
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38832
|
+
create(
|
|
38833
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
38358
38834
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
38359
38835
|
callback: BodyResponseCallback<Readable>
|
|
38360
38836
|
): void;
|
|
38361
|
-
|
|
38362
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38837
|
+
create(
|
|
38838
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
38363
38839
|
options:
|
|
38364
38840
|
| MethodOptions
|
|
38365
38841
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>,
|
|
38366
38842
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38367
38843
|
): void;
|
|
38368
|
-
|
|
38369
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38844
|
+
create(
|
|
38845
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
38370
38846
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38371
38847
|
): void;
|
|
38372
|
-
|
|
38848
|
+
create(
|
|
38373
38849
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38374
38850
|
): void;
|
|
38375
|
-
|
|
38851
|
+
create(
|
|
38376
38852
|
paramsOrCallback?:
|
|
38377
|
-
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38853
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create
|
|
38378
38854
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38379
38855
|
| BodyResponseCallback<Readable>,
|
|
38380
38856
|
optionsOrCallback?:
|
|
@@ -38392,13 +38868,13 @@ export namespace discoveryengine_v1beta {
|
|
|
38392
38868
|
>
|
|
38393
38869
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
38394
38870
|
let params = (paramsOrCallback ||
|
|
38395
|
-
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38871
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create;
|
|
38396
38872
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
38397
38873
|
|
|
38398
38874
|
if (typeof paramsOrCallback === 'function') {
|
|
38399
38875
|
callback = paramsOrCallback;
|
|
38400
38876
|
params =
|
|
38401
|
-
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38877
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create;
|
|
38402
38878
|
options = {};
|
|
38403
38879
|
}
|
|
38404
38880
|
|
|
@@ -38412,15 +38888,18 @@ export namespace discoveryengine_v1beta {
|
|
|
38412
38888
|
const parameters = {
|
|
38413
38889
|
options: Object.assign(
|
|
38414
38890
|
{
|
|
38415
|
-
url: (rootUrl + '/v1beta/{+
|
|
38416
|
-
|
|
38891
|
+
url: (rootUrl + '/v1beta/{+parent}/servingConfigs').replace(
|
|
38892
|
+
/([^:]\/)\/+/g,
|
|
38893
|
+
'$1'
|
|
38894
|
+
),
|
|
38895
|
+
method: 'POST',
|
|
38417
38896
|
apiVersion: '',
|
|
38418
38897
|
},
|
|
38419
38898
|
options
|
|
38420
38899
|
),
|
|
38421
38900
|
params,
|
|
38422
|
-
requiredParams: ['
|
|
38423
|
-
pathParams: ['
|
|
38901
|
+
requiredParams: ['parent'],
|
|
38902
|
+
pathParams: ['parent'],
|
|
38424
38903
|
context: this.context,
|
|
38425
38904
|
};
|
|
38426
38905
|
if (callback) {
|
|
@@ -38436,7 +38915,7 @@ export namespace discoveryengine_v1beta {
|
|
|
38436
38915
|
}
|
|
38437
38916
|
|
|
38438
38917
|
/**
|
|
38439
|
-
*
|
|
38918
|
+
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
38440
38919
|
* @example
|
|
38441
38920
|
* ```js
|
|
38442
38921
|
* // Before running the sample:
|
|
@@ -38469,23 +38948,178 @@ export namespace discoveryengine_v1beta {
|
|
|
38469
38948
|
*
|
|
38470
38949
|
* // Do the magic
|
|
38471
38950
|
* const res =
|
|
38472
|
-
* await discoveryengine.projects.locations.collections.engines.servingConfigs.
|
|
38951
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.delete(
|
|
38473
38952
|
* {
|
|
38474
|
-
* //
|
|
38475
|
-
*
|
|
38476
|
-
*
|
|
38477
|
-
*
|
|
38478
|
-
*
|
|
38479
|
-
*
|
|
38480
|
-
*
|
|
38953
|
+
* // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
38954
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/servingConfigs/my-servingConfig',
|
|
38955
|
+
* },
|
|
38956
|
+
* );
|
|
38957
|
+
* console.log(res.data);
|
|
38958
|
+
*
|
|
38959
|
+
* // Example response
|
|
38960
|
+
* // {}
|
|
38961
|
+
* }
|
|
38962
|
+
*
|
|
38963
|
+
* main().catch(e => {
|
|
38964
|
+
* console.error(e);
|
|
38965
|
+
* throw e;
|
|
38966
|
+
* });
|
|
38967
|
+
*
|
|
38968
|
+
* ```
|
|
38969
|
+
*
|
|
38970
|
+
* @param params - Parameters for request
|
|
38971
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
38972
|
+
* @param callback - Optional callback that handles the response.
|
|
38973
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
38974
|
+
*/
|
|
38975
|
+
delete(
|
|
38976
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
38977
|
+
options: StreamMethodOptions
|
|
38978
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
38979
|
+
delete(
|
|
38980
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
38981
|
+
options?: MethodOptions
|
|
38982
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
38983
|
+
delete(
|
|
38984
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
38985
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
38986
|
+
callback: BodyResponseCallback<Readable>
|
|
38987
|
+
): void;
|
|
38988
|
+
delete(
|
|
38989
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
38990
|
+
options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
|
|
38991
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
38992
|
+
): void;
|
|
38993
|
+
delete(
|
|
38994
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
38995
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
38996
|
+
): void;
|
|
38997
|
+
delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
38998
|
+
delete(
|
|
38999
|
+
paramsOrCallback?:
|
|
39000
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete
|
|
39001
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
39002
|
+
| BodyResponseCallback<Readable>,
|
|
39003
|
+
optionsOrCallback?:
|
|
39004
|
+
| MethodOptions
|
|
39005
|
+
| StreamMethodOptions
|
|
39006
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
39007
|
+
| BodyResponseCallback<Readable>,
|
|
39008
|
+
callback?:
|
|
39009
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
39010
|
+
| BodyResponseCallback<Readable>
|
|
39011
|
+
):
|
|
39012
|
+
| void
|
|
39013
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
|
|
39014
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
39015
|
+
let params = (paramsOrCallback ||
|
|
39016
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete;
|
|
39017
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
39018
|
+
|
|
39019
|
+
if (typeof paramsOrCallback === 'function') {
|
|
39020
|
+
callback = paramsOrCallback;
|
|
39021
|
+
params =
|
|
39022
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete;
|
|
39023
|
+
options = {};
|
|
39024
|
+
}
|
|
39025
|
+
|
|
39026
|
+
if (typeof optionsOrCallback === 'function') {
|
|
39027
|
+
callback = optionsOrCallback;
|
|
39028
|
+
options = {};
|
|
39029
|
+
}
|
|
39030
|
+
|
|
39031
|
+
const rootUrl =
|
|
39032
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
39033
|
+
const parameters = {
|
|
39034
|
+
options: Object.assign(
|
|
39035
|
+
{
|
|
39036
|
+
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
39037
|
+
method: 'DELETE',
|
|
39038
|
+
apiVersion: '',
|
|
39039
|
+
},
|
|
39040
|
+
options
|
|
39041
|
+
),
|
|
39042
|
+
params,
|
|
39043
|
+
requiredParams: ['name'],
|
|
39044
|
+
pathParams: ['name'],
|
|
39045
|
+
context: this.context,
|
|
39046
|
+
};
|
|
39047
|
+
if (callback) {
|
|
39048
|
+
createAPIRequest<Schema$GoogleProtobufEmpty>(
|
|
39049
|
+
parameters,
|
|
39050
|
+
callback as BodyResponseCallback<unknown>
|
|
39051
|
+
);
|
|
39052
|
+
} else {
|
|
39053
|
+
return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
|
|
39054
|
+
}
|
|
39055
|
+
}
|
|
39056
|
+
|
|
39057
|
+
/**
|
|
39058
|
+
* Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.
|
|
39059
|
+
* @example
|
|
39060
|
+
* ```js
|
|
39061
|
+
* // Before running the sample:
|
|
39062
|
+
* // - Enable the API at:
|
|
39063
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
39064
|
+
* // - Login into gcloud by running:
|
|
39065
|
+
* // ```sh
|
|
39066
|
+
* // $ gcloud auth application-default login
|
|
39067
|
+
* // ```
|
|
39068
|
+
* // - Install the npm module by running:
|
|
39069
|
+
* // ```sh
|
|
39070
|
+
* // $ npm install googleapis
|
|
39071
|
+
* // ```
|
|
39072
|
+
*
|
|
39073
|
+
* const {google} = require('googleapis');
|
|
39074
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
39075
|
+
*
|
|
39076
|
+
* async function main() {
|
|
39077
|
+
* const auth = new google.auth.GoogleAuth({
|
|
39078
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
39079
|
+
* scopes: [
|
|
39080
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
39081
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
39082
|
+
* ],
|
|
39083
|
+
* });
|
|
39084
|
+
*
|
|
39085
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
39086
|
+
* const authClient = await auth.getClient();
|
|
39087
|
+
* google.options({auth: authClient});
|
|
39088
|
+
*
|
|
39089
|
+
* // Do the magic
|
|
39090
|
+
* const res =
|
|
39091
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.get(
|
|
39092
|
+
* {
|
|
39093
|
+
* // Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
39094
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/servingConfigs/my-servingConfig',
|
|
38481
39095
|
* },
|
|
38482
39096
|
* );
|
|
38483
39097
|
* console.log(res.data);
|
|
38484
39098
|
*
|
|
38485
39099
|
* // Example response
|
|
38486
39100
|
* // {
|
|
38487
|
-
* // "
|
|
38488
|
-
* // "
|
|
39101
|
+
* // "answerGenerationSpec": {},
|
|
39102
|
+
* // "boostControlIds": [],
|
|
39103
|
+
* // "createTime": "my_createTime",
|
|
39104
|
+
* // "displayName": "my_displayName",
|
|
39105
|
+
* // "dissociateControlIds": [],
|
|
39106
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
39107
|
+
* // "embeddingConfig": {},
|
|
39108
|
+
* // "filterControlIds": [],
|
|
39109
|
+
* // "genericConfig": {},
|
|
39110
|
+
* // "ignoreControlIds": [],
|
|
39111
|
+
* // "mediaConfig": {},
|
|
39112
|
+
* // "modelId": "my_modelId",
|
|
39113
|
+
* // "name": "my_name",
|
|
39114
|
+
* // "onewaySynonymsControlIds": [],
|
|
39115
|
+
* // "personalizationSpec": {},
|
|
39116
|
+
* // "promoteControlIds": [],
|
|
39117
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
39118
|
+
* // "redirectControlIds": [],
|
|
39119
|
+
* // "replacementControlIds": [],
|
|
39120
|
+
* // "solutionType": "my_solutionType",
|
|
39121
|
+
* // "synonymsControlIds": [],
|
|
39122
|
+
* // "updateTime": "my_updateTime"
|
|
38489
39123
|
* // }
|
|
38490
39124
|
* }
|
|
38491
39125
|
*
|
|
@@ -38501,62 +39135,62 @@ export namespace discoveryengine_v1beta {
|
|
|
38501
39135
|
* @param callback - Optional callback that handles the response.
|
|
38502
39136
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
38503
39137
|
*/
|
|
38504
|
-
|
|
38505
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
39138
|
+
get(
|
|
39139
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get,
|
|
38506
39140
|
options: StreamMethodOptions
|
|
38507
39141
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
38508
|
-
|
|
38509
|
-
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
39142
|
+
get(
|
|
39143
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get,
|
|
38510
39144
|
options?: MethodOptions
|
|
38511
39145
|
): Promise<
|
|
38512
|
-
GaxiosResponseWithHTTP2<Schema$
|
|
39146
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38513
39147
|
>;
|
|
38514
|
-
|
|
38515
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
39148
|
+
get(
|
|
39149
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get,
|
|
38516
39150
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
38517
39151
|
callback: BodyResponseCallback<Readable>
|
|
38518
39152
|
): void;
|
|
38519
|
-
|
|
38520
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
39153
|
+
get(
|
|
39154
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get,
|
|
38521
39155
|
options:
|
|
38522
39156
|
| MethodOptions
|
|
38523
|
-
| BodyResponseCallback<Schema$
|
|
38524
|
-
callback: BodyResponseCallback<Schema$
|
|
39157
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>,
|
|
39158
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38525
39159
|
): void;
|
|
38526
|
-
|
|
38527
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38528
|
-
callback: BodyResponseCallback<Schema$
|
|
39160
|
+
get(
|
|
39161
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get,
|
|
39162
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38529
39163
|
): void;
|
|
38530
|
-
|
|
38531
|
-
callback: BodyResponseCallback<Schema$
|
|
39164
|
+
get(
|
|
39165
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38532
39166
|
): void;
|
|
38533
|
-
|
|
39167
|
+
get(
|
|
38534
39168
|
paramsOrCallback?:
|
|
38535
|
-
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
38536
|
-
| BodyResponseCallback<Schema$
|
|
39169
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get
|
|
39170
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38537
39171
|
| BodyResponseCallback<Readable>,
|
|
38538
39172
|
optionsOrCallback?:
|
|
38539
39173
|
| MethodOptions
|
|
38540
39174
|
| StreamMethodOptions
|
|
38541
|
-
| BodyResponseCallback<Schema$
|
|
39175
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38542
39176
|
| BodyResponseCallback<Readable>,
|
|
38543
39177
|
callback?:
|
|
38544
|
-
| BodyResponseCallback<Schema$
|
|
39178
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38545
39179
|
| BodyResponseCallback<Readable>
|
|
38546
39180
|
):
|
|
38547
39181
|
| void
|
|
38548
39182
|
| Promise<
|
|
38549
|
-
GaxiosResponseWithHTTP2<Schema$
|
|
39183
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
38550
39184
|
>
|
|
38551
39185
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
38552
39186
|
let params = (paramsOrCallback ||
|
|
38553
|
-
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
39187
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get;
|
|
38554
39188
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
38555
39189
|
|
|
38556
39190
|
if (typeof paramsOrCallback === 'function') {
|
|
38557
39191
|
callback = paramsOrCallback;
|
|
38558
39192
|
params =
|
|
38559
|
-
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
39193
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get;
|
|
38560
39194
|
options = {};
|
|
38561
39195
|
}
|
|
38562
39196
|
|
|
@@ -38570,34 +39204,192 @@ export namespace discoveryengine_v1beta {
|
|
|
38570
39204
|
const parameters = {
|
|
38571
39205
|
options: Object.assign(
|
|
38572
39206
|
{
|
|
38573
|
-
url: (rootUrl + '/v1beta/{+
|
|
38574
|
-
/([^:]\/)\/+/g,
|
|
38575
|
-
'$1'
|
|
38576
|
-
),
|
|
39207
|
+
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
38577
39208
|
method: 'GET',
|
|
38578
39209
|
apiVersion: '',
|
|
38579
39210
|
},
|
|
38580
39211
|
options
|
|
38581
39212
|
),
|
|
38582
39213
|
params,
|
|
38583
|
-
requiredParams: ['
|
|
38584
|
-
pathParams: ['
|
|
39214
|
+
requiredParams: ['name'],
|
|
39215
|
+
pathParams: ['name'],
|
|
38585
39216
|
context: this.context,
|
|
38586
39217
|
};
|
|
38587
39218
|
if (callback) {
|
|
38588
|
-
createAPIRequest<Schema$
|
|
39219
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>(
|
|
38589
39220
|
parameters,
|
|
38590
39221
|
callback as BodyResponseCallback<unknown>
|
|
38591
39222
|
);
|
|
38592
39223
|
} else {
|
|
38593
|
-
return createAPIRequest<Schema$
|
|
39224
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>(
|
|
38594
39225
|
parameters
|
|
38595
39226
|
);
|
|
38596
39227
|
}
|
|
38597
39228
|
}
|
|
38598
39229
|
|
|
38599
39230
|
/**
|
|
38600
|
-
*
|
|
39231
|
+
* Lists all ServingConfigs linked to this dataStore.
|
|
39232
|
+
* @example
|
|
39233
|
+
* ```js
|
|
39234
|
+
* // Before running the sample:
|
|
39235
|
+
* // - Enable the API at:
|
|
39236
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
39237
|
+
* // - Login into gcloud by running:
|
|
39238
|
+
* // ```sh
|
|
39239
|
+
* // $ gcloud auth application-default login
|
|
39240
|
+
* // ```
|
|
39241
|
+
* // - Install the npm module by running:
|
|
39242
|
+
* // ```sh
|
|
39243
|
+
* // $ npm install googleapis
|
|
39244
|
+
* // ```
|
|
39245
|
+
*
|
|
39246
|
+
* const {google} = require('googleapis');
|
|
39247
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
39248
|
+
*
|
|
39249
|
+
* async function main() {
|
|
39250
|
+
* const auth = new google.auth.GoogleAuth({
|
|
39251
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
39252
|
+
* scopes: [
|
|
39253
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
39254
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
39255
|
+
* ],
|
|
39256
|
+
* });
|
|
39257
|
+
*
|
|
39258
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
39259
|
+
* const authClient = await auth.getClient();
|
|
39260
|
+
* google.options({auth: authClient});
|
|
39261
|
+
*
|
|
39262
|
+
* // Do the magic
|
|
39263
|
+
* const res =
|
|
39264
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.list(
|
|
39265
|
+
* {
|
|
39266
|
+
* // 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.
|
|
39267
|
+
* pageSize: 'placeholder-value',
|
|
39268
|
+
* // Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.
|
|
39269
|
+
* pageToken: 'placeholder-value',
|
|
39270
|
+
* // Required. Full resource name of the parent resource. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
39271
|
+
* parent:
|
|
39272
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine',
|
|
39273
|
+
* },
|
|
39274
|
+
* );
|
|
39275
|
+
* console.log(res.data);
|
|
39276
|
+
*
|
|
39277
|
+
* // Example response
|
|
39278
|
+
* // {
|
|
39279
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
39280
|
+
* // "servingConfigs": []
|
|
39281
|
+
* // }
|
|
39282
|
+
* }
|
|
39283
|
+
*
|
|
39284
|
+
* main().catch(e => {
|
|
39285
|
+
* console.error(e);
|
|
39286
|
+
* throw e;
|
|
39287
|
+
* });
|
|
39288
|
+
*
|
|
39289
|
+
* ```
|
|
39290
|
+
*
|
|
39291
|
+
* @param params - Parameters for request
|
|
39292
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
39293
|
+
* @param callback - Optional callback that handles the response.
|
|
39294
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
39295
|
+
*/
|
|
39296
|
+
list(
|
|
39297
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$List,
|
|
39298
|
+
options: StreamMethodOptions
|
|
39299
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
39300
|
+
list(
|
|
39301
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$List,
|
|
39302
|
+
options?: MethodOptions
|
|
39303
|
+
): Promise<
|
|
39304
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
39305
|
+
>;
|
|
39306
|
+
list(
|
|
39307
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$List,
|
|
39308
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
39309
|
+
callback: BodyResponseCallback<Readable>
|
|
39310
|
+
): void;
|
|
39311
|
+
list(
|
|
39312
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$List,
|
|
39313
|
+
options:
|
|
39314
|
+
| MethodOptions
|
|
39315
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>,
|
|
39316
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
39317
|
+
): void;
|
|
39318
|
+
list(
|
|
39319
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$List,
|
|
39320
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
39321
|
+
): void;
|
|
39322
|
+
list(
|
|
39323
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
39324
|
+
): void;
|
|
39325
|
+
list(
|
|
39326
|
+
paramsOrCallback?:
|
|
39327
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$List
|
|
39328
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
39329
|
+
| BodyResponseCallback<Readable>,
|
|
39330
|
+
optionsOrCallback?:
|
|
39331
|
+
| MethodOptions
|
|
39332
|
+
| StreamMethodOptions
|
|
39333
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
39334
|
+
| BodyResponseCallback<Readable>,
|
|
39335
|
+
callback?:
|
|
39336
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
39337
|
+
| BodyResponseCallback<Readable>
|
|
39338
|
+
):
|
|
39339
|
+
| void
|
|
39340
|
+
| Promise<
|
|
39341
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>
|
|
39342
|
+
>
|
|
39343
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
39344
|
+
let params = (paramsOrCallback ||
|
|
39345
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$List;
|
|
39346
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
39347
|
+
|
|
39348
|
+
if (typeof paramsOrCallback === 'function') {
|
|
39349
|
+
callback = paramsOrCallback;
|
|
39350
|
+
params =
|
|
39351
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$List;
|
|
39352
|
+
options = {};
|
|
39353
|
+
}
|
|
39354
|
+
|
|
39355
|
+
if (typeof optionsOrCallback === 'function') {
|
|
39356
|
+
callback = optionsOrCallback;
|
|
39357
|
+
options = {};
|
|
39358
|
+
}
|
|
39359
|
+
|
|
39360
|
+
const rootUrl =
|
|
39361
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
39362
|
+
const parameters = {
|
|
39363
|
+
options: Object.assign(
|
|
39364
|
+
{
|
|
39365
|
+
url: (rootUrl + '/v1beta/{+parent}/servingConfigs').replace(
|
|
39366
|
+
/([^:]\/)\/+/g,
|
|
39367
|
+
'$1'
|
|
39368
|
+
),
|
|
39369
|
+
method: 'GET',
|
|
39370
|
+
apiVersion: '',
|
|
39371
|
+
},
|
|
39372
|
+
options
|
|
39373
|
+
),
|
|
39374
|
+
params,
|
|
39375
|
+
requiredParams: ['parent'],
|
|
39376
|
+
pathParams: ['parent'],
|
|
39377
|
+
context: this.context,
|
|
39378
|
+
};
|
|
39379
|
+
if (callback) {
|
|
39380
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>(
|
|
39381
|
+
parameters,
|
|
39382
|
+
callback as BodyResponseCallback<unknown>
|
|
39383
|
+
);
|
|
39384
|
+
} else {
|
|
39385
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaListServingConfigsResponse>(
|
|
39386
|
+
parameters
|
|
39387
|
+
);
|
|
39388
|
+
}
|
|
39389
|
+
}
|
|
39390
|
+
|
|
39391
|
+
/**
|
|
39392
|
+
* Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
38601
39393
|
* @example
|
|
38602
39394
|
* ```js
|
|
38603
39395
|
* // Before running the sample:
|
|
@@ -39043,6 +39835,7 @@ export namespace discoveryengine_v1beta {
|
|
|
39043
39835
|
* // "rankingExpression": "my_rankingExpression",
|
|
39044
39836
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
39045
39837
|
* // "regionCode": "my_regionCode",
|
|
39838
|
+
* // "relevanceFilterSpec": {},
|
|
39046
39839
|
* // "relevanceScoreSpec": {},
|
|
39047
39840
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
39048
39841
|
* // "safeSearch": false,
|
|
@@ -39262,6 +40055,7 @@ export namespace discoveryengine_v1beta {
|
|
|
39262
40055
|
* // "rankingExpression": "my_rankingExpression",
|
|
39263
40056
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
39264
40057
|
* // "regionCode": "my_regionCode",
|
|
40058
|
+
* // "relevanceFilterSpec": {},
|
|
39265
40059
|
* // "relevanceScoreSpec": {},
|
|
39266
40060
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
39267
40061
|
* // "safeSearch": false,
|
|
@@ -39599,6 +40393,27 @@ export namespace discoveryengine_v1beta {
|
|
|
39599
40393
|
*/
|
|
39600
40394
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryRequest;
|
|
39601
40395
|
}
|
|
40396
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create extends StandardParameters {
|
|
40397
|
+
/**
|
|
40398
|
+
* Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
40399
|
+
*/
|
|
40400
|
+
parent?: string;
|
|
40401
|
+
/**
|
|
40402
|
+
* Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
40403
|
+
*/
|
|
40404
|
+
servingConfigId?: string;
|
|
40405
|
+
|
|
40406
|
+
/**
|
|
40407
|
+
* Request body metadata
|
|
40408
|
+
*/
|
|
40409
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaServingConfig;
|
|
40410
|
+
}
|
|
40411
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete extends StandardParameters {
|
|
40412
|
+
/**
|
|
40413
|
+
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
40414
|
+
*/
|
|
40415
|
+
name?: string;
|
|
40416
|
+
}
|
|
39602
40417
|
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get extends StandardParameters {
|
|
39603
40418
|
/**
|
|
39604
40419
|
* Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
@@ -48275,33 +49090,469 @@ export namespace discoveryengine_v1beta {
|
|
|
48275
49090
|
* google.options({auth: authClient});
|
|
48276
49091
|
*
|
|
48277
49092
|
* // Do the magic
|
|
48278
|
-
* const res = await discoveryengine.projects.locations.dataStores.schemas.patch(
|
|
48279
|
-
* {
|
|
48280
|
-
* // If set to true, and the Schema is not found, a new Schema is created. In this situation, `update_mask` is ignored.
|
|
48281
|
-
* allowMissing: 'placeholder-value',
|
|
48282
|
-
* // 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.
|
|
48283
|
-
* name: 'projects/my-project/locations/my-location/dataStores/my-dataStore/schemas/my-schema',
|
|
49093
|
+
* const res = await discoveryengine.projects.locations.dataStores.schemas.patch(
|
|
49094
|
+
* {
|
|
49095
|
+
* // If set to true, and the Schema is not found, a new Schema is created. In this situation, `update_mask` is ignored.
|
|
49096
|
+
* allowMissing: 'placeholder-value',
|
|
49097
|
+
* // 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.
|
|
49098
|
+
* name: 'projects/my-project/locations/my-location/dataStores/my-dataStore/schemas/my-schema',
|
|
49099
|
+
*
|
|
49100
|
+
* // Request body metadata
|
|
49101
|
+
* requestBody: {
|
|
49102
|
+
* // request body parameters
|
|
49103
|
+
* // {
|
|
49104
|
+
* // "jsonSchema": "my_jsonSchema",
|
|
49105
|
+
* // "name": "my_name",
|
|
49106
|
+
* // "structSchema": {}
|
|
49107
|
+
* // }
|
|
49108
|
+
* },
|
|
49109
|
+
* },
|
|
49110
|
+
* );
|
|
49111
|
+
* console.log(res.data);
|
|
49112
|
+
*
|
|
49113
|
+
* // Example response
|
|
49114
|
+
* // {
|
|
49115
|
+
* // "done": false,
|
|
49116
|
+
* // "error": {},
|
|
49117
|
+
* // "metadata": {},
|
|
49118
|
+
* // "name": "my_name",
|
|
49119
|
+
* // "response": {}
|
|
49120
|
+
* // }
|
|
49121
|
+
* }
|
|
49122
|
+
*
|
|
49123
|
+
* main().catch(e => {
|
|
49124
|
+
* console.error(e);
|
|
49125
|
+
* throw e;
|
|
49126
|
+
* });
|
|
49127
|
+
*
|
|
49128
|
+
* ```
|
|
49129
|
+
*
|
|
49130
|
+
* @param params - Parameters for request
|
|
49131
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
49132
|
+
* @param callback - Optional callback that handles the response.
|
|
49133
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
49134
|
+
*/
|
|
49135
|
+
patch(
|
|
49136
|
+
params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
|
|
49137
|
+
options: StreamMethodOptions
|
|
49138
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
49139
|
+
patch(
|
|
49140
|
+
params?: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
|
|
49141
|
+
options?: MethodOptions
|
|
49142
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleLongrunningOperation>>;
|
|
49143
|
+
patch(
|
|
49144
|
+
params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
|
|
49145
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
49146
|
+
callback: BodyResponseCallback<Readable>
|
|
49147
|
+
): void;
|
|
49148
|
+
patch(
|
|
49149
|
+
params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
|
|
49150
|
+
options:
|
|
49151
|
+
| MethodOptions
|
|
49152
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>,
|
|
49153
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
49154
|
+
): void;
|
|
49155
|
+
patch(
|
|
49156
|
+
params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
|
|
49157
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
49158
|
+
): void;
|
|
49159
|
+
patch(
|
|
49160
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
49161
|
+
): void;
|
|
49162
|
+
patch(
|
|
49163
|
+
paramsOrCallback?:
|
|
49164
|
+
| Params$Resource$Projects$Locations$Datastores$Schemas$Patch
|
|
49165
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
49166
|
+
| BodyResponseCallback<Readable>,
|
|
49167
|
+
optionsOrCallback?:
|
|
49168
|
+
| MethodOptions
|
|
49169
|
+
| StreamMethodOptions
|
|
49170
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
49171
|
+
| BodyResponseCallback<Readable>,
|
|
49172
|
+
callback?:
|
|
49173
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
49174
|
+
| BodyResponseCallback<Readable>
|
|
49175
|
+
):
|
|
49176
|
+
| void
|
|
49177
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleLongrunningOperation>>
|
|
49178
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
49179
|
+
let params = (paramsOrCallback ||
|
|
49180
|
+
{}) as Params$Resource$Projects$Locations$Datastores$Schemas$Patch;
|
|
49181
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
49182
|
+
|
|
49183
|
+
if (typeof paramsOrCallback === 'function') {
|
|
49184
|
+
callback = paramsOrCallback;
|
|
49185
|
+
params =
|
|
49186
|
+
{} as Params$Resource$Projects$Locations$Datastores$Schemas$Patch;
|
|
49187
|
+
options = {};
|
|
49188
|
+
}
|
|
49189
|
+
|
|
49190
|
+
if (typeof optionsOrCallback === 'function') {
|
|
49191
|
+
callback = optionsOrCallback;
|
|
49192
|
+
options = {};
|
|
49193
|
+
}
|
|
49194
|
+
|
|
49195
|
+
const rootUrl =
|
|
49196
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
49197
|
+
const parameters = {
|
|
49198
|
+
options: Object.assign(
|
|
49199
|
+
{
|
|
49200
|
+
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
49201
|
+
method: 'PATCH',
|
|
49202
|
+
apiVersion: '',
|
|
49203
|
+
},
|
|
49204
|
+
options
|
|
49205
|
+
),
|
|
49206
|
+
params,
|
|
49207
|
+
requiredParams: ['name'],
|
|
49208
|
+
pathParams: ['name'],
|
|
49209
|
+
context: this.context,
|
|
49210
|
+
};
|
|
49211
|
+
if (callback) {
|
|
49212
|
+
createAPIRequest<Schema$GoogleLongrunningOperation>(
|
|
49213
|
+
parameters,
|
|
49214
|
+
callback as BodyResponseCallback<unknown>
|
|
49215
|
+
);
|
|
49216
|
+
} else {
|
|
49217
|
+
return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
|
|
49218
|
+
}
|
|
49219
|
+
}
|
|
49220
|
+
}
|
|
49221
|
+
|
|
49222
|
+
export interface Params$Resource$Projects$Locations$Datastores$Schemas$Create extends StandardParameters {
|
|
49223
|
+
/**
|
|
49224
|
+
* Required. The parent data store resource name, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}`.
|
|
49225
|
+
*/
|
|
49226
|
+
parent?: string;
|
|
49227
|
+
/**
|
|
49228
|
+
* Required. The ID to use for the Schema, which becomes the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.
|
|
49229
|
+
*/
|
|
49230
|
+
schemaId?: string;
|
|
49231
|
+
|
|
49232
|
+
/**
|
|
49233
|
+
* Request body metadata
|
|
49234
|
+
*/
|
|
49235
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaSchema;
|
|
49236
|
+
}
|
|
49237
|
+
export interface Params$Resource$Projects$Locations$Datastores$Schemas$Delete extends StandardParameters {
|
|
49238
|
+
/**
|
|
49239
|
+
* Required. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`.
|
|
49240
|
+
*/
|
|
49241
|
+
name?: string;
|
|
49242
|
+
}
|
|
49243
|
+
export interface Params$Resource$Projects$Locations$Datastores$Schemas$Get extends StandardParameters {
|
|
49244
|
+
/**
|
|
49245
|
+
* Required. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`.
|
|
49246
|
+
*/
|
|
49247
|
+
name?: string;
|
|
49248
|
+
}
|
|
49249
|
+
export interface Params$Resource$Projects$Locations$Datastores$Schemas$List extends StandardParameters {
|
|
49250
|
+
/**
|
|
49251
|
+
* The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas are returned. The maximum value is 1000; values above 1000 are set to 1000.
|
|
49252
|
+
*/
|
|
49253
|
+
pageSize?: number;
|
|
49254
|
+
/**
|
|
49255
|
+
* 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.
|
|
49256
|
+
*/
|
|
49257
|
+
pageToken?: string;
|
|
49258
|
+
/**
|
|
49259
|
+
* Required. The parent data store resource name, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}`.
|
|
49260
|
+
*/
|
|
49261
|
+
parent?: string;
|
|
49262
|
+
}
|
|
49263
|
+
export interface Params$Resource$Projects$Locations$Datastores$Schemas$Patch extends StandardParameters {
|
|
49264
|
+
/**
|
|
49265
|
+
* If set to true, and the Schema is not found, a new Schema is created. In this situation, `update_mask` is ignored.
|
|
49266
|
+
*/
|
|
49267
|
+
allowMissing?: boolean;
|
|
49268
|
+
/**
|
|
49269
|
+
* 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.
|
|
49270
|
+
*/
|
|
49271
|
+
name?: string;
|
|
49272
|
+
|
|
49273
|
+
/**
|
|
49274
|
+
* Request body metadata
|
|
49275
|
+
*/
|
|
49276
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaSchema;
|
|
49277
|
+
}
|
|
49278
|
+
|
|
49279
|
+
export class Resource$Projects$Locations$Datastores$Servingconfigs {
|
|
49280
|
+
context: APIRequestContext;
|
|
49281
|
+
constructor(context: APIRequestContext) {
|
|
49282
|
+
this.context = context;
|
|
49283
|
+
}
|
|
49284
|
+
|
|
49285
|
+
/**
|
|
49286
|
+
* Answer query method.
|
|
49287
|
+
* @example
|
|
49288
|
+
* ```js
|
|
49289
|
+
* // Before running the sample:
|
|
49290
|
+
* // - Enable the API at:
|
|
49291
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
49292
|
+
* // - Login into gcloud by running:
|
|
49293
|
+
* // ```sh
|
|
49294
|
+
* // $ gcloud auth application-default login
|
|
49295
|
+
* // ```
|
|
49296
|
+
* // - Install the npm module by running:
|
|
49297
|
+
* // ```sh
|
|
49298
|
+
* // $ npm install googleapis
|
|
49299
|
+
* // ```
|
|
49300
|
+
*
|
|
49301
|
+
* const {google} = require('googleapis');
|
|
49302
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
49303
|
+
*
|
|
49304
|
+
* async function main() {
|
|
49305
|
+
* const auth = new google.auth.GoogleAuth({
|
|
49306
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
49307
|
+
* scopes: [
|
|
49308
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
49309
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
49310
|
+
* ],
|
|
49311
|
+
* });
|
|
49312
|
+
*
|
|
49313
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
49314
|
+
* const authClient = await auth.getClient();
|
|
49315
|
+
* google.options({auth: authClient});
|
|
49316
|
+
*
|
|
49317
|
+
* // Do the magic
|
|
49318
|
+
* const res =
|
|
49319
|
+
* await discoveryengine.projects.locations.dataStores.servingConfigs.answer({
|
|
49320
|
+
* // Required. The resource name of the Search serving config, such as `projects/x/locations/global/collections/default_collection/engines/x/servingConfigs/default_serving_config`, or `projects/x/locations/global/collections/default_collection/dataStores/x/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.
|
|
49321
|
+
* servingConfig:
|
|
49322
|
+
* 'projects/my-project/locations/my-location/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
49323
|
+
*
|
|
49324
|
+
* // Request body metadata
|
|
49325
|
+
* requestBody: {
|
|
49326
|
+
* // request body parameters
|
|
49327
|
+
* // {
|
|
49328
|
+
* // "answerGenerationSpec": {},
|
|
49329
|
+
* // "asynchronousMode": false,
|
|
49330
|
+
* // "endUserSpec": {},
|
|
49331
|
+
* // "groundingSpec": {},
|
|
49332
|
+
* // "query": {},
|
|
49333
|
+
* // "queryUnderstandingSpec": {},
|
|
49334
|
+
* // "relatedQuestionsSpec": {},
|
|
49335
|
+
* // "safetySpec": {},
|
|
49336
|
+
* // "searchSpec": {},
|
|
49337
|
+
* // "session": "my_session",
|
|
49338
|
+
* // "userLabels": {},
|
|
49339
|
+
* // "userPseudoId": "my_userPseudoId"
|
|
49340
|
+
* // }
|
|
49341
|
+
* },
|
|
49342
|
+
* });
|
|
49343
|
+
* console.log(res.data);
|
|
49344
|
+
*
|
|
49345
|
+
* // Example response
|
|
49346
|
+
* // {
|
|
49347
|
+
* // "answer": {},
|
|
49348
|
+
* // "answerQueryToken": "my_answerQueryToken",
|
|
49349
|
+
* // "session": {}
|
|
49350
|
+
* // }
|
|
49351
|
+
* }
|
|
49352
|
+
*
|
|
49353
|
+
* main().catch(e => {
|
|
49354
|
+
* console.error(e);
|
|
49355
|
+
* throw e;
|
|
49356
|
+
* });
|
|
49357
|
+
*
|
|
49358
|
+
* ```
|
|
49359
|
+
*
|
|
49360
|
+
* @param params - Parameters for request
|
|
49361
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
49362
|
+
* @param callback - Optional callback that handles the response.
|
|
49363
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
49364
|
+
*/
|
|
49365
|
+
answer(
|
|
49366
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
49367
|
+
options: StreamMethodOptions
|
|
49368
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
49369
|
+
answer(
|
|
49370
|
+
params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
49371
|
+
options?: MethodOptions
|
|
49372
|
+
): Promise<
|
|
49373
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
49374
|
+
>;
|
|
49375
|
+
answer(
|
|
49376
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
49377
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
49378
|
+
callback: BodyResponseCallback<Readable>
|
|
49379
|
+
): void;
|
|
49380
|
+
answer(
|
|
49381
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
49382
|
+
options:
|
|
49383
|
+
| MethodOptions
|
|
49384
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>,
|
|
49385
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
49386
|
+
): void;
|
|
49387
|
+
answer(
|
|
49388
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
49389
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
49390
|
+
): void;
|
|
49391
|
+
answer(
|
|
49392
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
49393
|
+
): void;
|
|
49394
|
+
answer(
|
|
49395
|
+
paramsOrCallback?:
|
|
49396
|
+
| Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer
|
|
49397
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
49398
|
+
| BodyResponseCallback<Readable>,
|
|
49399
|
+
optionsOrCallback?:
|
|
49400
|
+
| MethodOptions
|
|
49401
|
+
| StreamMethodOptions
|
|
49402
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
49403
|
+
| BodyResponseCallback<Readable>,
|
|
49404
|
+
callback?:
|
|
49405
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
49406
|
+
| BodyResponseCallback<Readable>
|
|
49407
|
+
):
|
|
49408
|
+
| void
|
|
49409
|
+
| Promise<
|
|
49410
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
49411
|
+
>
|
|
49412
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
49413
|
+
let params = (paramsOrCallback ||
|
|
49414
|
+
{}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer;
|
|
49415
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
49416
|
+
|
|
49417
|
+
if (typeof paramsOrCallback === 'function') {
|
|
49418
|
+
callback = paramsOrCallback;
|
|
49419
|
+
params =
|
|
49420
|
+
{} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer;
|
|
49421
|
+
options = {};
|
|
49422
|
+
}
|
|
49423
|
+
|
|
49424
|
+
if (typeof optionsOrCallback === 'function') {
|
|
49425
|
+
callback = optionsOrCallback;
|
|
49426
|
+
options = {};
|
|
49427
|
+
}
|
|
49428
|
+
|
|
49429
|
+
const rootUrl =
|
|
49430
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
49431
|
+
const parameters = {
|
|
49432
|
+
options: Object.assign(
|
|
49433
|
+
{
|
|
49434
|
+
url: (rootUrl + '/v1beta/{+servingConfig}:answer').replace(
|
|
49435
|
+
/([^:]\/)\/+/g,
|
|
49436
|
+
'$1'
|
|
49437
|
+
),
|
|
49438
|
+
method: 'POST',
|
|
49439
|
+
apiVersion: '',
|
|
49440
|
+
},
|
|
49441
|
+
options
|
|
49442
|
+
),
|
|
49443
|
+
params,
|
|
49444
|
+
requiredParams: ['servingConfig'],
|
|
49445
|
+
pathParams: ['servingConfig'],
|
|
49446
|
+
context: this.context,
|
|
49447
|
+
};
|
|
49448
|
+
if (callback) {
|
|
49449
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>(
|
|
49450
|
+
parameters,
|
|
49451
|
+
callback as BodyResponseCallback<unknown>
|
|
49452
|
+
);
|
|
49453
|
+
} else {
|
|
49454
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>(
|
|
49455
|
+
parameters
|
|
49456
|
+
);
|
|
49457
|
+
}
|
|
49458
|
+
}
|
|
49459
|
+
|
|
49460
|
+
/**
|
|
49461
|
+
* Creates a ServingConfig. Note: The Google Cloud console works only with the default serving config. Additional ServingConfigs can be created and managed only via the API. A maximum of 100 ServingConfigs are allowed in an Engine, otherwise a RESOURCE_EXHAUSTED error is returned.
|
|
49462
|
+
* @example
|
|
49463
|
+
* ```js
|
|
49464
|
+
* // Before running the sample:
|
|
49465
|
+
* // - Enable the API at:
|
|
49466
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
49467
|
+
* // - Login into gcloud by running:
|
|
49468
|
+
* // ```sh
|
|
49469
|
+
* // $ gcloud auth application-default login
|
|
49470
|
+
* // ```
|
|
49471
|
+
* // - Install the npm module by running:
|
|
49472
|
+
* // ```sh
|
|
49473
|
+
* // $ npm install googleapis
|
|
49474
|
+
* // ```
|
|
49475
|
+
*
|
|
49476
|
+
* const {google} = require('googleapis');
|
|
49477
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
49478
|
+
*
|
|
49479
|
+
* async function main() {
|
|
49480
|
+
* const auth = new google.auth.GoogleAuth({
|
|
49481
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
49482
|
+
* scopes: [
|
|
49483
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
49484
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
49485
|
+
* ],
|
|
49486
|
+
* });
|
|
49487
|
+
*
|
|
49488
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
49489
|
+
* const authClient = await auth.getClient();
|
|
49490
|
+
* google.options({auth: authClient});
|
|
49491
|
+
*
|
|
49492
|
+
* // Do the magic
|
|
49493
|
+
* const res =
|
|
49494
|
+
* await discoveryengine.projects.locations.dataStores.servingConfigs.create({
|
|
49495
|
+
* // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
49496
|
+
* parent:
|
|
49497
|
+
* 'projects/my-project/locations/my-location/dataStores/my-dataStore',
|
|
49498
|
+
* // Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
49499
|
+
* servingConfigId: 'placeholder-value',
|
|
48284
49500
|
*
|
|
48285
49501
|
* // Request body metadata
|
|
48286
49502
|
* requestBody: {
|
|
48287
49503
|
* // request body parameters
|
|
48288
49504
|
* // {
|
|
48289
|
-
* // "
|
|
49505
|
+
* // "answerGenerationSpec": {},
|
|
49506
|
+
* // "boostControlIds": [],
|
|
49507
|
+
* // "createTime": "my_createTime",
|
|
49508
|
+
* // "displayName": "my_displayName",
|
|
49509
|
+
* // "dissociateControlIds": [],
|
|
49510
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
49511
|
+
* // "embeddingConfig": {},
|
|
49512
|
+
* // "filterControlIds": [],
|
|
49513
|
+
* // "genericConfig": {},
|
|
49514
|
+
* // "ignoreControlIds": [],
|
|
49515
|
+
* // "mediaConfig": {},
|
|
49516
|
+
* // "modelId": "my_modelId",
|
|
48290
49517
|
* // "name": "my_name",
|
|
48291
|
-
* // "
|
|
49518
|
+
* // "onewaySynonymsControlIds": [],
|
|
49519
|
+
* // "personalizationSpec": {},
|
|
49520
|
+
* // "promoteControlIds": [],
|
|
49521
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
49522
|
+
* // "redirectControlIds": [],
|
|
49523
|
+
* // "replacementControlIds": [],
|
|
49524
|
+
* // "solutionType": "my_solutionType",
|
|
49525
|
+
* // "synonymsControlIds": [],
|
|
49526
|
+
* // "updateTime": "my_updateTime"
|
|
48292
49527
|
* // }
|
|
48293
49528
|
* },
|
|
48294
|
-
* }
|
|
48295
|
-
* );
|
|
49529
|
+
* });
|
|
48296
49530
|
* console.log(res.data);
|
|
48297
49531
|
*
|
|
48298
49532
|
* // Example response
|
|
48299
49533
|
* // {
|
|
48300
|
-
* // "
|
|
48301
|
-
* // "
|
|
48302
|
-
* // "
|
|
49534
|
+
* // "answerGenerationSpec": {},
|
|
49535
|
+
* // "boostControlIds": [],
|
|
49536
|
+
* // "createTime": "my_createTime",
|
|
49537
|
+
* // "displayName": "my_displayName",
|
|
49538
|
+
* // "dissociateControlIds": [],
|
|
49539
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
49540
|
+
* // "embeddingConfig": {},
|
|
49541
|
+
* // "filterControlIds": [],
|
|
49542
|
+
* // "genericConfig": {},
|
|
49543
|
+
* // "ignoreControlIds": [],
|
|
49544
|
+
* // "mediaConfig": {},
|
|
49545
|
+
* // "modelId": "my_modelId",
|
|
48303
49546
|
* // "name": "my_name",
|
|
48304
|
-
* // "
|
|
49547
|
+
* // "onewaySynonymsControlIds": [],
|
|
49548
|
+
* // "personalizationSpec": {},
|
|
49549
|
+
* // "promoteControlIds": [],
|
|
49550
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
49551
|
+
* // "redirectControlIds": [],
|
|
49552
|
+
* // "replacementControlIds": [],
|
|
49553
|
+
* // "solutionType": "my_solutionType",
|
|
49554
|
+
* // "synonymsControlIds": [],
|
|
49555
|
+
* // "updateTime": "my_updateTime"
|
|
48305
49556
|
* // }
|
|
48306
49557
|
* }
|
|
48307
49558
|
*
|
|
@@ -48317,58 +49568,62 @@ export namespace discoveryengine_v1beta {
|
|
|
48317
49568
|
* @param callback - Optional callback that handles the response.
|
|
48318
49569
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
48319
49570
|
*/
|
|
48320
|
-
|
|
48321
|
-
params: Params$Resource$Projects$Locations$Datastores$
|
|
49571
|
+
create(
|
|
49572
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
48322
49573
|
options: StreamMethodOptions
|
|
48323
49574
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
48324
|
-
|
|
48325
|
-
params?: Params$Resource$Projects$Locations$Datastores$
|
|
49575
|
+
create(
|
|
49576
|
+
params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
48326
49577
|
options?: MethodOptions
|
|
48327
|
-
): Promise<
|
|
48328
|
-
|
|
48329
|
-
|
|
49578
|
+
): Promise<
|
|
49579
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
49580
|
+
>;
|
|
49581
|
+
create(
|
|
49582
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
48330
49583
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
48331
49584
|
callback: BodyResponseCallback<Readable>
|
|
48332
49585
|
): void;
|
|
48333
|
-
|
|
48334
|
-
params: Params$Resource$Projects$Locations$Datastores$
|
|
49586
|
+
create(
|
|
49587
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
48335
49588
|
options:
|
|
48336
49589
|
| MethodOptions
|
|
48337
|
-
| BodyResponseCallback<Schema$
|
|
48338
|
-
callback: BodyResponseCallback<Schema$
|
|
49590
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>,
|
|
49591
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
48339
49592
|
): void;
|
|
48340
|
-
|
|
48341
|
-
params: Params$Resource$Projects$Locations$Datastores$
|
|
48342
|
-
callback: BodyResponseCallback<Schema$
|
|
49593
|
+
create(
|
|
49594
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
49595
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
48343
49596
|
): void;
|
|
48344
|
-
|
|
48345
|
-
callback: BodyResponseCallback<Schema$
|
|
49597
|
+
create(
|
|
49598
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
48346
49599
|
): void;
|
|
48347
|
-
|
|
49600
|
+
create(
|
|
48348
49601
|
paramsOrCallback?:
|
|
48349
|
-
| Params$Resource$Projects$Locations$Datastores$
|
|
48350
|
-
| BodyResponseCallback<Schema$
|
|
49602
|
+
| Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create
|
|
49603
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
48351
49604
|
| BodyResponseCallback<Readable>,
|
|
48352
49605
|
optionsOrCallback?:
|
|
48353
49606
|
| MethodOptions
|
|
48354
49607
|
| StreamMethodOptions
|
|
48355
|
-
| BodyResponseCallback<Schema$
|
|
49608
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
48356
49609
|
| BodyResponseCallback<Readable>,
|
|
48357
49610
|
callback?:
|
|
48358
|
-
| BodyResponseCallback<Schema$
|
|
49611
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
48359
49612
|
| BodyResponseCallback<Readable>
|
|
48360
49613
|
):
|
|
48361
49614
|
| void
|
|
48362
|
-
| Promise<
|
|
49615
|
+
| Promise<
|
|
49616
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>
|
|
49617
|
+
>
|
|
48363
49618
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
48364
49619
|
let params = (paramsOrCallback ||
|
|
48365
|
-
{}) as Params$Resource$Projects$Locations$Datastores$
|
|
49620
|
+
{}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create;
|
|
48366
49621
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
48367
49622
|
|
|
48368
49623
|
if (typeof paramsOrCallback === 'function') {
|
|
48369
49624
|
callback = paramsOrCallback;
|
|
48370
49625
|
params =
|
|
48371
|
-
{} as Params$Resource$Projects$Locations$Datastores$
|
|
49626
|
+
{} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create;
|
|
48372
49627
|
options = {};
|
|
48373
49628
|
}
|
|
48374
49629
|
|
|
@@ -48382,93 +49637,34 @@ export namespace discoveryengine_v1beta {
|
|
|
48382
49637
|
const parameters = {
|
|
48383
49638
|
options: Object.assign(
|
|
48384
49639
|
{
|
|
48385
|
-
url: (rootUrl + '/v1beta/{+
|
|
48386
|
-
|
|
49640
|
+
url: (rootUrl + '/v1beta/{+parent}/servingConfigs').replace(
|
|
49641
|
+
/([^:]\/)\/+/g,
|
|
49642
|
+
'$1'
|
|
49643
|
+
),
|
|
49644
|
+
method: 'POST',
|
|
48387
49645
|
apiVersion: '',
|
|
48388
49646
|
},
|
|
48389
49647
|
options
|
|
48390
49648
|
),
|
|
48391
49649
|
params,
|
|
48392
|
-
requiredParams: ['
|
|
48393
|
-
pathParams: ['
|
|
49650
|
+
requiredParams: ['parent'],
|
|
49651
|
+
pathParams: ['parent'],
|
|
48394
49652
|
context: this.context,
|
|
48395
49653
|
};
|
|
48396
49654
|
if (callback) {
|
|
48397
|
-
createAPIRequest<Schema$
|
|
49655
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>(
|
|
48398
49656
|
parameters,
|
|
48399
49657
|
callback as BodyResponseCallback<unknown>
|
|
48400
49658
|
);
|
|
48401
49659
|
} else {
|
|
48402
|
-
return createAPIRequest<Schema$
|
|
49660
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>(
|
|
49661
|
+
parameters
|
|
49662
|
+
);
|
|
48403
49663
|
}
|
|
48404
49664
|
}
|
|
48405
|
-
}
|
|
48406
|
-
|
|
48407
|
-
export interface Params$Resource$Projects$Locations$Datastores$Schemas$Create extends StandardParameters {
|
|
48408
|
-
/**
|
|
48409
|
-
* Required. The parent data store resource name, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}`.
|
|
48410
|
-
*/
|
|
48411
|
-
parent?: string;
|
|
48412
|
-
/**
|
|
48413
|
-
* Required. The ID to use for the Schema, which becomes the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.
|
|
48414
|
-
*/
|
|
48415
|
-
schemaId?: string;
|
|
48416
|
-
|
|
48417
|
-
/**
|
|
48418
|
-
* Request body metadata
|
|
48419
|
-
*/
|
|
48420
|
-
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaSchema;
|
|
48421
|
-
}
|
|
48422
|
-
export interface Params$Resource$Projects$Locations$Datastores$Schemas$Delete extends StandardParameters {
|
|
48423
|
-
/**
|
|
48424
|
-
* Required. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`.
|
|
48425
|
-
*/
|
|
48426
|
-
name?: string;
|
|
48427
|
-
}
|
|
48428
|
-
export interface Params$Resource$Projects$Locations$Datastores$Schemas$Get extends StandardParameters {
|
|
48429
|
-
/**
|
|
48430
|
-
* Required. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`.
|
|
48431
|
-
*/
|
|
48432
|
-
name?: string;
|
|
48433
|
-
}
|
|
48434
|
-
export interface Params$Resource$Projects$Locations$Datastores$Schemas$List extends StandardParameters {
|
|
48435
|
-
/**
|
|
48436
|
-
* The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas are returned. The maximum value is 1000; values above 1000 are set to 1000.
|
|
48437
|
-
*/
|
|
48438
|
-
pageSize?: number;
|
|
48439
|
-
/**
|
|
48440
|
-
* 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.
|
|
48441
|
-
*/
|
|
48442
|
-
pageToken?: string;
|
|
48443
|
-
/**
|
|
48444
|
-
* Required. The parent data store resource name, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}`.
|
|
48445
|
-
*/
|
|
48446
|
-
parent?: string;
|
|
48447
|
-
}
|
|
48448
|
-
export interface Params$Resource$Projects$Locations$Datastores$Schemas$Patch extends StandardParameters {
|
|
48449
|
-
/**
|
|
48450
|
-
* If set to true, and the Schema is not found, a new Schema is created. In this situation, `update_mask` is ignored.
|
|
48451
|
-
*/
|
|
48452
|
-
allowMissing?: boolean;
|
|
48453
|
-
/**
|
|
48454
|
-
* 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.
|
|
48455
|
-
*/
|
|
48456
|
-
name?: string;
|
|
48457
|
-
|
|
48458
|
-
/**
|
|
48459
|
-
* Request body metadata
|
|
48460
|
-
*/
|
|
48461
|
-
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaSchema;
|
|
48462
|
-
}
|
|
48463
|
-
|
|
48464
|
-
export class Resource$Projects$Locations$Datastores$Servingconfigs {
|
|
48465
|
-
context: APIRequestContext;
|
|
48466
|
-
constructor(context: APIRequestContext) {
|
|
48467
|
-
this.context = context;
|
|
48468
|
-
}
|
|
48469
49665
|
|
|
48470
49666
|
/**
|
|
48471
|
-
*
|
|
49667
|
+
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
48472
49668
|
* @example
|
|
48473
49669
|
* ```js
|
|
48474
49670
|
* // Before running the sample:
|
|
@@ -48501,38 +49697,14 @@ export namespace discoveryengine_v1beta {
|
|
|
48501
49697
|
*
|
|
48502
49698
|
* // Do the magic
|
|
48503
49699
|
* const res =
|
|
48504
|
-
* await discoveryengine.projects.locations.dataStores.servingConfigs.
|
|
48505
|
-
* // Required. The resource name of the
|
|
48506
|
-
* servingConfig
|
|
48507
|
-
* 'projects/my-project/locations/my-location/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
48508
|
-
*
|
|
48509
|
-
* // Request body metadata
|
|
48510
|
-
* requestBody: {
|
|
48511
|
-
* // request body parameters
|
|
48512
|
-
* // {
|
|
48513
|
-
* // "answerGenerationSpec": {},
|
|
48514
|
-
* // "asynchronousMode": false,
|
|
48515
|
-
* // "endUserSpec": {},
|
|
48516
|
-
* // "groundingSpec": {},
|
|
48517
|
-
* // "query": {},
|
|
48518
|
-
* // "queryUnderstandingSpec": {},
|
|
48519
|
-
* // "relatedQuestionsSpec": {},
|
|
48520
|
-
* // "safetySpec": {},
|
|
48521
|
-
* // "searchSpec": {},
|
|
48522
|
-
* // "session": "my_session",
|
|
48523
|
-
* // "userLabels": {},
|
|
48524
|
-
* // "userPseudoId": "my_userPseudoId"
|
|
48525
|
-
* // }
|
|
48526
|
-
* },
|
|
49700
|
+
* await discoveryengine.projects.locations.dataStores.servingConfigs.delete({
|
|
49701
|
+
* // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
49702
|
+
* name: 'projects/my-project/locations/my-location/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
48527
49703
|
* });
|
|
48528
49704
|
* console.log(res.data);
|
|
48529
49705
|
*
|
|
48530
49706
|
* // Example response
|
|
48531
|
-
* // {
|
|
48532
|
-
* // "answer": {},
|
|
48533
|
-
* // "answerQueryToken": "my_answerQueryToken",
|
|
48534
|
-
* // "session": {}
|
|
48535
|
-
* // }
|
|
49707
|
+
* // {}
|
|
48536
49708
|
* }
|
|
48537
49709
|
*
|
|
48538
49710
|
* main().catch(e => {
|
|
@@ -48547,62 +49719,54 @@ export namespace discoveryengine_v1beta {
|
|
|
48547
49719
|
* @param callback - Optional callback that handles the response.
|
|
48548
49720
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
48549
49721
|
*/
|
|
48550
|
-
|
|
48551
|
-
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
49722
|
+
delete(
|
|
49723
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
48552
49724
|
options: StreamMethodOptions
|
|
48553
49725
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
48554
|
-
|
|
48555
|
-
params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
49726
|
+
delete(
|
|
49727
|
+
params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
48556
49728
|
options?: MethodOptions
|
|
48557
|
-
): Promise<
|
|
48558
|
-
|
|
48559
|
-
|
|
48560
|
-
answer(
|
|
48561
|
-
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
49729
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
49730
|
+
delete(
|
|
49731
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
48562
49732
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
48563
49733
|
callback: BodyResponseCallback<Readable>
|
|
48564
49734
|
): void;
|
|
48565
|
-
|
|
48566
|
-
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
48567
|
-
options:
|
|
48568
|
-
|
|
48569
|
-
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>,
|
|
48570
|
-
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
48571
|
-
): void;
|
|
48572
|
-
answer(
|
|
48573
|
-
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
48574
|
-
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
49735
|
+
delete(
|
|
49736
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
49737
|
+
options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
|
|
49738
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
48575
49739
|
): void;
|
|
48576
|
-
|
|
48577
|
-
|
|
49740
|
+
delete(
|
|
49741
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
49742
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
48578
49743
|
): void;
|
|
48579
|
-
|
|
49744
|
+
delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
49745
|
+
delete(
|
|
48580
49746
|
paramsOrCallback?:
|
|
48581
|
-
| Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
48582
|
-
| BodyResponseCallback<Schema$
|
|
49747
|
+
| Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete
|
|
49748
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
48583
49749
|
| BodyResponseCallback<Readable>,
|
|
48584
49750
|
optionsOrCallback?:
|
|
48585
49751
|
| MethodOptions
|
|
48586
49752
|
| StreamMethodOptions
|
|
48587
|
-
| BodyResponseCallback<Schema$
|
|
49753
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
48588
49754
|
| BodyResponseCallback<Readable>,
|
|
48589
49755
|
callback?:
|
|
48590
|
-
| BodyResponseCallback<Schema$
|
|
49756
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
48591
49757
|
| BodyResponseCallback<Readable>
|
|
48592
49758
|
):
|
|
48593
49759
|
| void
|
|
48594
|
-
| Promise<
|
|
48595
|
-
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>
|
|
48596
|
-
>
|
|
49760
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
|
|
48597
49761
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
48598
49762
|
let params = (paramsOrCallback ||
|
|
48599
|
-
{}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
49763
|
+
{}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete;
|
|
48600
49764
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
48601
49765
|
|
|
48602
49766
|
if (typeof paramsOrCallback === 'function') {
|
|
48603
49767
|
callback = paramsOrCallback;
|
|
48604
49768
|
params =
|
|
48605
|
-
{} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
49769
|
+
{} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete;
|
|
48606
49770
|
options = {};
|
|
48607
49771
|
}
|
|
48608
49772
|
|
|
@@ -48616,29 +49780,24 @@ export namespace discoveryengine_v1beta {
|
|
|
48616
49780
|
const parameters = {
|
|
48617
49781
|
options: Object.assign(
|
|
48618
49782
|
{
|
|
48619
|
-
url: (rootUrl + '/v1beta/{+
|
|
48620
|
-
|
|
48621
|
-
'$1'
|
|
48622
|
-
),
|
|
48623
|
-
method: 'POST',
|
|
49783
|
+
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
49784
|
+
method: 'DELETE',
|
|
48624
49785
|
apiVersion: '',
|
|
48625
49786
|
},
|
|
48626
49787
|
options
|
|
48627
49788
|
),
|
|
48628
49789
|
params,
|
|
48629
|
-
requiredParams: ['
|
|
48630
|
-
pathParams: ['
|
|
49790
|
+
requiredParams: ['name'],
|
|
49791
|
+
pathParams: ['name'],
|
|
48631
49792
|
context: this.context,
|
|
48632
49793
|
};
|
|
48633
49794
|
if (callback) {
|
|
48634
|
-
createAPIRequest<Schema$
|
|
49795
|
+
createAPIRequest<Schema$GoogleProtobufEmpty>(
|
|
48635
49796
|
parameters,
|
|
48636
49797
|
callback as BodyResponseCallback<unknown>
|
|
48637
49798
|
);
|
|
48638
49799
|
} else {
|
|
48639
|
-
return createAPIRequest<Schema$
|
|
48640
|
-
parameters
|
|
48641
|
-
);
|
|
49800
|
+
return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
|
|
48642
49801
|
}
|
|
48643
49802
|
}
|
|
48644
49803
|
|
|
@@ -49416,6 +50575,7 @@ export namespace discoveryengine_v1beta {
|
|
|
49416
50575
|
* // "rankingExpression": "my_rankingExpression",
|
|
49417
50576
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
49418
50577
|
* // "regionCode": "my_regionCode",
|
|
50578
|
+
* // "relevanceFilterSpec": {},
|
|
49419
50579
|
* // "relevanceScoreSpec": {},
|
|
49420
50580
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
49421
50581
|
* // "safeSearch": false,
|
|
@@ -49634,6 +50794,7 @@ export namespace discoveryengine_v1beta {
|
|
|
49634
50794
|
* // "rankingExpression": "my_rankingExpression",
|
|
49635
50795
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
49636
50796
|
* // "regionCode": "my_regionCode",
|
|
50797
|
+
* // "relevanceFilterSpec": {},
|
|
49637
50798
|
* // "relevanceScoreSpec": {},
|
|
49638
50799
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
49639
50800
|
* // "safeSearch": false,
|
|
@@ -49971,6 +51132,27 @@ export namespace discoveryengine_v1beta {
|
|
|
49971
51132
|
*/
|
|
49972
51133
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryRequest;
|
|
49973
51134
|
}
|
|
51135
|
+
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create extends StandardParameters {
|
|
51136
|
+
/**
|
|
51137
|
+
* Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
51138
|
+
*/
|
|
51139
|
+
parent?: string;
|
|
51140
|
+
/**
|
|
51141
|
+
* Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
51142
|
+
*/
|
|
51143
|
+
servingConfigId?: string;
|
|
51144
|
+
|
|
51145
|
+
/**
|
|
51146
|
+
* Request body metadata
|
|
51147
|
+
*/
|
|
51148
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaServingConfig;
|
|
51149
|
+
}
|
|
51150
|
+
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete extends StandardParameters {
|
|
51151
|
+
/**
|
|
51152
|
+
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
51153
|
+
*/
|
|
51154
|
+
name?: string;
|
|
51155
|
+
}
|
|
49974
51156
|
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Get extends StandardParameters {
|
|
49975
51157
|
/**
|
|
49976
51158
|
* Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|