@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,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,129 +206,24 @@ 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
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
211
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
219
212
  // This API contains "long-running operations", which return a
220
213
  // an Operation object that allows for tracking of the operation,
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,11 +389,16 @@ 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];
396
+ }).catch((error) => {
397
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
398
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
399
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
400
+ }
401
+ throw error;
528
402
  });
529
403
  }
530
404
  getTargetSite(request, optionsOrCallback, callback) {
@@ -540,13 +414,10 @@ class SiteSearchEngineServiceClient {
540
414
  options = options || {};
541
415
  options.otherArgs = options.otherArgs || {};
542
416
  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;
417
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
418
+ 'name': request.name ?? '',
549
419
  });
420
+ this.initialize().catch(err => { throw err; });
550
421
  this._log.info('getTargetSite request %j', request);
551
422
  const wrappedCallback = callback
552
423
  ? (error, response, options, rawResponse) => {
@@ -554,11 +425,16 @@ class SiteSearchEngineServiceClient {
554
425
  callback(error, response, options, rawResponse); // We verified callback above.
555
426
  }
556
427
  : undefined;
557
- return this.innerApiCalls
558
- .getTargetSite(request, options, wrappedCallback)
428
+ return this.innerApiCalls.getTargetSite(request, options, wrappedCallback)
559
429
  ?.then(([response, options, rawResponse]) => {
560
430
  this._log.info('getTargetSite response %j', response);
561
431
  return [response, options, rawResponse];
432
+ }).catch((error) => {
433
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
434
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
435
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
436
+ }
437
+ throw error;
562
438
  });
563
439
  }
564
440
  getUriPatternDocumentData(request, optionsOrCallback, callback) {
@@ -574,13 +450,10 @@ class SiteSearchEngineServiceClient {
574
450
  options = options || {};
575
451
  options.otherArgs = options.otherArgs || {};
576
452
  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;
453
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
454
+ 'site_search_engine': request.siteSearchEngine ?? '',
583
455
  });
456
+ this.initialize().catch(err => { throw err; });
584
457
  this._log.info('getUriPatternDocumentData request %j', request);
585
458
  const wrappedCallback = callback
586
459
  ? (error, response, options, rawResponse) => {
@@ -588,11 +461,16 @@ class SiteSearchEngineServiceClient {
588
461
  callback(error, response, options, rawResponse); // We verified callback above.
589
462
  }
590
463
  : undefined;
591
- return this.innerApiCalls
592
- .getUriPatternDocumentData(request, options, wrappedCallback)
464
+ return this.innerApiCalls.getUriPatternDocumentData(request, options, wrappedCallback)
593
465
  ?.then(([response, options, rawResponse]) => {
594
466
  this._log.info('getUriPatternDocumentData response %j', response);
595
467
  return [response, options, rawResponse];
468
+ }).catch((error) => {
469
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
470
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
471
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
472
+ }
473
+ throw error;
596
474
  });
597
475
  }
598
476
  createTargetSite(request, optionsOrCallback, callback) {
@@ -608,13 +486,10 @@ class SiteSearchEngineServiceClient {
608
486
  options = options || {};
609
487
  options.otherArgs = options.otherArgs || {};
610
488
  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;
489
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
490
+ 'parent': request.parent ?? '',
617
491
  });
492
+ this.initialize().catch(err => { throw err; });
618
493
  const wrappedCallback = callback
