@google-cloud/discoveryengine 2.0.1 → 2.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.
Files changed (167) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +7 -2
  3. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
  5. package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
  6. package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
  9. package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
  10. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
  12. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
  13. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
  14. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
  15. package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
  16. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
  17. package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
  19. package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
  21. package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
  22. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
  23. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
  24. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
  25. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
  26. package/build/protos/protos.d.ts +4390 -300
  27. package/build/protos/protos.js +13785 -2922
  28. package/build/protos/protos.json +1355 -14
  29. package/build/src/index.d.ts +4 -1
  30. package/build/src/index.js +4 -21
  31. package/build/src/v1/completion_service_client.d.ts +313 -76
  32. package/build/src/v1/completion_service_client.js +451 -262
  33. package/build/src/v1/completion_service_proto_list.json +3 -0
  34. package/build/src/v1/control_service_client.d.ts +318 -81
  35. package/build/src/v1/control_service_client.js +422 -132
  36. package/build/src/v1/control_service_proto_list.json +3 -0
  37. package/build/src/v1/conversational_search_service_client.d.ts +341 -134
  38. package/build/src/v1/conversational_search_service_client.js +395 -223
  39. package/build/src/v1/conversational_search_service_client_config.json +5 -0
  40. package/build/src/v1/conversational_search_service_proto_list.json +3 -0
  41. package/build/src/v1/data_store_service_client.d.ts +359 -122
  42. package/build/src/v1/data_store_service_client.js +460 -280
  43. package/build/src/v1/data_store_service_proto_list.json +3 -0
  44. package/build/src/v1/document_service_client.d.ts +364 -121
  45. package/build/src/v1/document_service_client.js +469 -300
  46. package/build/src/v1/document_service_proto_list.json +3 -0
  47. package/build/src/v1/engine_service_client.d.ts +340 -103
  48. package/build/src/v1/engine_service_client.js +460 -279
  49. package/build/src/v1/engine_service_proto_list.json +3 -0
  50. package/build/src/v1/gapic_metadata.json +59 -0
  51. package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
  52. package/build/src/v1/grounded_generation_service_client.js +405 -100
  53. package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
  54. package/build/src/v1/index.d.ts +1 -0
  55. package/build/src/v1/index.js +3 -1
  56. package/build/src/v1/project_service_client.d.ts +313 -76
  57. package/build/src/v1/project_service_client.js +434 -222
  58. package/build/src/v1/project_service_proto_list.json +3 -0
  59. package/build/src/v1/rank_service_client.d.ts +285 -48
  60. package/build/src/v1/rank_service_client.js +398 -85
  61. package/build/src/v1/rank_service_proto_list.json +3 -0
  62. package/build/src/v1/recommendation_service_client.d.ts +142 -49
  63. package/build/src/v1/recommendation_service_client.js +198 -82
  64. package/build/src/v1/recommendation_service_proto_list.json +3 -0
  65. package/build/src/v1/schema_service_client.d.ts +348 -111
  66. package/build/src/v1/schema_service_client.js +457 -273
  67. package/build/src/v1/schema_service_proto_list.json +3 -0
  68. package/build/src/v1/search_service_client.d.ts +748 -559
  69. package/build/src/v1/search_service_client.js +302 -133
  70. package/build/src/v1/search_service_proto_list.json +3 -0
  71. package/build/src/v1/search_tuning_service_client.d.ts +314 -77
  72. package/build/src/v1/search_tuning_service_client.js +439 -235
  73. package/build/src/v1/search_tuning_service_proto_list.json +3 -0
  74. package/build/src/v1/serving_config_service_client.d.ts +1851 -0
  75. package/build/src/v1/serving_config_service_client.js +2642 -0
  76. package/build/src/v1/serving_config_service_client_config.json +30 -0
  77. package/build/src/v1/serving_config_service_proto_list.json +39 -0
  78. package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
  79. package/build/src/v1/site_search_engine_service_client.js +625 -351
  80. package/build/src/v1/site_search_engine_service_client_config.json +12 -0
  81. package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
  82. package/build/src/v1/user_event_service_client.d.ts +335 -86
  83. package/build/src/v1/user_event_service_client.js +447 -253
  84. package/build/src/v1/user_event_service_proto_list.json +3 -0
  85. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  86. package/build/src/v1alpha/acl_config_service_client.js +82 -106
  87. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  88. package/build/src/v1alpha/chunk_service_client.js +92 -120
  89. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  90. package/build/src/v1alpha/completion_service_client.js +134 -280
  91. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  92. package/build/src/v1alpha/control_service_client.js +105 -151
  93. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  94. package/build/src/v1alpha/conversational_search_service_client.js +145 -237
  95. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  96. package/build/src/v1alpha/data_store_service_client.js +151 -316
  97. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  98. package/build/src/v1alpha/document_service_client.js +156 -328
  99. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  100. package/build/src/v1alpha/engine_service_client.js +155 -325
  101. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  102. package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
  103. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  104. package/build/src/v1alpha/evaluation_service_client.js +143 -295
  105. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  106. package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
  107. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  108. package/build/src/v1alpha/project_service_client.js +126 -262
  109. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  110. package/build/src/v1alpha/rank_service_client.js +81 -104
  111. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  112. package/build/src/v1alpha/recommendation_service_client.js +79 -100
  113. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  114. package/build/src/v1alpha/sample_query_service_client.js +144 -301
  115. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  116. package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
  117. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  118. package/build/src/v1alpha/schema_service_client.js +140 -292
  119. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  120. package/build/src/v1alpha/search_service_client.js +88 -112
  121. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  122. package/build/src/v1alpha/search_tuning_service_client.js +122 -253
  123. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  124. package/build/src/v1alpha/serving_config_service_client.js +97 -133
  125. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  126. package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
  127. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  128. package/build/src/v1alpha/user_event_service_client.js +130 -271
  129. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  130. package/build/src/v1beta/completion_service_client.js +136 -279
  131. package/build/src/v1beta/control_service_client.d.ts +84 -84
  132. package/build/src/v1beta/control_service_client.js +103 -147
  133. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  134. package/build/src/v1beta/conversational_search_service_client.js +143 -233
  135. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  136. package/build/src/v1beta/data_store_service_client.js +141 -288
  137. package/build/src/v1beta/document_service_client.d.ts +124 -124
  138. package/build/src/v1beta/document_service_client.js +150 -309
  139. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  140. package/build/src/v1beta/engine_service_client.js +153 -315
  141. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  142. package/build/src/v1beta/evaluation_service_client.js +141 -285
  143. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  144. package/build/src/v1beta/grounded_generation_service_client.js +86 -114
  145. package/build/src/v1beta/project_service_client.d.ts +76 -76
  146. package/build/src/v1beta/project_service_client.js +115 -231
  147. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  148. package/build/src/v1beta/rank_service_client.js +79 -99
  149. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  150. package/build/src/v1beta/recommendation_service_client.js +77 -96
  151. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  152. package/build/src/v1beta/sample_query_service_client.js +142 -291
  153. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  154. package/build/src/v1beta/sample_query_set_service_client.js +104 -149
  155. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  156. package/build/src/v1beta/schema_service_client.js +138 -282
  157. package/build/src/v1beta/search_service_client.d.ts +665 -665
  158. package/build/src/v1beta/search_service_client.js +97 -128
  159. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  160. package/build/src/v1beta/search_tuning_service_client.js +120 -243
  161. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  162. package/build/src/v1beta/serving_config_service_client.js +95 -129
  163. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  164. package/build/src/v1beta/site_search_engine_service_client.js +186 -386
  165. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  166. package/build/src/v1beta/user_event_service_client.js +128 -261
  167. package/package.json +4 -4
