@googleapis/discoveryengine 28.1.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/v1.ts CHANGED
@@ -4320,12 +4320,16 @@ export namespace discoveryengine_v1 {
4320
4320
  * 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.
4321
4321
  */
4322
4322
  regionCode?: string | null;
4323
+ /**
4324
+ * 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.
4325
+ */
4326
+ relevanceFilterSpec?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpec;
4323
4327
  /**
4324
4328
  * Optional. The specification for returning the relevance score.
4325
4329
  */
4326
4330
  relevanceScoreSpec?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceScoreSpec;
4327
4331
  /**
4328
- * The relevance threshold of the search results. Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information. This feature is not supported for healthcare search.
4332
+ * 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.
4329
4333
  */
4330
4334
  relevanceThreshold?: string | null;
4331
4335
  /**
@@ -4764,6 +4768,32 @@ export namespace discoveryengine_v1 {
4764
4768
  */
4765
4769
  pinUnexpandedResults?: boolean | null;
4766
4770
  }
4771
+ /**
4772
+ * Relevance filtering specification.
4773
+ */
4774
+ export interface Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpec {
4775
+ /**
4776
+ * Optional. Relevance filtering threshold specification for keyword search.
4777
+ */
4778
+ keywordSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
4779
+ /**
4780
+ * Optional. Relevance filtering threshold specification for semantic search.
4781
+ */
4782
+ semanticSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
4783
+ }
4784
+ /**
4785
+ * Specification for relevance filtering on a specific sub-search.
4786
+ */
4787
+ export interface Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec {
4788
+ /**
4789
+ * Pre-defined relevance threshold for the sub-search.
4790
+ */
4791
+ relevanceThreshold?: string | null;
4792
+ /**
4793
+ * Custom relevance threshold for the sub-search. The value must be in [0.0, 1.0].
4794
+ */
4795
+ semanticRelevanceThreshold?: number | null;
4796
+ }
4767
4797
  /**
4768
4798
  * The specification for returning the document relevance score.
4769
4799
  */
@@ -8479,12 +8509,16 @@ export namespace discoveryengine_v1 {
8479
8509
  * 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.
8480
8510
  */
8481
8511
  regionCode?: string | null;
8512
+ /**
8513
+ * 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.
8514
+ */
8515
+ relevanceFilterSpec?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpec;
8482
8516
  /**
8483
8517
  * Optional. The specification for returning the relevance score.
8484
8518
  */
8485
8519
  relevanceScoreSpec?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceScoreSpec;
8486
8520
  /**
8487
- * The relevance threshold of the search results. Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information. This feature is not supported for healthcare search.
8521
+ * 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.
8488
8522
  */
8489
8523
  relevanceThreshold?: string | null;
8490
8524
  /**
@@ -8919,6 +8953,32 @@ export namespace discoveryengine_v1 {
8919
8953
  */
8920
8954
  pinUnexpandedResults?: boolean | null;
8921
8955
  }
8956
+ /**
8957
+ * Relevance filtering specification.
8958
+ */
8959
+ export interface Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpec {
8960
+ /**
8961
+ * Optional. Relevance filtering threshold specification for keyword search.
8962
+ */
8963
+ keywordSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
8964
+ /**
8965
+ * Optional. Relevance filtering threshold specification for semantic search.
8966
+ */
8967
+ semanticSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
8968
+ }
8969
+ /**
8970
+ * Specification for relevance filtering on a specific sub-search.
8971
+ */
8972
+ export interface Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec {
8973
+ /**
8974
+ * Pre-defined relevance threshold for the sub-search.
8975
+ */
8976
+ relevanceThreshold?: string | null;
8977
+ /**
8978
+ * Custom relevance threshold for the sub-search. The value must be in [0.0, 1.0].
8979
+ */
8980
+ semanticRelevanceThreshold?: number | null;
8981
+ }
8922
8982
  /**
8923
8983
  * The specification for returning the document relevance score.
8924
8984
  */