619
494
  ? (error, response, rawResponse, _) => {
620
495
  this._log.info('createTargetSite response %j', rawResponse);
@@ -622,8 +497,7 @@ class SiteSearchEngineServiceClient {
622
497
  }
623
498
  : undefined;
624
499
  this._log.info('createTargetSite request %j', request);
625
- return this.innerApiCalls
626
- .createTargetSite(request, options, wrappedCallback)
500
+ return this.innerApiCalls.createTargetSite(request, options, wrappedCallback)
627
501
  ?.then(([response, rawResponse, _]) => {
628
502
  this._log.info('createTargetSite response %j', rawResponse);
629
503
  return [response, rawResponse, _];
@@ -660,13 +534,10 @@ class SiteSearchEngineServiceClient {
660
534
  options = options || {};
661
535
  options.otherArgs = options.otherArgs || {};
662
536
  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;
537
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
538
+ 'parent': request.parent ?? '',
669
539
  });
540
+ this.initialize().catch(err => { throw err; });
670
541
  const wrappedCallback = callback
671
542
  ? (error, response, rawResponse, _) => {
672
543
  this._log.info('batchCreateTargetSites response %j', rawResponse);
@@ -674,8 +545,7 @@ class SiteSearchEngineServiceClient {
674
545
  }
675
546
  : undefined;
676
547
  this._log.info('batchCreateTargetSites request %j', request);
677
- return this.innerApiCalls
678
- .batchCreateTargetSites(request, options, wrappedCallback)
548
+ return this.innerApiCalls.batchCreateTargetSites(request, options, wrappedCallback)
679
549
  ?.then(([response, rawResponse, _]) => {
680
550
  this._log.info('batchCreateTargetSites response %j', rawResponse);
681
551
  return [response, rawResponse, _];
@@ -712,13 +582,10 @@ class SiteSearchEngineServiceClient {
712
582
  options = options || {};
713
583
  options.otherArgs = options.otherArgs || {};
714
584
  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;
585
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
586
+ 'target_site.name': request.targetSite.name ?? '',
721
587
  });
588
+ this.initialize().catch(err => { throw err; });
722
589
  const wrappedCallback = callback
723
590
  ? (error, response, rawResponse, _) => {
724
591
  this._log.info('updateTargetSite response %j', rawResponse);
@@ -726,8 +593,7 @@ class SiteSearchEngineServiceClient {
726
593
  }
727
594
  : undefined;
728
595
  this._log.info('updateTargetSite request %j', request);
729
- return this.innerApiCalls
730
- .updateTargetSite(request, options, wrappedCallback)
596
+ return this.innerApiCalls.updateTargetSite(request, options, wrappedCallback)
731
597
  ?.then(([response, rawResponse, _]) => {
732
598
  this._log.info('updateTargetSite response %j', rawResponse);
733
599
  return [response, rawResponse, _];
@@ -764,13 +630,10 @@ class SiteSearchEngineServiceClient {
764
630
  options = options || {};
765
631
  options.otherArgs = options.otherArgs || {};
766
632
  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;
633
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
634
+ 'name': request.name ?? '',
773
635
  });
636
+ this.initialize().catch(err => { throw err; });
774
637
  const wrappedCallback = callback
775
638
  ? (error, response, rawResponse, _) => {
776
639
  this._log.info('deleteTargetSite response %j', rawResponse);
@@ -778,8 +641,7 @@ class SiteSearchEngineServiceClient {
778
641
  }
779
642
  : undefined;
780
643
  this._log.info('deleteTargetSite request %j', request);
781
- return this.innerApiCalls
782
- .deleteTargetSite(request, options, wrappedCallback)
644
+ return this.innerApiCalls.deleteTargetSite(request, options, wrappedCallback)
783
645
  ?.then(([response, rawResponse, _]) => {
784
646
  this._log.info('deleteTargetSite response %j', rawResponse);
785
647
  return [response, rawResponse, _];
@@ -816,13 +678,10 @@ class SiteSearchEngineServiceClient {
816
678
  options = options || {};
817
679
  options.otherArgs = options.otherArgs || {};
818
680
  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;
681
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
682
+ 'site_search_engine': request.siteSearchEngine ?? '',
825
683
  });
684
+ this.initialize().catch(err => { throw err; });
826
685
  const wrappedCallback = callback
827
686
  ? (error, response, rawResponse, _) => {
828
687
  this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
@@ -830,8 +689,7 @@ class SiteSearchEngineServiceClient {
830
689
  }
831
690
  : undefined;
832
691
  this._log.info('enableAdvancedSiteSearch request %j', request);
833
- return this.innerApiCalls
834
- .enableAdvancedSiteSearch(request, options, wrappedCallback)
692
+ return this.innerApiCalls.enableAdvancedSiteSearch(request, options, wrappedCallback)
835
693
  ?.then(([response, rawResponse, _]) => {
836
694
  this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
837
695
  return [response, rawResponse, _];
@@ -868,13 +726,10 @@ class SiteSearchEngineServiceClient {
868
726
  options = options || {};
869
727
  options.otherArgs = options.otherArgs || {};
870
728
  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;
729
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
730
+ 'site_search_engine': request.siteSearchEngine ?? '',
877
731
  });
732
+ this.initialize().catch(err => { throw err; });
878
733
  const wrappedCallback = callback
879
734
  ? (error, response, rawResponse, _) => {
880
735
  this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
@@ -882,8 +737,7 @@ class SiteSearchEngineServiceClient {
882
737
  }
883
738
  : undefined;
884
739
  this._log.info('disableAdvancedSiteSearch request %j', request);
885
- return this.innerApiCalls
886
- .disableAdvancedSiteSearch(request, options, wrappedCallback)
740
+ return this.innerApiCalls.disableAdvancedSiteSearch(request, options, wrappedCallback)
887
741
  ?.then(([response, rawResponse, _]) => {
888
742
  this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
889
743
  return [response, rawResponse, _];
@@ -920,13 +774,10 @@ class SiteSearchEngineServiceClient {
920
774
  options = options || {};
921
775
  options.otherArgs = options.otherArgs || {};
922
776
  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;
777
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
778
+ 'site_search_engine': request.siteSearchEngine ?? '',
929
779
  });
780
+ this.initialize().catch(err => { throw err; });
930
781
  const wrappedCallback = callback
931
782
  ? (error, response, rawResponse, _) => {
932
783
  this._log.info('recrawlUris response %j', rawResponse);
@@ -934,8 +785,7 @@ class SiteSearchEngineServiceClient {
934
785
  }
935
786
  : undefined;
936
787
  this._log.info('recrawlUris request %j', request);
937
- return this.innerApiCalls
938
- .recrawlUris(request, options, wrappedCallback)
788
+ return this.innerApiCalls.recrawlUris(request, options, wrappedCallback)
939
789
  ?.then(([response, rawResponse, _]) => {
940
790
  this._log.info('recrawlUris response %j', rawResponse);
941
791
  return [response, rawResponse, _];
@@ -972,13 +822,10 @@ class SiteSearchEngineServiceClient {
972
822
  options = options || {};
973
823
  options.otherArgs = options.otherArgs || {};
974
824
  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;
825
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
826
+ 'parent': request.parent ?? '',
981
827
  });
828
+ this.initialize().catch(err => { throw err; });
982
829
  const wrappedCallback = callback
983
830
  ? (error, response, rawResponse, _) => {
984
831
  this._log.info('batchVerifyTargetSites response %j', rawResponse);
@@ -986,8 +833,7 @@ class SiteSearchEngineServiceClient {
986
833
  }
987
834
  : undefined;
988
835
  this._log.info('batchVerifyTargetSites request %j', request);
989
- return this.innerApiCalls
990
- .batchVerifyTargetSites(request, options, wrappedCallback)
836
+ return this.innerApiCalls.batchVerifyTargetSites(request, options, wrappedCallback)
991
837
  ?.then(([response, rawResponse, _]) => {
992
838
  this._log.info('batchVerifyTargetSites response %j', rawResponse);
993
839
  return [response, rawResponse, _];
@@ -1024,13 +870,10 @@ class SiteSearchEngineServiceClient {
1024
870
  options = options || {};
1025
871
  options.otherArgs = options.otherArgs || {};
1026
872
  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;
873
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
874
+ 'site_search_engine': request.siteSearchEngine ?? '',
1033
875
  });
876
+ this.initialize().catch(err => { throw err; });
1034
877
  const wrappedCallback = callback
1035
878
  ? (error, response, rawResponse, _) => {
1036
879
  this._log.info('setUriPatternDocumentData response %j', rawResponse);
@@ -1038,8 +881,7 @@ class SiteSearchEngineServiceClient {
1038
881
  }
1039
882
  : undefined;
1040
883
  this._log.info('setUriPatternDocumentData request %j', request);
1041
- return this.innerApiCalls
1042
- .setUriPatternDocumentData(request, options, wrappedCallback)
884
+ return this.innerApiCalls.setUriPatternDocumentData(request, options, wrappedCallback)
1043
885
  ?.then(([response, rawResponse, _]) => {
1044
886
  this._log.info('setUriPatternDocumentData response %j', rawResponse);
1045
887
  return [response, rawResponse, _];
@@ -1076,13 +918,10 @@ class SiteSearchEngineServiceClient {
1076
918
  options = options || {};
1077
919
  options.otherArgs = options.otherArgs || {};
1078
920
  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;
921
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
922
+ 'parent': request.parent ?? '',
1085
923
  });
924
+ this.initialize().catch(err => { throw err; });
1086
925
  const wrappedCallback = callback
1087
926
  ? (error, values, nextPageRequest, rawResponse) => {
1088
927
  this._log.info('listTargetSites values %j', values);
@@ -1137,15 +976,12 @@ class SiteSearchEngineServiceClient {
1137
976
  options = options || {};
1138
977
  options.otherArgs = options.otherArgs || {};
1139
978
  options.otherArgs.headers = options.otherArgs.headers || {};
1140
- options.otherArgs.headers['x-goog-request-params'] =
1141
- this._gaxModule.routingHeader.fromParams({
1142
- parent: request.parent ?? '',
1143
- });
979
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
980
+ 'parent': request.parent ?? '',
981
+ });
1144
982
  const defaultCallSettings = this._defaults['listTargetSites'];
1145
983
  const callSettings = defaultCallSettings.merge(options);
1146
- this.initialize().catch(err => {
1147
- throw err;
1148
- });
984
+ this.initialize().catch(err => { throw err; });
1149
985
  this._log.info('listTargetSites stream %j', request);
1150
986
  return this.descriptors.page.listTargetSites.createStream(this.innerApiCalls.listTargetSites, request, callSettings);
1151
987
  }
@@ -1192,15 +1028,12 @@ class SiteSearchEngineServiceClient {
1192
1028
  options = options || {};
1193
1029
  options.otherArgs = options.otherArgs || {};
1194
1030
  options.otherArgs.headers = options.otherArgs.headers || {};
1195
- options.otherArgs.headers['x-goog-request-params'] =
1196
- this._gaxModule.routingHeader.fromParams({
1197
- parent: request.parent ?? '',
1198
- });
1031
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1032
+ 'parent': request.parent ?? '',
1033
+ });
1199
1034
  const defaultCallSettings = this._defaults['listTargetSites'];
1200
1035
  const callSettings = defaultCallSettings.merge(options);
1201
- this.initialize().catch(err => {
1202
- throw err;
1203
- });
1036
+ this.initialize().catch(err => { throw err; });
1204
1037
  this._log.info('listTargetSites iterate %j', request);
1205
1038
  return this.descriptors.page.listTargetSites.asyncIterate(this.innerApiCalls['listTargetSites'], request, callSettings);
1206
1039
  }
@@ -1217,13 +1050,10 @@ class SiteSearchEngineServiceClient {
1217
1050
  options = options || {};
1218
1051
  options.otherArgs = options.otherArgs || {};
1219
1052
  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;
1053
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1054
+ 'site_search_engine': request.siteSearchEngine ?? '',
1226
1055
  });
1056
+ this.initialize().catch(err => { throw err; });
1227
1057
  const wrappedCallback = callback
1228
1058
  ? (error, values, nextPageRequest, rawResponse) => {
1229
1059
  this._log.info('fetchDomainVerificationStatus values %j', values);
@@ -1275,15 +1105,12 @@ class SiteSearchEngineServiceClient {
1275
1105
  options = options || {};
1276
1106
  options.otherArgs = options.otherArgs || {};
1277
1107
  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
- });
1108
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1109
+ 'site_search_engine': request.siteSearchEngine ?? '',
1110
+ });
1282
1111
  const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
1283
1112
  const callSettings = defaultCallSettings.merge(options);
1284
- this.initialize().catch(err => {
1285
- throw err;
1286
- });
1113
+ this.initialize().catch(err => { throw err; });
1287
1114
  this._log.info('fetchDomainVerificationStatus stream %j', request);
1288
1115
  return this.descriptors.page.fetchDomainVerificationStatus.createStream(this.innerApiCalls.fetchDomainVerificationStatus, request, callSettings);
1289
1116
  }
@@ -1327,103 +1154,100 @@ class SiteSearchEngineServiceClient {
1327
1154
  options = options || {};
1328
1155
  options.otherArgs = options.otherArgs || {};
1329
1156
  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
- });
1157
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1158
+ 'site_search_engine': request.siteSearchEngine ?? '',
1159
+ });
1334
1160
  const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
1335
1161
  const callSettings = defaultCallSettings.merge(options);
1336
- this.initialize().catch(err => {
1337
- throw err;
1338
- });
1162
+ this.initialize().catch(err => { throw err; });
1339
1163
  this._log.info('fetchDomainVerificationStatus iterate %j', request);
1340
1164
  return this.descriptors.page.fetchDomainVerificationStatus.asyncIterate(this.innerApiCalls['fetchDomainVerificationStatus'], request, callSettings);
1341
1165
  }
1342
1166
  /**
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
- */
1167
+ * Gets information about a location.
1168
+ *
1169
+ * @param {Object} request
1170
+ * The request object that will be sent.
1171
+ * @param {string} request.name
1172
+ * Resource name for the location.
1173
+ * @param {object} [options]
1174
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1175
+ * @returns {Promise} - The promise which resolves to an array.
1176
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1177
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1178
+ * for more details and examples.
1179
+ * @example
1180
+ * ```
1181
+ * const [response] = await client.getLocation(request);
1182
+ * ```
1183
+ */
1360
1184
  getLocation(request, options, callback) {
1361
1185
  return this.locationsClient.getLocation(request, options, callback);
1362
1186
  }
1363
1187
  /**
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
- */
1188
+ * Lists information about the supported locations for this service. Returns an iterable object.
1189
+ *
1190
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1191
+ * @param {Object} request
1192
+ * The request object that will be sent.
1193
+ * @param {string} request.name
1194
+ * The resource that owns the locations collection, if applicable.
1195
+ * @param {string} request.filter
1196
+ * The standard list filter.
1197
+ * @param {number} request.pageSize
1198
+ * The standard list page size.
1199
+ * @param {string} request.pageToken
1200
+ * The standard list page token.
1201
+ * @param {object} [options]
1202
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1203
+ * @returns {Object}
1204
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1205
+ * When you iterate the returned iterable, each element will be an object representing
1206
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1207
+ * so you can stop the iteration when you don't need more results.
1208
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1209
+ * for more details and examples.
1210
+ * @example
1211
+ * ```
1212
+ * const iterable = client.listLocationsAsync(request);
1213
+ * for await (const response of iterable) {
1214
+ * // process response
1215
+ * }
1216
+ * ```
1217
+ */
1394
1218
  listLocationsAsync(request, options) {
1395
1219
  return this.locationsClient.listLocationsAsync(request, options);
1396
1220
  }
1397
1221
  /**
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
- */
1222
+ * Gets the latest state of a long-running operation. Clients can use this
1223
+ * method to poll the operation result at intervals as recommended by the API
1224
+ * service.
1225
+ *
1226
+ * @param {Object} request - The request object that will be sent.
1227
+ * @param {string} request.name - The name of the operation resource.
1228
+ * @param {Object=} options
1229
+ * Optional parameters. You can override the default settings for this call,
1230
+ * e.g, timeout, retries, paginations, etc. See {@link
1231
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1232
+ * for the details.
1233
+ * @param {function(?Error, ?Object)=} callback
1234
+ * The function which will be called with the result of the API call.
1235
+ *
1236
+ * The second parameter to the callback is an object representing
1237
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1238
+ * @return {Promise} - The promise which resolves to an array.
1239
+ * The first element of the array is an object representing
1240
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1241
+ * The promise has a method named "cancel" which cancels the ongoing API call.
1242
+ *
1243
+ * @example
1244
+ * ```
1245
+ * const client = longrunning.operationsClient();
1246
+ * const name = '';
1247
+ * const [response] = await client.getOperation({name});
1248
+ * // doThingsWith(response)
1249
+ * ```
1250
+ */
1427
1251
  getOperation(request, optionsOrCallback, callback) {
1428
1252
  let options;
1429
1253
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1598,8 +1422,7 @@ class SiteSearchEngineServiceClient {
1598
1422
  * @returns {string} A string representing the project.
1599
1423
  */
1600
1424
  matchProjectFromAclConfigName(aclConfigName) {
1601
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1602
- .project;
1425
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
1603
1426
  }
1604
1427
  /**
1605
1428
  * Parse the location from AclConfig resource.
@@ -1609,8 +1432,7 @@ class SiteSearchEngineServiceClient {
1609
1432
  * @returns {string} A string representing the location.
1610
1433
  */
1611
1434
  matchLocationFromAclConfigName(aclConfigName) {
1612
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1613
- .location;
1435
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
1614
1436
  }
1615
1437
  /**
1616
1438
  * Return a fully-qualified engine resource name string.
@@ -1692,8 +1514,7 @@ class SiteSearchEngineServiceClient {
1692
1514
  * @returns {string} A string representing the project.
1693
1515
  */
1694
1516
  matchProjectFromEvaluationName(evaluationName) {
1695
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1696
- .project;
1517
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1697
1518
  }
1698
1519
  /**
1699
1520
  * Parse the location from Evaluation resource.
@@ -1703,8 +1524,7 @@ class SiteSearchEngineServiceClient {
1703
1524
  * @returns {string} A string representing the location.
1704
1525
  */
1705
1526
  matchLocationFromEvaluationName(evaluationName) {
1706
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1707
- .location;
1527
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1708
1528
  }
1709
1529
  /**
1710
1530
  * Parse the evaluation from Evaluation resource.
@@ -1714,8 +1534,7 @@ class SiteSearchEngineServiceClient {
1714
1534
  * @returns {string} A string representing the evaluation.
1715
1535
  */
1716
1536
  matchEvaluationFromEvaluationName(evaluationName) {
1717
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1718
- .evaluation;
1537
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1719
1538
  }
1720
1539
  /**
1721
1540
  * Return a fully-qualified project resource name string.
@@ -3782,8 +3601,7 @@ class SiteSearchEngineServiceClient {
3782
3601
  * @returns {string} A string representing the project.
3783
3602
  */
3784
3603
  matchProjectFromSampleQueryName(sampleQueryName) {
3785
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3786
- .project;
3604
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3787
3605
  }
3788
3606
  /**
3789
3607
  * Parse the location from SampleQuery resource.
@@ -3793,8 +3611,7 @@ class SiteSearchEngineServiceClient {
3793
3611
  * @returns {string} A string representing the location.
3794
3612
  */
3795
3613
  matchLocationFromSampleQueryName(sampleQueryName) {
3796
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3797
- .location;
3614
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3798
3615
  }
3799
3616
  /**
3800
3617
  * Parse the sample_query_set from SampleQuery resource.
@@ -3804,8 +3621,7 @@ class SiteSearchEngineServiceClient {
3804
3621
  * @returns {string} A string representing the sample_query_set.
3805
3622
  */
3806
3623
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3807
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3808
- .sample_query_set;
3624
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3809
3625
  }
3810
3626
  /**
3811
3627
  * Parse the sample_query from SampleQuery resource.
@@ -3815,8 +3631,7 @@ class SiteSearchEngineServiceClient {
3815
3631
  * @returns {string} A string representing the sample_query.
3816
3632
  */
3817
3633
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3818
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3819
- .sample_query;
3634
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3820
3635
  }
3821
3636
  /**
3822
3637
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3875,8 +3690,8 @@ class SiteSearchEngineServiceClient {
3875
3690
  this._log.info('ending gRPC channel');
3876
3691
  this._terminated = true;
3877
3692
  stub.close();
3878
- this.locationsClient.close();
3879
- this.operationsClient.close();
3693
+ this.locationsClient.close().catch(err => { throw err; });
3694
+ void this.operationsClient.close();
3880
3695
  });
3881
3696
  }
3882
3697
  return Promise.resolve();