@google-cloud/discoveryengine 1.4.0 → 1.5.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.
Files changed (121) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +15 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config.proto +49 -0
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +79 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +106 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk_service.proto +137 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +97 -4
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +52 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +44 -2
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +6 -1
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +44 -0
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +80 -1
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +102 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +127 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +70 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +13 -8
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +3 -2
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto +130 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +376 -21
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +66 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +115 -0
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +3 -1
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +3 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +221 -30
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +27 -20
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +271 -0
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +148 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +9 -3
  29. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +7 -4
  30. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +4 -3
  31. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +5 -0
  32. package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +22 -0
  33. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +9 -0
  34. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +94 -0
  35. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +3 -0
  36. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +19 -4
  37. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +151 -0
  38. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +4 -3
  39. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +6 -5
  40. package/build/protos/protos.d.ts +18160 -8292
  41. package/build/protos/protos.js +50325 -25400
  42. package/build/protos/protos.json +4864 -2447
  43. package/build/src/v1/completion_service_client.js +10 -7
  44. package/build/src/v1/conversational_search_service_client.js +10 -7
  45. package/build/src/v1/data_store_service_client.js +10 -7
  46. package/build/src/v1/document_service_client.js +10 -7
  47. package/build/src/v1/engine_service_client.js +10 -7
  48. package/build/src/v1/schema_service_client.js +10 -7
  49. package/build/src/v1/search_service_client.js +10 -7
  50. package/build/src/v1/site_search_engine_service_client.js +10 -7
  51. package/build/src/v1/user_event_service_client.js +10 -7
  52. package/build/src/v1alpha/acl_config_service_client.d.ts +1233 -0
  53. package/build/src/v1alpha/acl_config_service_client.js +1768 -0
  54. package/build/src/v1alpha/acl_config_service_client_config.json +34 -0
  55. package/build/src/v1alpha/chunk_service_client.d.ts +1350 -0
  56. package/build/src/v1alpha/chunk_service_client.js +1889 -0
  57. package/build/src/v1alpha/chunk_service_client_config.json +34 -0
  58. package/build/src/v1alpha/completion_service_client.d.ts +588 -3
  59. package/build/src/v1alpha/completion_service_client.js +844 -9
  60. package/build/src/v1alpha/completion_service_client_config.json +10 -0
  61. package/build/src/v1alpha/conversational_search_service_client.d.ts +233 -1
  62. package/build/src/v1alpha/conversational_search_service_client.js +326 -7
  63. package/build/src/v1alpha/data_store_service_client.d.ts +451 -3
  64. package/build/src/v1alpha/data_store_service_client.js +575 -9
  65. package/build/src/v1alpha/data_store_service_client_config.json +8 -0
  66. package/build/src/v1alpha/document_service_client.d.ts +462 -21
  67. package/build/src/v1alpha/document_service_client.js +549 -7
  68. package/build/src/v1alpha/document_service_client_config.json +5 -0
  69. package/build/src/v1alpha/engine_service_client.d.ts +375 -2
  70. package/build/src/v1alpha/engine_service_client.js +527 -7
  71. package/build/src/v1alpha/estimate_billing_service_client.d.ts +1367 -0
  72. package/build/src/v1alpha/estimate_billing_service_client.js +2034 -0
  73. package/build/src/v1alpha/estimate_billing_service_client_config.json +30 -0
  74. package/build/src/v1alpha/index.d.ts +5 -0
  75. package/build/src/v1alpha/index.js +11 -1
  76. package/build/src/v1alpha/rank_service_client.d.ts +1254 -0
  77. package/build/src/v1alpha/rank_service_client.js +1796 -0
  78. package/build/src/v1alpha/rank_service_client_config.json +30 -0
  79. package/build/src/v1alpha/recommendation_service_client.d.ts +231 -1
  80. package/build/src/v1alpha/recommendation_service_client.js +326 -7
  81. package/build/src/v1alpha/schema_service_client.d.ts +372 -0
  82. package/build/src/v1alpha/schema_service_client.js +527 -7
  83. package/build/src/v1alpha/search_service_client.d.ts +288 -30
  84. package/build/src/v1alpha/search_service_client.js +366 -27
  85. package/build/src/v1alpha/search_tuning_service_client.d.ts +373 -1
  86. package/build/src/v1alpha/search_tuning_service_client.js +527 -7
  87. package/build/src/v1alpha/serving_config_service_client.d.ts +1370 -0
  88. package/build/src/v1alpha/serving_config_service_client.js +1939 -0
  89. package/build/src/v1alpha/serving_config_service_client_config.json +38 -0
  90. package/build/src/v1alpha/site_search_engine_service_client.d.ts +372 -0
  91. package/build/src/v1alpha/site_search_engine_service_client.js +527 -7
  92. package/build/src/v1alpha/user_event_service_client.d.ts +372 -0
  93. package/build/src/v1alpha/user_event_service_client.js +527 -7
  94. package/build/src/v1beta/completion_service_client.d.ts +75 -0
  95. package/build/src/v1beta/completion_service_client.js +114 -7
  96. package/build/src/v1beta/conversational_search_service_client.d.ts +79 -0
  97. package/build/src/v1beta/conversational_search_service_client.js +114 -7
  98. package/build/src/v1beta/data_store_service_client.d.ts +75 -0
  99. package/build/src/v1beta/data_store_service_client.js +114 -7
  100. package/build/src/v1beta/document_service_client.d.ts +75 -0
  101. package/build/src/v1beta/document_service_client.js +114 -7
  102. package/build/src/v1beta/engine_service_client.d.ts +75 -0
  103. package/build/src/v1beta/engine_service_client.js +114 -7
  104. package/build/src/v1beta/index.d.ts +1 -0
  105. package/build/src/v1beta/index.js +3 -1
  106. package/build/src/v1beta/recommendation_service_client.d.ts +75 -0
  107. package/build/src/v1beta/recommendation_service_client.js +114 -7
  108. package/build/src/v1beta/schema_service_client.d.ts +75 -0
  109. package/build/src/v1beta/schema_service_client.js +114 -7
  110. package/build/src/v1beta/search_service_client.d.ts +81 -0
  111. package/build/src/v1beta/search_service_client.js +118 -7
  112. package/build/src/v1beta/search_tuning_service_client.d.ts +1196 -0
  113. package/build/src/v1beta/search_tuning_service_client.js +1784 -0
  114. package/build/src/v1beta/search_tuning_service_client_config.json +30 -0
  115. package/build/src/v1beta/serving_config_service_client.d.ts +123 -8
  116. package/build/src/v1beta/serving_config_service_client.js +176 -12
  117. package/build/src/v1beta/site_search_engine_service_client.d.ts +75 -0
  118. package/build/src/v1beta/site_search_engine_service_client.js +114 -7
  119. package/build/src/v1beta/user_event_service_client.d.ts +75 -0
  120. package/build/src/v1beta/user_event_service_client.js +114 -7
  121. package/package.json +3 -3