@@ -97,28 +97,18 @@ class SiteSearchEngineServiceClient {
97
97
  */
98
98
  constructor(opts, gaxInstance) {
99
99
  // Ensure that options include all the required fields.
100
- const staticMembers = this
101
- .constructor;
102
- if (opts?.universe_domain &&
103
- opts?.universeDomain &&
104
- opts?.universe_domain !== opts?.universeDomain) {
100
+ const staticMembers = this.constructor;
101
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
105
102
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
106
103
  }
107
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
108
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
109
- : undefined;
110
- this._universeDomain =
111
- opts?.universeDomain ??
112
- opts?.universe_domain ??
113
- universeDomainEnvVar ??
114
- 'googleapis.com';
104
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
105
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
115
106
  this._servicePath = 'discoveryengine.' + this._universeDomain;
116
107
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
117
108
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
118
109
  const port = opts?.port || staticMembers.port;
119
110
  const clientConfig = opts?.clientConfig ?? {};
120
- const fallback = opts?.fallback ??
121
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
111
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
122
112
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
123
113
  // Request numeric enum values if REST transport is used.
124
114
  opts.numericEnums = true;
@@ -148,7 +138,10 @@ class SiteSearchEngineServiceClient {
148
138
  }
149
139
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
150
140
  // Determine the client header string.
151
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
141
+ const clientHeader = [
142
+ `gax/${this._gaxModule.version}`,
143
+ `gapic/${version}`,
144
+ ];
152
145
  if (typeof process === 'object' && 'versions' in process) {
153
146
  clientHeader.push(`gl-node/${process.versions.node}`);
154
147
  }
@@ -213,7 +206,7 @@ class SiteSearchEngineServiceClient {
213
206
  // pages). Denote the keys used for pagination and results.
214
207
  this.descriptors.page = {
215
208
  listTargetSites: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites'),
216
- fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites'),
209
+ fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites')
217
210
  };
218
211
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
219
212
  // This API contains "long-running operations", which return a
@@ -221,121 +214,16 @@ class SiteSearchEngineServiceClient {
221
214
  // rather than holding a request open.
222
215
  const lroOptions = {
223
216
  auth: this.auth,
224
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
217
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
225
218
  };
226
219
  if (opts.fallback) {
227
220
  lroOptions.protoJson = protoFilesRoot;
228
- lroOptions.httpRules = [
229
- {
230
- selector: 'google.longrunning.Operations.CancelOperation',
231
- post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
232
- body: '*',
233
- additional_bindings: [
234
- {
235
- post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
236
- body: '*',
237
- },
238
- ],
239
- },
240
- {
241
- selector: 'google.longrunning.Operations.GetOperation',
242
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
243
- additional_bindings: [
244
- {
245
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
246
- },
247
- {
248
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
249
- },
250
- {
251
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
252
- },
253
- {
254
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
255
- },
256
- {
257
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
258
- },
259
- {
260
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
261
- },
262
- {
263
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
264
- },
265
- {
266
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
267
- },
268
- {
269
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
270
- },
271
- {
272
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
273
- },
274
- {
275
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
276
- },
277
- {
278
- get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
279
- },
280
- {
281
- get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
282
- },
283
- { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
284
- {
285
- get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
286
- },
287
- { get: '/v1alpha/{name=projects/*/operations/*}' },
288
- ],
289
- },
290
- {
291
- selector: 'google.longrunning.Operations.ListOperations',
292
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
293
- additional_bindings: [
294
- {
295
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
296
- },
297
- {
298
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
299
- },
300
- {
301
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
302
- },
303
- {
304
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
305
- },
306
- {
307
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
308
- },
309
- {
310
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
311
- },
312
- {
313
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
314
- },
315
- {
316
- get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
317
- },
318
- {
319
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
320
- },
321
- {
322
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
323
- },
324
- {
325
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
326
- },
327
- {
328
- get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
329
- },
330
- { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
331
- { get: '/v1alpha/{name=projects/*}/operations' },
332
- ],
333
- },
334
- ];
221
+ lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
222
+ }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/operations/*}', }],
223
+ }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*}/operations', }, { get: '/v1alpha/{name=projects/*}/operations', }],
224
+ }];
335
225
  }
336
- this.operationsClient = this._gaxModule
337
- .lro(lroOptions)
338
- .operationsClient(opts);
226
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
339
227
  const createTargetSiteResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.TargetSite');
340
228
  const createTargetSiteMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.CreateTargetSiteMetadata');
341
229
  const batchCreateTargetSitesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.BatchCreateTargetSitesResponse');
@@ -363,7 +251,7 @@ class SiteSearchEngineServiceClient {
363
251
  disableAdvancedSiteSearch: new this._gaxModule.LongrunningDescriptor(this.operationsClient, disableAdvancedSiteSearchResponse.decode.bind(disableAdvancedSiteSearchResponse), disableAdvancedSiteSearchMetadata.decode.bind(disableAdvancedSiteSearchMetadata)),
364
252
  recrawlUris: new this._gaxModule.LongrunningDescriptor(this.operationsClient, recrawlUrisResponse.decode.bind(recrawlUrisResponse), recrawlUrisMetadata.decode.bind(recrawlUrisMetadata)),
365
253
  batchVerifyTargetSites: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchVerifyTargetSitesResponse.decode.bind(batchVerifyTargetSitesResponse), batchVerifyTargetSitesMetadata.decode.bind(batchVerifyTargetSitesMetadata)),
366
- setUriPatternDocumentData: new this._gaxModule.LongrunningDescriptor(this.operationsClient, setUriPatternDocumentDataResponse.decode.bind(setUriPatternDocumentDataResponse), setUriPatternDocumentDataMetadata.decode.bind(setUriPatternDocumentDataMetadata)),
254
+ setUriPatternDocumentData: new this._gaxModule.LongrunningDescriptor(this.operationsClient, setUriPatternDocumentDataResponse.decode.bind(setUriPatternDocumentDataResponse), setUriPatternDocumentDataMetadata.decode.bind(setUriPatternDocumentDataMetadata))
367
255
  };
368
256
  // Put together the default options sent with requests.
369
257
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SiteSearchEngineService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -392,29 +280,13 @@ class SiteSearchEngineServiceClient {
392
280
  }
393
281
  // Put together the "service stub" for
394
282
  // google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.
395
- this.siteSearchEngineServiceStub = this._gaxGrpc.createStub(this._opts.fallback
396
- ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SiteSearchEngineService')
397
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
398
- this._protos.google.cloud.discoveryengine.v1alpha
399
- .SiteSearchEngineService, this._opts, this._providedCustomServicePath);
283
+ this.siteSearchEngineServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
284
+ this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SiteSearchEngineService') :
285
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
286
+ this._protos.google.cloud.discoveryengine.v1alpha.SiteSearchEngineService, this._opts, this._providedCustomServicePath);
400
287
  // Iterate over each of the methods that the service provides
401
288
  // and create an API call method for each.
402
- const siteSearchEngineServiceStubMethods = [
403
- 'getSiteSearchEngine',
404
- 'createTargetSite',
405
- 'batchCreateTargetSites',
406
- 'getTargetSite',
407
- 'updateTargetSite',
408
- 'deleteTargetSite',
409
- 'listTargetSites',
410
- 'enableAdvancedSiteSearch',
411
- 'disableAdvancedSiteSearch',
412
- 'recrawlUris',
413
- 'batchVerifyTargetSites',
414
- 'fetchDomainVerificationStatus',
415
- 'setUriPatternDocumentData',
416
- 'getUriPatternDocumentData',
417
- ];
289
+ const siteSearchEngineServiceStubMethods = ['getSiteSearchEngine', 'createTargetSite', 'batchCreateTargetSites', 'getTargetSite', 'updateTargetSite', 'deleteTargetSite', 'listTargetSites', 'enableAdvancedSiteSearch', 'disableAdvancedSiteSearch', 'recrawlUris', 'batchVerifyTargetSites', 'fetchDomainVerificationStatus', 'setUriPatternDocumentData', 'getUriPatternDocumentData'];
418
290
  for (const methodName of siteSearchEngineServiceStubMethods) {
419
291
  const callPromise = this.siteSearchEngineServiceStub.then(stub => (...args) => {
420
292
  if (this._terminated) {
@@ -439,8 +311,7 @@ class SiteSearchEngineServiceClient {
439
311
  * @returns {string} The DNS address for this service.
440
312
  */
441
313
  static get servicePath() {
442
- if (typeof process === 'object' &&
443
- typeof process.emitWarning === 'function') {
314
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
444
315
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
445
316
  }
446
317
  return 'discoveryengine.googleapis.com';
@@ -451,8 +322,7 @@ class SiteSearchEngineServiceClient {
451
322
  * @returns {string} The DNS address for this service.
452
323
  */
453
324
  static get apiEndpoint() {
454
- if (typeof process === 'object' &&
455
- typeof process.emitWarning === 'function') {
325
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
456
326
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
457
327
  }
458
328
  return 'discoveryengine.googleapis.com';
@@ -480,7 +350,9 @@ class SiteSearchEngineServiceClient {
480
350
  * @returns {string[]} List of default scopes.
481
351
  */
482
352
  static get scopes() {
483
- return ['https://www.googleapis.com/auth/cloud-platform'];
353
+ return [
354
+ 'https://www.googleapis.com/auth/cloud-platform'
355
+ ];
484
356
  }
485
357
  /**
486
358
  * Return the project ID used by this class.
@@ -506,13 +378,10 @@ class SiteSearchEngineServiceClient {
506
378
  options = options || {};
507
379
  options.otherArgs = options.otherArgs || {};
508
380
  options.otherArgs.headers = options.otherArgs.headers || {};
509
- options.otherArgs.headers['x-goog-request-params'] =
510
- this._gaxModule.routingHeader.fromParams({
511
- name: request.name ?? '',
512
- });
513
- this.initialize().catch(err => {
514
- throw err;
381
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
382
+ 'name': request.name ?? '',
515
383
  });
384
+ this.initialize().catch(err => { throw err; });
516
385
  this._log.info('getSiteSearchEngine request %j', request);
517
386
  const wrappedCallback = callback
518
387
  ? (error, response, options, rawResponse) => {
@@ -520,8 +389,7 @@ class SiteSearchEngineServiceClient {
520
389
  callback(error, response, options, rawResponse); // We verified callback above.
521
390
  }
522
391
  : undefined;
523
- return this.innerApiCalls
524
- .getSiteSearchEngine(request, options, wrappedCallback)
392
+ return this.innerApiCalls.getSiteSearchEngine(request, options, wrappedCallback)
525
393
  ?.then(([response, options, rawResponse]) => {
526
394
  this._log.info('getSiteSearchEngine response %j', response);
527
395
  return [response, options, rawResponse];
@@ -540,13 +408,10 @@ class SiteSearchEngineServiceClient {
540
408
  options = options || {};
541
409
  options.otherArgs = options.otherArgs || {};
542
410
  options.otherArgs.headers = options.otherArgs.headers || {};
543
- options.otherArgs.headers['x-goog-request-params'] =
544
- this._gaxModule.routingHeader.fromParams({
545
- name: request.name ?? '',
546
- });
547
- this.initialize().catch(err => {
548
- throw err;
411
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
412
+ 'name': request.name ?? '',
549
413
  });
414
+ this.initialize().catch(err => { throw err; });
550
415
  this._log.info('getTargetSite request %j', request);
551
416
  const wrappedCallback = callback
552
417
  ? (error, response, options, rawResponse) => {
@@ -554,8 +419,7 @@ class SiteSearchEngineServiceClient {
554
419
  callback(error, response, options, rawResponse); // We verified callback above.
555
420
  }
556
421
  : undefined;
557
- return this.innerApiCalls
558
- .getTargetSite(request, options, wrappedCallback)
422
+ return this.innerApiCalls.getTargetSite(request, options, wrappedCallback)
559
423
  ?.then(([response, options, rawResponse]) => {
560
424
  this._log.info('getTargetSite response %j', response);
561
425
  return [response, options, rawResponse];
@@ -574,13 +438,10 @@ class SiteSearchEngineServiceClient {
574
438
  options = options || {};
575
439
  options.otherArgs = options.otherArgs || {};
576
440
  options.otherArgs.headers = options.otherArgs.headers || {};
577
- options.otherArgs.headers['x-goog-request-params'] =
578
- this._gaxModule.routingHeader.fromParams({
579
- site_search_engine: request.siteSearchEngine ?? '',
580
- });
581
- this.initialize().catch(err => {
582
- throw err;
441
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
442
+ 'site_search_engine': request.siteSearchEngine ?? '',
583
443
  });
444
+ this.initialize().catch(err => { throw err; });
584
445
  this._log.info('getUriPatternDocumentData request %j', request);
585
446
  const wrappedCallback = callback
586
447
  ? (error, response, options, rawResponse) => {
@@ -588,8 +449,7 @@ class SiteSearchEngineServiceClient {
588
449
  callback(error, response, options, rawResponse); // We verified callback above.
589
450
  }
590
451
  : undefined;
591
- return this.innerApiCalls
592
- .getUriPatternDocumentData(request, options, wrappedCallback)
452
+ return this.innerApiCalls.getUriPatternDocumentData(request, options, wrappedCallback)
593
453
  ?.then(([response, options, rawResponse]) => {
594
454
  this._log.info('getUriPatternDocumentData response %j', response);
595
455
  return [response, options, rawResponse];
@@ -608,13 +468,10 @@ class SiteSearchEngineServiceClient {
608
468
  options = options || {};
609
469
  options.otherArgs = options.otherArgs || {};
610
470
  options.otherArgs.headers = options.otherArgs.headers || {};
611
- options.otherArgs.headers['x-goog-request-params'] =
612
- this._gaxModule.routingHeader.fromParams({
613
- parent: request.parent ?? '',
614
- });
615
- this.initialize().catch(err => {
616
- throw err;
471
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
472
+ 'parent': request.parent ?? '',
617
473
  });
474
+ this.initialize().catch(err => { throw err; });
618
475
  const wrappedCallback = callback
619
476
  ? (error, response, rawResponse, _) => {
620
477
  this._log.info('createTargetSite response %j', rawResponse);
@@ -622,8 +479,7 @@ class SiteSearchEngineServiceClient {
622
479
  }
623
480
  : undefined;
624
481
  this._log.info('createTargetSite request %j', request);
625
- return this.innerApiCalls
626
- .createTargetSite(request, options, wrappedCallback)
482
+ return this.innerApiCalls.createTargetSite(request, options, wrappedCallback)
627
483
  ?.then(([response, rawResponse, _]) => {
628
484
  this._log.info('createTargetSite response %j', rawResponse);
629
485
  return [response, rawResponse, _];
@@ -660,13 +516,10 @@ class SiteSearchEngineServiceClient {
660
516
  options = options || {};
661
517
  options.otherArgs = options.otherArgs || {};
662
518
  options.otherArgs.headers = options.otherArgs.headers || {};
663
- options.otherArgs.headers['x-goog-request-params'] =
664
- this._gaxModule.routingHeader.fromParams({
665
- parent: request.parent ?? '',
666
- });
667
- this.initialize().catch(err => {
668
- throw err;
519
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
520
+ 'parent': request.parent ?? '',
669
521
  });
522
+ this.initialize().catch(err => { throw err; });
670
523
  const wrappedCallback = callback
671
524
  ? (error, response, rawResponse, _) => {
672
525
  this._log.info('batchCreateTargetSites response %j', rawResponse);
@@ -674,8 +527,7 @@ class SiteSearchEngineServiceClient {
674
527
  }
675
528
  : undefined;
676
529
  this._log.info('batchCreateTargetSites request %j', request);
677
- return this.innerApiCalls
678
- .batchCreateTargetSites(request, options, wrappedCallback)
530
+ return this.innerApiCalls.batchCreateTargetSites(request, options, wrappedCallback)
679
531
  ?.then(([response, rawResponse, _]) => {
680
532
  this._log.info('batchCreateTargetSites response %j', rawResponse);
681
533
  return [response, rawResponse, _];
@@ -712,13 +564,10 @@ class SiteSearchEngineServiceClient {
712
564
  options = options || {};
713
565
  options.otherArgs = options.otherArgs || {};
714
566
  options.otherArgs.headers = options.otherArgs.headers || {};
715
- options.otherArgs.headers['x-goog-request-params'] =
716
- this._gaxModule.routingHeader.fromParams({
717
- 'target_site.name': request.targetSite.name ?? '',
718
- });
719
- this.initialize().catch(err => {
720
- throw err;
567
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
568
+ 'target_site.name': request.targetSite.name ?? '',
721
569
  });
570
+ this.initialize().catch(err => { throw err; });
722
571
  const wrappedCallback = callback
723
572
  ? (error, response, rawResponse, _) => {
724
573
  this._log.info('updateTargetSite response %j', rawResponse);
@@ -726,8 +575,7 @@ class SiteSearchEngineServiceClient {
726
575
  }
727
576
  : undefined;
728
577
  this._log.info('updateTargetSite request %j', request);
729
- return this.innerApiCalls
730
- .updateTargetSite(request, options, wrappedCallback)
578
+ return this.innerApiCalls.updateTargetSite(request, options, wrappedCallback)
731
579
  ?.then(([response, rawResponse, _]) => {
732
580
  this._log.info('updateTargetSite response %j', rawResponse);
733
581
  return [response, rawResponse, _];
@@ -764,13 +612,10 @@ class SiteSearchEngineServiceClient {
764
612
  options = options || {};
765
613
  options.otherArgs = options.otherArgs || {};
766
614
  options.otherArgs.headers = options.otherArgs.headers || {};
767
- options.otherArgs.headers['x-goog-request-params'] =
768
- this._gaxModule.routingHeader.fromParams({
769
- name: request.name ?? '',
770
- });
771
- this.initialize().catch(err => {
772
- throw err;
615
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
616
+ 'name': request.name ?? '',
773
617
  });
618
+ this.initialize().catch(err => { throw err; });
774
619
  const wrappedCallback = callback
775
620
  ? (error, response, rawResponse, _) => {
776
621
  this._log.info('deleteTargetSite response %j', rawResponse);
@@ -778,8 +623,7 @@ class SiteSearchEngineServiceClient {
778
623
  }
779
624
  : undefined;
780
625
  this._log.info('deleteTargetSite request %j', request);
781
- return this.innerApiCalls
782
- .deleteTargetSite(request, options, wrappedCallback)
626
+ return this.innerApiCalls.deleteTargetSite(request, options, wrappedCallback)
783
627
  ?.then(([response, rawResponse, _]) => {
784
628
  this._log.info('deleteTargetSite response %j', rawResponse);
785
629
  return [response, rawResponse, _];
@@ -816,13 +660,10 @@ class SiteSearchEngineServiceClient {
816
660
  options = options || {};
817
661
  options.otherArgs = options.otherArgs || {};
818
662
  options.otherArgs.headers = options.otherArgs.headers || {};
819
- options.otherArgs.headers['x-goog-request-params'] =
820
- this._gaxModule.routingHeader.fromParams({
821
- site_search_engine: request.siteSearchEngine ?? '',
822
- });
823
- this.initialize().catch(err => {
824
- throw err;
663
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
664
+ 'site_search_engine': request.siteSearchEngine ?? '',
825
665
  });
666
+ this.initialize().catch(err => { throw err; });
826
667
  const wrappedCallback = callback
827
668
  ? (error, response, rawResponse, _) => {
828
669
  this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
@@ -830,8 +671,7 @@ class SiteSearchEngineServiceClient {
830
671
  }
831
672
  : undefined;
832
673
  this._log.info('enableAdvancedSiteSearch request %j', request);
833
- return this.innerApiCalls
834
- .enableAdvancedSiteSearch(request, options, wrappedCallback)
674
+ return this.innerApiCalls.enableAdvancedSiteSearch(request, options, wrappedCallback)
835
675
  ?.then(([response, rawResponse, _]) => {
836
676
  this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
837
677
  return [response, rawResponse, _];
@@ -868,13 +708,10 @@ class SiteSearchEngineServiceClient {
868
708
  options = options || {};
869
709
  options.otherArgs = options.otherArgs || {};
870
710
  options.otherArgs.headers = options.otherArgs.headers || {};
871
- options.otherArgs.headers['x-goog-request-params'] =
872
- this._gaxModule.routingHeader.fromParams({
873
- site_search_engine: request.siteSearchEngine ?? '',
874
- });
875
- this.initialize().catch(err => {
876
- throw err;
711
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
712
+ 'site_search_engine': request.siteSearchEngine ?? '',
877
713
  });
714
+ this.initialize().catch(err => { throw err; });
878
715
  const wrappedCallback = callback
879
716
  ? (error, response, rawResponse, _) => {
880
717
  this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
@@ -882,8 +719,7 @@ class SiteSearchEngineServiceClient {
882
719
  }
883
720
  : undefined;
884
721
  this._log.info('disableAdvancedSiteSearch request %j', request);
885
- return this.innerApiCalls
886
- .disableAdvancedSiteSearch(request, options, wrappedCallback)
722
+ return this.innerApiCalls.disableAdvancedSiteSearch(request, options, wrappedCallback)
887
723
  ?.then(([response, rawResponse, _]) => {
888
724
  this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
889
725
  return [response, rawResponse, _];
@@ -920,13 +756,10 @@ class SiteSearchEngineServiceClient {
920
756
  options = options || {};
921
757
  options.otherArgs = options.otherArgs || {};
922
758
  options.otherArgs.headers = options.otherArgs.headers || {};
923
- options.otherArgs.headers['x-goog-request-params'] =
924
- this._gaxModule.routingHeader.fromParams({
925
- site_search_engine: request.siteSearchEngine ?? '',
926
- });
927
- this.initialize().catch(err => {
928
- throw err;
759
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
760
+ 'site_search_engine': request.siteSearchEngine ?? '',
929
761
  });
762
+ this.initialize().catch(err => { throw err; });
930
763
  const wrappedCallback = callback
931
764
  ? (error, response, rawResponse, _) => {
932
765
  this._log.info('recrawlUris response %j', rawResponse);
@@ -934,8 +767,7 @@ class SiteSearchEngineServiceClient {
934
767
  }
935
768
  : undefined;
936
769
  this._log.info('recrawlUris request %j', request);
937
- return this.innerApiCalls
938
- .recrawlUris(request, options, wrappedCallback)
770
+ return this.innerApiCalls.recrawlUris(request, options, wrappedCallback)
939
771
  ?.then(([response, rawResponse, _]) => {
940
772
  this._log.info('recrawlUris response %j', rawResponse);
941
773
  return [response, rawResponse, _];
@@ -972,13 +804,10 @@ class SiteSearchEngineServiceClient {
972
804
  options = options || {};
973
805
  options.otherArgs = options.otherArgs || {};
974
806
  options.otherArgs.headers = options.otherArgs.headers || {};
975
- options.otherArgs.headers['x-goog-request-params'] =
976
- this._gaxModule.routingHeader.fromParams({
977
- parent: request.parent ?? '',
978
- });
979
- this.initialize().catch(err => {
980
- throw err;
807
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
808
+ 'parent': request.parent ?? '',
981
809
  });
810
+ this.initialize().catch(err => { throw err; });
982
811
  const wrappedCallback = callback
983
812
  ? (error, response, rawResponse, _) => {
984
813
  this._log.info('batchVerifyTargetSites response %j', rawResponse);
@@ -986,8 +815,7 @@ class SiteSearchEngineServiceClient {
986
815
  }
987
816
  : undefined;
988
817
  this._log.info('batchVerifyTargetSites request %j', request);
989
- return this.innerApiCalls
990
- .batchVerifyTargetSites(request, options, wrappedCallback)
818
+ return this.innerApiCalls.batchVerifyTargetSites(request, options, wrappedCallback)
991
819
  ?.then(([response, rawResponse, _]) => {
992
820
  this._log.info('batchVerifyTargetSites response %j', rawResponse);
993
821
  return [response, rawResponse, _];
@@ -1024,13 +852,10 @@ class SiteSearchEngineServiceClient {
1024
852
  options = options || {};
1025
853
  options.otherArgs = options.otherArgs || {};
1026
854
  options.otherArgs.headers = options.otherArgs.headers || {};
1027
- options.otherArgs.headers['x-goog-request-params'] =
1028
- this._gaxModule.routingHeader.fromParams({
1029
- site_search_engine: request.siteSearchEngine ?? '',
1030
- });
1031
- this.initialize().catch(err => {
1032
- throw err;
855
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
856
+ 'site_search_engine': request.siteSearchEngine ?? '',
1033
857
  });
858
+ this.initialize().catch(err => { throw err; });
1034
859
  const wrappedCallback = callback
1035
860
  ? (error, response, rawResponse, _) => {
1036
861
  this._log.info('setUriPatternDocumentData response %j', rawResponse);
@@ -1038,8 +863,7 @@ class SiteSearchEngineServiceClient {
1038
863
  }
1039
864
  : undefined;
1040
865
  this._log.info('setUriPatternDocumentData request %j', request);
1041
- return this.innerApiCalls
1042
- .setUriPatternDocumentData(request, options, wrappedCallback)
866
+ return this.innerApiCalls.setUriPatternDocumentData(request, options, wrappedCallback)
1043
867
  ?.then(([response, rawResponse, _]) => {
1044
868
  this._log.info('setUriPatternDocumentData response %j', rawResponse);
1045
869
  return [response, rawResponse, _];
@@ -1076,13 +900,10 @@ class SiteSearchEngineServiceClient {
1076
900
  options = options || {};
1077
901
  options.otherArgs = options.otherArgs || {};
1078
902
  options.otherArgs.headers = options.otherArgs.headers || {};
1079
- options.otherArgs.headers['x-goog-request-params'] =
1080
- this._gaxModule.routingHeader.fromParams({
1081
- parent: request.parent ?? '',
1082
- });
1083
- this.initialize().catch(err => {
1084
- throw err;
903
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
904
+ 'parent': request.parent ?? '',
1085
905
  });
906
+ this.initialize().catch(err => { throw err; });
1086
907
  const wrappedCallback = callback
1087
908
  ? (error, values, nextPageRequest, rawResponse) => {
1088
909
  this._log.info('listTargetSites values %j', values);
@@ -1137,15 +958,12 @@ class SiteSearchEngineServiceClient {
1137
958
  options = options || {};
1138
959
  options.otherArgs = options.otherArgs || {};
1139
960
  options.otherArgs.headers = options.otherArgs.headers || {};
1140
- options.otherArgs.headers['x-goog-request-params'] =
1141
- this._gaxModule.routingHeader.fromParams({
1142
- parent: request.parent ?? '',
1143
- });
961
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
962
+ 'parent': request.parent ?? '',
963
+ });
1144
964
  const defaultCallSettings = this._defaults['listTargetSites'];
1145
965
  const callSettings = defaultCallSettings.merge(options);
1146
- this.initialize().catch(err => {
1147
- throw err;
1148
- });
966
+ this.initialize().catch(err => { throw err; });
1149
967
  this._log.info('listTargetSites stream %j', request);
1150
968
  return this.descriptors.page.listTargetSites.createStream(this.innerApiCalls.listTargetSites, request, callSettings);
1151
969
  }
@@ -1192,15 +1010,12 @@ class SiteSearchEngineServiceClient {
1192
1010
  options = options || {};
1193
1011
  options.otherArgs = options.otherArgs || {};
1194
1012
  options.otherArgs.headers = options.otherArgs.headers || {};
1195
- options.otherArgs.headers['x-goog-request-params'] =
1196
- this._gaxModule.routingHeader.fromParams({
1197
- parent: request.parent ?? '',
1198
- });
1013
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1014
+ 'parent': request.parent ?? '',
1015
+ });
1199
1016
  const defaultCallSettings = this._defaults['listTargetSites'];
1200
1017
  const callSettings = defaultCallSettings.merge(options);
1201
- this.initialize().catch(err => {
1202
- throw err;
1203
- });
1018
+ this.initialize().catch(err => { throw err; });
1204
1019
  this._log.info('listTargetSites iterate %j', request);
1205
1020
  return this.descriptors.page.listTargetSites.asyncIterate(this.innerApiCalls['listTargetSites'], request, callSettings);
1206
1021
  }
@@ -1217,13 +1032,10 @@ class SiteSearchEngineServiceClient {
1217
1032
  options = options || {};
1218
1033
  options.otherArgs = options.otherArgs || {};
1219
1034
  options.otherArgs.headers = options.otherArgs.headers || {};
1220
- options.otherArgs.headers['x-goog-request-params'] =
1221
- this._gaxModule.routingHeader.fromParams({
1222
- site_search_engine: request.siteSearchEngine ?? '',
1223
- });
1224
- this.initialize().catch(err => {
1225
- throw err;
1035
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1036
+ 'site_search_engine': request.siteSearchEngine ?? '',
1226
1037
  });
1038
+ this.initialize().catch(err => { throw err; });
1227
1039
  const wrappedCallback = callback
1228
1040
  ? (error, values, nextPageRequest, rawResponse) => {
1229
1041
  this._log.info('fetchDomainVerificationStatus values %j', values);
@@ -1275,15 +1087,12 @@ class SiteSearchEngineServiceClient {
1275
1087
  options = options || {};
1276
1088
  options.otherArgs = options.otherArgs || {};
1277
1089
  options.otherArgs.headers = options.otherArgs.headers || {};
1278
- options.otherArgs.headers['x-goog-request-params'] =
1279
- this._gaxModule.routingHeader.fromParams({
1280
- site_search_engine: request.siteSearchEngine ?? '',
1281
- });
1090
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1091
+ 'site_search_engine': request.siteSearchEngine ?? '',
1092
+ });
1282
1093
  const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
1283
1094
  const callSettings = defaultCallSettings.merge(options);
1284
- this.initialize().catch(err => {
1285
- throw err;
1286
- });
1095
+ this.initialize().catch(err => { throw err; });
1287
1096
  this._log.info('fetchDomainVerificationStatus stream %j', request);
1288
1097
  return this.descriptors.page.fetchDomainVerificationStatus.createStream(this.innerApiCalls.fetchDomainVerificationStatus, request, callSettings);
1289
1098
  }
@@ -1327,103 +1136,100 @@ class SiteSearchEngineServiceClient {
1327
1136
  options = options || {};
1328
1137
  options.otherArgs = options.otherArgs || {};
1329
1138
  options.otherArgs.headers = options.otherArgs.headers || {};
1330
- options.otherArgs.headers['x-goog-request-params'] =
1331
- this._gaxModule.routingHeader.fromParams({
1332
- site_search_engine: request.siteSearchEngine ?? '',
1333
- });
1139
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1140
+ 'site_search_engine': request.siteSearchEngine ?? '',
1141
+ });
1334
1142
  const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
1335
1143
  const callSettings = defaultCallSettings.merge(options);
1336
- this.initialize().catch(err => {
1337
- throw err;
1338
- });
1144
+ this.initialize().catch(err => { throw err; });
1339
1145
  this._log.info('fetchDomainVerificationStatus iterate %j', request);
1340
1146
  return this.descriptors.page.fetchDomainVerificationStatus.asyncIterate(this.innerApiCalls['fetchDomainVerificationStatus'], request, callSettings);
1341
1147
  }
1342
1148
  /**
1343
- * Gets information about a location.
1344
- *
1345
- * @param {Object} request
1346
- * The request object that will be sent.
1347
- * @param {string} request.name
1348
- * Resource name for the location.
1349
- * @param {object} [options]
1350
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1351
- * @returns {Promise} - The promise which resolves to an array.
1352
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1353
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1354
- * for more details and examples.
1355
- * @example
1356
- * ```
1357
- * const [response] = await client.getLocation(request);
1358
- * ```
1359
- */
1149
+ * Gets information about a location.
1150
+ *
1151
+ * @param {Object} request
1152
+ * The request object that will be sent.
1153
+ * @param {string} request.name
1154
+ * Resource name for the location.
1155
+ * @param {object} [options]
1156
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1157
+ * @returns {Promise} - The promise which resolves to an array.
1158
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1159
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1160
+ * for more details and examples.
1161
+ * @example
1162
+ * ```
1163
+ * const [response] = await client.getLocation(request);
1164
+ * ```
1165
+ */
1360
1166
  getLocation(request, options, callback) {
1361
1167
  return this.locationsClient.getLocation(request, options, callback);
1362
1168
  }
1363
1169
  /**
1364
- * Lists information about the supported locations for this service. Returns an iterable object.
1365
- *
1366
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1367
- * @param {Object} request
1368
- * The request object that will be sent.
1369
- * @param {string} request.name
1370
- * The resource that owns the locations collection, if applicable.
1371
- * @param {string} request.filter
1372
- * The standard list filter.
1373
- * @param {number} request.pageSize
1374
- * The standard list page size.
1375
- * @param {string} request.pageToken
1376
- * The standard list page token.
1377
- * @param {object} [options]
1378
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1379
- * @returns {Object}
1380
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1381
- * When you iterate the returned iterable, each element will be an object representing
1382
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1383
- * so you can stop the iteration when you don't need more results.
1384
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1385
- * for more details and examples.
1386
- * @example
1387
- * ```
1388
- * const iterable = client.listLocationsAsync(request);
1389
- * for await (const response of iterable) {
1390
- * // process response
1391
- * }
1392
- * ```
1393
- */
1170
+ * Lists information about the supported locations for this service. Returns an iterable object.
1171
+ *
1172
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1173
+ * @param {Object} request
1174
+ * The request object that will be sent.
1175
+ * @param {string} request.name
1176
+ * The resource that owns the locations collection, if applicable.
1177
+ * @param {string} request.filter
1178
+ * The standard list filter.
1179
+ * @param {number} request.pageSize
1180
+ * The standard list page size.
1181
+ * @param {string} request.pageToken
1182
+ * The standard list page token.
1183
+ * @param {object} [options]
1184
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1185
+ * @returns {Object}
1186
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1187
+ * When you iterate the returned iterable, each element will be an object representing
1188
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1189
+ * so you can stop the iteration when you don't need more results.
1190
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1191
+ * for more details and examples.
1192
+ * @example
1193
+ * ```
1194
+ * const iterable = client.listLocationsAsync(request);
1195
+ * for await (const response of iterable) {
1196
+ * // process response
1197
+ * }
1198
+ * ```
1199
+ */
1394
1200
  listLocationsAsync(request, options) {
1395
1201
  return this.locationsClient.listLocationsAsync(request, options);
1396
1202
  }
1397
1203
  /**
1398
- * Gets the latest state of a long-running operation. Clients can use this
1399
- * method to poll the operation result at intervals as recommended by the API
1400
- * service.
1401
- *
1402
- * @param {Object} request - The request object that will be sent.
1403
- * @param {string} request.name - The name of the operation resource.
1404
- * @param {Object=} options
1405
- * Optional parameters. You can override the default settings for this call,
1406
- * e.g, timeout, retries, paginations, etc. See {@link
1407
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1408
- * for the details.
1409
- * @param {function(?Error, ?Object)=} callback
1410
- * The function which will be called with the result of the API call.
1411
- *
1412
- * The second parameter to the callback is an object representing
1413
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
1414
- * @return {Promise} - The promise which resolves to an array.
1415
- * The first element of the array is an object representing
1416
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
1417
- * The promise has a method named "cancel" which cancels the ongoing API call.
1418
- *
1419
- * @example
1420
- * ```
1421
- * const client = longrunning.operationsClient();
1422
- * const name = '';
1423
- * const [response] = await client.getOperation({name});
1424
- * // doThingsWith(response)
1425
- * ```
1426
- */
1204
+ * Gets the latest state of a long-running operation. Clients can use this
1205
+ * method to poll the operation result at intervals as recommended by the API
1206
+ * service.
1207
+ *
1208
+ * @param {Object} request - The request object that will be sent.
1209
+ * @param {string} request.name - The name of the operation resource.
1210
+ * @param {Object=} options
1211
+ * Optional parameters. You can override the default settings for this call,
1212
+ * e.g, timeout, retries, paginations, etc. See {@link
1213
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1214
+ * for the details.
1215
+ * @param {function(?Error, ?Object)=} callback
1216
+ * The function which will be called with the result of the API call.
1217
+ *
1218
+ * The second parameter to the callback is an object representing
1219
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1220
+ * @return {Promise} - The promise which resolves to an array.
1221
+ * The first element of the array is an object representing
1222
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1223
+ * The promise has a method named "cancel" which cancels the ongoing API call.
1224
+ *
1225
+ * @example
1226
+ * ```
1227
+ * const client = longrunning.operationsClient();
1228
+ * const name = '';
1229
+ * const [response] = await client.getOperation({name});
1230
+ * // doThingsWith(response)
1231
+ * ```
1232
+ */
1427
1233
  getOperation(request, optionsOrCallback, callback) {
1428
1234
  let options;
1429
1235
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1598,8 +1404,7 @@ class SiteSearchEngineServiceClient {
1598
1404
  * @returns {string} A string representing the project.
1599
1405
  */
1600
1406
  matchProjectFromAclConfigName(aclConfigName) {
1601
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1602
- .project;
1407
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
1603
1408
  }
1604
1409
  /**
1605
1410
  * Parse the location from AclConfig resource.
@@ -1609,8 +1414,7 @@ class SiteSearchEngineServiceClient {
1609
1414
  * @returns {string} A string representing the location.
1610
1415
  */
1611
1416
  matchLocationFromAclConfigName(aclConfigName) {
1612
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1613
- .location;
1417
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
1614
1418
  }
1615
1419
  /**
1616
1420
  * Return a fully-qualified engine resource name string.
@@ -1692,8 +1496,7 @@ class SiteSearchEngineServiceClient {
1692
1496
  * @returns {string} A string representing the project.
1693
1497
  */
1694
1498
  matchProjectFromEvaluationName(evaluationName) {
1695
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1696
- .project;
1499
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1697
1500
  }
1698
1501
  /**
1699
1502
  * Parse the location from Evaluation resource.
@@ -1703,8 +1506,7 @@ class SiteSearchEngineServiceClient {
1703
1506
  * @returns {string} A string representing the location.
1704
1507
  */
1705
1508
  matchLocationFromEvaluationName(evaluationName) {
1706
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1707
- .location;
1509
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1708
1510
  }
1709
1511
  /**
1710
1512
  * Parse the evaluation from Evaluation resource.
@@ -1714,8 +1516,7 @@ class SiteSearchEngineServiceClient {
1714
1516
  * @returns {string} A string representing the evaluation.
1715
1517
  */
1716
1518
  matchEvaluationFromEvaluationName(evaluationName) {
1717
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1718
- .evaluation;
1519
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1719
1520
  }
1720
1521
  /**
1721
1522
  * Return a fully-qualified project resource name string.
@@ -3782,8 +3583,7 @@ class SiteSearchEngineServiceClient {
3782
3583
  * @returns {string} A string representing the project.
3783
3584
  */
3784
3585
  matchProjectFromSampleQueryName(sampleQueryName) {
3785
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3786
- .project;
3586
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3787
3587
  }
3788
3588
  /**
3789
3589
  * Parse the location from SampleQuery resource.
@@ -3793,8 +3593,7 @@ class SiteSearchEngineServiceClient {
3793
3593
  * @returns {string} A string representing the location.
3794
3594
  */
3795
3595
  matchLocationFromSampleQueryName(sampleQueryName) {
3796
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3797
- .location;
3596
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3798
3597
  }
3799
3598
  /**
3800
3599
  * Parse the sample_query_set from SampleQuery resource.
@@ -3804,8 +3603,7 @@ class SiteSearchEngineServiceClient {
3804
3603
  * @returns {string} A string representing the sample_query_set.
3805
3604
  */
3806
3605
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3807
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3808
- .sample_query_set;
3606
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3809
3607
  }
3810
3608
  /**
3811
3609
  * Parse the sample_query from SampleQuery resource.
@@ -3815,8 +3613,7 @@ class SiteSearchEngineServiceClient {
3815
3613
  * @returns {string} A string representing the sample_query.
3816
3614
  */
3817
3615
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3818
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3819
- .sample_query;
3616
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3820
3617
  }
3821
3618
  /**
3822
3619
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3875,8 +3672,8 @@ class SiteSearchEngineServiceClient {
3875
3672
  this._log.info('ending gRPC channel');
3876
3673
  this._terminated = true;
3877
3674
  stub.close();
3878
- this.locationsClient.close();
3879
- this.operationsClient.close();
3675
+ this.locationsClient.close().catch(err => { throw err; });
3676
+ void this.operationsClient.close();
3880
3677
  });
3881
3678
  }
3882
3679
  return Promise.resolve();