@google-cloud/discoveryengine 2.1.0 → 2.3.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 (172) hide show
  1. package/README.md +13 -0
  2. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
  3. package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
  4. package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
  5. package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
  9. package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
  10. package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
  11. package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
  12. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
  13. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
  14. package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
  15. package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
  16. package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
  17. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
  19. package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
  21. package/build/protos/protos.d.ts +5415 -578
  22. package/build/protos/protos.js +77830 -63391
  23. package/build/protos/protos.json +1537 -92
  24. package/build/src/index.d.ts +10 -1
  25. package/build/src/index.js +8 -22
  26. package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
  27. package/build/src/v1/cmek_config_service_client.js +3274 -0
  28. package/build/src/v1/cmek_config_service_client_config.json +42 -0
  29. package/build/src/v1/cmek_config_service_proto_list.json +44 -0
  30. package/build/src/v1/completion_service_client.d.ts +166 -76
  31. package/build/src/v1/completion_service_client.js +258 -263
  32. package/build/src/v1/completion_service_proto_list.json +6 -1
  33. package/build/src/v1/control_service_client.d.ts +171 -81
  34. package/build/src/v1/control_service_client.js +246 -132
  35. package/build/src/v1/control_service_proto_list.json +6 -1
  36. package/build/src/v1/conversational_search_service_client.d.ts +233 -143
  37. package/build/src/v1/conversational_search_service_client.js +330 -226
  38. package/build/src/v1/conversational_search_service_proto_list.json +6 -1
  39. package/build/src/v1/data_store_service_client.d.ts +218 -122
  40. package/build/src/v1/data_store_service_client.js +273 -281
  41. package/build/src/v1/data_store_service_proto_list.json +6 -1
  42. package/build/src/v1/document_service_client.d.ts +210 -120
  43. package/build/src/v1/document_service_client.js +300 -301
  44. package/build/src/v1/document_service_proto_list.json +6 -1
  45. package/build/src/v1/engine_service_client.d.ts +193 -103
  46. package/build/src/v1/engine_service_client.js +273 -280
  47. package/build/src/v1/engine_service_proto_list.json +6 -1
  48. package/build/src/v1/gapic_metadata.json +184 -0
  49. package/build/src/v1/grounded_generation_service_client.d.ts +138 -48
  50. package/build/src/v1/grounded_generation_service_client.js +217 -100
  51. package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
  52. package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
  53. package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
  54. package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
  55. package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -0
  56. package/build/src/v1/index.d.ts +3 -0
  57. package/build/src/v1/index.js +7 -1
  58. package/build/src/v1/project_service_client.d.ts +166 -76
  59. package/build/src/v1/project_service_client.js +235 -223
  60. package/build/src/v1/project_service_proto_list.json +6 -1
  61. package/build/src/v1/rank_service_client.d.ts +137 -47
  62. package/build/src/v1/rank_service_client.js +204 -85
  63. package/build/src/v1/rank_service_proto_list.json +6 -1
  64. package/build/src/v1/recommendation_service_client.d.ts +137 -47
  65. package/build/src/v1/recommendation_service_client.js +202 -82
  66. package/build/src/v1/recommendation_service_proto_list.json +6 -1
  67. package/build/src/v1/schema_service_client.d.ts +201 -111
  68. package/build/src/v1/schema_service_client.js +264 -274
  69. package/build/src/v1/schema_service_proto_list.json +6 -1
  70. package/build/src/v1/search_service_client.d.ts +661 -571
  71. package/build/src/v1/search_service_client.js +216 -113
  72. package/build/src/v1/search_service_proto_list.json +6 -1
  73. package/build/src/v1/search_tuning_service_client.d.ts +167 -77
  74. package/build/src/v1/search_tuning_service_client.js +246 -236
  75. package/build/src/v1/search_tuning_service_proto_list.json +6 -1
  76. package/build/src/v1/serving_config_service_client.d.ts +138 -48
  77. package/build/src/v1/serving_config_service_client.js +201 -80
  78. package/build/src/v1/serving_config_service_proto_list.json +6 -1
  79. package/build/src/v1/site_search_engine_service_client.d.ts +238 -148
  80. package/build/src/v1/site_search_engine_service_client.js +324 -379
  81. package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
  82. package/build/src/v1/user_event_service_client.d.ts +167 -77
  83. package/build/src/v1/user_event_service_client.js +260 -254
  84. package/build/src/v1/user_event_service_proto_list.json +6 -1
  85. package/build/src/v1/user_license_service_client.d.ts +2256 -0
  86. package/build/src/v1/user_license_service_client.js +3194 -0
  87. package/build/src/v1/user_license_service_client_config.json +34 -0
  88. package/build/src/v1/user_license_service_proto_list.json +44 -0
  89. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  90. package/build/src/v1alpha/acl_config_service_client.js +94 -106
  91. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  92. package/build/src/v1alpha/chunk_service_client.js +98 -120
  93. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  94. package/build/src/v1alpha/completion_service_client.js +141 -281
  95. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  96. package/build/src/v1alpha/control_service_client.js +129 -151
  97. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  98. package/build/src/v1alpha/conversational_search_service_client.js +211 -237
  99. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  100. package/build/src/v1alpha/data_store_service_client.js +176 -317
  101. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  102. package/build/src/v1alpha/document_service_client.js +193 -329
  103. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  104. package/build/src/v1alpha/engine_service_client.js +180 -326
  105. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  106. package/build/src/v1alpha/estimate_billing_service_client.js +119 -244
  107. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  108. package/build/src/v1alpha/evaluation_service_client.js +150 -296
  109. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  110. package/build/src/v1alpha/grounded_generation_service_client.js +85 -100
  111. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  112. package/build/src/v1alpha/project_service_client.js +139 -263
  113. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  114. package/build/src/v1alpha/rank_service_client.js +87 -104
  115. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  116. package/build/src/v1alpha/recommendation_service_client.js +85 -100
  117. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  118. package/build/src/v1alpha/sample_query_service_client.js +169 -302
  119. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  120. package/build/src/v1alpha/sample_query_set_service_client.js +130 -153
  121. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  122. package/build/src/v1alpha/schema_service_client.js +147 -293
  123. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  124. package/build/src/v1alpha/search_service_client.js +88 -112
  125. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  126. package/build/src/v1alpha/search_tuning_service_client.js +129 -254
  127. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  128. package/build/src/v1alpha/serving_config_service_client.js +109 -133
  129. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  130. package/build/src/v1alpha/site_search_engine_service_client.js +203 -388
  131. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  132. package/build/src/v1alpha/user_event_service_client.js +143 -272
  133. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  134. package/build/src/v1beta/completion_service_client.js +149 -280
  135. package/build/src/v1beta/control_service_client.d.ts +84 -84
  136. package/build/src/v1beta/control_service_client.js +127 -147
  137. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  138. package/build/src/v1beta/conversational_search_service_client.js +209 -233
  139. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  140. package/build/src/v1beta/data_store_service_client.js +154 -289
  141. package/build/src/v1beta/document_service_client.d.ts +124 -124
  142. package/build/src/v1beta/document_service_client.js +181 -310
  143. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  144. package/build/src/v1beta/engine_service_client.js +178 -316
  145. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  146. package/build/src/v1beta/evaluation_service_client.js +148 -286
  147. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  148. package/build/src/v1beta/grounded_generation_service_client.js +98 -114
  149. package/build/src/v1beta/project_service_client.d.ts +76 -76
  150. package/build/src/v1beta/project_service_client.js +116 -232
  151. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  152. package/build/src/v1beta/rank_service_client.js +85 -99
  153. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  154. package/build/src/v1beta/recommendation_service_client.js +83 -96
  155. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  156. package/build/src/v1beta/sample_query_service_client.js +167 -292
  157. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  158. package/build/src/v1beta/sample_query_set_service_client.js +128 -149
  159. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  160. package/build/src/v1beta/schema_service_client.js +145 -283
  161. package/build/src/v1beta/search_service_client.d.ts +665 -665
  162. package/build/src/v1beta/search_service_client.js +97 -128
  163. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  164. package/build/src/v1beta/search_tuning_service_client.js +127 -244
  165. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  166. package/build/src/v1beta/serving_config_service_client.js +107 -129
  167. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  168. package/build/src/v1beta/site_search_engine_service_client.js +205 -387
  169. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  170. package/build/src/v1beta/user_event_service_client.js +141 -262
  171. package/package.json +7 -7
  172. package/CHANGELOG.md +0 -267