@@ -72,7 +72,7 @@ class SearchServiceClient {
72
72
  * ```
73
73
  */
74
74
  constructor(opts, gaxInstance) {
75
- var _a, _b, _c, _d;
75
+ var _a, _b, _c, _d, _e;
76
76
  this._terminated = false;
77
77
  this.descriptors = {
78
78
  page: {},
@@ -87,14 +87,17 @@ class SearchServiceClient {
87
87
  (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
88
88
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
89
89
  }
90
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
91
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
92
+ : undefined;
90
93
  this._universeDomain =
91
- (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
94
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
92
95
  this._servicePath = 'discoveryengine.' + this._universeDomain;
93
96
  const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
94
97
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
95
98
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
96
- const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
97
- const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
99
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
100
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
98
101
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
99
102
  // Request numeric enum values if REST transport is used.
100
103
  opts.numericEnums = true;
@@ -125,7 +128,7 @@ class SearchServiceClient {
125
128
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
126
129
  // Determine the client header string.
127
130
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
128
- if (typeof process !== 'undefined' && 'versions' in process) {
131
+ if (typeof process === 'object' && 'versions' in process) {
129
132
  clientHeader.push(`gl-node/${process.versions.node}`);
130
133
  }
131
134
  else {
@@ -146,11 +149,14 @@ class SearchServiceClient {
146
149
  // identifiers to uniquely identify resources within the API.
147
150
  // Create useful helper objects for these.
148
151
  this.pathTemplates = {
152
+ aclConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/aclConfig'),
149
153
  enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
150
154
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
151
155
  projectLocationCollectionDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}'),
152
156
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
157
+ projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
153
158
  projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
159
+ projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig'),
154
160
  projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
155
161
  projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
156
162
  projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
@@ -160,7 +166,9 @@ class SearchServiceClient {
160
166
  projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
161
167
  projectLocationDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}'),
162
168
  projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
169
+ projectLocationDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
163
170
  projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
171
+ projectLocationDataStoreDocumentProcessingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig'),
164
172
  projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
165
173
  projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
166
174
  projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
@@ -229,7 +237,7 @@ class SearchServiceClient {
229
237
  * @returns {string} The DNS address for this service.
230
238
  */
231
239
  static get servicePath() {
232
- if (typeof process !== undefined &&
240
+ if (typeof process === 'object' &&
233
241
  typeof process.emitWarning === 'function') {
234
242
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
235
243
  }
@@ -241,7 +249,7 @@ class SearchServiceClient {
241
249
  * @returns {string} The DNS address for this service.
242
250
  */
243
251
  static get apiEndpoint() {
244
- if (typeof process !== undefined &&
252
+ if (typeof process === 'object' &&
245
253
  typeof process.emitWarning === 'function') {
246
254
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
247
255
  }
@@ -327,11 +335,15 @@ class SearchServiceClient {
327
335
  * Raw image query.
328
336
  * @param {number} request.pageSize
329
337
  * Maximum number of
330
- * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. If
331
- * unspecified, defaults to a reasonable value. The maximum allowed value is
332
- * 100. Values above 100 are coerced to 100.
338
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. The
339
+ * maximum allowed value depends on the data type. Values above the maximum
340
+ * value are coerced to the maximum value.
333
341
  *
334
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
342
+ * * Websites with basic indexing: Default `10`, Maximum `25`.
343
+ * * Websites with advanced indexing: Default `25`, Maximum `50`.
344
+ * * Other: Default `50`, Maximum `100`.
345
+ *
346
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
335
347
  * @param {string} request.pageToken
336
348
  * A page token received from a previous
337
349
  * {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
@@ -350,6 +362,8 @@ class SearchServiceClient {
350
362
  * is unset.
351
363
  *
352
364
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
365
+ * @param {number[]} request.dataStoreSpecs
366
+ * A list of data store specs to apply on a search call.
353
367
  * @param {string} request.filter
354
368
  * The filter syntax consists of an expression language for constructing a
355
369
  * predicate from one or more fields of the documents being filtered. Filter
@@ -445,12 +459,14 @@ class SearchServiceClient {
445
459
  * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec} request.embeddingSpec
446
460
  * Uses the provided embedding to do additional semantic document retrieval.
447
461
  * The retrieval is based on the dot product of
448
- * {@link protos.|SearchRequest.embedding_spec.embedding_vectors.vector} and the document
449
- * embedding that is provided in
450
- * {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path}.
451
- *
452
- * If {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path} is not
453
- * provided, it will use {@link protos.|ServingConfig.embedding_config.field_paths}.
462
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector|SearchRequest.EmbeddingSpec.EmbeddingVector.vector}
463
+ * and the document embedding that is provided in
464
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}.
465
+ *
466
+ * If
467
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
468
+ * is not provided, it will use
469
+ * {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
454
470
  * @param {string} request.rankingExpression
455
471
  * The ranking expression controls the customized ranking on retrieval
456
472
  * documents. This overrides
@@ -493,6 +509,8 @@ class SearchServiceClient {
493
509
  * See [Google Cloud
494
510
  * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
495
511
  * for more details.
512
+ * @param {google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec} request.customFineTuningSpec
513
+ * Custom fine tuning configs.
496
514
  * @param {object} [options]
497
515
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
498
516
  * @returns {Stream}
@@ -544,11 +562,15 @@ class SearchServiceClient {
544
562
  * Raw image query.
545
563
  * @param {number} request.pageSize
546
564
  * Maximum number of
547
- * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. If
548
- * unspecified, defaults to a reasonable value. The maximum allowed value is
549
- * 100. Values above 100 are coerced to 100.
565
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. The
566
+ * maximum allowed value depends on the data type. Values above the maximum
567
+ * value are coerced to the maximum value.
550
568
  *
551
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
569
+ * * Websites with basic indexing: Default `10`, Maximum `25`.
570
+ * * Websites with advanced indexing: Default `25`, Maximum `50`.
571
+ * * Other: Default `50`, Maximum `100`.
572
+ *
573
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
552
574
  * @param {string} request.pageToken
553
575
  * A page token received from a previous
554
576
  * {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
@@ -567,6 +589,8 @@ class SearchServiceClient {
567
589
  * is unset.
568
590
  *
569
591
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
592
+ * @param {number[]} request.dataStoreSpecs
593
+ * A list of data store specs to apply on a search call.
570
594
  * @param {string} request.filter
571
595
  * The filter syntax consists of an expression language for constructing a
572
596
  * predicate from one or more fields of the documents being filtered. Filter
@@ -662,12 +686,14 @@ class SearchServiceClient {
662
686
  * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec} request.embeddingSpec
663
687
  * Uses the provided embedding to do additional semantic document retrieval.
664
688
  * The retrieval is based on the dot product of
665
- * {@link protos.|SearchRequest.embedding_spec.embedding_vectors.vector} and the document
666
- * embedding that is provided in
667
- * {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path}.
668
- *
669
- * If {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path} is not
670
- * provided, it will use {@link protos.|ServingConfig.embedding_config.field_paths}.
689
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector|SearchRequest.EmbeddingSpec.EmbeddingVector.vector}
690
+ * and the document embedding that is provided in
691
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}.
692
+ *
693
+ * If
694
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
695
+ * is not provided, it will use
696
+ * {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
671
697
  * @param {string} request.rankingExpression
672
698
  * The ranking expression controls the customized ranking on retrieval
673
699
  * documents. This overrides
@@ -710,6 +736,8 @@ class SearchServiceClient {
710
736
  * See [Google Cloud
711
737
  * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
712
738
  * for more details.
739
+ * @param {google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec} request.customFineTuningSpec
740
+ * Custom fine tuning configs.
713
741
  * @param {object} [options]
714
742
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
715
743
  * @returns {Object}
@@ -795,6 +823,41 @@ class SearchServiceClient {
795
823
  // --------------------
796
824
  // -- Path templates --
797
825
  // --------------------
826
+ /**
827
+ * Return a fully-qualified aclConfig resource name string.
828
+ *
829
+ * @param {string} project
830
+ * @param {string} location
831
+ * @returns {string} Resource name string.
832
+ */
833
+ aclConfigPath(project, location) {
834
+ return this.pathTemplates.aclConfigPathTemplate.render({
835
+ project: project,
836
+ location: location,
837
+ });
838
+ }
839
+ /**
840
+ * Parse the project from AclConfig resource.
841
+ *
842
+ * @param {string} aclConfigName
843
+ * A fully-qualified path representing AclConfig resource.
844
+ * @returns {string} A string representing the project.
845
+ */
846
+ matchProjectFromAclConfigName(aclConfigName) {
847
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
848
+ .project;
849
+ }
850
+ /**
851
+ * Parse the location from AclConfig resource.
852
+ *
853
+ * @param {string} aclConfigName
854
+ * A fully-qualified path representing AclConfig resource.
855
+ * @returns {string} A string representing the location.
856
+ */
857
+ matchLocationFromAclConfigName(aclConfigName) {
858
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
859
+ .location;
860
+ }
798
861
  /**
799
862
  * Return a fully-qualified engine resource name string.
800
863
  *
@@ -1059,6 +1122,99 @@ class SearchServiceClient {
1059
1122
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1060
1123
  return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
1061
1124
  }
1125
+ /**
1126
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string.
1127
+ *
1128
+ * @param {string} project
1129
+ * @param {string} location
1130
+ * @param {string} collection
1131
+ * @param {string} data_store
1132
+ * @param {string} branch
1133
+ * @param {string} document
1134
+ * @param {string} chunk
1135
+ * @returns {string} Resource name string.
1136
+ */
1137
+ projectLocationCollectionDataStoreBranchDocumentChunkPath(project, location, collection, dataStore, branch, document, chunk) {
1138
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render({
1139
+ project: project,
1140
+ location: location,
1141
+ collection: collection,
1142
+ data_store: dataStore,
1143
+ branch: branch,
1144
+ document: document,
1145
+ chunk: chunk,
1146
+ });
1147
+ }
1148
+ /**
1149
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1150
+ *
1151
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1152
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1153
+ * @returns {string} A string representing the project.
1154
+ */
1155
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1156
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).project;
1157
+ }
1158
+ /**
1159
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1160
+ *
1161
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1162
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1163
+ * @returns {string} A string representing the location.
1164
+ */
1165
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1166
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).location;
1167
+ }
1168
+ /**
1169
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1170
+ *
1171
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1172
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1173
+ * @returns {string} A string representing the collection.
1174
+ */
1175
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1176
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).collection;
1177
+ }
1178
+ /**
1179
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1180
+ *
1181
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1182
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1183
+ * @returns {string} A string representing the data_store.
1184
+ */
1185
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1186
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).data_store;
1187
+ }
1188
+ /**
1189
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1190
+ *
1191
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1192
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1193
+ * @returns {string} A string representing the branch.
1194
+ */
1195
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1196
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).branch;
1197
+ }
1198
+ /**
1199
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1200
+ *
1201
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1202
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1203
+ * @returns {string} A string representing the document.
1204
+ */
1205
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1206
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).document;
1207
+ }
1208
+ /**
1209
+ * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1210
+ *
1211
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1212
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1213
+ * @returns {string} A string representing the chunk.
1214
+ */
1215
+ matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1216
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).chunk;
1217
+ }
1062
1218
  /**
1063
1219
  * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
1064
1220
  *
@@ -1128,6 +1284,63 @@ class SearchServiceClient {
1128
1284
  matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1129
1285
  return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
1130
1286
  }
1287
+ /**
1288
+ * Return a fully-qualified projectLocationCollectionDataStoreDocumentProcessingConfig resource name string.
1289
+ *
1290
+ * @param {string} project
1291
+ * @param {string} location
1292
+ * @param {string} collection
1293
+ * @param {string} data_store
1294
+ * @returns {string} Resource name string.
1295
+ */
1296
+ projectLocationCollectionDataStoreDocumentProcessingConfigPath(project, location, collection, dataStore) {
1297
+ return this.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render({
1298
+ project: project,
1299
+ location: location,
1300
+ collection: collection,
1301
+ data_store: dataStore,
1302
+ });
1303
+ }
1304
+ /**
1305
+ * Parse the project from ProjectLocationCollectionDataStoreDocumentProcessingConfig resource.
1306
+ *
1307
+ * @param {string} projectLocationCollectionDataStoreDocumentProcessingConfigName
1308
+ * A fully-qualified path representing project_location_collection_data_store_documentProcessingConfig resource.
1309
+ * @returns {string} A string representing the project.
1310
+ */
1311
+ matchProjectFromProjectLocationCollectionDataStoreDocumentProcessingConfigName(projectLocationCollectionDataStoreDocumentProcessingConfigName) {
1312
+ return this.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match(projectLocationCollectionDataStoreDocumentProcessingConfigName).project;
1313
+ }
1314
+ /**
1315
+ * Parse the location from ProjectLocationCollectionDataStoreDocumentProcessingConfig resource.
1316
+ *
1317
+ * @param {string} projectLocationCollectionDataStoreDocumentProcessingConfigName
1318
+ * A fully-qualified path representing project_location_collection_data_store_documentProcessingConfig resource.
1319
+ * @returns {string} A string representing the location.
1320
+ */
1321
+ matchLocationFromProjectLocationCollectionDataStoreDocumentProcessingConfigName(projectLocationCollectionDataStoreDocumentProcessingConfigName) {
1322
+ return this.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match(projectLocationCollectionDataStoreDocumentProcessingConfigName).location;
1323
+ }
1324
+ /**
1325
+ * Parse the collection from ProjectLocationCollectionDataStoreDocumentProcessingConfig resource.
1326
+ *
1327
+ * @param {string} projectLocationCollectionDataStoreDocumentProcessingConfigName
1328
+ * A fully-qualified path representing project_location_collection_data_store_documentProcessingConfig resource.
1329
+ * @returns {string} A string representing the collection.
1330
+ */
1331
+ matchCollectionFromProjectLocationCollectionDataStoreDocumentProcessingConfigName(projectLocationCollectionDataStoreDocumentProcessingConfigName) {
1332
+ return this.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match(projectLocationCollectionDataStoreDocumentProcessingConfigName).collection;
1333
+ }
1334
+ /**
1335
+ * Parse the data_store from ProjectLocationCollectionDataStoreDocumentProcessingConfig resource.
1336
+ *
1337
+ * @param {string} projectLocationCollectionDataStoreDocumentProcessingConfigName
1338
+ * A fully-qualified path representing project_location_collection_data_store_documentProcessingConfig resource.
1339
+ * @returns {string} A string representing the data_store.
1340
+ */
1341
+ matchDataStoreFromProjectLocationCollectionDataStoreDocumentProcessingConfigName(projectLocationCollectionDataStoreDocumentProcessingConfigName) {
1342
+ return this.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match(projectLocationCollectionDataStoreDocumentProcessingConfigName).data_store;
1343
+ }
1131
1344
  /**
1132
1345
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
1133
1346
  *
@@ -1701,6 +1914,87 @@ class SearchServiceClient {
1701
1914
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1702
1915
  return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1703
1916
  }
1917
+ /**
1918
+ * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string.
1919
+ *
1920
+ * @param {string} project
1921
+ * @param {string} location
1922
+ * @param {string} data_store
1923
+ * @param {string} branch
1924
+ * @param {string} document
1925
+ * @param {string} chunk
1926
+ * @returns {string} Resource name string.
1927
+ */
1928
+ projectLocationDataStoreBranchDocumentChunkPath(project, location, dataStore, branch, document, chunk) {
1929
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render({
1930
+ project: project,
1931
+ location: location,
1932
+ data_store: dataStore,
1933
+ branch: branch,
1934
+ document: document,
1935
+ chunk: chunk,
1936
+ });
1937
+ }
1938
+ /**
1939
+ * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource.
1940
+ *
1941
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
1942
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
1943
+ * @returns {string} A string representing the project.
1944
+ */
1945
+ matchProjectFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
1946
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).project;
1947
+ }
1948
+ /**
1949
+ * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource.
1950
+ *
1951
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
1952
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
1953
+ * @returns {string} A string representing the location.
1954
+ */
1955
+ matchLocationFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
1956
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).location;
1957
+ }
1958
+ /**
1959
+ * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource.
1960
+ *
1961
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
1962
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
1963
+ * @returns {string} A string representing the data_store.
1964
+ */
1965
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
1966
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).data_store;
1967
+ }
1968
+ /**
1969
+ * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource.
1970
+ *
1971
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
1972
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
1973
+ * @returns {string} A string representing the branch.
1974
+ */
1975
+ matchBranchFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
1976
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).branch;
1977
+ }
1978
+ /**
1979
+ * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource.
1980
+ *
1981
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
1982
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
1983
+ * @returns {string} A string representing the document.
1984
+ */
1985
+ matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
1986
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).document;
1987
+ }
1988
+ /**
1989
+ * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource.
1990
+ *
1991
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
1992
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
1993
+ * @returns {string} A string representing the chunk.
1994
+ */
1995
+ matchChunkFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
1996
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).chunk;
1997
+ }
1704
1998
  /**
1705
1999
  * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1706
2000
  *
@@ -1758,6 +2052,51 @@ class SearchServiceClient {
1758
2052
  matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1759
2053
  return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1760
2054
  }
2055
+ /**
2056
+ * Return a fully-qualified projectLocationDataStoreDocumentProcessingConfig resource name string.
2057
+ *
2058
+ * @param {string} project
2059
+ * @param {string} location
2060
+ * @param {string} data_store
2061
+ * @returns {string} Resource name string.
2062
+ */
2063
+ projectLocationDataStoreDocumentProcessingConfigPath(project, location, dataStore) {
2064
+ return this.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render({
2065
+ project: project,
2066
+ location: location,
2067
+ data_store: dataStore,
2068
+ });
2069
+ }
2070
+ /**
2071
+ * Parse the project from ProjectLocationDataStoreDocumentProcessingConfig resource.
2072
+ *
2073
+ * @param {string} projectLocationDataStoreDocumentProcessingConfigName
2074
+ * A fully-qualified path representing project_location_data_store_documentProcessingConfig resource.
2075
+ * @returns {string} A string representing the project.
2076
+ */
2077
+ matchProjectFromProjectLocationDataStoreDocumentProcessingConfigName(projectLocationDataStoreDocumentProcessingConfigName) {
2078
+ return this.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match(projectLocationDataStoreDocumentProcessingConfigName).project;
2079
+ }
2080
+ /**
2081
+ * Parse the location from ProjectLocationDataStoreDocumentProcessingConfig resource.
2082
+ *
2083
+ * @param {string} projectLocationDataStoreDocumentProcessingConfigName
2084
+ * A fully-qualified path representing project_location_data_store_documentProcessingConfig resource.
2085
+ * @returns {string} A string representing the location.
2086
+ */
2087
+ matchLocationFromProjectLocationDataStoreDocumentProcessingConfigName(projectLocationDataStoreDocumentProcessingConfigName) {
2088
+ return this.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match(projectLocationDataStoreDocumentProcessingConfigName).location;
2089
+ }
2090
+ /**
2091
+ * Parse the data_store from ProjectLocationDataStoreDocumentProcessingConfig resource.
2092
+ *
2093
+ * @param {string} projectLocationDataStoreDocumentProcessingConfigName
2094
+ * A fully-qualified path representing project_location_data_store_documentProcessingConfig resource.
2095
+ * @returns {string} A string representing the data_store.
2096
+ */
2097
+ matchDataStoreFromProjectLocationDataStoreDocumentProcessingConfigName(projectLocationDataStoreDocumentProcessingConfigName) {
2098
+ return this.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match(projectLocationDataStoreDocumentProcessingConfigName).data_store;
2099
+ }
1761
2100
  /**
1762
2101
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1763
2102
  *