@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/v1alpha.ts
CHANGED
|
@@ -521,11 +521,28 @@ export namespace discoveryengine_v1alpha {
|
|
|
521
521
|
* Stored definition of an agent that uses A2A.
|
|
522
522
|
*/
|
|
523
523
|
export interface Schema$GoogleCloudDiscoveryengineV1alphaA2AAgentDefinition {
|
|
524
|
+
/**
|
|
525
|
+
* Optional. Configuration specific to agents that are deployed from Cloud Marketplace.
|
|
526
|
+
*/
|
|
527
|
+
cloudMarketplaceConfig?: Schema$GoogleCloudDiscoveryengineV1alphaA2AAgentDefinitionCloudMarketplaceConfig;
|
|
524
528
|
/**
|
|
525
529
|
* Optional. The agent card is a JSON string.
|
|
526
530
|
*/
|
|
527
531
|
jsonAgentCard?: string | null;
|
|
528
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Configuration specific to agents that are deployed from Cloud Marketplace.
|
|
535
|
+
*/
|
|
536
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaA2AAgentDefinitionCloudMarketplaceConfig {
|
|
537
|
+
/**
|
|
538
|
+
* Required. The Marketplace Entitlement this agent is associated with. Format: `projects/{project\}/entitlements/{entitlement\}`.
|
|
539
|
+
*/
|
|
540
|
+
entitlement?: string | null;
|
|
541
|
+
/**
|
|
542
|
+
* Output only. The Marketplace Order this agent belongs to. Format: `billingAccounts/{billing_account\}/orders/{order\}`
|
|
543
|
+
*/
|
|
544
|
+
order?: string | null;
|
|
545
|
+
}
|
|
529
546
|
/**
|
|
530
547
|
* Access Control Configuration.
|
|
531
548
|
*/
|
|
@@ -865,6 +882,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
865
882
|
* Optional. The code of the language of the text in the description, display_name and starter_prompts fields.
|
|
866
883
|
*/
|
|
867
884
|
languageCode?: string | null;
|
|
885
|
+
/**
|
|
886
|
+
* Optional. The behavior of the Google managed agent.
|
|
887
|
+
*/
|
|
888
|
+
managedAgentDefinition?: Schema$GoogleCloudDiscoveryengineV1alphaManagedAgentDefinition;
|
|
868
889
|
/**
|
|
869
890
|
* Identifier. Resource name of the agent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
870
891
|
*/
|
|
@@ -6824,6 +6845,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
6824
6845
|
*/
|
|
6825
6846
|
userLicenses?: Schema$GoogleCloudDiscoveryengineV1alphaUserLicense[];
|
|
6826
6847
|
}
|
|
6848
|
+
/**
|
|
6849
|
+
* Stores the definition of a Google managed agent.
|
|
6850
|
+
*/
|
|
6851
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaManagedAgentDefinition {}
|
|
6827
6852
|
/**
|
|
6828
6853
|
* Media-specific user event information.
|
|
6829
6854
|
*/
|
|
@@ -8169,7 +8194,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
8169
8194
|
*/
|
|
8170
8195
|
orderBy?: string | null;
|
|
8171
8196
|
/**
|
|
8172
|
-
* 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`
|
|
8197
|
+
* 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`
|
|
8173
8198
|
*/
|
|
8174
8199
|
pageCategories?: string[] | null;
|
|
8175
8200
|
/**
|
|
@@ -8208,12 +8233,16 @@ export namespace discoveryengine_v1alpha {
|
|
|
8208
8233
|
* 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.
|
|
8209
8234
|
*/
|
|
8210
8235
|
regionCode?: string | null;
|
|
8236
|
+
/**
|
|
8237
|
+
* 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.
|
|
8238
|
+
*/
|
|
8239
|
+
relevanceFilterSpec?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpec;
|
|
8211
8240
|
/**
|
|
8212
8241
|
* Optional. The specification for returning the relevance score.
|
|
8213
8242
|
*/
|
|
8214
8243
|
relevanceScoreSpec?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceScoreSpec;
|
|
8215
8244
|
/**
|
|
8216
|
-
* The relevance threshold of the search results.
|
|
8245
|
+
* 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.
|
|
8217
8246
|
*/
|
|
8218
8247
|
relevanceThreshold?: string | null;
|
|
8219
8248
|
/**
|
|
@@ -8652,6 +8681,32 @@ export namespace discoveryengine_v1alpha {
|
|
|
8652
8681
|
*/
|
|
8653
8682
|
pinUnexpandedResults?: boolean | null;
|
|
8654
8683
|
}
|
|
8684
|
+
/**
|
|
8685
|
+
* Relevance filtering specification.
|
|
8686
|
+
*/
|
|
8687
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpec {
|
|
8688
|
+
/**
|
|
8689
|
+
* Optional. Relevance filtering threshold specification for keyword search.
|
|
8690
|
+
*/
|
|
8691
|
+
keywordSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
8692
|
+
/**
|
|
8693
|
+
* Optional. Relevance filtering threshold specification for semantic search.
|
|
8694
|
+
*/
|
|
8695
|
+
semanticSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
8696
|
+
}
|
|
8697
|
+
/**
|
|
8698
|
+
* Specification for relevance filtering on a specific sub-search.
|
|
8699
|
+
*/
|
|
8700
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec {
|
|
8701
|
+
/**
|
|
8702
|
+
* Pre-defined relevance threshold for the sub-search.
|
|
8703
|
+
*/
|
|
8704
|
+
relevanceThreshold?: string | null;
|
|
8705
|
+
/**
|
|
8706
|
+
* Custom relevance threshold for the sub-search. The value must be in [0.0, 1.0].
|
|
8707
|
+
*/
|
|
8708
|
+
semanticRelevanceThreshold?: number | null;
|
|
8709
|
+
}
|
|
8655
8710
|
/**
|
|
8656
8711
|
* The specification for returning the document relevance score.
|
|
8657
8712
|
*/
|
|
@@ -10134,7 +10189,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
10134
10189
|
*/
|
|
10135
10190
|
eventType?: string | null;
|
|
10136
10191
|
/**
|
|
10137
|
-
* 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.
|
|
10192
|
+
* 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.
|
|
10138
10193
|
*/
|
|
10139
10194
|
filter?: string | null;
|
|
10140
10195
|
/**
|
|
@@ -12878,7 +12933,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
12878
12933
|
*/
|
|
12879
12934
|
orderBy?: string | null;
|
|
12880
12935
|
/**
|
|
12881
|
-
* 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`
|
|
12936
|
+
* 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`
|
|
12882
12937
|
*/
|
|
12883
12938
|
pageCategories?: string[] | null;
|
|
12884
12939
|
/**
|
|
@@ -12917,12 +12972,16 @@ export namespace discoveryengine_v1alpha {
|
|
|
12917
12972
|
* 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.
|
|
12918
12973
|
*/
|
|
12919
12974
|
regionCode?: string | null;
|
|
12975
|
+
/**
|
|
12976
|
+
* 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.
|
|
12977
|
+
*/
|
|
12978
|
+
relevanceFilterSpec?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpec;
|
|
12920
12979
|
/**
|
|
12921
12980
|
* Optional. The specification for returning the relevance score.
|
|
12922
12981
|
*/
|
|
12923
12982
|
relevanceScoreSpec?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceScoreSpec;
|
|
12924
12983
|
/**
|
|
12925
|
-
* The relevance threshold of the search results.
|
|
12984
|
+
* 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.
|
|
12926
12985
|
*/
|
|
12927
12986
|
relevanceThreshold?: string | null;
|
|
12928
12987
|
/**
|
|
@@ -13357,6 +13416,32 @@ export namespace discoveryengine_v1alpha {
|
|
|
13357
13416
|
*/
|
|
13358
13417
|
pinUnexpandedResults?: boolean | null;
|
|
13359
13418
|
}
|
|
13419
|
+
/**
|
|
13420
|
+
* Relevance filtering specification.
|
|
13421
|
+
*/
|
|
13422
|
+
export interface Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpec {
|
|
13423
|
+
/**
|
|
13424
|
+
* Optional. Relevance filtering threshold specification for keyword search.
|
|
13425
|
+
*/
|
|
13426
|
+
keywordSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
13427
|
+
/**
|
|
13428
|
+
* Optional. Relevance filtering threshold specification for semantic search.
|
|
13429
|
+
*/
|
|
13430
|
+
semanticSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
13431
|
+
}
|
|
13432
|
+
/**
|
|
13433
|
+
* Specification for relevance filtering on a specific sub-search.
|
|
13434
|
+
*/
|
|
13435
|
+
export interface Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec {
|
|
13436
|
+
/**
|
|
13437
|
+
* Pre-defined relevance threshold for the sub-search.
|
|
13438
|
+
*/
|
|
13439
|
+
relevanceThreshold?: string | null;
|
|
13440
|
+
/**
|
|
13441
|
+
* Custom relevance threshold for the sub-search. The value must be in [0.0, 1.0].
|
|
13442
|
+
*/
|
|
13443
|
+
semanticRelevanceThreshold?: number | null;
|
|
13444
|
+
}
|
|
13360
13445
|
/**
|
|
13361
13446
|
* The specification for returning the document relevance score.
|
|
13362
13447
|
*/
|
|
@@ -14363,6 +14448,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
14363
14448
|
* 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.
|
|
14364
14449
|
*/
|
|
14365
14450
|
name?: string | null;
|
|
14451
|
+
/**
|
|
14452
|
+
* Optional. Configuration for Natural Language Query Understanding.
|
|
14453
|
+
*/
|
|
14454
|
+
naturalLanguageQueryUnderstandingConfig?: Schema$GoogleCloudDiscoveryengineV1NaturalLanguageQueryUnderstandingConfig;
|
|
14366
14455
|
/**
|
|
14367
14456
|
* Optional. Stores serving config at DataStore level.
|
|
14368
14457
|
*/
|
|
@@ -15199,6 +15288,15 @@ export namespace discoveryengine_v1alpha {
|
|
|
15199
15288
|
*/
|
|
15200
15289
|
subscriptionTier?: string | null;
|
|
15201
15290
|
}
|
|
15291
|
+
/**
|
|
15292
|
+
* Configuration for Natural Language Query Understanding.
|
|
15293
|
+
*/
|
|
15294
|
+
export interface Schema$GoogleCloudDiscoveryengineV1NaturalLanguageQueryUnderstandingConfig {
|
|
15295
|
+
/**
|
|
15296
|
+
* Mode of Natural Language Query Understanding. If this field is unset, the behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED.
|
|
15297
|
+
*/
|
|
15298
|
+
mode?: string | null;
|
|
15299
|
+
}
|
|
15202
15300
|
/**
|
|
15203
15301
|
* Metadata and configurations for a Google Cloud project in the service.
|
|
15204
15302
|
*/
|
|
@@ -22617,7 +22715,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
22617
22715
|
* await discoveryengine.projects.locations.collections.updateDataConnector({
|
|
22618
22716
|
* // Output only. The full resource name of the Data Connector. Format: `projects/x/locations/x/collections/x/dataConnector`.
|
|
22619
22717
|
* name: 'projects/my-project/locations/my-location/collections/my-collection/dataConnector',
|
|
22620
|
-
* // Indicates which fields in the provided DataConnector to update. Supported field paths include: - refresh_interval - params - auto_run_disabled - action_config - action_config.action_params - action_config.service_name - destination_configs - blocking_reasons - sync_mode - incremental_sync_disabled - incremental_refresh_interval Note: Support for these fields may vary depending on the connector type. For example, not all connectors support `destination_configs`. If an unsupported or unknown field path is provided, the request will return an INVALID_ARGUMENT error.
|
|
22718
|
+
* // Indicates which fields in the provided DataConnector to update. Supported field paths include: - `refresh_interval` - `params` - `auto_run_disabled` - `action_config` - `action_config.action_params` - `action_config.service_name` - `destination_configs` - `blocking_reasons` - `sync_mode` - `incremental_sync_disabled` - `incremental_refresh_interval` - `data_protection_policy` Note: Support for these fields may vary depending on the connector type. For example, not all connectors support `destination_configs`. If an unsupported or unknown field path is provided, the request will return an INVALID_ARGUMENT error.
|
|
22621
22719
|
* updateMask: 'placeholder-value',
|
|
22622
22720
|
*
|
|
22623
22721
|
* // Request body metadata
|
|
@@ -22874,7 +22972,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
22874
22972
|
*/
|
|
22875
22973
|
name?: string;
|
|
22876
22974
|
/**
|
|
22877
|
-
* Indicates which fields in the provided DataConnector to update. Supported field paths include: - refresh_interval - params - auto_run_disabled - action_config - action_config.action_params - action_config.service_name - destination_configs - blocking_reasons - sync_mode - incremental_sync_disabled - incremental_refresh_interval Note: Support for these fields may vary depending on the connector type. For example, not all connectors support `destination_configs`. If an unsupported or unknown field path is provided, the request will return an INVALID_ARGUMENT error.
|
|
22975
|
+
* Indicates which fields in the provided DataConnector to update. Supported field paths include: - `refresh_interval` - `params` - `auto_run_disabled` - `action_config` - `action_config.action_params` - `action_config.service_name` - `destination_configs` - `blocking_reasons` - `sync_mode` - `incremental_sync_disabled` - `incremental_refresh_interval` - `data_protection_policy` Note: Support for these fields may vary depending on the connector type. For example, not all connectors support `destination_configs`. If an unsupported or unknown field path is provided, the request will return an INVALID_ARGUMENT error.
|
|
22878
22976
|
*/
|
|
22879
22977
|
updateMask?: string;
|
|
22880
22978
|
|
|
@@ -33673,7 +33771,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
33673
33771
|
}
|
|
33674
33772
|
|
|
33675
33773
|
/**
|
|
33676
|
-
*
|
|
33774
|
+
* 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.
|
|
33677
33775
|
* @example
|
|
33678
33776
|
* ```js
|
|
33679
33777
|
* // Before running the sample:
|
|
@@ -33706,10 +33804,44 @@ export namespace discoveryengine_v1alpha {
|
|
|
33706
33804
|
*
|
|
33707
33805
|
* // Do the magic
|
|
33708
33806
|
* const res =
|
|
33709
|
-
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.
|
|
33807
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.create(
|
|
33710
33808
|
* {
|
|
33711
|
-
* // Required.
|
|
33712
|
-
*
|
|
33809
|
+
* // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
33810
|
+
* parent:
|
|
33811
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
|
|
33812
|
+
* // 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+/.
|
|
33813
|
+
* servingConfigId: 'placeholder-value',
|
|
33814
|
+
*
|
|
33815
|
+
* // Request body metadata
|
|
33816
|
+
* requestBody: {
|
|
33817
|
+
* // request body parameters
|
|
33818
|
+
* // {
|
|
33819
|
+
* // "answerGenerationSpec": {},
|
|
33820
|
+
* // "boostControlIds": [],
|
|
33821
|
+
* // "createTime": "my_createTime",
|
|
33822
|
+
* // "customFineTuningSpec": {},
|
|
33823
|
+
* // "displayName": "my_displayName",
|
|
33824
|
+
* // "dissociateControlIds": [],
|
|
33825
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
33826
|
+
* // "embeddingConfig": {},
|
|
33827
|
+
* // "filterControlIds": [],
|
|
33828
|
+
* // "genericConfig": {},
|
|
33829
|
+
* // "guidedSearchSpec": {},
|
|
33830
|
+
* // "ignoreControlIds": [],
|
|
33831
|
+
* // "mediaConfig": {},
|
|
33832
|
+
* // "modelId": "my_modelId",
|
|
33833
|
+
* // "name": "my_name",
|
|
33834
|
+
* // "onewaySynonymsControlIds": [],
|
|
33835
|
+
* // "personalizationSpec": {},
|
|
33836
|
+
* // "promoteControlIds": [],
|
|
33837
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
33838
|
+
* // "redirectControlIds": [],
|
|
33839
|
+
* // "replacementControlIds": [],
|
|
33840
|
+
* // "solutionType": "my_solutionType",
|
|
33841
|
+
* // "synonymsControlIds": [],
|
|
33842
|
+
* // "updateTime": "my_updateTime"
|
|
33843
|
+
* // }
|
|
33844
|
+
* },
|
|
33713
33845
|
* },
|
|
33714
33846
|
* );
|
|
33715
33847
|
* console.log(res.data);
|
|
@@ -33755,38 +33887,38 @@ export namespace discoveryengine_v1alpha {
|
|
|
33755
33887
|
* @param callback - Optional callback that handles the response.
|
|
33756
33888
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
33757
33889
|
*/
|
|
33758
|
-
|
|
33759
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33890
|
+
create(
|
|
33891
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
33760
33892
|
options: StreamMethodOptions
|
|
33761
33893
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
33762
|
-
|
|
33763
|
-
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33894
|
+
create(
|
|
33895
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
33764
33896
|
options?: MethodOptions
|
|
33765
33897
|
): Promise<
|
|
33766
33898
|
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
33767
33899
|
>;
|
|
33768
|
-
|
|
33769
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33900
|
+
create(
|
|
33901
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
33770
33902
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
33771
33903
|
callback: BodyResponseCallback<Readable>
|
|
33772
33904
|
): void;
|
|
33773
|
-
|
|
33774
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33905
|
+
create(
|
|
33906
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
33775
33907
|
options:
|
|
33776
33908
|
| MethodOptions
|
|
33777
33909
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>,
|
|
33778
33910
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
33779
33911
|
): void;
|
|
33780
|
-
|
|
33781
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33912
|
+
create(
|
|
33913
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
|
|
33782
33914
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
33783
33915
|
): void;
|
|
33784
|
-
|
|
33916
|
+
create(
|
|
33785
33917
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
33786
33918
|
): void;
|
|
33787
|
-
|
|
33919
|
+
create(
|
|
33788
33920
|
paramsOrCallback?:
|
|
33789
|
-
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33921
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create
|
|
33790
33922
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
33791
33923
|
| BodyResponseCallback<Readable>,
|
|
33792
33924
|
optionsOrCallback?:
|
|
@@ -33804,13 +33936,13 @@ export namespace discoveryengine_v1alpha {
|
|
|
33804
33936
|
>
|
|
33805
33937
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
33806
33938
|
let params = (paramsOrCallback ||
|
|
33807
|
-
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33939
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create;
|
|
33808
33940
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
33809
33941
|
|
|
33810
33942
|
if (typeof paramsOrCallback === 'function') {
|
|
33811
33943
|
callback = paramsOrCallback;
|
|
33812
33944
|
params =
|
|
33813
|
-
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33945
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create;
|
|
33814
33946
|
options = {};
|
|
33815
33947
|
}
|
|
33816
33948
|
|
|
@@ -33824,15 +33956,18 @@ export namespace discoveryengine_v1alpha {
|
|
|
33824
33956
|
const parameters = {
|
|
33825
33957
|
options: Object.assign(
|
|
33826
33958
|
{
|
|
33827
|
-
url: (rootUrl + '/v1alpha/{+
|
|
33828
|
-
|
|
33959
|
+
url: (rootUrl + '/v1alpha/{+parent}/servingConfigs').replace(
|
|
33960
|
+
/([^:]\/)\/+/g,
|
|
33961
|
+
'$1'
|
|
33962
|
+
),
|
|
33963
|
+
method: 'POST',
|
|
33829
33964
|
apiVersion: '',
|
|
33830
33965
|
},
|
|
33831
33966
|
options
|
|
33832
33967
|
),
|
|
33833
33968
|
params,
|
|
33834
|
-
requiredParams: ['
|
|
33835
|
-
pathParams: ['
|
|
33969
|
+
requiredParams: ['parent'],
|
|
33970
|
+
pathParams: ['parent'],
|
|
33836
33971
|
context: this.context,
|
|
33837
33972
|
};
|
|
33838
33973
|
if (callback) {
|
|
@@ -33848,7 +33983,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
33848
33983
|
}
|
|
33849
33984
|
|
|
33850
33985
|
/**
|
|
33851
|
-
*
|
|
33986
|
+
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
33852
33987
|
* @example
|
|
33853
33988
|
* ```js
|
|
33854
33989
|
* // Before running the sample:
|
|
@@ -33881,24 +34016,16 @@ export namespace discoveryengine_v1alpha {
|
|
|
33881
34016
|
*
|
|
33882
34017
|
* // Do the magic
|
|
33883
34018
|
* const res =
|
|
33884
|
-
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.
|
|
34019
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.delete(
|
|
33885
34020
|
* {
|
|
33886
|
-
* //
|
|
33887
|
-
*
|
|
33888
|
-
* // Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.
|
|
33889
|
-
* pageToken: 'placeholder-value',
|
|
33890
|
-
* // Required. Full resource name of the parent resource. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
33891
|
-
* parent:
|
|
33892
|
-
* 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
|
|
34021
|
+
* // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
34022
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
33893
34023
|
* },
|
|
33894
34024
|
* );
|
|
33895
34025
|
* console.log(res.data);
|
|
33896
34026
|
*
|
|
33897
34027
|
* // Example response
|
|
33898
|
-
* // {
|
|
33899
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
33900
|
-
* // "servingConfigs": []
|
|
33901
|
-
* // }
|
|
34028
|
+
* // {}
|
|
33902
34029
|
* }
|
|
33903
34030
|
*
|
|
33904
34031
|
* main().catch(e => {
|
|
@@ -33913,62 +34040,54 @@ export namespace discoveryengine_v1alpha {
|
|
|
33913
34040
|
* @param callback - Optional callback that handles the response.
|
|
33914
34041
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
33915
34042
|
*/
|
|
33916
|
-
|
|
33917
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34043
|
+
delete(
|
|
34044
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
33918
34045
|
options: StreamMethodOptions
|
|
33919
34046
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
33920
|
-
|
|
33921
|
-
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34047
|
+
delete(
|
|
34048
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
33922
34049
|
options?: MethodOptions
|
|
33923
|
-
): Promise<
|
|
33924
|
-
|
|
33925
|
-
|
|
33926
|
-
list(
|
|
33927
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
34050
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
34051
|
+
delete(
|
|
34052
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
33928
34053
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
33929
34054
|
callback: BodyResponseCallback<Readable>
|
|
33930
34055
|
): void;
|
|
33931
|
-
|
|
33932
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33933
|
-
options:
|
|
33934
|
-
|
|
33935
|
-
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>,
|
|
33936
|
-
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
33937
|
-
): void;
|
|
33938
|
-
list(
|
|
33939
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
33940
|
-
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
34056
|
+
delete(
|
|
34057
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
34058
|
+
options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
|
|
34059
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
33941
34060
|
): void;
|
|
33942
|
-
|
|
33943
|
-
|
|
34061
|
+
delete(
|
|
34062
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
|
|
34063
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
33944
34064
|
): void;
|
|
33945
|
-
|
|
34065
|
+
delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
34066
|
+
delete(
|
|
33946
34067
|
paramsOrCallback?:
|
|
33947
|
-
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
33948
|
-
| BodyResponseCallback<Schema$
|
|
34068
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete
|
|
34069
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
33949
34070
|
| BodyResponseCallback<Readable>,
|
|
33950
34071
|
optionsOrCallback?:
|
|
33951
34072
|
| MethodOptions
|
|
33952
34073
|
| StreamMethodOptions
|
|
33953
|
-
| BodyResponseCallback<Schema$
|
|
34074
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
33954
34075
|
| BodyResponseCallback<Readable>,
|
|
33955
34076
|
callback?:
|
|
33956
|
-
| BodyResponseCallback<Schema$
|
|
34077
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
33957
34078
|
| BodyResponseCallback<Readable>
|
|
33958
34079
|
):
|
|
33959
34080
|
| void
|
|
33960
|
-
| Promise<
|
|
33961
|
-
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
33962
|
-
>
|
|
34081
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
|
|
33963
34082
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
33964
34083
|
let params = (paramsOrCallback ||
|
|
33965
|
-
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34084
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete;
|
|
33966
34085
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
33967
34086
|
|
|
33968
34087
|
if (typeof paramsOrCallback === 'function') {
|
|
33969
34088
|
callback = paramsOrCallback;
|
|
33970
34089
|
params =
|
|
33971
|
-
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34090
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete;
|
|
33972
34091
|
options = {};
|
|
33973
34092
|
}
|
|
33974
34093
|
|
|
@@ -33982,34 +34101,29 @@ export namespace discoveryengine_v1alpha {
|
|
|
33982
34101
|
const parameters = {
|
|
33983
34102
|
options: Object.assign(
|
|
33984
34103
|
{
|
|
33985
|
-
url: (rootUrl + '/v1alpha/{+
|
|
33986
|
-
|
|
33987
|
-
'$1'
|
|
33988
|
-
),
|
|
33989
|
-
method: 'GET',
|
|
34104
|
+
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
34105
|
+
method: 'DELETE',
|
|
33990
34106
|
apiVersion: '',
|
|
33991
34107
|
},
|
|
33992
34108
|
options
|
|
33993
34109
|
),
|
|
33994
34110
|
params,
|
|
33995
|
-
requiredParams: ['
|
|
33996
|
-
pathParams: ['
|
|
34111
|
+
requiredParams: ['name'],
|
|
34112
|
+
pathParams: ['name'],
|
|
33997
34113
|
context: this.context,
|
|
33998
34114
|
};
|
|
33999
34115
|
if (callback) {
|
|
34000
|
-
createAPIRequest<Schema$
|
|
34116
|
+
createAPIRequest<Schema$GoogleProtobufEmpty>(
|
|
34001
34117
|
parameters,
|
|
34002
34118
|
callback as BodyResponseCallback<unknown>
|
|
34003
34119
|
);
|
|
34004
34120
|
} else {
|
|
34005
|
-
return createAPIRequest<Schema$
|
|
34006
|
-
parameters
|
|
34007
|
-
);
|
|
34121
|
+
return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
|
|
34008
34122
|
}
|
|
34009
34123
|
}
|
|
34010
34124
|
|
|
34011
34125
|
/**
|
|
34012
|
-
*
|
|
34126
|
+
* Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.
|
|
34013
34127
|
* @example
|
|
34014
34128
|
* ```js
|
|
34015
34129
|
* // Before running the sample:
|
|
@@ -34042,43 +34156,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
34042
34156
|
*
|
|
34043
34157
|
* // Do the magic
|
|
34044
34158
|
* const res =
|
|
34045
|
-
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.
|
|
34159
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.get(
|
|
34046
34160
|
* {
|
|
34047
|
-
* //
|
|
34161
|
+
* // Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
34048
34162
|
* name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
34049
|
-
* // Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.
|
|
34050
|
-
* updateMask: 'placeholder-value',
|
|
34051
|
-
*
|
|
34052
|
-
* // Request body metadata
|
|
34053
|
-
* requestBody: {
|
|
34054
|
-
* // request body parameters
|
|
34055
|
-
* // {
|
|
34056
|
-
* // "answerGenerationSpec": {},
|
|
34057
|
-
* // "boostControlIds": [],
|
|
34058
|
-
* // "createTime": "my_createTime",
|
|
34059
|
-
* // "customFineTuningSpec": {},
|
|
34060
|
-
* // "displayName": "my_displayName",
|
|
34061
|
-
* // "dissociateControlIds": [],
|
|
34062
|
-
* // "diversityLevel": "my_diversityLevel",
|
|
34063
|
-
* // "embeddingConfig": {},
|
|
34064
|
-
* // "filterControlIds": [],
|
|
34065
|
-
* // "genericConfig": {},
|
|
34066
|
-
* // "guidedSearchSpec": {},
|
|
34067
|
-
* // "ignoreControlIds": [],
|
|
34068
|
-
* // "mediaConfig": {},
|
|
34069
|
-
* // "modelId": "my_modelId",
|
|
34070
|
-
* // "name": "my_name",
|
|
34071
|
-
* // "onewaySynonymsControlIds": [],
|
|
34072
|
-
* // "personalizationSpec": {},
|
|
34073
|
-
* // "promoteControlIds": [],
|
|
34074
|
-
* // "rankingExpression": "my_rankingExpression",
|
|
34075
|
-
* // "redirectControlIds": [],
|
|
34076
|
-
* // "replacementControlIds": [],
|
|
34077
|
-
* // "solutionType": "my_solutionType",
|
|
34078
|
-
* // "synonymsControlIds": [],
|
|
34079
|
-
* // "updateTime": "my_updateTime"
|
|
34080
|
-
* // }
|
|
34081
|
-
* },
|
|
34082
34163
|
* },
|
|
34083
34164
|
* );
|
|
34084
34165
|
* console.log(res.data);
|
|
@@ -34124,38 +34205,38 @@ export namespace discoveryengine_v1alpha {
|
|
|
34124
34205
|
* @param callback - Optional callback that handles the response.
|
|
34125
34206
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
34126
34207
|
*/
|
|
34127
|
-
|
|
34128
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34208
|
+
get(
|
|
34209
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
34129
34210
|
options: StreamMethodOptions
|
|
34130
34211
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
34131
|
-
|
|
34132
|
-
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34212
|
+
get(
|
|
34213
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
34133
34214
|
options?: MethodOptions
|
|
34134
34215
|
): Promise<
|
|
34135
34216
|
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34136
34217
|
>;
|
|
34137
|
-
|
|
34138
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34218
|
+
get(
|
|
34219
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
34139
34220
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
34140
34221
|
callback: BodyResponseCallback<Readable>
|
|
34141
34222
|
): void;
|
|
34142
|
-
|
|
34143
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34223
|
+
get(
|
|
34224
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
34144
34225
|
options:
|
|
34145
34226
|
| MethodOptions
|
|
34146
34227
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>,
|
|
34147
34228
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34148
34229
|
): void;
|
|
34149
|
-
|
|
34150
|
-
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34230
|
+
get(
|
|
34231
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
|
|
34151
34232
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34152
34233
|
): void;
|
|
34153
|
-
|
|
34234
|
+
get(
|
|
34154
34235
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34155
34236
|
): void;
|
|
34156
|
-
|
|
34237
|
+
get(
|
|
34157
34238
|
paramsOrCallback?:
|
|
34158
|
-
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34239
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get
|
|
34159
34240
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34160
34241
|
| BodyResponseCallback<Readable>,
|
|
34161
34242
|
optionsOrCallback?:
|
|
@@ -34173,13 +34254,13 @@ export namespace discoveryengine_v1alpha {
|
|
|
34173
34254
|
>
|
|
34174
34255
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
34175
34256
|
let params = (paramsOrCallback ||
|
|
34176
|
-
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34257
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get;
|
|
34177
34258
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
34178
34259
|
|
|
34179
34260
|
if (typeof paramsOrCallback === 'function') {
|
|
34180
34261
|
callback = paramsOrCallback;
|
|
34181
34262
|
params =
|
|
34182
|
-
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$
|
|
34263
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get;
|
|
34183
34264
|
options = {};
|
|
34184
34265
|
}
|
|
34185
34266
|
|
|
@@ -34194,7 +34275,376 @@ export namespace discoveryengine_v1alpha {
|
|
|
34194
34275
|
options: Object.assign(
|
|
34195
34276
|
{
|
|
34196
34277
|
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
34197
|
-
method: '
|
|
34278
|
+
method: 'GET',
|
|
34279
|
+
apiVersion: '',
|
|
34280
|
+
},
|
|
34281
|
+
options
|
|
34282
|
+
),
|
|
34283
|
+
params,
|
|
34284
|
+
requiredParams: ['name'],
|
|
34285
|
+
pathParams: ['name'],
|
|
34286
|
+
context: this.context,
|
|
34287
|
+
};
|
|
34288
|
+
if (callback) {
|
|
34289
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>(
|
|
34290
|
+
parameters,
|
|
34291
|
+
callback as BodyResponseCallback<unknown>
|
|
34292
|
+
);
|
|
34293
|
+
} else {
|
|
34294
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>(
|
|
34295
|
+
parameters
|
|
34296
|
+
);
|
|
34297
|
+
}
|
|
34298
|
+
}
|
|
34299
|
+
|
|
34300
|
+
/**
|
|
34301
|
+
* Lists all ServingConfigs linked to this dataStore.
|
|
34302
|
+
* @example
|
|
34303
|
+
* ```js
|
|
34304
|
+
* // Before running the sample:
|
|
34305
|
+
* // - Enable the API at:
|
|
34306
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
34307
|
+
* // - Login into gcloud by running:
|
|
34308
|
+
* // ```sh
|
|
34309
|
+
* // $ gcloud auth application-default login
|
|
34310
|
+
* // ```
|
|
34311
|
+
* // - Install the npm module by running:
|
|
34312
|
+
* // ```sh
|
|
34313
|
+
* // $ npm install googleapis
|
|
34314
|
+
* // ```
|
|
34315
|
+
*
|
|
34316
|
+
* const {google} = require('googleapis');
|
|
34317
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
34318
|
+
*
|
|
34319
|
+
* async function main() {
|
|
34320
|
+
* const auth = new google.auth.GoogleAuth({
|
|
34321
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
34322
|
+
* scopes: [
|
|
34323
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
34324
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
34325
|
+
* ],
|
|
34326
|
+
* });
|
|
34327
|
+
*
|
|
34328
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
34329
|
+
* const authClient = await auth.getClient();
|
|
34330
|
+
* google.options({auth: authClient});
|
|
34331
|
+
*
|
|
34332
|
+
* // Do the magic
|
|
34333
|
+
* const res =
|
|
34334
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.list(
|
|
34335
|
+
* {
|
|
34336
|
+
* // 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.
|
|
34337
|
+
* pageSize: 'placeholder-value',
|
|
34338
|
+
* // Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.
|
|
34339
|
+
* pageToken: 'placeholder-value',
|
|
34340
|
+
* // Required. Full resource name of the parent resource. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
34341
|
+
* parent:
|
|
34342
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
|
|
34343
|
+
* },
|
|
34344
|
+
* );
|
|
34345
|
+
* console.log(res.data);
|
|
34346
|
+
*
|
|
34347
|
+
* // Example response
|
|
34348
|
+
* // {
|
|
34349
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
34350
|
+
* // "servingConfigs": []
|
|
34351
|
+
* // }
|
|
34352
|
+
* }
|
|
34353
|
+
*
|
|
34354
|
+
* main().catch(e => {
|
|
34355
|
+
* console.error(e);
|
|
34356
|
+
* throw e;
|
|
34357
|
+
* });
|
|
34358
|
+
*
|
|
34359
|
+
* ```
|
|
34360
|
+
*
|
|
34361
|
+
* @param params - Parameters for request
|
|
34362
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
34363
|
+
* @param callback - Optional callback that handles the response.
|
|
34364
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
34365
|
+
*/
|
|
34366
|
+
list(
|
|
34367
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
34368
|
+
options: StreamMethodOptions
|
|
34369
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
34370
|
+
list(
|
|
34371
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
34372
|
+
options?: MethodOptions
|
|
34373
|
+
): Promise<
|
|
34374
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
34375
|
+
>;
|
|
34376
|
+
list(
|
|
34377
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
34378
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
34379
|
+
callback: BodyResponseCallback<Readable>
|
|
34380
|
+
): void;
|
|
34381
|
+
list(
|
|
34382
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
34383
|
+
options:
|
|
34384
|
+
| MethodOptions
|
|
34385
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>,
|
|
34386
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
34387
|
+
): void;
|
|
34388
|
+
list(
|
|
34389
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
|
|
34390
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
34391
|
+
): void;
|
|
34392
|
+
list(
|
|
34393
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
34394
|
+
): void;
|
|
34395
|
+
list(
|
|
34396
|
+
paramsOrCallback?:
|
|
34397
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List
|
|
34398
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
34399
|
+
| BodyResponseCallback<Readable>,
|
|
34400
|
+
optionsOrCallback?:
|
|
34401
|
+
| MethodOptions
|
|
34402
|
+
| StreamMethodOptions
|
|
34403
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
34404
|
+
| BodyResponseCallback<Readable>,
|
|
34405
|
+
callback?:
|
|
34406
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
34407
|
+
| BodyResponseCallback<Readable>
|
|
34408
|
+
):
|
|
34409
|
+
| void
|
|
34410
|
+
| Promise<
|
|
34411
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>
|
|
34412
|
+
>
|
|
34413
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
34414
|
+
let params = (paramsOrCallback ||
|
|
34415
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List;
|
|
34416
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
34417
|
+
|
|
34418
|
+
if (typeof paramsOrCallback === 'function') {
|
|
34419
|
+
callback = paramsOrCallback;
|
|
34420
|
+
params =
|
|
34421
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List;
|
|
34422
|
+
options = {};
|
|
34423
|
+
}
|
|
34424
|
+
|
|
34425
|
+
if (typeof optionsOrCallback === 'function') {
|
|
34426
|
+
callback = optionsOrCallback;
|
|
34427
|
+
options = {};
|
|
34428
|
+
}
|
|
34429
|
+
|
|
34430
|
+
const rootUrl =
|
|
34431
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
34432
|
+
const parameters = {
|
|
34433
|
+
options: Object.assign(
|
|
34434
|
+
{
|
|
34435
|
+
url: (rootUrl + '/v1alpha/{+parent}/servingConfigs').replace(
|
|
34436
|
+
/([^:]\/)\/+/g,
|
|
34437
|
+
'$1'
|
|
34438
|
+
),
|
|
34439
|
+
method: 'GET',
|
|
34440
|
+
apiVersion: '',
|
|
34441
|
+
},
|
|
34442
|
+
options
|
|
34443
|
+
),
|
|
34444
|
+
params,
|
|
34445
|
+
requiredParams: ['parent'],
|
|
34446
|
+
pathParams: ['parent'],
|
|
34447
|
+
context: this.context,
|
|
34448
|
+
};
|
|
34449
|
+
if (callback) {
|
|
34450
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>(
|
|
34451
|
+
parameters,
|
|
34452
|
+
callback as BodyResponseCallback<unknown>
|
|
34453
|
+
);
|
|
34454
|
+
} else {
|
|
34455
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse>(
|
|
34456
|
+
parameters
|
|
34457
|
+
);
|
|
34458
|
+
}
|
|
34459
|
+
}
|
|
34460
|
+
|
|
34461
|
+
/**
|
|
34462
|
+
* Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
34463
|
+
* @example
|
|
34464
|
+
* ```js
|
|
34465
|
+
* // Before running the sample:
|
|
34466
|
+
* // - Enable the API at:
|
|
34467
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
34468
|
+
* // - Login into gcloud by running:
|
|
34469
|
+
* // ```sh
|
|
34470
|
+
* // $ gcloud auth application-default login
|
|
34471
|
+
* // ```
|
|
34472
|
+
* // - Install the npm module by running:
|
|
34473
|
+
* // ```sh
|
|
34474
|
+
* // $ npm install googleapis
|
|
34475
|
+
* // ```
|
|
34476
|
+
*
|
|
34477
|
+
* const {google} = require('googleapis');
|
|
34478
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
34479
|
+
*
|
|
34480
|
+
* async function main() {
|
|
34481
|
+
* const auth = new google.auth.GoogleAuth({
|
|
34482
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
34483
|
+
* scopes: [
|
|
34484
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
34485
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
34486
|
+
* ],
|
|
34487
|
+
* });
|
|
34488
|
+
*
|
|
34489
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
34490
|
+
* const authClient = await auth.getClient();
|
|
34491
|
+
* google.options({auth: authClient});
|
|
34492
|
+
*
|
|
34493
|
+
* // Do the magic
|
|
34494
|
+
* const res =
|
|
34495
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch(
|
|
34496
|
+
* {
|
|
34497
|
+
* // Immutable. Fully qualified name `projects/{project\}/locations/{location\}/collections/{collection_id\}/engines/{engine_id\}/servingConfigs/{serving_config_id\}`
|
|
34498
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
34499
|
+
* // Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.
|
|
34500
|
+
* updateMask: 'placeholder-value',
|
|
34501
|
+
*
|
|
34502
|
+
* // Request body metadata
|
|
34503
|
+
* requestBody: {
|
|
34504
|
+
* // request body parameters
|
|
34505
|
+
* // {
|
|
34506
|
+
* // "answerGenerationSpec": {},
|
|
34507
|
+
* // "boostControlIds": [],
|
|
34508
|
+
* // "createTime": "my_createTime",
|
|
34509
|
+
* // "customFineTuningSpec": {},
|
|
34510
|
+
* // "displayName": "my_displayName",
|
|
34511
|
+
* // "dissociateControlIds": [],
|
|
34512
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
34513
|
+
* // "embeddingConfig": {},
|
|
34514
|
+
* // "filterControlIds": [],
|
|
34515
|
+
* // "genericConfig": {},
|
|
34516
|
+
* // "guidedSearchSpec": {},
|
|
34517
|
+
* // "ignoreControlIds": [],
|
|
34518
|
+
* // "mediaConfig": {},
|
|
34519
|
+
* // "modelId": "my_modelId",
|
|
34520
|
+
* // "name": "my_name",
|
|
34521
|
+
* // "onewaySynonymsControlIds": [],
|
|
34522
|
+
* // "personalizationSpec": {},
|
|
34523
|
+
* // "promoteControlIds": [],
|
|
34524
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
34525
|
+
* // "redirectControlIds": [],
|
|
34526
|
+
* // "replacementControlIds": [],
|
|
34527
|
+
* // "solutionType": "my_solutionType",
|
|
34528
|
+
* // "synonymsControlIds": [],
|
|
34529
|
+
* // "updateTime": "my_updateTime"
|
|
34530
|
+
* // }
|
|
34531
|
+
* },
|
|
34532
|
+
* },
|
|
34533
|
+
* );
|
|
34534
|
+
* console.log(res.data);
|
|
34535
|
+
*
|
|
34536
|
+
* // Example response
|
|
34537
|
+
* // {
|
|
34538
|
+
* // "answerGenerationSpec": {},
|
|
34539
|
+
* // "boostControlIds": [],
|
|
34540
|
+
* // "createTime": "my_createTime",
|
|
34541
|
+
* // "customFineTuningSpec": {},
|
|
34542
|
+
* // "displayName": "my_displayName",
|
|
34543
|
+
* // "dissociateControlIds": [],
|
|
34544
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
34545
|
+
* // "embeddingConfig": {},
|
|
34546
|
+
* // "filterControlIds": [],
|
|
34547
|
+
* // "genericConfig": {},
|
|
34548
|
+
* // "guidedSearchSpec": {},
|
|
34549
|
+
* // "ignoreControlIds": [],
|
|
34550
|
+
* // "mediaConfig": {},
|
|
34551
|
+
* // "modelId": "my_modelId",
|
|
34552
|
+
* // "name": "my_name",
|
|
34553
|
+
* // "onewaySynonymsControlIds": [],
|
|
34554
|
+
* // "personalizationSpec": {},
|
|
34555
|
+
* // "promoteControlIds": [],
|
|
34556
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
34557
|
+
* // "redirectControlIds": [],
|
|
34558
|
+
* // "replacementControlIds": [],
|
|
34559
|
+
* // "solutionType": "my_solutionType",
|
|
34560
|
+
* // "synonymsControlIds": [],
|
|
34561
|
+
* // "updateTime": "my_updateTime"
|
|
34562
|
+
* // }
|
|
34563
|
+
* }
|
|
34564
|
+
*
|
|
34565
|
+
* main().catch(e => {
|
|
34566
|
+
* console.error(e);
|
|
34567
|
+
* throw e;
|
|
34568
|
+
* });
|
|
34569
|
+
*
|
|
34570
|
+
* ```
|
|
34571
|
+
*
|
|
34572
|
+
* @param params - Parameters for request
|
|
34573
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
34574
|
+
* @param callback - Optional callback that handles the response.
|
|
34575
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
34576
|
+
*/
|
|
34577
|
+
patch(
|
|
34578
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
34579
|
+
options: StreamMethodOptions
|
|
34580
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
34581
|
+
patch(
|
|
34582
|
+
params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
34583
|
+
options?: MethodOptions
|
|
34584
|
+
): Promise<
|
|
34585
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34586
|
+
>;
|
|
34587
|
+
patch(
|
|
34588
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
34589
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
34590
|
+
callback: BodyResponseCallback<Readable>
|
|
34591
|
+
): void;
|
|
34592
|
+
patch(
|
|
34593
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
34594
|
+
options:
|
|
34595
|
+
| MethodOptions
|
|
34596
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>,
|
|
34597
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34598
|
+
): void;
|
|
34599
|
+
patch(
|
|
34600
|
+
params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch,
|
|
34601
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34602
|
+
): void;
|
|
34603
|
+
patch(
|
|
34604
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34605
|
+
): void;
|
|
34606
|
+
patch(
|
|
34607
|
+
paramsOrCallback?:
|
|
34608
|
+
| Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch
|
|
34609
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34610
|
+
| BodyResponseCallback<Readable>,
|
|
34611
|
+
optionsOrCallback?:
|
|
34612
|
+
| MethodOptions
|
|
34613
|
+
| StreamMethodOptions
|
|
34614
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34615
|
+
| BodyResponseCallback<Readable>,
|
|
34616
|
+
callback?:
|
|
34617
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34618
|
+
| BodyResponseCallback<Readable>
|
|
34619
|
+
):
|
|
34620
|
+
| void
|
|
34621
|
+
| Promise<
|
|
34622
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
34623
|
+
>
|
|
34624
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
34625
|
+
let params = (paramsOrCallback ||
|
|
34626
|
+
{}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch;
|
|
34627
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
34628
|
+
|
|
34629
|
+
if (typeof paramsOrCallback === 'function') {
|
|
34630
|
+
callback = paramsOrCallback;
|
|
34631
|
+
params =
|
|
34632
|
+
{} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Patch;
|
|
34633
|
+
options = {};
|
|
34634
|
+
}
|
|
34635
|
+
|
|
34636
|
+
if (typeof optionsOrCallback === 'function') {
|
|
34637
|
+
callback = optionsOrCallback;
|
|
34638
|
+
options = {};
|
|
34639
|
+
}
|
|
34640
|
+
|
|
34641
|
+
const rootUrl =
|
|
34642
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
34643
|
+
const parameters = {
|
|
34644
|
+
options: Object.assign(
|
|
34645
|
+
{
|
|
34646
|
+
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
34647
|
+
method: 'PATCH',
|
|
34198
34648
|
apiVersion: '',
|
|
34199
34649
|
},
|
|
34200
34650
|
options
|
|
@@ -34460,6 +34910,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
34460
34910
|
* // "rankingExpression": "my_rankingExpression",
|
|
34461
34911
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
34462
34912
|
* // "regionCode": "my_regionCode",
|
|
34913
|
+
* // "relevanceFilterSpec": {},
|
|
34463
34914
|
* // "relevanceScoreSpec": {},
|
|
34464
34915
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
34465
34916
|
* // "safeSearch": false,
|
|
@@ -34681,6 +35132,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
34681
35132
|
* // "rankingExpression": "my_rankingExpression",
|
|
34682
35133
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
34683
35134
|
* // "regionCode": "my_regionCode",
|
|
35135
|
+
* // "relevanceFilterSpec": {},
|
|
34684
35136
|
* // "relevanceScoreSpec": {},
|
|
34685
35137
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
34686
35138
|
* // "safeSearch": false,
|
|
@@ -35020,6 +35472,27 @@ export namespace discoveryengine_v1alpha {
|
|
|
35020
35472
|
*/
|
|
35021
35473
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest;
|
|
35022
35474
|
}
|
|
35475
|
+
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create extends StandardParameters {
|
|
35476
|
+
/**
|
|
35477
|
+
* Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
35478
|
+
*/
|
|
35479
|
+
parent?: string;
|
|
35480
|
+
/**
|
|
35481
|
+
* 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+/.
|
|
35482
|
+
*/
|
|
35483
|
+
servingConfigId?: string;
|
|
35484
|
+
|
|
35485
|
+
/**
|
|
35486
|
+
* Request body metadata
|
|
35487
|
+
*/
|
|
35488
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1alphaServingConfig;
|
|
35489
|
+
}
|
|
35490
|
+
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete extends StandardParameters {
|
|
35491
|
+
/**
|
|
35492
|
+
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
35493
|
+
*/
|
|
35494
|
+
name?: string;
|
|
35495
|
+
}
|
|
35023
35496
|
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get extends StandardParameters {
|
|
35024
35497
|
/**
|
|
35025
35498
|
* Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
@@ -44450,6 +44923,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
44450
44923
|
* // "displayName": "my_displayName",
|
|
44451
44924
|
* // "icon": {},
|
|
44452
44925
|
* // "languageCode": "my_languageCode",
|
|
44926
|
+
* // "managedAgentDefinition": {},
|
|
44453
44927
|
* // "name": "my_name",
|
|
44454
44928
|
* // "rejectionReason": "my_rejectionReason",
|
|
44455
44929
|
* // "sharingConfig": {},
|
|
@@ -44476,6 +44950,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
44476
44950
|
* // "displayName": "my_displayName",
|
|
44477
44951
|
* // "icon": {},
|
|
44478
44952
|
* // "languageCode": "my_languageCode",
|
|
44953
|
+
* // "managedAgentDefinition": {},
|
|
44479
44954
|
* // "name": "my_name",
|
|
44480
44955
|
* // "rejectionReason": "my_rejectionReason",
|
|
44481
44956
|
* // "sharingConfig": {},
|
|
@@ -44800,6 +45275,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
44800
45275
|
* // "displayName": "my_displayName",
|
|
44801
45276
|
* // "icon": {},
|
|
44802
45277
|
* // "languageCode": "my_languageCode",
|
|
45278
|
+
* // "managedAgentDefinition": {},
|
|
44803
45279
|
* // "name": "my_name",
|
|
44804
45280
|
* // "rejectionReason": "my_rejectionReason",
|
|
44805
45281
|
* // "sharingConfig": {},
|
|
@@ -44973,6 +45449,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
44973
45449
|
* // "displayName": "my_displayName",
|
|
44974
45450
|
* // "icon": {},
|
|
44975
45451
|
* // "languageCode": "my_languageCode",
|
|
45452
|
+
* // "managedAgentDefinition": {},
|
|
44976
45453
|
* // "name": "my_name",
|
|
44977
45454
|
* // "rejectionReason": "my_rejectionReason",
|
|
44978
45455
|
* // "sharingConfig": {},
|
|
@@ -45146,6 +45623,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
45146
45623
|
* // "displayName": "my_displayName",
|
|
45147
45624
|
* // "icon": {},
|
|
45148
45625
|
* // "languageCode": "my_languageCode",
|
|
45626
|
+
* // "managedAgentDefinition": {},
|
|
45149
45627
|
* // "name": "my_name",
|
|
45150
45628
|
* // "rejectionReason": "my_rejectionReason",
|
|
45151
45629
|
* // "sharingConfig": {},
|
|
@@ -45796,6 +46274,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
45796
46274
|
* // "displayName": "my_displayName",
|
|
45797
46275
|
* // "icon": {},
|
|
45798
46276
|
* // "languageCode": "my_languageCode",
|
|
46277
|
+
* // "managedAgentDefinition": {},
|
|
45799
46278
|
* // "name": "my_name",
|
|
45800
46279
|
* // "rejectionReason": "my_rejectionReason",
|
|
45801
46280
|
* // "sharingConfig": {},
|
|
@@ -45822,6 +46301,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
45822
46301
|
* // "displayName": "my_displayName",
|
|
45823
46302
|
* // "icon": {},
|
|
45824
46303
|
* // "languageCode": "my_languageCode",
|
|
46304
|
+
* // "managedAgentDefinition": {},
|
|
45825
46305
|
* // "name": "my_name",
|
|
45826
46306
|
* // "rejectionReason": "my_rejectionReason",
|
|
45827
46307
|
* // "sharingConfig": {},
|
|
@@ -46153,6 +46633,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
46153
46633
|
* // "displayName": "my_displayName",
|
|
46154
46634
|
* // "icon": {},
|
|
46155
46635
|
* // "languageCode": "my_languageCode",
|
|
46636
|
+
* // "managedAgentDefinition": {},
|
|
46156
46637
|
* // "name": "my_name",
|
|
46157
46638
|
* // "rejectionReason": "my_rejectionReason",
|
|
46158
46639
|
* // "sharingConfig": {},
|
|
@@ -50335,7 +50816,396 @@ export namespace discoveryengine_v1alpha {
|
|
|
50335
50816
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
50336
50817
|
* scopes: [
|
|
50337
50818
|
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
50338
|
-
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
50819
|
+
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
50820
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
50821
|
+
* ],
|
|
50822
|
+
* });
|
|
50823
|
+
*
|
|
50824
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
50825
|
+
* const authClient = await auth.getClient();
|
|
50826
|
+
* google.options({auth: authClient});
|
|
50827
|
+
*
|
|
50828
|
+
* // Do the magic
|
|
50829
|
+
* const res =
|
|
50830
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.answer(
|
|
50831
|
+
* {
|
|
50832
|
+
* // 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.
|
|
50833
|
+
* servingConfig:
|
|
50834
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/servingConfigs/my-servingConfig',
|
|
50835
|
+
*
|
|
50836
|
+
* // Request body metadata
|
|
50837
|
+
* requestBody: {
|
|
50838
|
+
* // request body parameters
|
|
50839
|
+
* // {
|
|
50840
|
+
* // "answerGenerationSpec": {},
|
|
50841
|
+
* // "asynchronousMode": false,
|
|
50842
|
+
* // "endUserSpec": {},
|
|
50843
|
+
* // "groundingSpec": {},
|
|
50844
|
+
* // "query": {},
|
|
50845
|
+
* // "queryUnderstandingSpec": {},
|
|
50846
|
+
* // "relatedQuestionsSpec": {},
|
|
50847
|
+
* // "safetySpec": {},
|
|
50848
|
+
* // "searchSpec": {},
|
|
50849
|
+
* // "session": "my_session",
|
|
50850
|
+
* // "userLabels": {},
|
|
50851
|
+
* // "userPseudoId": "my_userPseudoId"
|
|
50852
|
+
* // }
|
|
50853
|
+
* },
|
|
50854
|
+
* },
|
|
50855
|
+
* );
|
|
50856
|
+
* console.log(res.data);
|
|
50857
|
+
*
|
|
50858
|
+
* // Example response
|
|
50859
|
+
* // {
|
|
50860
|
+
* // "answer": {},
|
|
50861
|
+
* // "answerQueryToken": "my_answerQueryToken",
|
|
50862
|
+
* // "session": {}
|
|
50863
|
+
* // }
|
|
50864
|
+
* }
|
|
50865
|
+
*
|
|
50866
|
+
* main().catch(e => {
|
|
50867
|
+
* console.error(e);
|
|
50868
|
+
* throw e;
|
|
50869
|
+
* });
|
|
50870
|
+
*
|
|
50871
|
+
* ```
|
|
50872
|
+
*
|
|
50873
|
+
* @param params - Parameters for request
|
|
50874
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
50875
|
+
* @param callback - Optional callback that handles the response.
|
|
50876
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
50877
|
+
*/
|
|
50878
|
+
answer(
|
|
50879
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer,
|
|
50880
|
+
options: StreamMethodOptions
|
|
50881
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
50882
|
+
answer(
|
|
50883
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer,
|
|
50884
|
+
options?: MethodOptions
|
|
50885
|
+
): Promise<
|
|
50886
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50887
|
+
>;
|
|
50888
|
+
answer(
|
|
50889
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer,
|
|
50890
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
50891
|
+
callback: BodyResponseCallback<Readable>
|
|
50892
|
+
): void;
|
|
50893
|
+
answer(
|
|
50894
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer,
|
|
50895
|
+
options:
|
|
50896
|
+
| MethodOptions
|
|
50897
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>,
|
|
50898
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50899
|
+
): void;
|
|
50900
|
+
answer(
|
|
50901
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer,
|
|
50902
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50903
|
+
): void;
|
|
50904
|
+
answer(
|
|
50905
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50906
|
+
): void;
|
|
50907
|
+
answer(
|
|
50908
|
+
paramsOrCallback?:
|
|
50909
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer
|
|
50910
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50911
|
+
| BodyResponseCallback<Readable>,
|
|
50912
|
+
optionsOrCallback?:
|
|
50913
|
+
| MethodOptions
|
|
50914
|
+
| StreamMethodOptions
|
|
50915
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50916
|
+
| BodyResponseCallback<Readable>,
|
|
50917
|
+
callback?:
|
|
50918
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50919
|
+
| BodyResponseCallback<Readable>
|
|
50920
|
+
):
|
|
50921
|
+
| void
|
|
50922
|
+
| Promise<
|
|
50923
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50924
|
+
>
|
|
50925
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
50926
|
+
let params = (paramsOrCallback ||
|
|
50927
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer;
|
|
50928
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
50929
|
+
|
|
50930
|
+
if (typeof paramsOrCallback === 'function') {
|
|
50931
|
+
callback = paramsOrCallback;
|
|
50932
|
+
params =
|
|
50933
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer;
|
|
50934
|
+
options = {};
|
|
50935
|
+
}
|
|
50936
|
+
|
|
50937
|
+
if (typeof optionsOrCallback === 'function') {
|
|
50938
|
+
callback = optionsOrCallback;
|
|
50939
|
+
options = {};
|
|
50940
|
+
}
|
|
50941
|
+
|
|
50942
|
+
const rootUrl =
|
|
50943
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
50944
|
+
const parameters = {
|
|
50945
|
+
options: Object.assign(
|
|
50946
|
+
{
|
|
50947
|
+
url: (rootUrl + '/v1alpha/{+servingConfig}:answer').replace(
|
|
50948
|
+
/([^:]\/)\/+/g,
|
|
50949
|
+
'$1'
|
|
50950
|
+
),
|
|
50951
|
+
method: 'POST',
|
|
50952
|
+
apiVersion: '',
|
|
50953
|
+
},
|
|
50954
|
+
options
|
|
50955
|
+
),
|
|
50956
|
+
params,
|
|
50957
|
+
requiredParams: ['servingConfig'],
|
|
50958
|
+
pathParams: ['servingConfig'],
|
|
50959
|
+
context: this.context,
|
|
50960
|
+
};
|
|
50961
|
+
if (callback) {
|
|
50962
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>(
|
|
50963
|
+
parameters,
|
|
50964
|
+
callback as BodyResponseCallback<unknown>
|
|
50965
|
+
);
|
|
50966
|
+
} else {
|
|
50967
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>(
|
|
50968
|
+
parameters
|
|
50969
|
+
);
|
|
50970
|
+
}
|
|
50971
|
+
}
|
|
50972
|
+
|
|
50973
|
+
/**
|
|
50974
|
+
* 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.
|
|
50975
|
+
* @example
|
|
50976
|
+
* ```js
|
|
50977
|
+
* // Before running the sample:
|
|
50978
|
+
* // - Enable the API at:
|
|
50979
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
50980
|
+
* // - Login into gcloud by running:
|
|
50981
|
+
* // ```sh
|
|
50982
|
+
* // $ gcloud auth application-default login
|
|
50983
|
+
* // ```
|
|
50984
|
+
* // - Install the npm module by running:
|
|
50985
|
+
* // ```sh
|
|
50986
|
+
* // $ npm install googleapis
|
|
50987
|
+
* // ```
|
|
50988
|
+
*
|
|
50989
|
+
* const {google} = require('googleapis');
|
|
50990
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
50991
|
+
*
|
|
50992
|
+
* async function main() {
|
|
50993
|
+
* const auth = new google.auth.GoogleAuth({
|
|
50994
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
50995
|
+
* scopes: [
|
|
50996
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
50997
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
50998
|
+
* ],
|
|
50999
|
+
* });
|
|
51000
|
+
*
|
|
51001
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
51002
|
+
* const authClient = await auth.getClient();
|
|
51003
|
+
* google.options({auth: authClient});
|
|
51004
|
+
*
|
|
51005
|
+
* // Do the magic
|
|
51006
|
+
* const res =
|
|
51007
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.create(
|
|
51008
|
+
* {
|
|
51009
|
+
* // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
51010
|
+
* parent:
|
|
51011
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine',
|
|
51012
|
+
* // 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+/.
|
|
51013
|
+
* servingConfigId: 'placeholder-value',
|
|
51014
|
+
*
|
|
51015
|
+
* // Request body metadata
|
|
51016
|
+
* requestBody: {
|
|
51017
|
+
* // request body parameters
|
|
51018
|
+
* // {
|
|
51019
|
+
* // "answerGenerationSpec": {},
|
|
51020
|
+
* // "boostControlIds": [],
|
|
51021
|
+
* // "createTime": "my_createTime",
|
|
51022
|
+
* // "customFineTuningSpec": {},
|
|
51023
|
+
* // "displayName": "my_displayName",
|
|
51024
|
+
* // "dissociateControlIds": [],
|
|
51025
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
51026
|
+
* // "embeddingConfig": {},
|
|
51027
|
+
* // "filterControlIds": [],
|
|
51028
|
+
* // "genericConfig": {},
|
|
51029
|
+
* // "guidedSearchSpec": {},
|
|
51030
|
+
* // "ignoreControlIds": [],
|
|
51031
|
+
* // "mediaConfig": {},
|
|
51032
|
+
* // "modelId": "my_modelId",
|
|
51033
|
+
* // "name": "my_name",
|
|
51034
|
+
* // "onewaySynonymsControlIds": [],
|
|
51035
|
+
* // "personalizationSpec": {},
|
|
51036
|
+
* // "promoteControlIds": [],
|
|
51037
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
51038
|
+
* // "redirectControlIds": [],
|
|
51039
|
+
* // "replacementControlIds": [],
|
|
51040
|
+
* // "solutionType": "my_solutionType",
|
|
51041
|
+
* // "synonymsControlIds": [],
|
|
51042
|
+
* // "updateTime": "my_updateTime"
|
|
51043
|
+
* // }
|
|
51044
|
+
* },
|
|
51045
|
+
* },
|
|
51046
|
+
* );
|
|
51047
|
+
* console.log(res.data);
|
|
51048
|
+
*
|
|
51049
|
+
* // Example response
|
|
51050
|
+
* // {
|
|
51051
|
+
* // "answerGenerationSpec": {},
|
|
51052
|
+
* // "boostControlIds": [],
|
|
51053
|
+
* // "createTime": "my_createTime",
|
|
51054
|
+
* // "customFineTuningSpec": {},
|
|
51055
|
+
* // "displayName": "my_displayName",
|
|
51056
|
+
* // "dissociateControlIds": [],
|
|
51057
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
51058
|
+
* // "embeddingConfig": {},
|
|
51059
|
+
* // "filterControlIds": [],
|
|
51060
|
+
* // "genericConfig": {},
|
|
51061
|
+
* // "guidedSearchSpec": {},
|
|
51062
|
+
* // "ignoreControlIds": [],
|
|
51063
|
+
* // "mediaConfig": {},
|
|
51064
|
+
* // "modelId": "my_modelId",
|
|
51065
|
+
* // "name": "my_name",
|
|
51066
|
+
* // "onewaySynonymsControlIds": [],
|
|
51067
|
+
* // "personalizationSpec": {},
|
|
51068
|
+
* // "promoteControlIds": [],
|
|
51069
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
51070
|
+
* // "redirectControlIds": [],
|
|
51071
|
+
* // "replacementControlIds": [],
|
|
51072
|
+
* // "solutionType": "my_solutionType",
|
|
51073
|
+
* // "synonymsControlIds": [],
|
|
51074
|
+
* // "updateTime": "my_updateTime"
|
|
51075
|
+
* // }
|
|
51076
|
+
* }
|
|
51077
|
+
*
|
|
51078
|
+
* main().catch(e => {
|
|
51079
|
+
* console.error(e);
|
|
51080
|
+
* throw e;
|
|
51081
|
+
* });
|
|
51082
|
+
*
|
|
51083
|
+
* ```
|
|
51084
|
+
*
|
|
51085
|
+
* @param params - Parameters for request
|
|
51086
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
51087
|
+
* @param callback - Optional callback that handles the response.
|
|
51088
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
51089
|
+
*/
|
|
51090
|
+
create(
|
|
51091
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
51092
|
+
options: StreamMethodOptions
|
|
51093
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
51094
|
+
create(
|
|
51095
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
51096
|
+
options?: MethodOptions
|
|
51097
|
+
): Promise<
|
|
51098
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
51099
|
+
>;
|
|
51100
|
+
create(
|
|
51101
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
51102
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
51103
|
+
callback: BodyResponseCallback<Readable>
|
|
51104
|
+
): void;
|
|
51105
|
+
create(
|
|
51106
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
51107
|
+
options:
|
|
51108
|
+
| MethodOptions
|
|
51109
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>,
|
|
51110
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
51111
|
+
): void;
|
|
51112
|
+
create(
|
|
51113
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
|
|
51114
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
51115
|
+
): void;
|
|
51116
|
+
create(
|
|
51117
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
51118
|
+
): void;
|
|
51119
|
+
create(
|
|
51120
|
+
paramsOrCallback?:
|
|
51121
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create
|
|
51122
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
51123
|
+
| BodyResponseCallback<Readable>,
|
|
51124
|
+
optionsOrCallback?:
|
|
51125
|
+
| MethodOptions
|
|
51126
|
+
| StreamMethodOptions
|
|
51127
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
51128
|
+
| BodyResponseCallback<Readable>,
|
|
51129
|
+
callback?:
|
|
51130
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
51131
|
+
| BodyResponseCallback<Readable>
|
|
51132
|
+
):
|
|
51133
|
+
| void
|
|
51134
|
+
| Promise<
|
|
51135
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
51136
|
+
>
|
|
51137
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
51138
|
+
let params = (paramsOrCallback ||
|
|
51139
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create;
|
|
51140
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
51141
|
+
|
|
51142
|
+
if (typeof paramsOrCallback === 'function') {
|
|
51143
|
+
callback = paramsOrCallback;
|
|
51144
|
+
params =
|
|
51145
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create;
|
|
51146
|
+
options = {};
|
|
51147
|
+
}
|
|
51148
|
+
|
|
51149
|
+
if (typeof optionsOrCallback === 'function') {
|
|
51150
|
+
callback = optionsOrCallback;
|
|
51151
|
+
options = {};
|
|
51152
|
+
}
|
|
51153
|
+
|
|
51154
|
+
const rootUrl =
|
|
51155
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
51156
|
+
const parameters = {
|
|
51157
|
+
options: Object.assign(
|
|
51158
|
+
{
|
|
51159
|
+
url: (rootUrl + '/v1alpha/{+parent}/servingConfigs').replace(
|
|
51160
|
+
/([^:]\/)\/+/g,
|
|
51161
|
+
'$1'
|
|
51162
|
+
),
|
|
51163
|
+
method: 'POST',
|
|
51164
|
+
apiVersion: '',
|
|
51165
|
+
},
|
|
51166
|
+
options
|
|
51167
|
+
),
|
|
51168
|
+
params,
|
|
51169
|
+
requiredParams: ['parent'],
|
|
51170
|
+
pathParams: ['parent'],
|
|
51171
|
+
context: this.context,
|
|
51172
|
+
};
|
|
51173
|
+
if (callback) {
|
|
51174
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>(
|
|
51175
|
+
parameters,
|
|
51176
|
+
callback as BodyResponseCallback<unknown>
|
|
51177
|
+
);
|
|
51178
|
+
} else {
|
|
51179
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>(
|
|
51180
|
+
parameters
|
|
51181
|
+
);
|
|
51182
|
+
}
|
|
51183
|
+
}
|
|
51184
|
+
|
|
51185
|
+
/**
|
|
51186
|
+
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
51187
|
+
* @example
|
|
51188
|
+
* ```js
|
|
51189
|
+
* // Before running the sample:
|
|
51190
|
+
* // - Enable the API at:
|
|
51191
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
51192
|
+
* // - Login into gcloud by running:
|
|
51193
|
+
* // ```sh
|
|
51194
|
+
* // $ gcloud auth application-default login
|
|
51195
|
+
* // ```
|
|
51196
|
+
* // - Install the npm module by running:
|
|
51197
|
+
* // ```sh
|
|
51198
|
+
* // $ npm install googleapis
|
|
51199
|
+
* // ```
|
|
51200
|
+
*
|
|
51201
|
+
* const {google} = require('googleapis');
|
|
51202
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
51203
|
+
*
|
|
51204
|
+
* async function main() {
|
|
51205
|
+
* const auth = new google.auth.GoogleAuth({
|
|
51206
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
51207
|
+
* scopes: [
|
|
51208
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
50339
51209
|
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
50340
51210
|
* ],
|
|
50341
51211
|
* });
|
|
@@ -50346,40 +51216,16 @@ export namespace discoveryengine_v1alpha {
|
|
|
50346
51216
|
*
|
|
50347
51217
|
* // Do the magic
|
|
50348
51218
|
* const res =
|
|
50349
|
-
* await discoveryengine.projects.locations.collections.engines.servingConfigs.
|
|
51219
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.delete(
|
|
50350
51220
|
* {
|
|
50351
|
-
* // Required. The resource name of the
|
|
50352
|
-
* servingConfig
|
|
50353
|
-
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/servingConfigs/my-servingConfig',
|
|
50354
|
-
*
|
|
50355
|
-
* // Request body metadata
|
|
50356
|
-
* requestBody: {
|
|
50357
|
-
* // request body parameters
|
|
50358
|
-
* // {
|
|
50359
|
-
* // "answerGenerationSpec": {},
|
|
50360
|
-
* // "asynchronousMode": false,
|
|
50361
|
-
* // "endUserSpec": {},
|
|
50362
|
-
* // "groundingSpec": {},
|
|
50363
|
-
* // "query": {},
|
|
50364
|
-
* // "queryUnderstandingSpec": {},
|
|
50365
|
-
* // "relatedQuestionsSpec": {},
|
|
50366
|
-
* // "safetySpec": {},
|
|
50367
|
-
* // "searchSpec": {},
|
|
50368
|
-
* // "session": "my_session",
|
|
50369
|
-
* // "userLabels": {},
|
|
50370
|
-
* // "userPseudoId": "my_userPseudoId"
|
|
50371
|
-
* // }
|
|
50372
|
-
* },
|
|
51221
|
+
* // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
51222
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/servingConfigs/my-servingConfig',
|
|
50373
51223
|
* },
|
|
50374
51224
|
* );
|
|
50375
51225
|
* console.log(res.data);
|
|
50376
51226
|
*
|
|
50377
51227
|
* // Example response
|
|
50378
|
-
* // {
|
|
50379
|
-
* // "answer": {},
|
|
50380
|
-
* // "answerQueryToken": "my_answerQueryToken",
|
|
50381
|
-
* // "session": {}
|
|
50382
|
-
* // }
|
|
51228
|
+
* // {}
|
|
50383
51229
|
* }
|
|
50384
51230
|
*
|
|
50385
51231
|
* main().catch(e => {
|
|
@@ -50394,62 +51240,54 @@ export namespace discoveryengine_v1alpha {
|
|
|
50394
51240
|
* @param callback - Optional callback that handles the response.
|
|
50395
51241
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
50396
51242
|
*/
|
|
50397
|
-
|
|
50398
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
51243
|
+
delete(
|
|
51244
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
50399
51245
|
options: StreamMethodOptions
|
|
50400
51246
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
50401
|
-
|
|
50402
|
-
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
51247
|
+
delete(
|
|
51248
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
50403
51249
|
options?: MethodOptions
|
|
50404
|
-
): Promise<
|
|
50405
|
-
|
|
50406
|
-
|
|
50407
|
-
answer(
|
|
50408
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer,
|
|
51250
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
51251
|
+
delete(
|
|
51252
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
50409
51253
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
50410
51254
|
callback: BodyResponseCallback<Readable>
|
|
50411
51255
|
): void;
|
|
50412
|
-
|
|
50413
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
50414
|
-
options:
|
|
50415
|
-
|
|
50416
|
-
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>,
|
|
50417
|
-
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50418
|
-
): void;
|
|
50419
|
-
answer(
|
|
50420
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer,
|
|
50421
|
-
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
51256
|
+
delete(
|
|
51257
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
51258
|
+
options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
|
|
51259
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
50422
51260
|
): void;
|
|
50423
|
-
|
|
50424
|
-
|
|
51261
|
+
delete(
|
|
51262
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete,
|
|
51263
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
50425
51264
|
): void;
|
|
50426
|
-
|
|
51265
|
+
delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
51266
|
+
delete(
|
|
50427
51267
|
paramsOrCallback?:
|
|
50428
|
-
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
50429
|
-
| BodyResponseCallback<Schema$
|
|
51268
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete
|
|
51269
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
50430
51270
|
| BodyResponseCallback<Readable>,
|
|
50431
51271
|
optionsOrCallback?:
|
|
50432
51272
|
| MethodOptions
|
|
50433
51273
|
| StreamMethodOptions
|
|
50434
|
-
| BodyResponseCallback<Schema$
|
|
51274
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
50435
51275
|
| BodyResponseCallback<Readable>,
|
|
50436
51276
|
callback?:
|
|
50437
|
-
| BodyResponseCallback<Schema$
|
|
51277
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
50438
51278
|
| BodyResponseCallback<Readable>
|
|
50439
51279
|
):
|
|
50440
51280
|
| void
|
|
50441
|
-
| Promise<
|
|
50442
|
-
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
50443
|
-
>
|
|
51281
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
|
|
50444
51282
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
50445
51283
|
let params = (paramsOrCallback ||
|
|
50446
|
-
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
51284
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete;
|
|
50447
51285
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
50448
51286
|
|
|
50449
51287
|
if (typeof paramsOrCallback === 'function') {
|
|
50450
51288
|
callback = paramsOrCallback;
|
|
50451
51289
|
params =
|
|
50452
|
-
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$
|
|
51290
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete;
|
|
50453
51291
|
options = {};
|
|
50454
51292
|
}
|
|
50455
51293
|
|
|
@@ -50463,29 +51301,24 @@ export namespace discoveryengine_v1alpha {
|
|
|
50463
51301
|
const parameters = {
|
|
50464
51302
|
options: Object.assign(
|
|
50465
51303
|
{
|
|
50466
|
-
url: (rootUrl + '/v1alpha/{+
|
|
50467
|
-
|
|
50468
|
-
'$1'
|
|
50469
|
-
),
|
|
50470
|
-
method: 'POST',
|
|
51304
|
+
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
51305
|
+
method: 'DELETE',
|
|
50471
51306
|
apiVersion: '',
|
|
50472
51307
|
},
|
|
50473
51308
|
options
|
|
50474
51309
|
),
|
|
50475
51310
|
params,
|
|
50476
|
-
requiredParams: ['
|
|
50477
|
-
pathParams: ['
|
|
51311
|
+
requiredParams: ['name'],
|
|
51312
|
+
pathParams: ['name'],
|
|
50478
51313
|
context: this.context,
|
|
50479
51314
|
};
|
|
50480
51315
|
if (callback) {
|
|
50481
|
-
createAPIRequest<Schema$
|
|
51316
|
+
createAPIRequest<Schema$GoogleProtobufEmpty>(
|
|
50482
51317
|
parameters,
|
|
50483
51318
|
callback as BodyResponseCallback<unknown>
|
|
50484
51319
|
);
|
|
50485
51320
|
} else {
|
|
50486
|
-
return createAPIRequest<Schema$
|
|
50487
|
-
parameters
|
|
50488
|
-
);
|
|
51321
|
+
return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
|
|
50489
51322
|
}
|
|
50490
51323
|
}
|
|
50491
51324
|
|
|
@@ -51277,6 +52110,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
51277
52110
|
* // "rankingExpression": "my_rankingExpression",
|
|
51278
52111
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
51279
52112
|
* // "regionCode": "my_regionCode",
|
|
52113
|
+
* // "relevanceFilterSpec": {},
|
|
51280
52114
|
* // "relevanceScoreSpec": {},
|
|
51281
52115
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
51282
52116
|
* // "safeSearch": false,
|
|
@@ -51498,6 +52332,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
51498
52332
|
* // "rankingExpression": "my_rankingExpression",
|
|
51499
52333
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
51500
52334
|
* // "regionCode": "my_regionCode",
|
|
52335
|
+
* // "relevanceFilterSpec": {},
|
|
51501
52336
|
* // "relevanceScoreSpec": {},
|
|
51502
52337
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
51503
52338
|
* // "safeSearch": false,
|
|
@@ -51837,6 +52672,27 @@ export namespace discoveryengine_v1alpha {
|
|
|
51837
52672
|
*/
|
|
51838
52673
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest;
|
|
51839
52674
|
}
|
|
52675
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create extends StandardParameters {
|
|
52676
|
+
/**
|
|
52677
|
+
* Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
52678
|
+
*/
|
|
52679
|
+
parent?: string;
|
|
52680
|
+
/**
|
|
52681
|
+
* 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+/.
|
|
52682
|
+
*/
|
|
52683
|
+
servingConfigId?: string;
|
|
52684
|
+
|
|
52685
|
+
/**
|
|
52686
|
+
* Request body metadata
|
|
52687
|
+
*/
|
|
52688
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1alphaServingConfig;
|
|
52689
|
+
}
|
|
52690
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete extends StandardParameters {
|
|
52691
|
+
/**
|
|
52692
|
+
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
52693
|
+
*/
|
|
52694
|
+
name?: string;
|
|
52695
|
+
}
|
|
51840
52696
|
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get extends StandardParameters {
|
|
51841
52697
|
/**
|
|
51842
52698
|
* Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
@@ -62968,7 +63824,182 @@ export namespace discoveryengine_v1alpha {
|
|
|
62968
63824
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
62969
63825
|
* scopes: [
|
|
62970
63826
|
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
62971
|
-
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
63827
|
+
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
63828
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
63829
|
+
* ],
|
|
63830
|
+
* });
|
|
63831
|
+
*
|
|
63832
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
63833
|
+
* const authClient = await auth.getClient();
|
|
63834
|
+
* google.options({auth: authClient});
|
|
63835
|
+
*
|
|
63836
|
+
* // Do the magic
|
|
63837
|
+
* const res =
|
|
63838
|
+
* await discoveryengine.projects.locations.dataStores.servingConfigs.answer({
|
|
63839
|
+
* // 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.
|
|
63840
|
+
* servingConfig:
|
|
63841
|
+
* 'projects/my-project/locations/my-location/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
63842
|
+
*
|
|
63843
|
+
* // Request body metadata
|
|
63844
|
+
* requestBody: {
|
|
63845
|
+
* // request body parameters
|
|
63846
|
+
* // {
|
|
63847
|
+
* // "answerGenerationSpec": {},
|
|
63848
|
+
* // "asynchronousMode": false,
|
|
63849
|
+
* // "endUserSpec": {},
|
|
63850
|
+
* // "groundingSpec": {},
|
|
63851
|
+
* // "query": {},
|
|
63852
|
+
* // "queryUnderstandingSpec": {},
|
|
63853
|
+
* // "relatedQuestionsSpec": {},
|
|
63854
|
+
* // "safetySpec": {},
|
|
63855
|
+
* // "searchSpec": {},
|
|
63856
|
+
* // "session": "my_session",
|
|
63857
|
+
* // "userLabels": {},
|
|
63858
|
+
* // "userPseudoId": "my_userPseudoId"
|
|
63859
|
+
* // }
|
|
63860
|
+
* },
|
|
63861
|
+
* });
|
|
63862
|
+
* console.log(res.data);
|
|
63863
|
+
*
|
|
63864
|
+
* // Example response
|
|
63865
|
+
* // {
|
|
63866
|
+
* // "answer": {},
|
|
63867
|
+
* // "answerQueryToken": "my_answerQueryToken",
|
|
63868
|
+
* // "session": {}
|
|
63869
|
+
* // }
|
|
63870
|
+
* }
|
|
63871
|
+
*
|
|
63872
|
+
* main().catch(e => {
|
|
63873
|
+
* console.error(e);
|
|
63874
|
+
* throw e;
|
|
63875
|
+
* });
|
|
63876
|
+
*
|
|
63877
|
+
* ```
|
|
63878
|
+
*
|
|
63879
|
+
* @param params - Parameters for request
|
|
63880
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
63881
|
+
* @param callback - Optional callback that handles the response.
|
|
63882
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
63883
|
+
*/
|
|
63884
|
+
answer(
|
|
63885
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
63886
|
+
options: StreamMethodOptions
|
|
63887
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
63888
|
+
answer(
|
|
63889
|
+
params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
63890
|
+
options?: MethodOptions
|
|
63891
|
+
): Promise<
|
|
63892
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
63893
|
+
>;
|
|
63894
|
+
answer(
|
|
63895
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
63896
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
63897
|
+
callback: BodyResponseCallback<Readable>
|
|
63898
|
+
): void;
|
|
63899
|
+
answer(
|
|
63900
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
63901
|
+
options:
|
|
63902
|
+
| MethodOptions
|
|
63903
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>,
|
|
63904
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
63905
|
+
): void;
|
|
63906
|
+
answer(
|
|
63907
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
|
|
63908
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
63909
|
+
): void;
|
|
63910
|
+
answer(
|
|
63911
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
63912
|
+
): void;
|
|
63913
|
+
answer(
|
|
63914
|
+
paramsOrCallback?:
|
|
63915
|
+
| Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer
|
|
63916
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
63917
|
+
| BodyResponseCallback<Readable>,
|
|
63918
|
+
optionsOrCallback?:
|
|
63919
|
+
| MethodOptions
|
|
63920
|
+
| StreamMethodOptions
|
|
63921
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
63922
|
+
| BodyResponseCallback<Readable>,
|
|
63923
|
+
callback?:
|
|
63924
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
63925
|
+
| BodyResponseCallback<Readable>
|
|
63926
|
+
):
|
|
63927
|
+
| void
|
|
63928
|
+
| Promise<
|
|
63929
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>
|
|
63930
|
+
>
|
|
63931
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
63932
|
+
let params = (paramsOrCallback ||
|
|
63933
|
+
{}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer;
|
|
63934
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
63935
|
+
|
|
63936
|
+
if (typeof paramsOrCallback === 'function') {
|
|
63937
|
+
callback = paramsOrCallback;
|
|
63938
|
+
params =
|
|
63939
|
+
{} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer;
|
|
63940
|
+
options = {};
|
|
63941
|
+
}
|
|
63942
|
+
|
|
63943
|
+
if (typeof optionsOrCallback === 'function') {
|
|
63944
|
+
callback = optionsOrCallback;
|
|
63945
|
+
options = {};
|
|
63946
|
+
}
|
|
63947
|
+
|
|
63948
|
+
const rootUrl =
|
|
63949
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
63950
|
+
const parameters = {
|
|
63951
|
+
options: Object.assign(
|
|
63952
|
+
{
|
|
63953
|
+
url: (rootUrl + '/v1alpha/{+servingConfig}:answer').replace(
|
|
63954
|
+
/([^:]\/)\/+/g,
|
|
63955
|
+
'$1'
|
|
63956
|
+
),
|
|
63957
|
+
method: 'POST',
|
|
63958
|
+
apiVersion: '',
|
|
63959
|
+
},
|
|
63960
|
+
options
|
|
63961
|
+
),
|
|
63962
|
+
params,
|
|
63963
|
+
requiredParams: ['servingConfig'],
|
|
63964
|
+
pathParams: ['servingConfig'],
|
|
63965
|
+
context: this.context,
|
|
63966
|
+
};
|
|
63967
|
+
if (callback) {
|
|
63968
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>(
|
|
63969
|
+
parameters,
|
|
63970
|
+
callback as BodyResponseCallback<unknown>
|
|
63971
|
+
);
|
|
63972
|
+
} else {
|
|
63973
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse>(
|
|
63974
|
+
parameters
|
|
63975
|
+
);
|
|
63976
|
+
}
|
|
63977
|
+
}
|
|
63978
|
+
|
|
63979
|
+
/**
|
|
63980
|
+
* 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.
|
|
63981
|
+
* @example
|
|
63982
|
+
* ```js
|
|
63983
|
+
* // Before running the sample:
|
|
63984
|
+
* // - Enable the API at:
|
|
63985
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
63986
|
+
* // - Login into gcloud by running:
|
|
63987
|
+
* // ```sh
|
|
63988
|
+
* // $ gcloud auth application-default login
|
|
63989
|
+
* // ```
|
|
63990
|
+
* // - Install the npm module by running:
|
|
63991
|
+
* // ```sh
|
|
63992
|
+
* // $ npm install googleapis
|
|
63993
|
+
* // ```
|
|
63994
|
+
*
|
|
63995
|
+
* const {google} = require('googleapis');
|
|
63996
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
63997
|
+
*
|
|
63998
|
+
* async function main() {
|
|
63999
|
+
* const auth = new google.auth.GoogleAuth({
|
|
64000
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
64001
|
+
* scopes: [
|
|
64002
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
62972
64003
|
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
62973
64004
|
* ],
|
|
62974
64005
|
* });
|
|
@@ -62979,27 +64010,41 @@ export namespace discoveryengine_v1alpha {
|
|
|
62979
64010
|
*
|
|
62980
64011
|
* // Do the magic
|
|
62981
64012
|
* const res =
|
|
62982
|
-
* await discoveryengine.projects.locations.dataStores.servingConfigs.
|
|
62983
|
-
* // Required.
|
|
62984
|
-
*
|
|
62985
|
-
* 'projects/my-project/locations/my-location/dataStores/my-dataStore
|
|
64013
|
+
* await discoveryengine.projects.locations.dataStores.servingConfigs.create({
|
|
64014
|
+
* // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
64015
|
+
* parent:
|
|
64016
|
+
* 'projects/my-project/locations/my-location/dataStores/my-dataStore',
|
|
64017
|
+
* // 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+/.
|
|
64018
|
+
* servingConfigId: 'placeholder-value',
|
|
62986
64019
|
*
|
|
62987
64020
|
* // Request body metadata
|
|
62988
64021
|
* requestBody: {
|
|
62989
64022
|
* // request body parameters
|
|
62990
64023
|
* // {
|
|
62991
64024
|
* // "answerGenerationSpec": {},
|
|
62992
|
-
* // "
|
|
62993
|
-
* // "
|
|
62994
|
-
* // "
|
|
62995
|
-
* // "
|
|
62996
|
-
* // "
|
|
62997
|
-
* // "
|
|
62998
|
-
* // "
|
|
62999
|
-
* // "
|
|
63000
|
-
* // "
|
|
63001
|
-
* // "
|
|
63002
|
-
* // "
|
|
64025
|
+
* // "boostControlIds": [],
|
|
64026
|
+
* // "createTime": "my_createTime",
|
|
64027
|
+
* // "customFineTuningSpec": {},
|
|
64028
|
+
* // "displayName": "my_displayName",
|
|
64029
|
+
* // "dissociateControlIds": [],
|
|
64030
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
64031
|
+
* // "embeddingConfig": {},
|
|
64032
|
+
* // "filterControlIds": [],
|
|
64033
|
+
* // "genericConfig": {},
|
|
64034
|
+
* // "guidedSearchSpec": {},
|
|
64035
|
+
* // "ignoreControlIds": [],
|
|
64036
|
+
* // "mediaConfig": {},
|
|
64037
|
+
* // "modelId": "my_modelId",
|
|
64038
|
+
* // "name": "my_name",
|
|
64039
|
+
* // "onewaySynonymsControlIds": [],
|
|
64040
|
+
* // "personalizationSpec": {},
|
|
64041
|
+
* // "promoteControlIds": [],
|
|
64042
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
64043
|
+
* // "redirectControlIds": [],
|
|
64044
|
+
* // "replacementControlIds": [],
|
|
64045
|
+
* // "solutionType": "my_solutionType",
|
|
64046
|
+
* // "synonymsControlIds": [],
|
|
64047
|
+
* // "updateTime": "my_updateTime"
|
|
63003
64048
|
* // }
|
|
63004
64049
|
* },
|
|
63005
64050
|
* });
|
|
@@ -63007,9 +64052,30 @@ export namespace discoveryengine_v1alpha {
|
|
|
63007
64052
|
*
|
|
63008
64053
|
* // Example response
|
|
63009
64054
|
* // {
|
|
63010
|
-
* // "
|
|
63011
|
-
* // "
|
|
63012
|
-
* // "
|
|
64055
|
+
* // "answerGenerationSpec": {},
|
|
64056
|
+
* // "boostControlIds": [],
|
|
64057
|
+
* // "createTime": "my_createTime",
|
|
64058
|
+
* // "customFineTuningSpec": {},
|
|
64059
|
+
* // "displayName": "my_displayName",
|
|
64060
|
+
* // "dissociateControlIds": [],
|
|
64061
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
64062
|
+
* // "embeddingConfig": {},
|
|
64063
|
+
* // "filterControlIds": [],
|
|
64064
|
+
* // "genericConfig": {},
|
|
64065
|
+
* // "guidedSearchSpec": {},
|
|
64066
|
+
* // "ignoreControlIds": [],
|
|
64067
|
+
* // "mediaConfig": {},
|
|
64068
|
+
* // "modelId": "my_modelId",
|
|
64069
|
+
* // "name": "my_name",
|
|
64070
|
+
* // "onewaySynonymsControlIds": [],
|
|
64071
|
+
* // "personalizationSpec": {},
|
|
64072
|
+
* // "promoteControlIds": [],
|
|
64073
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
64074
|
+
* // "redirectControlIds": [],
|
|
64075
|
+
* // "replacementControlIds": [],
|
|
64076
|
+
* // "solutionType": "my_solutionType",
|
|
64077
|
+
* // "synonymsControlIds": [],
|
|
64078
|
+
* // "updateTime": "my_updateTime"
|
|
63013
64079
|
* // }
|
|
63014
64080
|
* }
|
|
63015
64081
|
*
|
|
@@ -63025,62 +64091,62 @@ export namespace discoveryengine_v1alpha {
|
|
|
63025
64091
|
* @param callback - Optional callback that handles the response.
|
|
63026
64092
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
63027
64093
|
*/
|
|
63028
|
-
|
|
63029
|
-
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
64094
|
+
create(
|
|
64095
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
63030
64096
|
options: StreamMethodOptions
|
|
63031
64097
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
63032
|
-
|
|
63033
|
-
params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
64098
|
+
create(
|
|
64099
|
+
params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
63034
64100
|
options?: MethodOptions
|
|
63035
64101
|
): Promise<
|
|
63036
|
-
GaxiosResponseWithHTTP2<Schema$
|
|
64102
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
63037
64103
|
>;
|
|
63038
|
-
|
|
63039
|
-
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
64104
|
+
create(
|
|
64105
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
63040
64106
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
63041
64107
|
callback: BodyResponseCallback<Readable>
|
|
63042
64108
|
): void;
|
|
63043
|
-
|
|
63044
|
-
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
64109
|
+
create(
|
|
64110
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
63045
64111
|
options:
|
|
63046
64112
|
| MethodOptions
|
|
63047
|
-
| BodyResponseCallback<Schema$
|
|
63048
|
-
callback: BodyResponseCallback<Schema$
|
|
64113
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>,
|
|
64114
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
63049
64115
|
): void;
|
|
63050
|
-
|
|
63051
|
-
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
63052
|
-
callback: BodyResponseCallback<Schema$
|
|
64116
|
+
create(
|
|
64117
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
|
|
64118
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
63053
64119
|
): void;
|
|
63054
|
-
|
|
63055
|
-
callback: BodyResponseCallback<Schema$
|
|
64120
|
+
create(
|
|
64121
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
63056
64122
|
): void;
|
|
63057
|
-
|
|
64123
|
+
create(
|
|
63058
64124
|
paramsOrCallback?:
|
|
63059
|
-
| Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
63060
|
-
| BodyResponseCallback<Schema$
|
|
64125
|
+
| Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create
|
|
64126
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
63061
64127
|
| BodyResponseCallback<Readable>,
|
|
63062
64128
|
optionsOrCallback?:
|
|
63063
64129
|
| MethodOptions
|
|
63064
64130
|
| StreamMethodOptions
|
|
63065
|
-
| BodyResponseCallback<Schema$
|
|
64131
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
63066
64132
|
| BodyResponseCallback<Readable>,
|
|
63067
64133
|
callback?:
|
|
63068
|
-
| BodyResponseCallback<Schema$
|
|
64134
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
63069
64135
|
| BodyResponseCallback<Readable>
|
|
63070
64136
|
):
|
|
63071
64137
|
| void
|
|
63072
64138
|
| Promise<
|
|
63073
|
-
GaxiosResponseWithHTTP2<Schema$
|
|
64139
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>
|
|
63074
64140
|
>
|
|
63075
64141
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
63076
64142
|
let params = (paramsOrCallback ||
|
|
63077
|
-
{}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
64143
|
+
{}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create;
|
|
63078
64144
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
63079
64145
|
|
|
63080
64146
|
if (typeof paramsOrCallback === 'function') {
|
|
63081
64147
|
callback = paramsOrCallback;
|
|
63082
64148
|
params =
|
|
63083
|
-
{} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$
|
|
64149
|
+
{} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create;
|
|
63084
64150
|
options = {};
|
|
63085
64151
|
}
|
|
63086
64152
|
|
|
@@ -63094,7 +64160,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
63094
64160
|
const parameters = {
|
|
63095
64161
|
options: Object.assign(
|
|
63096
64162
|
{
|
|
63097
|
-
url: (rootUrl + '/v1alpha/{+
|
|
64163
|
+
url: (rootUrl + '/v1alpha/{+parent}/servingConfigs').replace(
|
|
63098
64164
|
/([^:]\/)\/+/g,
|
|
63099
64165
|
'$1'
|
|
63100
64166
|
),
|
|
@@ -63104,22 +64170,160 @@ export namespace discoveryengine_v1alpha {
|
|
|
63104
64170
|
options
|
|
63105
64171
|
),
|
|
63106
64172
|
params,
|
|
63107
|
-
requiredParams: ['
|
|
63108
|
-
pathParams: ['
|
|
64173
|
+
requiredParams: ['parent'],
|
|
64174
|
+
pathParams: ['parent'],
|
|
63109
64175
|
context: this.context,
|
|
63110
64176
|
};
|
|
63111
64177
|
if (callback) {
|
|
63112
|
-
createAPIRequest<Schema$
|
|
64178
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>(
|
|
63113
64179
|
parameters,
|
|
63114
64180
|
callback as BodyResponseCallback<unknown>
|
|
63115
64181
|
);
|
|
63116
64182
|
} else {
|
|
63117
|
-
return createAPIRequest<Schema$
|
|
64183
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaServingConfig>(
|
|
63118
64184
|
parameters
|
|
63119
64185
|
);
|
|
63120
64186
|
}
|
|
63121
64187
|
}
|
|
63122
64188
|
|
|
64189
|
+
/**
|
|
64190
|
+
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
64191
|
+
* @example
|
|
64192
|
+
* ```js
|
|
64193
|
+
* // Before running the sample:
|
|
64194
|
+
* // - Enable the API at:
|
|
64195
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
64196
|
+
* // - Login into gcloud by running:
|
|
64197
|
+
* // ```sh
|
|
64198
|
+
* // $ gcloud auth application-default login
|
|
64199
|
+
* // ```
|
|
64200
|
+
* // - Install the npm module by running:
|
|
64201
|
+
* // ```sh
|
|
64202
|
+
* // $ npm install googleapis
|
|
64203
|
+
* // ```
|
|
64204
|
+
*
|
|
64205
|
+
* const {google} = require('googleapis');
|
|
64206
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
64207
|
+
*
|
|
64208
|
+
* async function main() {
|
|
64209
|
+
* const auth = new google.auth.GoogleAuth({
|
|
64210
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
64211
|
+
* scopes: [
|
|
64212
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
64213
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
64214
|
+
* ],
|
|
64215
|
+
* });
|
|
64216
|
+
*
|
|
64217
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
64218
|
+
* const authClient = await auth.getClient();
|
|
64219
|
+
* google.options({auth: authClient});
|
|
64220
|
+
*
|
|
64221
|
+
* // Do the magic
|
|
64222
|
+
* const res =
|
|
64223
|
+
* await discoveryengine.projects.locations.dataStores.servingConfigs.delete({
|
|
64224
|
+
* // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
64225
|
+
* name: 'projects/my-project/locations/my-location/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
64226
|
+
* });
|
|
64227
|
+
* console.log(res.data);
|
|
64228
|
+
*
|
|
64229
|
+
* // Example response
|
|
64230
|
+
* // {}
|
|
64231
|
+
* }
|
|
64232
|
+
*
|
|
64233
|
+
* main().catch(e => {
|
|
64234
|
+
* console.error(e);
|
|
64235
|
+
* throw e;
|
|
64236
|
+
* });
|
|
64237
|
+
*
|
|
64238
|
+
* ```
|
|
64239
|
+
*
|
|
64240
|
+
* @param params - Parameters for request
|
|
64241
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
64242
|
+
* @param callback - Optional callback that handles the response.
|
|
64243
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
64244
|
+
*/
|
|
64245
|
+
delete(
|
|
64246
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
64247
|
+
options: StreamMethodOptions
|
|
64248
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
64249
|
+
delete(
|
|
64250
|
+
params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
64251
|
+
options?: MethodOptions
|
|
64252
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
64253
|
+
delete(
|
|
64254
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
64255
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
64256
|
+
callback: BodyResponseCallback<Readable>
|
|
64257
|
+
): void;
|
|
64258
|
+
delete(
|
|
64259
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
64260
|
+
options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
|
|
64261
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
64262
|
+
): void;
|
|
64263
|
+
delete(
|
|
64264
|
+
params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete,
|
|
64265
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
64266
|
+
): void;
|
|
64267
|
+
delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
64268
|
+
delete(
|
|
64269
|
+
paramsOrCallback?:
|
|
64270
|
+
| Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete
|
|
64271
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
64272
|
+
| BodyResponseCallback<Readable>,
|
|
64273
|
+
optionsOrCallback?:
|
|
64274
|
+
| MethodOptions
|
|
64275
|
+
| StreamMethodOptions
|
|
64276
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
64277
|
+
| BodyResponseCallback<Readable>,
|
|
64278
|
+
callback?:
|
|
64279
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
64280
|
+
| BodyResponseCallback<Readable>
|
|
64281
|
+
):
|
|
64282
|
+
| void
|
|
64283
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
|
|
64284
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
64285
|
+
let params = (paramsOrCallback ||
|
|
64286
|
+
{}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete;
|
|
64287
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
64288
|
+
|
|
64289
|
+
if (typeof paramsOrCallback === 'function') {
|
|
64290
|
+
callback = paramsOrCallback;
|
|
64291
|
+
params =
|
|
64292
|
+
{} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete;
|
|
64293
|
+
options = {};
|
|
64294
|
+
}
|
|
64295
|
+
|
|
64296
|
+
if (typeof optionsOrCallback === 'function') {
|
|
64297
|
+
callback = optionsOrCallback;
|
|
64298
|
+
options = {};
|
|
64299
|
+
}
|
|
64300
|
+
|
|
64301
|
+
const rootUrl =
|
|
64302
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
64303
|
+
const parameters = {
|
|
64304
|
+
options: Object.assign(
|
|
64305
|
+
{
|
|
64306
|
+
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
64307
|
+
method: 'DELETE',
|
|
64308
|
+
apiVersion: '',
|
|
64309
|
+
},
|
|
64310
|
+
options
|
|
64311
|
+
),
|
|
64312
|
+
params,
|
|
64313
|
+
requiredParams: ['name'],
|
|
64314
|
+
pathParams: ['name'],
|
|
64315
|
+
context: this.context,
|
|
64316
|
+
};
|
|
64317
|
+
if (callback) {
|
|
64318
|
+
createAPIRequest<Schema$GoogleProtobufEmpty>(
|
|
64319
|
+
parameters,
|
|
64320
|
+
callback as BodyResponseCallback<unknown>
|
|
64321
|
+
);
|
|
64322
|
+
} else {
|
|
64323
|
+
return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
|
|
64324
|
+
}
|
|
64325
|
+
}
|
|
64326
|
+
|
|
63123
64327
|
/**
|
|
63124
64328
|
* Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.
|
|
63125
64329
|
* @example
|
|
@@ -63901,6 +65105,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
63901
65105
|
* // "rankingExpression": "my_rankingExpression",
|
|
63902
65106
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
63903
65107
|
* // "regionCode": "my_regionCode",
|
|
65108
|
+
* // "relevanceFilterSpec": {},
|
|
63904
65109
|
* // "relevanceScoreSpec": {},
|
|
63905
65110
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
63906
65111
|
* // "safeSearch": false,
|
|
@@ -64121,6 +65326,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
64121
65326
|
* // "rankingExpression": "my_rankingExpression",
|
|
64122
65327
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
64123
65328
|
* // "regionCode": "my_regionCode",
|
|
65329
|
+
* // "relevanceFilterSpec": {},
|
|
64124
65330
|
* // "relevanceScoreSpec": {},
|
|
64125
65331
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
64126
65332
|
* // "safeSearch": false,
|
|
@@ -64460,6 +65666,27 @@ export namespace discoveryengine_v1alpha {
|
|
|
64460
65666
|
*/
|
|
64461
65667
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest;
|
|
64462
65668
|
}
|
|
65669
|
+
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create extends StandardParameters {
|
|
65670
|
+
/**
|
|
65671
|
+
* Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
65672
|
+
*/
|
|
65673
|
+
parent?: string;
|
|
65674
|
+
/**
|
|
65675
|
+
* 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+/.
|
|
65676
|
+
*/
|
|
65677
|
+
servingConfigId?: string;
|
|
65678
|
+
|
|
65679
|
+
/**
|
|
65680
|
+
* Request body metadata
|
|
65681
|
+
*/
|
|
65682
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1alphaServingConfig;
|
|
65683
|
+
}
|
|
65684
|
+
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete extends StandardParameters {
|
|
65685
|
+
/**
|
|
65686
|
+
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
65687
|
+
*/
|
|
65688
|
+
name?: string;
|
|
65689
|
+
}
|
|
64463
65690
|
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Get extends StandardParameters {
|
|
64464
65691
|
/**
|
|
64465
65692
|
* Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|