@@ -97,26 +97,17 @@ class SearchServiceClient {
97
97
  constructor(opts, gaxInstance) {
98
98
  // Ensure that options include all the required fields.
99
99
  const staticMembers = this.constructor;
100
- if (opts?.universe_domain &&
101
- opts?.universeDomain &&
102
- opts?.universe_domain !== opts?.universeDomain) {
100
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
103
101
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
104
102
  }
105
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
106
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
107
- : undefined;
108
- this._universeDomain =
109
- opts?.universeDomain ??
110
- opts?.universe_domain ??
111
- universeDomainEnvVar ??
112
- 'googleapis.com';
103
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
104
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
113
105
  this._servicePath = 'discoveryengine.' + this._universeDomain;
114
106
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
115
107
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
116
108
  const port = opts?.port || staticMembers.port;
117
109
  const clientConfig = opts?.clientConfig ?? {};
118
- const fallback = opts?.fallback ??
119
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
110
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
120
111
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
121
112
  // Request numeric enum values if REST transport is used.
122
113
  opts.numericEnums = true;
@@ -146,7 +137,10 @@ class SearchServiceClient {
146
137
  }
147
138
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
148
139
  // Determine the client header string.
149
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
140
+ const clientHeader = [
141
+ `gax/${this._gaxModule.version}`,
142
+ `gapic/${version}`,
143
+ ];
150
144
  if (typeof process === 'object' && 'versions' in process) {
151
145
  clientHeader.push(`gl-node/${process.versions.node}`);
152
146
  }
@@ -169,7 +163,10 @@ class SearchServiceClient {
169
163
  // Create useful helper objects for these.
170
164
  this.pathTemplates = {
171
165
  enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
166
+ identityMappingStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}'),
172
167
  projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
168
+ projectLocationCmekConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfig'),
169
+ projectLocationCmekConfigsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfigs/{cmek_config}'),
173
170
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
174
171
  projectLocationCollectionDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}'),
175
172
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
@@ -211,7 +208,7 @@ class SearchServiceClient {
211
208
  // pages). Denote the keys used for pagination and results.
212
209
  this.descriptors.page = {
213
210
  search: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results'),
214
- searchLite: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results'),
211
+ searchLite: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results')
215
212
  };
216
213
  // Put together the default options sent with requests.
217
214
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.SearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -240,10 +237,10 @@ class SearchServiceClient {
240
237
  }
241
238
  // Put together the "service stub" for
242
239
  // google.cloud.discoveryengine.v1.SearchService.
243
- this.searchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
244
- ? this._protos.lookupService('google.cloud.discoveryengine.v1.SearchService')
245
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
246
- this._protos.google.cloud.discoveryengine.v1.SearchService, this._opts, this._providedCustomServicePath);
240
+ this.searchServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
241
+ this._protos.lookupService('google.cloud.discoveryengine.v1.SearchService') :
242
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
243
+ this._protos.google.cloud.discoveryengine.v1.SearchService, this._opts, this._providedCustomServicePath);
247
244
  // Iterate over each of the methods that the service provides
248
245
  // and create an API call method for each.
249
246
  const searchServiceStubMethods = ['search', 'searchLite'];
@@ -257,7 +254,8 @@ class SearchServiceClient {
257
254
  }, (err) => () => {
258
255
  throw err;
259
256
  });