@@ -12902,7 +12962,7 @@ export namespace discoveryengine_v1 {
12902
12962
  */
12903
12963
  relevanceScoreSpec?: Schema$GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec;
12904
12964
  /**
12905
- * The relevance threshold of the search results. Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information. This feature is not supported for healthcare search.
12965
+ * 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.
12906
12966
  */
12907
12967
  relevanceThreshold?: string | null;
12908
12968
  /**
@@ -17509,7 +17569,7 @@ export namespace discoveryengine_v1 {
17509
17569
  * await discoveryengine.projects.locations.collections.updateDataConnector({
17510
17570
  * // Output only. The full resource name of the Data Connector. Format: `projects/x/locations/x/collections/x/dataConnector`.
17511
17571
  * name: 'projects/my-project/locations/my-location/collections/my-collection/dataConnector',
17512
- * // 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.
17572
+ * // 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.
17513
17573
  * updateMask: 'placeholder-value',
17514
17574
  *
17515
17575
  * // Request body metadata
@@ -17727,7 +17787,7 @@ export namespace discoveryengine_v1 {
17727
17787
  */
17728
17788
  name?: string;
17729
17789
  /**
17730
- * 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.
17790
+ * 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.
17731
17791
  */
17732
17792
  updateMask?: string;
17733
17793
 
@@ -26412,7 +26472,7 @@ export namespace discoveryengine_v1 {
26412
26472
  }
26413
26473
 
26414
26474
  /**
26415
- * Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
26475
+ * 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.
26416
26476
  * @example
26417
26477
  * ```js
26418
26478
  * // Before running the sample:
@@ -26445,150 +26505,40 @@ export namespace discoveryengine_v1 {
26445
26505
  *
26446
26506
  * // Do the magic
26447
26507
  * const res =
26448
- * await discoveryengine.projects.locations.collections.dataStores.servingConfigs.delete(
26508
+ * await discoveryengine.projects.locations.collections.dataStores.servingConfigs.create(
26449
26509
  * {
26450
- * // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
26451
- * name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
26452
- * },
26453
- * );
26454
- * console.log(res.data);
26455
- *
26456
- * // Example response
26457
- * // {}
26458
- * }
26459
- *
26460
- * main().catch(e => {
26461
- * console.error(e);
26462
- * throw e;
26463
- * });
26464
- *
26465
- * ```
26466
- *
26467
- * @param params - Parameters for request
26468
- * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
26469
- * @param callback - Optional callback that handles the response.
26470
- * @returns A promise if used with async/await, or void if used with a callback.
26471
- */
26472
- delete(
26473
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26474
- options: StreamMethodOptions
26475
- ): Promise<GaxiosResponseWithHTTP2<Readable>>;
26476
- delete(
26477
- params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26478
- options?: MethodOptions
26479
- ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
26480
- delete(
26481
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26482
- options: StreamMethodOptions | BodyResponseCallback<Readable>,
26483
- callback: BodyResponseCallback<Readable>
26484
- ): void;
26485
- delete(
26486
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26487
- options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
26488
- callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
26489
- ): void;
26490
- delete(
26491
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26492
- callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
26493
- ): void;
26494
- delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
26495
- delete(
26496
- paramsOrCallback?:
26497
- | Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete
26498
- | BodyResponseCallback<Schema$GoogleProtobufEmpty>
26499
- | BodyResponseCallback<Readable>,
26500
- optionsOrCallback?:
26501
- | MethodOptions
26502
- | StreamMethodOptions
26503
- | BodyResponseCallback<Schema$GoogleProtobufEmpty>
26504
- | BodyResponseCallback<Readable>,
26505
- callback?:
26506
- | BodyResponseCallback<Schema$GoogleProtobufEmpty>
26507
- | BodyResponseCallback<Readable>
26508
- ):
26509
- | void
26510
- | Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
26511
- | Promise<GaxiosResponseWithHTTP2<Readable>> {
26512
- let params = (paramsOrCallback ||
26513
- {}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete;
26514
- let options = (optionsOrCallback || {}) as MethodOptions;
26515
-
26516
- if (typeof paramsOrCallback === 'function') {
26517
- callback = paramsOrCallback;
26518
- params =
26519
- {} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete;
26520
- options = {};
26521
- }
26522
-
26523
- if (typeof optionsOrCallback === 'function') {
26524
- callback = optionsOrCallback;
26525
- options = {};
26526
- }
26527
-
26528
- const rootUrl =
26529
- options.rootUrl || 'https://discoveryengine.googleapis.com/';
26530
- const parameters = {
26531
- options: Object.assign(
26532
- {
26533
- url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
26534
- method: 'DELETE',
26535
- apiVersion: '',
26536
- },
26537
- options
26538
- ),
26539
- params,
26540
- requiredParams: ['name'],
26541
- pathParams: ['name'],
26542
- context: this.context,
26543
- };
26544
- if (callback) {
26545
- createAPIRequest<Schema$GoogleProtobufEmpty>(
26546
- parameters,
26547
- callback as BodyResponseCallback<unknown>
26548
- );
26549
- } else {
26550
- return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
26551
- }
26552
- }
26553
-
26554
- /**
26555
- * Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.
26556
- * @example
26557
- * ```js
26558
- * // Before running the sample:
26559
- * // - Enable the API at:
26560
- * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
26561
- * // - Login into gcloud by running:
26562
- * // ```sh
26563
- * // $ gcloud auth application-default login
26564
- * // ```
26565
- * // - Install the npm module by running:
26566
- * // ```sh
26567
- * // $ npm install googleapis
26568
- * // ```
26569
- *
26570
- * const {google} = require('googleapis');
26571
- * const discoveryengine = google.discoveryengine('v1');
26572
- *
26573
- * async function main() {
26574
- * const auth = new google.auth.GoogleAuth({
26575
- * // Scopes can be specified either as an array or as a single, space-delimited string.
26576
- * scopes: [
26577
- * 'https://www.googleapis.com/auth/cloud-platform',
26578
- * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
26579
- * ],
26580
- * });
26581
- *
26582
- * // Acquire an auth client, and bind it to all future calls
26583
- * const authClient = await auth.getClient();
26584
- * google.options({auth: authClient});
26510
+ * // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
26511
+ * parent:
26512
+ * 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
26513
+ * // 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+/.
26514
+ * servingConfigId: 'placeholder-value',
26585
26515
  *
26586
- * // Do the magic
26587
- * const res =
26588
- * await discoveryengine.projects.locations.collections.dataStores.servingConfigs.get(
26589
- * {
26590
- * // Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
26591
- * name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
26516
+ * // Request body metadata
26517
+ * requestBody: {
26518
+ * // request body parameters
26519
+ * // {
26520
+ * // "answerGenerationSpec": {},
26521
+ * // "boostControlIds": [],
26522
+ * // "createTime": "my_createTime",
26523
+ * // "displayName": "my_displayName",
26524
+ * // "dissociateControlIds": [],
26525
+ * // "diversityLevel": "my_diversityLevel",
26526
+ * // "filterControlIds": [],
26527
+ * // "genericConfig": {},
26528
+ * // "ignoreControlIds": [],
26529
+ * // "mediaConfig": {},
26530
+ * // "modelId": "my_modelId",
26531
+ * // "name": "my_name",
26532
+ * // "onewaySynonymsControlIds": [],
26533
+ * // "promoteControlIds": [],
26534
+ * // "rankingExpression": "my_rankingExpression",
26535
+ * // "redirectControlIds": [],
26536
+ * // "replacementControlIds": [],
26537
+ * // "solutionType": "my_solutionType",
26538
+ * // "synonymsControlIds": [],
26539
+ * // "updateTime": "my_updateTime"
26540
+ * // }
26541
+ * },
26592
26542
  * },
26593
26543
  * );
26594
26544
  * console.log(res.data);
@@ -26630,38 +26580,38 @@ export namespace discoveryengine_v1 {
26630
26580
  * @param callback - Optional callback that handles the response.
26631
26581
  * @returns A promise if used with async/await, or void if used with a callback.
26632
26582
  */
26633
- get(
26634
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26583
+ create(
26584
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
26635
26585
  options: StreamMethodOptions
26636
26586
  ): Promise<GaxiosResponseWithHTTP2<Readable>>;
26637
- get(
26638
- params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26587
+ create(
26588
+ params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
26639
26589
  options?: MethodOptions
26640
26590
  ): Promise<
26641
26591
  GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26642
26592
  >;
26643
- get(
26644
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26593
+ create(
26594
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
26645
26595
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
26646
26596
  callback: BodyResponseCallback<Readable>
26647
26597
  ): void;
26648
- get(
26649
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26598
+ create(
26599
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
26650
26600
  options:
26651
26601
  | MethodOptions
26652
26602
  | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>,
26653
26603
  callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26654
26604
  ): void;
26655
- get(
26656
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26605
+ create(
26606
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create,
26657
26607
  callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26658
26608
  ): void;
26659
- get(
26609
+ create(
26660
26610
  callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26661
26611
  ): void;
26662
- get(
26612
+ create(
26663
26613
  paramsOrCallback?:
26664
- | Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get
26614
+ | Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create
26665
26615
  | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26666
26616
  | BodyResponseCallback<Readable>,
26667
26617
  optionsOrCallback?:
@@ -26679,13 +26629,13 @@ export namespace discoveryengine_v1 {
26679
26629
  >
26680
26630
  | Promise<GaxiosResponseWithHTTP2<Readable>> {
26681
26631
  let params = (paramsOrCallback ||
26682
- {}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get;
26632
+ {}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create;
26683
26633
  let options = (optionsOrCallback || {}) as MethodOptions;
26684
26634
 
26685
26635
  if (typeof paramsOrCallback === 'function') {
26686
26636
  callback = paramsOrCallback;
26687
26637
  params =
26688
- {} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get;
26638
+ {} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create;
26689
26639
  options = {};
26690
26640
  }
26691
26641
 
@@ -26699,15 +26649,18 @@ export namespace discoveryengine_v1 {
26699
26649
  const parameters = {
26700
26650
  options: Object.assign(
26701
26651
  {
26702
- url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
26703
- method: 'GET',
26652
+ url: (rootUrl + '/v1/{+parent}/servingConfigs').replace(
26653
+ /([^:]\/)\/+/g,
26654
+ '$1'
26655
+ ),
26656
+ method: 'POST',
26704
26657
  apiVersion: '',
26705
26658
  },
26706
26659
  options
26707
26660
  ),
26708
26661
  params,
26709
- requiredParams: ['name'],
26710
- pathParams: ['name'],
26662
+ requiredParams: ['parent'],
26663
+ pathParams: ['parent'],
26711
26664
  context: this.context,
26712
26665
  };
26713
26666
  if (callback) {
@@ -26723,7 +26676,7 @@ export namespace discoveryengine_v1 {
26723
26676
  }
26724
26677
 
26725
26678
  /**
26726
- * Lists all ServingConfigs linked to this dataStore.
26679
+ * Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
26727
26680
  * @example
26728
26681
  * ```js
26729
26682
  * // Before running the sample:
@@ -26756,24 +26709,16 @@ export namespace discoveryengine_v1 {
26756
26709
  *
26757
26710
  * // Do the magic
26758
26711
  * const res =
26759
- * await discoveryengine.projects.locations.collections.dataStores.servingConfigs.list(
26712
+ * await discoveryengine.projects.locations.collections.dataStores.servingConfigs.delete(
26760
26713
  * {
26761
- * // 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.
26762
- * pageSize: 'placeholder-value',
26763
- * // Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.
26764
- * pageToken: 'placeholder-value',
26765
- * // Required. Full resource name of the parent resource. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
26766
- * parent:
26767
- * 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
26714
+ * // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
26715
+ * name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
26768
26716
  * },
26769
26717
  * );
26770
26718
  * console.log(res.data);
26771
26719
  *
26772
26720
  * // Example response
26773
- * // {
26774
- * // "nextPageToken": "my_nextPageToken",
26775
- * // "servingConfigs": []
26776
- * // }
26721
+ * // {}
26777
26722
  * }
26778
26723
  *
26779
26724
  * main().catch(e => {
@@ -26788,62 +26733,54 @@ export namespace discoveryengine_v1 {
26788
26733
  * @param callback - Optional callback that handles the response.
26789
26734
  * @returns A promise if used with async/await, or void if used with a callback.
26790
26735
  */
26791
- list(
26792
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
26736
+ delete(
26737
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26793
26738
  options: StreamMethodOptions
26794
26739
  ): Promise<GaxiosResponseWithHTTP2<Readable>>;
26795
- list(
26796
- params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
26740
+ delete(
26741
+ params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26797
26742
  options?: MethodOptions
26798
- ): Promise<
26799
- GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
26800
- >;
26801
- list(
26802
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
26743
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
26744
+ delete(
26745
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26803
26746
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
26804
26747
  callback: BodyResponseCallback<Readable>
26805
26748
  ): void;
26806
- list(
26807
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
26808
- options:
26809
- | MethodOptions
26810
- | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>,
26811
- callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
26812
- ): void;
26813
- list(
26814
- params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
26815
- callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
26749
+ delete(
26750
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26751
+ options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
26752
+ callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
26816
26753
  ): void;
26817
- list(
26818
- callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
26754
+ delete(
26755
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete,
26756
+ callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
26819
26757
  ): void;
26820
- list(
26758
+ delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
26759
+ delete(
26821
26760
  paramsOrCallback?:
26822
- | Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List
26823
- | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
26761
+ | Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete
26762
+ | BodyResponseCallback<Schema$GoogleProtobufEmpty>
26824
26763
  | BodyResponseCallback<Readable>,
26825
26764
  optionsOrCallback?:
26826
26765
  | MethodOptions
26827
26766
  | StreamMethodOptions
26828
- | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
26767
+ | BodyResponseCallback<Schema$GoogleProtobufEmpty>
26829
26768
  | BodyResponseCallback<Readable>,
26830
26769
  callback?:
26831
- | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
26770
+ | BodyResponseCallback<Schema$GoogleProtobufEmpty>
26832
26771
  | BodyResponseCallback<Readable>
26833
26772
  ):
26834
26773
  | void
26835
- | Promise<
26836
- GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
26837
- >
26774
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
26838
26775
  | Promise<GaxiosResponseWithHTTP2<Readable>> {
26839
26776
  let params = (paramsOrCallback ||
26840
- {}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List;
26777
+ {}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete;
26841
26778
  let options = (optionsOrCallback || {}) as MethodOptions;
26842
26779
 
26843
26780
  if (typeof paramsOrCallback === 'function') {
26844
26781
  callback = paramsOrCallback;
26845
26782
  params =
26846
- {} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List;
26783
+ {} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete;
26847
26784
  options = {};
26848
26785
  }
26849
26786
 
@@ -26857,34 +26794,361 @@ export namespace discoveryengine_v1 {
26857
26794
  const parameters = {
26858
26795
  options: Object.assign(
26859
26796
  {
26860
- url: (rootUrl + '/v1/{+parent}/servingConfigs').replace(
26861
- /([^:]\/)\/+/g,
26862
- '$1'
26863
- ),
26864
- method: 'GET',
26797
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
26798
+ method: 'DELETE',
26865
26799
  apiVersion: '',
26866
26800
  },
26867
26801
  options
26868
26802
  ),
26869
26803
  params,
26870
- requiredParams: ['parent'],
26871
- pathParams: ['parent'],
26804
+ requiredParams: ['name'],
26805
+ pathParams: ['name'],
26872
26806
  context: this.context,
26873
26807
  };
26874
26808
  if (callback) {
26875
- createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>(
26809
+ createAPIRequest<Schema$GoogleProtobufEmpty>(
26876
26810
  parameters,
26877
26811
  callback as BodyResponseCallback<unknown>
26878
26812
  );
26879
26813
  } else {
26880
- return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>(
26881
- parameters
26882
- );
26814
+ return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
26883
26815
  }
26884
26816
  }
26885
26817
 
26886
26818
  /**
26887
- * Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
26819
+ * Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.
26820
+ * @example
26821
+ * ```js
26822
+ * // Before running the sample:
26823
+ * // - Enable the API at:
26824
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
26825
+ * // - Login into gcloud by running:
26826
+ * // ```sh
26827
+ * // $ gcloud auth application-default login
26828
+ * // ```
26829
+ * // - Install the npm module by running:
26830
+ * // ```sh
26831
+ * // $ npm install googleapis
26832
+ * // ```
26833
+ *
26834
+ * const {google} = require('googleapis');
26835
+ * const discoveryengine = google.discoveryengine('v1');
26836
+ *
26837
+ * async function main() {
26838
+ * const auth = new google.auth.GoogleAuth({
26839
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
26840
+ * scopes: [
26841
+ * 'https://www.googleapis.com/auth/cloud-platform',
26842
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
26843
+ * ],
26844
+ * });
26845
+ *
26846
+ * // Acquire an auth client, and bind it to all future calls
26847
+ * const authClient = await auth.getClient();
26848
+ * google.options({auth: authClient});
26849
+ *
26850
+ * // Do the magic
26851
+ * const res =
26852
+ * await discoveryengine.projects.locations.collections.dataStores.servingConfigs.get(
26853
+ * {
26854
+ * // Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
26855
+ * name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
26856
+ * },
26857
+ * );
26858
+ * console.log(res.data);
26859
+ *
26860
+ * // Example response
26861
+ * // {
26862
+ * // "answerGenerationSpec": {},
26863
+ * // "boostControlIds": [],
26864
+ * // "createTime": "my_createTime",
26865
+ * // "displayName": "my_displayName",
26866
+ * // "dissociateControlIds": [],
26867
+ * // "diversityLevel": "my_diversityLevel",
26868
+ * // "filterControlIds": [],
26869
+ * // "genericConfig": {},
26870
+ * // "ignoreControlIds": [],
26871
+ * // "mediaConfig": {},
26872
+ * // "modelId": "my_modelId",
26873
+ * // "name": "my_name",
26874
+ * // "onewaySynonymsControlIds": [],
26875
+ * // "promoteControlIds": [],
26876
+ * // "rankingExpression": "my_rankingExpression",
26877
+ * // "redirectControlIds": [],
26878
+ * // "replacementControlIds": [],
26879
+ * // "solutionType": "my_solutionType",
26880
+ * // "synonymsControlIds": [],
26881
+ * // "updateTime": "my_updateTime"
26882
+ * // }
26883
+ * }
26884
+ *
26885
+ * main().catch(e => {
26886
+ * console.error(e);
26887
+ * throw e;
26888
+ * });
26889
+ *
26890
+ * ```
26891
+ *
26892
+ * @param params - Parameters for request
26893
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
26894
+ * @param callback - Optional callback that handles the response.
26895
+ * @returns A promise if used with async/await, or void if used with a callback.
26896
+ */
26897
+ get(
26898
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26899
+ options: StreamMethodOptions
26900
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
26901
+ get(
26902
+ params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26903
+ options?: MethodOptions
26904
+ ): Promise<
26905
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26906
+ >;
26907
+ get(
26908
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26909
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
26910
+ callback: BodyResponseCallback<Readable>
26911
+ ): void;
26912
+ get(
26913
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26914
+ options:
26915
+ | MethodOptions
26916
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>,
26917
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26918
+ ): void;
26919
+ get(
26920
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get,
26921
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26922
+ ): void;
26923
+ get(
26924
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26925
+ ): void;
26926
+ get(
26927
+ paramsOrCallback?:
26928
+ | Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get
26929
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26930
+ | BodyResponseCallback<Readable>,
26931
+ optionsOrCallback?:
26932
+ | MethodOptions
26933
+ | StreamMethodOptions
26934
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26935
+ | BodyResponseCallback<Readable>,
26936
+ callback?:
26937
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26938
+ | BodyResponseCallback<Readable>
26939
+ ):
26940
+ | void
26941
+ | Promise<
26942
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
26943
+ >
26944
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
26945
+ let params = (paramsOrCallback ||
26946
+ {}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get;
26947
+ let options = (optionsOrCallback || {}) as MethodOptions;
26948
+
26949
+ if (typeof paramsOrCallback === 'function') {
26950
+ callback = paramsOrCallback;
26951
+ params =
26952
+ {} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get;
26953
+ options = {};
26954
+ }
26955
+
26956
+ if (typeof optionsOrCallback === 'function') {
26957
+ callback = optionsOrCallback;
26958
+ options = {};
26959
+ }
26960
+
26961
+ const rootUrl =
26962
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
26963
+ const parameters = {
26964
+ options: Object.assign(
26965
+ {
26966
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
26967
+ method: 'GET',
26968
+ apiVersion: '',
26969
+ },
26970
+ options
26971
+ ),
26972
+ params,
26973
+ requiredParams: ['name'],
26974
+ pathParams: ['name'],
26975
+ context: this.context,
26976
+ };
26977
+ if (callback) {
26978
+ createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ServingConfig>(
26979
+ parameters,
26980
+ callback as BodyResponseCallback<unknown>
26981
+ );
26982
+ } else {
26983
+ return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ServingConfig>(
26984
+ parameters
26985
+ );
26986
+ }
26987
+ }
26988
+
26989
+ /**
26990
+ * Lists all ServingConfigs linked to this dataStore.
26991
+ * @example
26992
+ * ```js
26993
+ * // Before running the sample:
26994
+ * // - Enable the API at:
26995
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
26996
+ * // - Login into gcloud by running:
26997
+ * // ```sh
26998
+ * // $ gcloud auth application-default login
26999
+ * // ```
27000
+ * // - Install the npm module by running:
27001
+ * // ```sh
27002
+ * // $ npm install googleapis
27003
+ * // ```
27004
+ *
27005
+ * const {google} = require('googleapis');
27006
+ * const discoveryengine = google.discoveryengine('v1');
27007
+ *
27008
+ * async function main() {
27009
+ * const auth = new google.auth.GoogleAuth({
27010
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
27011
+ * scopes: [
27012
+ * 'https://www.googleapis.com/auth/cloud-platform',
27013
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
27014
+ * ],
27015
+ * });
27016
+ *
27017
+ * // Acquire an auth client, and bind it to all future calls
27018
+ * const authClient = await auth.getClient();
27019
+ * google.options({auth: authClient});
27020
+ *
27021
+ * // Do the magic
27022
+ * const res =
27023
+ * await discoveryengine.projects.locations.collections.dataStores.servingConfigs.list(
27024
+ * {
27025
+ * // 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.
27026
+ * pageSize: 'placeholder-value',
27027
+ * // Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.
27028
+ * pageToken: 'placeholder-value',
27029
+ * // Required. Full resource name of the parent resource. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
27030
+ * parent:
27031
+ * 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
27032
+ * },
27033
+ * );
27034
+ * console.log(res.data);
27035
+ *
27036
+ * // Example response
27037
+ * // {
27038
+ * // "nextPageToken": "my_nextPageToken",
27039
+ * // "servingConfigs": []
27040
+ * // }
27041
+ * }
27042
+ *
27043
+ * main().catch(e => {
27044
+ * console.error(e);
27045
+ * throw e;
27046
+ * });
27047
+ *
27048
+ * ```
27049
+ *
27050
+ * @param params - Parameters for request
27051
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
27052
+ * @param callback - Optional callback that handles the response.
27053
+ * @returns A promise if used with async/await, or void if used with a callback.
27054
+ */
27055
+ list(
27056
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
27057
+ options: StreamMethodOptions
27058
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
27059
+ list(
27060
+ params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
27061
+ options?: MethodOptions
27062
+ ): Promise<
27063
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
27064
+ >;
27065
+ list(
27066
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
27067
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
27068
+ callback: BodyResponseCallback<Readable>
27069
+ ): void;
27070
+ list(
27071
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
27072
+ options:
27073
+ | MethodOptions
27074
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>,
27075
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
27076
+ ): void;
27077
+ list(
27078
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List,
27079
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
27080
+ ): void;
27081
+ list(
27082
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
27083
+ ): void;
27084
+ list(
27085
+ paramsOrCallback?:
27086
+ | Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List
27087
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
27088
+ | BodyResponseCallback<Readable>,
27089
+ optionsOrCallback?:
27090
+ | MethodOptions
27091
+ | StreamMethodOptions
27092
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
27093
+ | BodyResponseCallback<Readable>,
27094
+ callback?:
27095
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
27096
+ | BodyResponseCallback<Readable>
27097
+ ):
27098
+ | void
27099
+ | Promise<
27100
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>
27101
+ >
27102
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
27103
+ let params = (paramsOrCallback ||
27104
+ {}) as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List;
27105
+ let options = (optionsOrCallback || {}) as MethodOptions;
27106
+
27107
+ if (typeof paramsOrCallback === 'function') {
27108
+ callback = paramsOrCallback;
27109
+ params =
27110
+ {} as Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$List;
27111
+ options = {};
27112
+ }
27113
+
27114
+ if (typeof optionsOrCallback === 'function') {
27115
+ callback = optionsOrCallback;
27116
+ options = {};
27117
+ }
27118
+
27119
+ const rootUrl =
27120
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
27121
+ const parameters = {
27122
+ options: Object.assign(
27123
+ {
27124
+ url: (rootUrl + '/v1/{+parent}/servingConfigs').replace(
27125
+ /([^:]\/)\/+/g,
27126
+ '$1'
27127
+ ),
27128
+ method: 'GET',
27129
+ apiVersion: '',
27130
+ },
27131
+ options
27132
+ ),
27133
+ params,
27134
+ requiredParams: ['parent'],
27135
+ pathParams: ['parent'],
27136
+ context: this.context,
27137
+ };
27138
+ if (callback) {
27139
+ createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>(
27140
+ parameters,
27141
+ callback as BodyResponseCallback<unknown>
27142
+ );
27143
+ } else {
27144
+ return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ListServingConfigsResponse>(
27145
+ parameters
27146
+ );
27147
+ }
27148
+ }
27149
+
27150
+ /**
27151
+ * Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
26888
27152
  * @example
26889
27153
  * ```js
26890
27154
  * // Before running the sample:
@@ -27860,6 +28124,21 @@ export namespace discoveryengine_v1 {
27860
28124
  */
27861
28125
  requestBody?: Schema$GoogleCloudDiscoveryengineV1AnswerQueryRequest;
27862
28126
  }
28127
+ export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create extends StandardParameters {
28128
+ /**
28129
+ * Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
28130
+ */
28131
+ parent?: string;
28132
+ /**
28133
+ * 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+/.
28134
+ */
28135
+ servingConfigId?: string;
28136
+
28137
+ /**
28138
+ * Request body metadata
28139
+ */
28140
+ requestBody?: Schema$GoogleCloudDiscoveryengineV1ServingConfig;
28141
+ }
27863
28142
  export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete extends StandardParameters {
27864
28143
  /**
27865
28144
  * Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
@@ -38786,6 +39065,210 @@ export namespace discoveryengine_v1 {
38786
39065
  }
38787
39066
  }
38788
39067
 
39068
+ /**
39069
+ * 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.
39070
+ * @example
39071
+ * ```js
39072
+ * // Before running the sample:
39073
+ * // - Enable the API at:
39074
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
39075
+ * // - Login into gcloud by running:
39076
+ * // ```sh
39077
+ * // $ gcloud auth application-default login
39078
+ * // ```
39079
+ * // - Install the npm module by running:
39080
+ * // ```sh
39081
+ * // $ npm install googleapis
39082
+ * // ```
39083
+ *
39084
+ * const {google} = require('googleapis');
39085
+ * const discoveryengine = google.discoveryengine('v1');
39086
+ *
39087
+ * async function main() {
39088
+ * const auth = new google.auth.GoogleAuth({
39089
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
39090
+ * scopes: [
39091
+ * 'https://www.googleapis.com/auth/cloud-platform',
39092
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
39093
+ * ],
39094
+ * });
39095
+ *
39096
+ * // Acquire an auth client, and bind it to all future calls
39097
+ * const authClient = await auth.getClient();
39098
+ * google.options({auth: authClient});
39099
+ *
39100
+ * // Do the magic
39101
+ * const res =
39102
+ * await discoveryengine.projects.locations.collections.engines.servingConfigs.create(
39103
+ * {
39104
+ * // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
39105
+ * parent:
39106
+ * 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine',
39107
+ * // 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+/.
39108
+ * servingConfigId: 'placeholder-value',
39109
+ *
39110
+ * // Request body metadata
39111
+ * requestBody: {
39112
+ * // request body parameters
39113
+ * // {
39114
+ * // "answerGenerationSpec": {},
39115
+ * // "boostControlIds": [],
39116
+ * // "createTime": "my_createTime",
39117
+ * // "displayName": "my_displayName",
39118
+ * // "dissociateControlIds": [],
39119
+ * // "diversityLevel": "my_diversityLevel",
39120
+ * // "filterControlIds": [],
39121
+ * // "genericConfig": {},
39122
+ * // "ignoreControlIds": [],
39123
+ * // "mediaConfig": {},
39124
+ * // "modelId": "my_modelId",
39125
+ * // "name": "my_name",
39126
+ * // "onewaySynonymsControlIds": [],
39127
+ * // "promoteControlIds": [],
39128
+ * // "rankingExpression": "my_rankingExpression",
39129
+ * // "redirectControlIds": [],
39130
+ * // "replacementControlIds": [],
39131
+ * // "solutionType": "my_solutionType",
39132
+ * // "synonymsControlIds": [],
39133
+ * // "updateTime": "my_updateTime"
39134
+ * // }
39135
+ * },
39136
+ * },
39137
+ * );
39138
+ * console.log(res.data);
39139
+ *
39140
+ * // Example response
39141
+ * // {
39142
+ * // "answerGenerationSpec": {},
39143
+ * // "boostControlIds": [],
39144
+ * // "createTime": "my_createTime",
39145
+ * // "displayName": "my_displayName",
39146
+ * // "dissociateControlIds": [],
39147
+ * // "diversityLevel": "my_diversityLevel",
39148
+ * // "filterControlIds": [],
39149
+ * // "genericConfig": {},
39150
+ * // "ignoreControlIds": [],
39151
+ * // "mediaConfig": {},
39152
+ * // "modelId": "my_modelId",
39153
+ * // "name": "my_name",
39154
+ * // "onewaySynonymsControlIds": [],
39155
+ * // "promoteControlIds": [],
39156
+ * // "rankingExpression": "my_rankingExpression",
39157
+ * // "redirectControlIds": [],
39158
+ * // "replacementControlIds": [],
39159
+ * // "solutionType": "my_solutionType",
39160
+ * // "synonymsControlIds": [],
39161
+ * // "updateTime": "my_updateTime"
39162
+ * // }
39163
+ * }
39164
+ *
39165
+ * main().catch(e => {
39166
+ * console.error(e);
39167
+ * throw e;
39168
+ * });
39169
+ *
39170
+ * ```
39171
+ *
39172
+ * @param params - Parameters for request
39173
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
39174
+ * @param callback - Optional callback that handles the response.
39175
+ * @returns A promise if used with async/await, or void if used with a callback.
39176
+ */
39177
+ create(
39178
+ params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
39179
+ options: StreamMethodOptions
39180
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
39181
+ create(
39182
+ params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
39183
+ options?: MethodOptions
39184
+ ): Promise<
39185
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
39186
+ >;
39187
+ create(
39188
+ params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
39189
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
39190
+ callback: BodyResponseCallback<Readable>
39191
+ ): void;
39192
+ create(
39193
+ params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
39194
+ options:
39195
+ | MethodOptions
39196
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>,
39197
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
39198
+ ): void;
39199
+ create(
39200
+ params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create,
39201
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
39202
+ ): void;
39203
+ create(
39204
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
39205
+ ): void;
39206
+ create(
39207
+ paramsOrCallback?:
39208
+ | Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create
39209
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
39210
+ | BodyResponseCallback<Readable>,
39211
+ optionsOrCallback?:
39212
+ | MethodOptions
39213
+ | StreamMethodOptions
39214
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
39215
+ | BodyResponseCallback<Readable>,
39216
+ callback?:
39217
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
39218
+ | BodyResponseCallback<Readable>
39219
+ ):
39220
+ | void
39221
+ | Promise<
39222
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
39223
+ >
39224
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
39225
+ let params = (paramsOrCallback ||
39226
+ {}) as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create;
39227
+ let options = (optionsOrCallback || {}) as MethodOptions;
39228
+
39229
+ if (typeof paramsOrCallback === 'function') {
39230
+ callback = paramsOrCallback;
39231
+ params =
39232
+ {} as Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create;
39233
+ options = {};
39234
+ }
39235
+
39236
+ if (typeof optionsOrCallback === 'function') {
39237
+ callback = optionsOrCallback;
39238
+ options = {};
39239
+ }
39240
+
39241
+ const rootUrl =
39242
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
39243
+ const parameters = {
39244
+ options: Object.assign(
39245
+ {
39246
+ url: (rootUrl + '/v1/{+parent}/servingConfigs').replace(
39247
+ /([^:]\/)\/+/g,
39248
+ '$1'
39249
+ ),
39250
+ method: 'POST',
39251
+ apiVersion: '',
39252
+ },
39253
+ options
39254
+ ),
39255
+ params,
39256
+ requiredParams: ['parent'],
39257
+ pathParams: ['parent'],
39258
+ context: this.context,
39259
+ };
39260
+ if (callback) {
39261
+ createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ServingConfig>(
39262
+ parameters,
39263
+ callback as BodyResponseCallback<unknown>
39264
+ );
39265
+ } else {
39266
+ return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ServingConfig>(
39267
+ parameters
39268
+ );
39269
+ }
39270
+ }
39271
+
38789
39272
  /**
38790
39273
  * Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
38791
39274
  * @example
@@ -40235,6 +40718,21 @@ export namespace discoveryengine_v1 {
40235
40718
  */
40236
40719
  requestBody?: Schema$GoogleCloudDiscoveryengineV1AnswerQueryRequest;
40237
40720
  }
40721
+ export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create extends StandardParameters {
40722
+ /**
40723
+ * Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
40724
+ */
40725
+ parent?: string;
40726
+ /**
40727
+ * 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+/.
40728
+ */
40729
+ servingConfigId?: string;
40730
+
40731
+ /**
40732
+ * Request body metadata
40733
+ */
40734
+ requestBody?: Schema$GoogleCloudDiscoveryengineV1ServingConfig;
40735
+ }
40238
40736
  export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete extends StandardParameters {
40239
40737
  /**
40240
40738
  * Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
@@ -49376,33 +49874,263 @@ export namespace discoveryengine_v1 {
49376
49874
  * google.options({auth: authClient});
49377
49875
  *
49378
49876
  * // Do the magic
49379
- * const res = await discoveryengine.projects.locations.dataStores.schemas.patch(
49380
- * {
49381
- * // If set to true, and the Schema is not found, a new Schema is created. In this situation, `update_mask` is ignored.
49382
- * allowMissing: 'placeholder-value',
49383
- * // Immutable. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
49384
- * name: 'projects/my-project/locations/my-location/dataStores/my-dataStore/schemas/my-schema',
49877
+ * const res = await discoveryengine.projects.locations.dataStores.schemas.patch(
49878
+ * {
49879
+ * // If set to true, and the Schema is not found, a new Schema is created. In this situation, `update_mask` is ignored.
49880
+ * allowMissing: 'placeholder-value',
49881
+ * // Immutable. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
49882
+ * name: 'projects/my-project/locations/my-location/dataStores/my-dataStore/schemas/my-schema',
49883
+ *
49884
+ * // Request body metadata
49885
+ * requestBody: {
49886
+ * // request body parameters
49887
+ * // {
49888
+ * // "jsonSchema": "my_jsonSchema",
49889
+ * // "name": "my_name",
49890
+ * // "structSchema": {}
49891
+ * // }
49892
+ * },
49893
+ * },
49894
+ * );
49895
+ * console.log(res.data);
49896
+ *
49897
+ * // Example response
49898
+ * // {
49899
+ * // "done": false,
49900
+ * // "error": {},
49901
+ * // "metadata": {},
49902
+ * // "name": "my_name",
49903
+ * // "response": {}
49904
+ * // }
49905
+ * }
49906
+ *
49907
+ * main().catch(e => {
49908
+ * console.error(e);
49909
+ * throw e;
49910
+ * });
49911
+ *
49912
+ * ```
49913
+ *
49914
+ * @param params - Parameters for request
49915
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
49916
+ * @param callback - Optional callback that handles the response.
49917
+ * @returns A promise if used with async/await, or void if used with a callback.
49918
+ */
49919
+ patch(
49920
+ params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
49921
+ options: StreamMethodOptions
49922
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
49923
+ patch(
49924
+ params?: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
49925
+ options?: MethodOptions
49926
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleLongrunningOperation>>;
49927
+ patch(
49928
+ params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
49929
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
49930
+ callback: BodyResponseCallback<Readable>
49931
+ ): void;
49932
+ patch(
49933
+ params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
49934
+ options:
49935
+ | MethodOptions
49936
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>,
49937
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
49938
+ ): void;
49939
+ patch(
49940
+ params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
49941
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
49942
+ ): void;
49943
+ patch(
49944
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
49945
+ ): void;
49946
+ patch(
49947
+ paramsOrCallback?:
49948
+ | Params$Resource$Projects$Locations$Datastores$Schemas$Patch
49949
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
49950
+ | BodyResponseCallback<Readable>,
49951
+ optionsOrCallback?:
49952
+ | MethodOptions
49953
+ | StreamMethodOptions
49954
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
49955
+ | BodyResponseCallback<Readable>,
49956
+ callback?:
49957
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
49958
+ | BodyResponseCallback<Readable>
49959
+ ):
49960
+ | void
49961
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleLongrunningOperation>>
49962
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
49963
+ let params = (paramsOrCallback ||
49964
+ {}) as Params$Resource$Projects$Locations$Datastores$Schemas$Patch;
49965
+ let options = (optionsOrCallback || {}) as MethodOptions;
49966
+
49967
+ if (typeof paramsOrCallback === 'function') {
49968
+ callback = paramsOrCallback;
49969
+ params =
49970
+ {} as Params$Resource$Projects$Locations$Datastores$Schemas$Patch;
49971
+ options = {};
49972
+ }
49973
+
49974
+ if (typeof optionsOrCallback === 'function') {
49975
+ callback = optionsOrCallback;
49976
+ options = {};
49977
+ }
49978
+
49979
+ const rootUrl =
49980
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
49981
+ const parameters = {
49982
+ options: Object.assign(
49983
+ {
49984
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
49985
+ method: 'PATCH',
49986
+ apiVersion: '',
49987
+ },
49988
+ options
49989
+ ),
49990
+ params,
49991
+ requiredParams: ['name'],
49992
+ pathParams: ['name'],
49993
+ context: this.context,
49994
+ };
49995
+ if (callback) {
49996
+ createAPIRequest<Schema$GoogleLongrunningOperation>(
49997
+ parameters,
49998
+ callback as BodyResponseCallback<unknown>
49999
+ );
50000
+ } else {
50001
+ return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
50002
+ }
50003
+ }
50004
+ }
50005
+
50006
+ export interface Params$Resource$Projects$Locations$Datastores$Schemas$Create extends StandardParameters {
50007
+ /**
50008
+ * Required. The parent data store resource name, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}`.
50009
+ */
50010
+ parent?: string;
50011
+ /**
50012
+ * Required. The ID to use for the Schema, which becomes the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.
50013
+ */
50014
+ schemaId?: string;
50015
+
50016
+ /**
50017
+ * Request body metadata
50018
+ */
50019
+ requestBody?: Schema$GoogleCloudDiscoveryengineV1Schema;
50020
+ }
50021
+ export interface Params$Resource$Projects$Locations$Datastores$Schemas$Delete extends StandardParameters {
50022
+ /**
50023
+ * Required. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`.
50024
+ */
50025
+ name?: string;
50026
+ }
50027
+ export interface Params$Resource$Projects$Locations$Datastores$Schemas$Get extends StandardParameters {
50028
+ /**
50029
+ * Required. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`.
50030
+ */
50031
+ name?: string;
50032
+ }
50033
+ export interface Params$Resource$Projects$Locations$Datastores$Schemas$List extends StandardParameters {
50034
+ /**
50035
+ * The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas are returned. The maximum value is 1000; values above 1000 are set to 1000.
50036
+ */
50037
+ pageSize?: number;
50038
+ /**
50039
+ * A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.
50040
+ */
50041
+ pageToken?: string;
50042
+ /**
50043
+ * Required. The parent data store resource name, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}`.
50044
+ */
50045
+ parent?: string;
50046
+ }
50047
+ export interface Params$Resource$Projects$Locations$Datastores$Schemas$Patch extends StandardParameters {
50048
+ /**
50049
+ * If set to true, and the Schema is not found, a new Schema is created. In this situation, `update_mask` is ignored.
50050
+ */
50051
+ allowMissing?: boolean;
50052
+ /**
50053
+ * Immutable. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
50054
+ */
50055
+ name?: string;
50056
+
50057
+ /**
50058
+ * Request body metadata
50059
+ */
50060
+ requestBody?: Schema$GoogleCloudDiscoveryengineV1Schema;
50061
+ }
50062
+
50063
+ export class Resource$Projects$Locations$Datastores$Servingconfigs {
50064
+ context: APIRequestContext;
50065
+ constructor(context: APIRequestContext) {
50066
+ this.context = context;
50067
+ }
50068
+
50069
+ /**
50070
+ * Answer query method.
50071
+ * @example
50072
+ * ```js
50073
+ * // Before running the sample:
50074
+ * // - Enable the API at:
50075
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
50076
+ * // - Login into gcloud by running:
50077
+ * // ```sh
50078
+ * // $ gcloud auth application-default login
50079
+ * // ```
50080
+ * // - Install the npm module by running:
50081
+ * // ```sh
50082
+ * // $ npm install googleapis
50083
+ * // ```
50084
+ *
50085
+ * const {google} = require('googleapis');
50086
+ * const discoveryengine = google.discoveryengine('v1');
50087
+ *
50088
+ * async function main() {
50089
+ * const auth = new google.auth.GoogleAuth({
50090
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
50091
+ * scopes: [
50092
+ * 'https://www.googleapis.com/auth/cloud-platform',
50093
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
50094
+ * ],
50095
+ * });
50096
+ *
50097
+ * // Acquire an auth client, and bind it to all future calls
50098
+ * const authClient = await auth.getClient();
50099
+ * google.options({auth: authClient});
50100
+ *
50101
+ * // Do the magic
50102
+ * const res =
50103
+ * await discoveryengine.projects.locations.dataStores.servingConfigs.answer({
50104
+ * // 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.
50105
+ * servingConfig:
50106
+ * 'projects/my-project/locations/my-location/dataStores/my-dataStore/servingConfigs/my-servingConfig',
49385
50107
  *
49386
50108
  * // Request body metadata
49387
50109
  * requestBody: {
49388
50110
  * // request body parameters
49389
50111
  * // {
49390
- * // "jsonSchema": "my_jsonSchema",
49391
- * // "name": "my_name",
49392
- * // "structSchema": {}
50112
+ * // "answerGenerationSpec": {},
50113
+ * // "asynchronousMode": false,
50114
+ * // "endUserSpec": {},
50115
+ * // "groundingSpec": {},
50116
+ * // "query": {},
50117
+ * // "queryUnderstandingSpec": {},
50118
+ * // "relatedQuestionsSpec": {},
50119
+ * // "safetySpec": {},
50120
+ * // "searchSpec": {},
50121
+ * // "session": "my_session",
50122
+ * // "userLabels": {},
50123
+ * // "userPseudoId": "my_userPseudoId"
49393
50124
  * // }
49394
50125
  * },
49395
- * },
49396
- * );
50126
+ * });
49397
50127
  * console.log(res.data);
49398
50128
  *
49399
50129
  * // Example response
49400
50130
  * // {
49401
- * // "done": false,
49402
- * // "error": {},
49403
- * // "metadata": {},
49404
- * // "name": "my_name",
49405
- * // "response": {}
50131
+ * // "answer": {},
50132
+ * // "answerQueryToken": "my_answerQueryToken",
50133
+ * // "session": {}
49406
50134
  * // }
49407
50135
  * }
49408
50136
  *
@@ -49418,58 +50146,62 @@ export namespace discoveryengine_v1 {
49418
50146
  * @param callback - Optional callback that handles the response.
49419
50147
  * @returns A promise if used with async/await, or void if used with a callback.
49420
50148
  */
49421
- patch(
49422
- params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
50149
+ answer(
50150
+ params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
49423
50151
  options: StreamMethodOptions
49424
50152
  ): Promise<GaxiosResponseWithHTTP2<Readable>>;
49425
- patch(
49426
- params?: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
50153
+ answer(
50154
+ params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
49427
50155
  options?: MethodOptions
49428
- ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleLongrunningOperation>>;
49429
- patch(
49430
- params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
50156
+ ): Promise<
50157
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50158
+ >;
50159
+ answer(
50160
+ params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
49431
50161
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
49432
50162
  callback: BodyResponseCallback<Readable>
49433
50163
  ): void;
49434
- patch(
49435
- params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
50164
+ answer(
50165
+ params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
49436
50166
  options:
49437
50167
  | MethodOptions
49438
- | BodyResponseCallback<Schema$GoogleLongrunningOperation>,
49439
- callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
50168
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>,
50169
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
49440
50170
  ): void;
49441
- patch(
49442
- params: Params$Resource$Projects$Locations$Datastores$Schemas$Patch,
49443
- callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
50171
+ answer(
50172
+ params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
50173
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
49444
50174
  ): void;
49445
- patch(
49446
- callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
50175
+ answer(
50176
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
49447
50177
  ): void;
49448
- patch(
50178
+ answer(
49449
50179
  paramsOrCallback?:
49450
- | Params$Resource$Projects$Locations$Datastores$Schemas$Patch
49451
- | BodyResponseCallback<Schema$GoogleLongrunningOperation>
50180
+ | Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer
50181
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
49452
50182
  | BodyResponseCallback<Readable>,
49453
50183
  optionsOrCallback?:
49454
50184
  | MethodOptions
49455
50185
  | StreamMethodOptions
49456
- | BodyResponseCallback<Schema$GoogleLongrunningOperation>
50186
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
49457
50187
  | BodyResponseCallback<Readable>,
49458
50188
  callback?:
49459
- | BodyResponseCallback<Schema$GoogleLongrunningOperation>
50189
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
49460
50190
  | BodyResponseCallback<Readable>
49461
50191
  ):
49462
50192
  | void
49463
- | Promise<GaxiosResponseWithHTTP2<Schema$GoogleLongrunningOperation>>
50193
+ | Promise<
50194
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50195
+ >
49464
50196
  | Promise<GaxiosResponseWithHTTP2<Readable>> {
49465
50197
  let params = (paramsOrCallback ||
49466
- {}) as Params$Resource$Projects$Locations$Datastores$Schemas$Patch;
50198
+ {}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer;
49467
50199
  let options = (optionsOrCallback || {}) as MethodOptions;
49468
50200
 
49469
50201
  if (typeof paramsOrCallback === 'function') {
49470
50202
  callback = paramsOrCallback;
49471
50203
  params =
49472
- {} as Params$Resource$Projects$Locations$Datastores$Schemas$Patch;
50204
+ {} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer;
49473
50205
  options = {};
49474
50206
  }
49475
50207
 
@@ -49483,93 +50215,34 @@ export namespace discoveryengine_v1 {
49483
50215
  const parameters = {
49484
50216
  options: Object.assign(
49485
50217
  {
49486
- url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
49487
- method: 'PATCH',
50218
+ url: (rootUrl + '/v1/{+servingConfig}:answer').replace(
50219
+ /([^:]\/)\/+/g,
50220
+ '$1'
50221
+ ),
50222
+ method: 'POST',
49488
50223
  apiVersion: '',
49489
50224
  },
49490
50225
  options
49491
50226
  ),
49492
50227
  params,
49493
- requiredParams: ['name'],
49494
- pathParams: ['name'],
50228
+ requiredParams: ['servingConfig'],
50229
+ pathParams: ['servingConfig'],
49495
50230
  context: this.context,
49496
50231
  };
49497
50232
  if (callback) {
49498
- createAPIRequest<Schema$GoogleLongrunningOperation>(
50233
+ createAPIRequest<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>(
49499
50234
  parameters,
49500
50235
  callback as BodyResponseCallback<unknown>
49501
50236
  );
49502
50237
  } else {
49503
- return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
50238
+ return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>(
50239
+ parameters
50240
+ );
49504
50241
  }
49505
50242
  }
49506
- }
49507
50243
 
49508
- export interface Params$Resource$Projects$Locations$Datastores$Schemas$Create extends StandardParameters {
49509
50244
  /**
49510
- * Required. The parent data store resource name, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}`.
49511
- */
49512
- parent?: string;
49513
- /**
49514
- * Required. The ID to use for the Schema, which becomes the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.
49515
- */
49516
- schemaId?: string;
49517
-
49518
- /**
49519
- * Request body metadata
49520
- */
49521
- requestBody?: Schema$GoogleCloudDiscoveryengineV1Schema;
49522
- }
49523
- export interface Params$Resource$Projects$Locations$Datastores$Schemas$Delete extends StandardParameters {
49524
- /**
49525
- * Required. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`.
49526
- */
49527
- name?: string;
49528
- }
49529
- export interface Params$Resource$Projects$Locations$Datastores$Schemas$Get extends StandardParameters {
49530
- /**
49531
- * Required. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`.
49532
- */
49533
- name?: string;
49534
- }
49535
- export interface Params$Resource$Projects$Locations$Datastores$Schemas$List extends StandardParameters {
49536
- /**
49537
- * The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas are returned. The maximum value is 1000; values above 1000 are set to 1000.
49538
- */
49539
- pageSize?: number;
49540
- /**
49541
- * A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.
49542
- */
49543
- pageToken?: string;
49544
- /**
49545
- * Required. The parent data store resource name, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}`.
49546
- */
49547
- parent?: string;
49548
- }
49549
- export interface Params$Resource$Projects$Locations$Datastores$Schemas$Patch extends StandardParameters {
49550
- /**
49551
- * If set to true, and the Schema is not found, a new Schema is created. In this situation, `update_mask` is ignored.
49552
- */
49553
- allowMissing?: boolean;
49554
- /**
49555
- * Immutable. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
49556
- */
49557
- name?: string;
49558
-
49559
- /**
49560
- * Request body metadata
49561
- */
49562
- requestBody?: Schema$GoogleCloudDiscoveryengineV1Schema;
49563
- }
49564
-
49565
- export class Resource$Projects$Locations$Datastores$Servingconfigs {
49566
- context: APIRequestContext;
49567
- constructor(context: APIRequestContext) {
49568
- this.context = context;
49569
- }
49570
-
49571
- /**
49572
- * Answer query method.
50245
+ * 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.
49573
50246
  * @example
49574
50247
  * ```js
49575
50248
  * // Before running the sample:
@@ -49602,27 +50275,37 @@ export namespace discoveryengine_v1 {
49602
50275
  *
49603
50276
  * // Do the magic
49604
50277
  * const res =
49605
- * await discoveryengine.projects.locations.dataStores.servingConfigs.answer({
49606
- * // 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.
49607
- * servingConfig:
49608
- * 'projects/my-project/locations/my-location/dataStores/my-dataStore/servingConfigs/my-servingConfig',
50278
+ * await discoveryengine.projects.locations.dataStores.servingConfigs.create({
50279
+ * // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
50280
+ * parent:
50281
+ * 'projects/my-project/locations/my-location/dataStores/my-dataStore',
50282
+ * // 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+/.
50283
+ * servingConfigId: 'placeholder-value',
49609
50284
  *
49610
50285
  * // Request body metadata
49611
50286
  * requestBody: {
49612
50287
  * // request body parameters
49613
50288
  * // {
49614
50289
  * // "answerGenerationSpec": {},
49615
- * // "asynchronousMode": false,
49616
- * // "endUserSpec": {},
49617
- * // "groundingSpec": {},
49618
- * // "query": {},
49619
- * // "queryUnderstandingSpec": {},
49620
- * // "relatedQuestionsSpec": {},
49621
- * // "safetySpec": {},
49622
- * // "searchSpec": {},
49623
- * // "session": "my_session",
49624
- * // "userLabels": {},
49625
- * // "userPseudoId": "my_userPseudoId"
50290
+ * // "boostControlIds": [],
50291
+ * // "createTime": "my_createTime",
50292
+ * // "displayName": "my_displayName",
50293
+ * // "dissociateControlIds": [],
50294
+ * // "diversityLevel": "my_diversityLevel",
50295
+ * // "filterControlIds": [],
50296
+ * // "genericConfig": {},
50297
+ * // "ignoreControlIds": [],
50298
+ * // "mediaConfig": {},
50299
+ * // "modelId": "my_modelId",
50300
+ * // "name": "my_name",
50301
+ * // "onewaySynonymsControlIds": [],
50302
+ * // "promoteControlIds": [],
50303
+ * // "rankingExpression": "my_rankingExpression",
50304
+ * // "redirectControlIds": [],
50305
+ * // "replacementControlIds": [],
50306
+ * // "solutionType": "my_solutionType",
50307
+ * // "synonymsControlIds": [],
50308
+ * // "updateTime": "my_updateTime"
49626
50309
  * // }
49627
50310
  * },
49628
50311
  * });
@@ -49630,9 +50313,26 @@ export namespace discoveryengine_v1 {
49630
50313
  *
49631
50314
  * // Example response
49632
50315
  * // {
49633
- * // "answer": {},
49634
- * // "answerQueryToken": "my_answerQueryToken",
49635
- * // "session": {}
50316
+ * // "answerGenerationSpec": {},
50317
+ * // "boostControlIds": [],
50318
+ * // "createTime": "my_createTime",
50319
+ * // "displayName": "my_displayName",
50320
+ * // "dissociateControlIds": [],
50321
+ * // "diversityLevel": "my_diversityLevel",
50322
+ * // "filterControlIds": [],
50323
+ * // "genericConfig": {},
50324
+ * // "ignoreControlIds": [],
50325
+ * // "mediaConfig": {},
50326
+ * // "modelId": "my_modelId",
50327
+ * // "name": "my_name",
50328
+ * // "onewaySynonymsControlIds": [],
50329
+ * // "promoteControlIds": [],
50330
+ * // "rankingExpression": "my_rankingExpression",
50331
+ * // "redirectControlIds": [],
50332
+ * // "replacementControlIds": [],
50333
+ * // "solutionType": "my_solutionType",
50334
+ * // "synonymsControlIds": [],
50335
+ * // "updateTime": "my_updateTime"
49636
50336
  * // }
49637
50337
  * }
49638
50338
  *
@@ -49648,62 +50348,62 @@ export namespace discoveryengine_v1 {
49648
50348
  * @param callback - Optional callback that handles the response.
49649
50349
  * @returns A promise if used with async/await, or void if used with a callback.
49650
50350
  */
49651
- answer(
49652
- params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
50351
+ create(
50352
+ params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
49653
50353
  options: StreamMethodOptions
49654
50354
  ): Promise<GaxiosResponseWithHTTP2<Readable>>;
49655
- answer(
49656
- params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
50355
+ create(
50356
+ params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
49657
50357
  options?: MethodOptions
49658
50358
  ): Promise<
49659
- GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50359
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
49660
50360
  >;
49661
- answer(
49662
- params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
50361
+ create(
50362
+ params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
49663
50363
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
49664
50364
  callback: BodyResponseCallback<Readable>
49665
50365
  ): void;
49666
- answer(
49667
- params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
50366
+ create(
50367
+ params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
49668
50368
  options:
49669
50369
  | MethodOptions
49670
- | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>,
49671
- callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50370
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>,
50371
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
49672
50372
  ): void;
49673
- answer(
49674
- params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer,
49675
- callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50373
+ create(
50374
+ params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create,
50375
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
49676
50376
  ): void;
49677
- answer(
49678
- callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50377
+ create(
50378
+ callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
49679
50379
  ): void;
49680
- answer(
50380
+ create(
49681
50381
  paramsOrCallback?:
49682
- | Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer
49683
- | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50382
+ | Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create
50383
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
49684
50384
  | BodyResponseCallback<Readable>,
49685
50385
  optionsOrCallback?:
49686
50386
  | MethodOptions
49687
50387
  | StreamMethodOptions
49688
- | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50388
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
49689
50389
  | BodyResponseCallback<Readable>,
49690
50390
  callback?:
49691
- | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50391
+ | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
49692
50392
  | BodyResponseCallback<Readable>
49693
50393
  ):
49694
50394
  | void
49695
50395
  | Promise<
49696
- GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>
50396
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1ServingConfig>
49697
50397
  >
49698
50398
  | Promise<GaxiosResponseWithHTTP2<Readable>> {
49699
50399
  let params = (paramsOrCallback ||
49700
- {}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer;
50400
+ {}) as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create;
49701
50401
  let options = (optionsOrCallback || {}) as MethodOptions;
49702
50402
 
49703
50403
  if (typeof paramsOrCallback === 'function') {
49704
50404
  callback = paramsOrCallback;
49705
50405
  params =
49706
- {} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer;
50406
+ {} as Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create;
49707
50407
  options = {};
49708
50408
  }
49709
50409
 
@@ -49717,7 +50417,7 @@ export namespace discoveryengine_v1 {
49717
50417
  const parameters = {
49718
50418
  options: Object.assign(
49719
50419
  {
49720
- url: (rootUrl + '/v1/{+servingConfig}:answer').replace(
50420
+ url: (rootUrl + '/v1/{+parent}/servingConfigs').replace(
49721
50421
  /([^:]\/)\/+/g,
49722
50422
  '$1'
49723
50423
  ),
@@ -49727,17 +50427,17 @@ export namespace discoveryengine_v1 {
49727
50427
  options
49728
50428
  ),
49729
50429
  params,
49730
- requiredParams: ['servingConfig'],
49731
- pathParams: ['servingConfig'],
50430
+ requiredParams: ['parent'],
50431
+ pathParams: ['parent'],
49732
50432
  context: this.context,
49733
50433
  };
49734
50434
  if (callback) {
49735
- createAPIRequest<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>(
50435
+ createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ServingConfig>(
49736
50436
  parameters,
49737
50437
  callback as BodyResponseCallback<unknown>
49738
50438
  );
49739
50439
  } else {
49740
- return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1AnswerQueryResponse>(
50440
+ return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1ServingConfig>(
49741
50441
  parameters
49742
50442
  );
49743
50443
  }
@@ -51182,6 +51882,21 @@ export namespace discoveryengine_v1 {
51182
51882
  */
51183
51883
  requestBody?: Schema$GoogleCloudDiscoveryengineV1AnswerQueryRequest;
51184
51884
  }
51885
+ export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create extends StandardParameters {
51886
+ /**
51887
+ * Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
51888
+ */
51889
+ parent?: string;
51890
+ /**
51891
+ * 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+/.
51892
+ */
51893
+ servingConfigId?: string;
51894
+
51895
+ /**
51896
+ * Request body metadata
51897
+ */
51898
+ requestBody?: Schema$GoogleCloudDiscoveryengineV1ServingConfig;
51899
+ }
51185
51900
  export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete extends StandardParameters {
51186
51901
  /**
51187
51902
  * Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`