260
- const descriptor = this.descriptors.page[methodName] || undefined;
257
+ const descriptor = this.descriptors.page[methodName] ||
258
+ undefined;
261
259
  const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
262
260
  this.innerApiCalls[methodName] = apiCall;
263
261
  }
@@ -269,8 +267,7 @@ class SearchServiceClient {
269
267
  * @returns {string} The DNS address for this service.
270
268
  */
271
269
  static get servicePath() {
272
- if (typeof process === 'object' &&
273
- typeof process.emitWarning === 'function') {
270
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
274
271
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
275
272
  }
276
273
  return 'discoveryengine.googleapis.com';
@@ -281,8 +278,7 @@ class SearchServiceClient {
281
278
  * @returns {string} The DNS address for this service.
282
279
  */
283
280
  static get apiEndpoint() {
284
- if (typeof process === 'object' &&
285
- typeof process.emitWarning === 'function') {
281
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
286
282
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
287
283
  }
288
284
  return 'discoveryengine.googleapis.com';
@@ -310,7 +306,9 @@ class SearchServiceClient {
310
306
  * @returns {string[]} List of default scopes.
311
307
  */
312
308
  static get scopes() {
313
- return ['https://www.googleapis.com/auth/cloud-platform'];
309
+ return [
310
+ 'https://www.googleapis.com/auth/cloud-platform'
311
+ ];
314
312
  }
315
313
  /**
316
314
  * Return the project ID used by this class.
@@ -336,13 +334,10 @@ class SearchServiceClient {
336
334
  options = options || {};
337
335
  options.otherArgs = options.otherArgs || {};
338
336
  options.otherArgs.headers = options.otherArgs.headers || {};
339
- options.otherArgs.headers['x-goog-request-params'] =
340
- this._gaxModule.routingHeader.fromParams({
341
- serving_config: request.servingConfig ?? '',
342
- });
343
- this.initialize().catch(err => {
344
- throw err;
337
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
338
+ 'serving_config': request.servingConfig ?? '',
345
339
  });
340
+ this.initialize().catch(err => { throw err; });
346
341
  const wrappedCallback = callback
347
342
  ? (error, values, nextPageRequest, rawResponse) => {
348
343
  this._log.info('search values %j', values);
@@ -604,15 +599,12 @@ class SearchServiceClient {
604
599
  options = options || {};
605
600
  options.otherArgs = options.otherArgs || {};
606
601
  options.otherArgs.headers = options.otherArgs.headers || {};
607
- options.otherArgs.headers['x-goog-request-params'] =
608
- this._gaxModule.routingHeader.fromParams({
609
- serving_config: request.servingConfig ?? '',
610
- });
602
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
603
+ 'serving_config': request.servingConfig ?? '',
604
+ });
611
605
  const defaultCallSettings = this._defaults['search'];
612
606
  const callSettings = defaultCallSettings.merge(options);
613
- this.initialize().catch(err => {
614
- throw err;
615
- });
607
+ this.initialize().catch(err => { throw err; });
616
608
  this._log.info('search stream %j', request);
617
609
  return this.descriptors.page.search.createStream(this.innerApiCalls.search, request, callSettings);
618
610
  }
@@ -866,15 +858,12 @@ class SearchServiceClient {
866
858
  options = options || {};
867
859
  options.otherArgs = options.otherArgs || {};
868
860
  options.otherArgs.headers = options.otherArgs.headers || {};
869
- options.otherArgs.headers['x-goog-request-params'] =
870
- this._gaxModule.routingHeader.fromParams({
871
- serving_config: request.servingConfig ?? '',
872
- });
861
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
862
+ 'serving_config': request.servingConfig ?? '',
863
+ });
873
864
  const defaultCallSettings = this._defaults['search'];
874
865
  const callSettings = defaultCallSettings.merge(options);
875
- this.initialize().catch(err => {
876
- throw err;
877
- });
866
+ this.initialize().catch(err => { throw err; });
878
867
  this._log.info('search iterate %j', request);
879
868
  return this.descriptors.page.search.asyncIterate(this.innerApiCalls['search'], request, callSettings);
880
869
  }
@@ -891,13 +880,10 @@ class SearchServiceClient {
891
880
  options = options || {};
892
881
  options.otherArgs = options.otherArgs || {};
893
882
  options.otherArgs.headers = options.otherArgs.headers || {};
894
- options.otherArgs.headers['x-goog-request-params'] =
895
- this._gaxModule.routingHeader.fromParams({
896
- serving_config: request.servingConfig ?? '',
897
- });
898
- this.initialize().catch(err => {
899
- throw err;
883
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
884
+ 'serving_config': request.servingConfig ?? '',
900
885
  });
886
+ this.initialize().catch(err => { throw err; });
901
887
  const wrappedCallback = callback
902
888
  ? (error, values, nextPageRequest, rawResponse) => {
903
889
  this._log.info('searchLite values %j', values);
@@ -1159,15 +1145,12 @@ class SearchServiceClient {
1159
1145
  options = options || {};
1160
1146
  options.otherArgs = options.otherArgs || {};
1161
1147
  options.otherArgs.headers = options.otherArgs.headers || {};
1162
- options.otherArgs.headers['x-goog-request-params'] =
1163
- this._gaxModule.routingHeader.fromParams({
1164
- serving_config: request.servingConfig ?? '',
1165
- });
1148
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1149
+ 'serving_config': request.servingConfig ?? '',
1150
+ });
1166
1151
  const defaultCallSettings = this._defaults['searchLite'];
1167
1152
  const callSettings = defaultCallSettings.merge(options);
1168
- this.initialize().catch(err => {
1169
- throw err;
1170
- });
1153
+ this.initialize().catch(err => { throw err; });
1171
1154
  this._log.info('searchLite stream %j', request);
1172
1155
  return this.descriptors.page.searchLite.createStream(this.innerApiCalls.searchLite, request, callSettings);
1173
1156
  }
@@ -1421,70 +1404,67 @@ class SearchServiceClient {
1421
1404
  options = options || {};
1422
1405
  options.otherArgs = options.otherArgs || {};
1423
1406
  options.otherArgs.headers = options.otherArgs.headers || {};
1424
- options.otherArgs.headers['x-goog-request-params'] =
1425
- this._gaxModule.routingHeader.fromParams({
1426
- serving_config: request.servingConfig ?? '',
1427
- });
1407
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1408
+ 'serving_config': request.servingConfig ?? '',
1409
+ });
1428
1410
  const defaultCallSettings = this._defaults['searchLite'];
1429
1411
  const callSettings = defaultCallSettings.merge(options);
1430
- this.initialize().catch(err => {
1431
- throw err;
1432
- });
1412
+ this.initialize().catch(err => { throw err; });
1433
1413
  this._log.info('searchLite iterate %j', request);
1434
1414
  return this.descriptors.page.searchLite.asyncIterate(this.innerApiCalls['searchLite'], request, callSettings);
1435
1415
  }
1436
1416
  /**
1437
- * Gets information about a location.
1438
- *
1439
- * @param {Object} request
1440
- * The request object that will be sent.
1441
- * @param {string} request.name
1442
- * Resource name for the location.
1443
- * @param {object} [options]
1444
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1445
- * @returns {Promise} - The promise which resolves to an array.
1446
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1447
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1448
- * for more details and examples.
1449
- * @example
1450
- * ```
1451
- * const [response] = await client.getLocation(request);
1452
- * ```
1453
- */
1417
+ * Gets information about a location.
1418
+ *
1419
+ * @param {Object} request
1420
+ * The request object that will be sent.
1421
+ * @param {string} request.name
1422
+ * Resource name for the location.
1423
+ * @param {object} [options]
1424
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1425
+ * @returns {Promise} - The promise which resolves to an array.
1426
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1427
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1428
+ * for more details and examples.
1429
+ * @example
1430
+ * ```
1431
+ * const [response] = await client.getLocation(request);
1432
+ * ```
1433
+ */
1454
1434
  getLocation(request, options, callback) {
1455
1435
  return this.locationsClient.getLocation(request, options, callback);
1456
1436
  }
1457
1437
  /**
1458
- * Lists information about the supported locations for this service. Returns an iterable object.
1459
- *
1460
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1461
- * @param {Object} request
1462
- * The request object that will be sent.
1463
- * @param {string} request.name
1464
- * The resource that owns the locations collection, if applicable.
1465
- * @param {string} request.filter
1466
- * The standard list filter.
1467
- * @param {number} request.pageSize
1468
- * The standard list page size.
1469
- * @param {string} request.pageToken
1470
- * The standard list page token.
1471
- * @param {object} [options]
1472
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1473
- * @returns {Object}
1474
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1475
- * When you iterate the returned iterable, each element will be an object representing
1476
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1477
- * so you can stop the iteration when you don't need more results.
1478
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1479
- * for more details and examples.
1480
- * @example
1481
- * ```
1482
- * const iterable = client.listLocationsAsync(request);
1483
- * for await (const response of iterable) {
1484
- * // process response
1485
- * }
1486
- * ```
1487
- */
1438
+ * Lists information about the supported locations for this service. Returns an iterable object.
1439
+ *
1440
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1441
+ * @param {Object} request
1442
+ * The request object that will be sent.
1443
+ * @param {string} request.name
1444
+ * The resource that owns the locations collection, if applicable.
1445
+ * @param {string} request.filter
1446
+ * The standard list filter.
1447
+ * @param {number} request.pageSize
1448
+ * The standard list page size.
1449
+ * @param {string} request.pageToken
1450
+ * The standard list page token.
1451
+ * @param {object} [options]
1452
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1453
+ * @returns {Object}
1454
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1455
+ * When you iterate the returned iterable, each element will be an object representing
1456
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1457
+ * so you can stop the iteration when you don't need more results.
1458
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1459
+ * for more details and examples.
1460
+ * @example
1461
+ * ```
1462
+ * const iterable = client.listLocationsAsync(request);
1463
+ * for await (const response of iterable) {
1464
+ * // process response
1465
+ * }
1466
+ * ```
1467
+ */
1488
1468
  listLocationsAsync(request, options) {
1489
1469
  return this.locationsClient.listLocationsAsync(request, options);
1490
1470
  }
@@ -1548,6 +1528,51 @@ class SearchServiceClient {
1548
1528
  matchEngineFromEngineName(engineName) {
1549
1529
  return this.pathTemplates.enginePathTemplate.match(engineName).engine;
1550
1530
  }
1531
+ /**
1532
+ * Return a fully-qualified identityMappingStore resource name string.
1533
+ *
1534
+ * @param {string} project
1535
+ * @param {string} location
1536
+ * @param {string} identity_mapping_store
1537
+ * @returns {string} Resource name string.
1538
+ */
1539
+ identityMappingStorePath(project, location, identityMappingStore) {
1540
+ return this.pathTemplates.identityMappingStorePathTemplate.render({
1541
+ project: project,
1542
+ location: location,
1543
+ identity_mapping_store: identityMappingStore,
1544
+ });
1545
+ }
1546
+ /**
1547
+ * Parse the project from IdentityMappingStore resource.
1548
+ *
1549
+ * @param {string} identityMappingStoreName
1550
+ * A fully-qualified path representing IdentityMappingStore resource.
1551
+ * @returns {string} A string representing the project.
1552
+ */
1553
+ matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
1554
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
1555
+ }
1556
+ /**
1557
+ * Parse the location from IdentityMappingStore resource.
1558
+ *
1559
+ * @param {string} identityMappingStoreName
1560
+ * A fully-qualified path representing IdentityMappingStore resource.
1561
+ * @returns {string} A string representing the location.
1562
+ */
1563
+ matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
1564
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
1565
+ }
1566
+ /**
1567
+ * Parse the identity_mapping_store from IdentityMappingStore resource.
1568
+ *
1569
+ * @param {string} identityMappingStoreName
1570
+ * A fully-qualified path representing IdentityMappingStore resource.
1571
+ * @returns {string} A string representing the identity_mapping_store.
1572
+ */
1573
+ matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
1574
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
1575
+ }
1551
1576
  /**
1552
1577
  * Return a fully-qualified project resource name string.
1553
1578
  *
@@ -1569,6 +1594,84 @@ class SearchServiceClient {
1569
1594
  matchProjectFromProjectName(projectName) {
1570
1595
  return this.pathTemplates.projectPathTemplate.match(projectName).project;
1571
1596
  }
1597
+ /**
1598
+ * Return a fully-qualified projectLocationCmekConfig resource name string.
1599
+ *
1600
+ * @param {string} project
1601
+ * @param {string} location
1602
+ * @returns {string} Resource name string.
1603
+ */
1604
+ projectLocationCmekConfigPath(project, location) {
1605
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
1606
+ project: project,
1607
+ location: location,
1608
+ });
1609
+ }
1610
+ /**
1611
+ * Parse the project from ProjectLocationCmekConfig resource.
1612
+ *
1613
+ * @param {string} projectLocationCmekConfigName
1614
+ * A fully-qualified path representing project_location_cmekConfig resource.
1615
+ * @returns {string} A string representing the project.
1616
+ */
1617
+ matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
1618
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
1619
+ }
1620
+ /**
1621
+ * Parse the location from ProjectLocationCmekConfig resource.
1622
+ *
1623
+ * @param {string} projectLocationCmekConfigName
1624
+ * A fully-qualified path representing project_location_cmekConfig resource.
1625
+ * @returns {string} A string representing the location.
1626
+ */
1627
+ matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
1628
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
1629
+ }
1630
+ /**
1631
+ * Return a fully-qualified projectLocationCmekConfigs resource name string.
1632
+ *
1633
+ * @param {string} project
1634
+ * @param {string} location
1635
+ * @param {string} cmek_config
1636
+ * @returns {string} Resource name string.
1637
+ */
1638
+ projectLocationCmekConfigsPath(project, location, cmekConfig) {
1639
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
1640
+ project: project,
1641
+ location: location,
1642
+ cmek_config: cmekConfig,
1643
+ });
1644
+ }
1645
+ /**
1646
+ * Parse the project from ProjectLocationCmekConfigs resource.
1647
+ *
1648
+ * @param {string} projectLocationCmekConfigsName
1649
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1650
+ * @returns {string} A string representing the project.
1651
+ */
1652
+ matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1653
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
1654
+ }
1655
+ /**
1656
+ * Parse the location from ProjectLocationCmekConfigs resource.
1657
+ *
1658
+ * @param {string} projectLocationCmekConfigsName
1659
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1660
+ * @returns {string} A string representing the location.
1661
+ */
1662
+ matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1663
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
1664
+ }
1665
+ /**
1666
+ * Parse the cmek_config from ProjectLocationCmekConfigs resource.
1667
+ *
1668
+ * @param {string} projectLocationCmekConfigsName
1669
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1670
+ * @returns {string} A string representing the cmek_config.
1671
+ */
1672
+ matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1673
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
1674
+ }
1572
1675
  /**
1573
1676
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
1574
1677
  *
@@ -3852,7 +3955,7 @@ class SearchServiceClient {
3852
3955
  this._log.info('ending gRPC channel');
3853
3956
  this._terminated = true;
3854
3957
  stub.close();
3855
- this.locationsClient.close();
3958
+ this.locationsClient.close().catch(err => { throw err; });
3856
3959
  });
3857
3960
  }
3858
3961
  return Promise.resolve();
@@ -1,6 +1,7 @@
1
1
  [
2
2
  "../../protos/google/cloud/discoveryengine/v1/answer.proto",
3
3
  "../../protos/google/cloud/discoveryengine/v1/chunk.proto",
4
+ "../../protos/google/cloud/discoveryengine/v1/cmek_config_service.proto",
4
5
  "../../protos/google/cloud/discoveryengine/v1/common.proto",
5
6
  "../../protos/google/cloud/discoveryengine/v1/completion.proto",
6
7
  "../../protos/google/cloud/discoveryengine/v1/completion_service.proto",
@@ -18,6 +19,8 @@
18
19
  "../../protos/google/cloud/discoveryengine/v1/engine_service.proto",
19
20
  "../../protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto",
20
21
  "../../protos/google/cloud/discoveryengine/v1/grounding.proto",
22
+ "../../protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto",
23
+ "../../protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto",
21
24
  "../../protos/google/cloud/discoveryengine/v1/import_config.proto",
22
25
  "../../protos/google/cloud/discoveryengine/v1/project.proto",
23
26
  "../../protos/google/cloud/discoveryengine/v1/project_service.proto",
@@ -35,5 +38,7 @@
35
38
  "../../protos/google/cloud/discoveryengine/v1/site_search_engine.proto",
36
39
  "../../protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto",
37
40
  "../../protos/google/cloud/discoveryengine/v1/user_event.proto",
38
- "../../protos/google/cloud/discoveryengine/v1/user_event_service.proto"
41
+ "../../protos/google/cloud/discoveryengine/v1/user_event_service.proto",
42
+ "../../protos/google/cloud/discoveryengine/v1/user_license.proto",
43
+ "../../protos/google/cloud/discoveryengine/v1/user_license_service.proto"
39
44
  ]