@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
@@ -99,26 +99,17 @@ class SampleQueryServiceClient {
99
99
  constructor(opts, gaxInstance) {
100
100
  // Ensure that options include all the required fields.
101
101
  const staticMembers = this.constructor;
102
- if (opts?.universe_domain &&
103
- opts?.universeDomain &&
104
- opts?.universe_domain !== opts?.universeDomain) {
102
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
105
103
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
106
104
  }
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';
105
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
106
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
115
107
  this._servicePath = 'discoveryengine.' + this._universeDomain;
116
108
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
117
109
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
118
110
  const port = opts?.port || staticMembers.port;
119
111
  const clientConfig = opts?.clientConfig ?? {};
120
- const fallback = opts?.fallback ??
121
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
112
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
122
113
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
123
114
  // Request numeric enum values if REST transport is used.
124
115
  opts.numericEnums = true;
@@ -148,7 +139,10 @@ class SampleQueryServiceClient {
148
139
  }
149
140
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
150
141
  // Determine the client header string.
151
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
142
+ const clientHeader = [
143
+ `gax/${this._gaxModule.version}`,
144
+ `gapic/${version}`,
145
+ ];
152
146
  if (typeof process === 'object' && 'versions' in process) {
153
147
  clientHeader.push(`gl-node/${process.versions.node}`);
154
148
  }
@@ -214,7 +208,7 @@ class SampleQueryServiceClient {
214
208
  // (e.g. 50 results at a time, with tokens to get subsequent
215
209
  // pages). Denote the keys used for pagination and results.
216
210
  this.descriptors.page = {
217
- listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries'),
211
+ listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries')
218
212
  };
219
213
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
220
214
  // This API contains "long-running operations", which return a
@@ -222,119 +216,20 @@ class SampleQueryServiceClient {
222
216
  // rather than holding a request open.
223
217
  const lroOptions = {
224
218
  auth: this.auth,
225
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
219
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
226
220
  };
227
221
  if (opts.fallback) {
228
222
  lroOptions.protoJson = protoFilesRoot;
229
- lroOptions.httpRules = [
230
- {
231
- selector: 'google.longrunning.Operations.CancelOperation',
232
- post: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
233
- body: '*',
234
- additional_bindings: [
235
- {
236
- post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
237
- body: '*',
238
- },
239
- ],
240
- },
241
- {
242
- selector: 'google.longrunning.Operations.GetOperation',
243
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
244
- additional_bindings: [
245
- {
246
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
247
- },
248
- {
249
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
250
- },
251
- {
252
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
253
- },
254
- {
255
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
256
- },
257
- {
258
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
259
- },
260
- {
261
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
262
- },
263
- {
264
- get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
265
- },
266
- {
267
- get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
268
- },
269
- {
270
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
271
- },
272
- {
273
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
274
- },
275
- {
276
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
277
- },
278
- {
279
- get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}',
280
- },
281
- { get: '/v1beta/{name=projects/*/locations/*/operations/*}' },
282
- {
283
- get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
284
- },
285
- { get: '/v1beta/{name=projects/*/operations/*}' },
286
- ],
287
- },
288
- {
289
- selector: 'google.longrunning.Operations.ListOperations',
290
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
291
- additional_bindings: [
292
- {
293
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
294
- },
295
- {
296
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
297
- },
298
- {
299
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
300
- },
301
- {
302
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
303
- },
304
- {
305
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
306
- },
307
- {
308
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
309
- },
310
- {
311
- get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
312
- },
313
- {
314
- get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
315
- },
316
- {
317
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
318
- },
319
- {
320
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
321
- },
322
- {
323
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
324
- },
325
- { get: '/v1beta/{name=projects/*/locations/*}/operations' },
326
- { get: '/v1beta/{name=projects/*}/operations' },
327
- ],
328
- },
329
- ];
223
+ lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
224
+ }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1beta/{name=projects/*/operations/*}', }],
225
+ }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*}/operations', }, { get: '/v1beta/{name=projects/*}/operations', }],
226
+ }];
330
227
  }
331
- this.operationsClient = this._gaxModule
332
- .lro(lroOptions)
333
- .operationsClient(opts);
228
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
334
229
  const importSampleQueriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportSampleQueriesResponse');
335
230
  const importSampleQueriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportSampleQueriesMetadata');
336
231
  this.descriptors.longrunning = {
337
- importSampleQueries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSampleQueriesResponse.decode.bind(importSampleQueriesResponse), importSampleQueriesMetadata.decode.bind(importSampleQueriesMetadata)),
232
+ importSampleQueries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSampleQueriesResponse.decode.bind(importSampleQueriesResponse), importSampleQueriesMetadata.decode.bind(importSampleQueriesMetadata))
338
233
  };
339
234
  // Put together the default options sent with requests.
340
235
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.SampleQueryService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -363,21 +258,13 @@ class SampleQueryServiceClient {
363
258
  }
364
259
  // Put together the "service stub" for
365
260
  // google.cloud.discoveryengine.v1beta.SampleQueryService.
366
- this.sampleQueryServiceStub = this._gaxGrpc.createStub(this._opts.fallback
367
- ? this._protos.lookupService('google.cloud.discoveryengine.v1beta.SampleQueryService')
368
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
369
- this._protos.google.cloud.discoveryengine.v1beta
370
- .SampleQueryService, this._opts, this._providedCustomServicePath);
261
+ this.sampleQueryServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
262
+ this._protos.lookupService('google.cloud.discoveryengine.v1beta.SampleQueryService') :
263
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
264
+ this._protos.google.cloud.discoveryengine.v1beta.SampleQueryService, this._opts, this._providedCustomServicePath);
371
265
  // Iterate over each of the methods that the service provides
372
266
  // and create an API call method for each.
373
- const sampleQueryServiceStubMethods = [
374
- 'getSampleQuery',
375
- 'listSampleQueries',
376
- 'createSampleQuery',
377
- 'updateSampleQuery',
378
- 'deleteSampleQuery',
379
- 'importSampleQueries',
380
- ];
267
+ const sampleQueryServiceStubMethods = ['getSampleQuery', 'listSampleQueries', 'createSampleQuery', 'updateSampleQuery', 'deleteSampleQuery', 'importSampleQueries'];
381
268
  for (const methodName of sampleQueryServiceStubMethods) {
382
269
  const callPromise = this.sampleQueryServiceStub.then(stub => (...args) => {
383
270
  if (this._terminated) {
@@ -402,8 +289,7 @@ class SampleQueryServiceClient {
402
289
  * @returns {string} The DNS address for this service.
403
290
  */
404
291
  static get servicePath() {
405
- if (typeof process === 'object' &&
406
- typeof process.emitWarning === 'function') {
292
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
407
293
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
408
294
  }
409
295
  return 'discoveryengine.googleapis.com';
@@ -414,8 +300,7 @@ class SampleQueryServiceClient {
414
300
  * @returns {string} The DNS address for this service.
415
301
  */
416
302
  static get apiEndpoint() {
417
- if (typeof process === 'object' &&
418
- typeof process.emitWarning === 'function') {
303
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
419
304
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
420
305
  }
421
306
  return 'discoveryengine.googleapis.com';
@@ -443,7 +328,9 @@ class SampleQueryServiceClient {
443
328
  * @returns {string[]} List of default scopes.
444
329
  */
445
330
  static get scopes() {
446
- return ['https://www.googleapis.com/auth/cloud-platform'];
331
+ return [
332
+ 'https://www.googleapis.com/auth/cloud-platform'
333
+ ];
447
334
  }
448
335
  /**
449
336
  * Return the project ID used by this class.
@@ -469,13 +356,10 @@ class SampleQueryServiceClient {
469
356
  options = options || {};
470
357
  options.otherArgs = options.otherArgs || {};
471
358
  options.otherArgs.headers = options.otherArgs.headers || {};
472
- options.otherArgs.headers['x-goog-request-params'] =
473
- this._gaxModule.routingHeader.fromParams({
474
- name: request.name ?? '',
475
- });
476
- this.initialize().catch(err => {
477
- throw err;
359
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
360
+ 'name': request.name ?? '',
478
361
  });
362
+ this.initialize().catch(err => { throw err; });
479
363
  this._log.info('getSampleQuery request %j', request);
480
364
  const wrappedCallback = callback
481
365
  ? (error, response, options, rawResponse) => {
@@ -483,8 +367,7 @@ class SampleQueryServiceClient {
483
367
  callback(error, response, options, rawResponse); // We verified callback above.
484
368
  }
485
369
  : undefined;
486
- return this.innerApiCalls
487
- .getSampleQuery(request, options, wrappedCallback)
370
+ return this.innerApiCalls.getSampleQuery(request, options, wrappedCallback)
488
371
  ?.then(([response, options, rawResponse]) => {
489
372
  this._log.info('getSampleQuery response %j', response);
490
373
  return [response, options, rawResponse];
@@ -503,13 +386,10 @@ class SampleQueryServiceClient {
503
386
  options = options || {};
504
387
  options.otherArgs = options.otherArgs || {};
505
388
  options.otherArgs.headers = options.otherArgs.headers || {};
506
- options.otherArgs.headers['x-goog-request-params'] =
507
- this._gaxModule.routingHeader.fromParams({
508
- parent: request.parent ?? '',
509
- });
510
- this.initialize().catch(err => {
511
- throw err;
389
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
390
+ 'parent': request.parent ?? '',
512
391
  });
392
+ this.initialize().catch(err => { throw err; });
513
393
  this._log.info('createSampleQuery request %j', request);
514
394
  const wrappedCallback = callback
515
395
  ? (error, response, options, rawResponse) => {
@@ -517,8 +397,7 @@ class SampleQueryServiceClient {
517
397
  callback(error, response, options, rawResponse); // We verified callback above.
518
398
  }
519
399
  : undefined;
520
- return this.innerApiCalls
521
- .createSampleQuery(request, options, wrappedCallback)
400
+ return this.innerApiCalls.createSampleQuery(request, options, wrappedCallback)
522
401
  ?.then(([response, options, rawResponse]) => {
523
402
  this._log.info('createSampleQuery response %j', response);
524
403
  return [response, options, rawResponse];
@@ -537,13 +416,10 @@ class SampleQueryServiceClient {
537
416
  options = options || {};
538
417
  options.otherArgs = options.otherArgs || {};
539
418
  options.otherArgs.headers = options.otherArgs.headers || {};
540
- options.otherArgs.headers['x-goog-request-params'] =
541
- this._gaxModule.routingHeader.fromParams({
542
- 'sample_query.name': request.sampleQuery.name ?? '',
543
- });
544
- this.initialize().catch(err => {
545
- throw err;
419
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
420
+ 'sample_query.name': request.sampleQuery.name ?? '',
546
421
  });
422
+ this.initialize().catch(err => { throw err; });
547
423
  this._log.info('updateSampleQuery request %j', request);
548
424
  const wrappedCallback = callback
549
425
  ? (error, response, options, rawResponse) => {
@@ -551,8 +427,7 @@ class SampleQueryServiceClient {
551
427
  callback(error, response, options, rawResponse); // We verified callback above.
552
428
  }
553
429
  : undefined;
554
- return this.innerApiCalls
555
- .updateSampleQuery(request, options, wrappedCallback)
430
+ return this.innerApiCalls.updateSampleQuery(request, options, wrappedCallback)
556
431
  ?.then(([response, options, rawResponse]) => {
557
432
  this._log.info('updateSampleQuery response %j', response);
558
433
  return [response, options, rawResponse];
@@ -571,13 +446,10 @@ class SampleQueryServiceClient {
571
446
  options = options || {};
572
447
  options.otherArgs = options.otherArgs || {};
573
448
  options.otherArgs.headers = options.otherArgs.headers || {};
574
- options.otherArgs.headers['x-goog-request-params'] =
575
- this._gaxModule.routingHeader.fromParams({
576
- name: request.name ?? '',
577
- });
578
- this.initialize().catch(err => {
579
- throw err;
449
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
450
+ 'name': request.name ?? '',
580
451
  });
452
+ this.initialize().catch(err => { throw err; });
581
453
  this._log.info('deleteSampleQuery request %j', request);
582
454
  const wrappedCallback = callback
583
455
  ? (error, response, options, rawResponse) => {
@@ -585,8 +457,7 @@ class SampleQueryServiceClient {
585
457
  callback(error, response, options, rawResponse); // We verified callback above.
586
458
  }
587
459
  : undefined;
588
- return this.innerApiCalls
589
- .deleteSampleQuery(request, options, wrappedCallback)
460
+ return this.innerApiCalls.deleteSampleQuery(request, options, wrappedCallback)
590
461
  ?.then(([response, options, rawResponse]) => {
591
462
  this._log.info('deleteSampleQuery response %j', response);
592
463
  return [response, options, rawResponse];
@@ -605,13 +476,10 @@ class SampleQueryServiceClient {
605
476
  options = options || {};
606
477
  options.otherArgs = options.otherArgs || {};
607
478
  options.otherArgs.headers = options.otherArgs.headers || {};
608
- options.otherArgs.headers['x-goog-request-params'] =
609
- this._gaxModule.routingHeader.fromParams({
610
- parent: request.parent ?? '',
611
- });
612
- this.initialize().catch(err => {
613
- throw err;
479
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
480
+ 'parent': request.parent ?? '',
614
481
  });
482
+ this.initialize().catch(err => { throw err; });
615
483
  const wrappedCallback = callback
616
484
  ? (error, response, rawResponse, _) => {
617
485
  this._log.info('importSampleQueries response %j', rawResponse);
@@ -619,8 +487,7 @@ class SampleQueryServiceClient {
619
487
  }
620
488
  : undefined;
621
489
  this._log.info('importSampleQueries request %j', request);
622
- return this.innerApiCalls
623
- .importSampleQueries(request, options, wrappedCallback)
490
+ return this.innerApiCalls.importSampleQueries(request, options, wrappedCallback)
624
491
  ?.then(([response, rawResponse, _]) => {
625
492
  this._log.info('importSampleQueries response %j', rawResponse);
626
493
  return [response, rawResponse, _];
@@ -657,13 +524,10 @@ class SampleQueryServiceClient {
657
524
  options = options || {};
658
525
  options.otherArgs = options.otherArgs || {};
659
526
  options.otherArgs.headers = options.otherArgs.headers || {};
660
- options.otherArgs.headers['x-goog-request-params'] =
661
- this._gaxModule.routingHeader.fromParams({
662
- parent: request.parent ?? '',
663
- });
664
- this.initialize().catch(err => {
665
- throw err;
527
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
528
+ 'parent': request.parent ?? '',
666
529
  });
530
+ this.initialize().catch(err => { throw err; });
667
531
  const wrappedCallback = callback
668
532
  ? (error, values, nextPageRequest, rawResponse) => {
669
533
  this._log.info('listSampleQueries values %j', values);
@@ -724,15 +588,12 @@ class SampleQueryServiceClient {
724
588
  options = options || {};
725
589
  options.otherArgs = options.otherArgs || {};
726
590
  options.otherArgs.headers = options.otherArgs.headers || {};
727
- options.otherArgs.headers['x-goog-request-params'] =
728
- this._gaxModule.routingHeader.fromParams({
729
- parent: request.parent ?? '',
730
- });
591
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
592
+ 'parent': request.parent ?? '',
593
+ });
731
594
  const defaultCallSettings = this._defaults['listSampleQueries'];
732
595
  const callSettings = defaultCallSettings.merge(options);
733
- this.initialize().catch(err => {
734
- throw err;
735
- });
596
+ this.initialize().catch(err => { throw err; });
736
597
  this._log.info('listSampleQueries stream %j', request);
737
598
  return this.descriptors.page.listSampleQueries.createStream(this.innerApiCalls.listSampleQueries, request, callSettings);
738
599
  }
@@ -785,103 +646,100 @@ class SampleQueryServiceClient {
785
646
  options = options || {};
786
647
  options.otherArgs = options.otherArgs || {};
787
648
  options.otherArgs.headers = options.otherArgs.headers || {};
788
- options.otherArgs.headers['x-goog-request-params'] =
789
- this._gaxModule.routingHeader.fromParams({
790
- parent: request.parent ?? '',
791
- });
649
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
650
+ 'parent': request.parent ?? '',
651
+ });
792
652
  const defaultCallSettings = this._defaults['listSampleQueries'];
793
653
  const callSettings = defaultCallSettings.merge(options);
794
- this.initialize().catch(err => {
795
- throw err;
796
- });
654
+ this.initialize().catch(err => { throw err; });
797
655
  this._log.info('listSampleQueries iterate %j', request);
798
656
  return this.descriptors.page.listSampleQueries.asyncIterate(this.innerApiCalls['listSampleQueries'], request, callSettings);
799
657
  }
800
658
  /**
801
- * Gets information about a location.
802
- *
803
- * @param {Object} request
804
- * The request object that will be sent.
805
- * @param {string} request.name
806
- * Resource name for the location.
807
- * @param {object} [options]
808
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
809
- * @returns {Promise} - The promise which resolves to an array.
810
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
811
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
812
- * for more details and examples.
813
- * @example
814
- * ```
815
- * const [response] = await client.getLocation(request);
816
- * ```
817
- */
659
+ * Gets information about a location.
660
+ *
661
+ * @param {Object} request
662
+ * The request object that will be sent.
663
+ * @param {string} request.name
664
+ * Resource name for the location.
665
+ * @param {object} [options]
666
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
667
+ * @returns {Promise} - The promise which resolves to an array.
668
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
669
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
670
+ * for more details and examples.
671
+ * @example
672
+ * ```
673
+ * const [response] = await client.getLocation(request);
674
+ * ```
675
+ */
818
676
  getLocation(request, options, callback) {
819
677
  return this.locationsClient.getLocation(request, options, callback);
820
678
  }
821
679
  /**
822
- * Lists information about the supported locations for this service. Returns an iterable object.
823
- *
824
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
825
- * @param {Object} request
826
- * The request object that will be sent.
827
- * @param {string} request.name
828
- * The resource that owns the locations collection, if applicable.
829
- * @param {string} request.filter
830
- * The standard list filter.
831
- * @param {number} request.pageSize
832
- * The standard list page size.
833
- * @param {string} request.pageToken
834
- * The standard list page token.
835
- * @param {object} [options]
836
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
837
- * @returns {Object}
838
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
839
- * When you iterate the returned iterable, each element will be an object representing
840
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
841
- * so you can stop the iteration when you don't need more results.
842
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
843
- * for more details and examples.
844
- * @example
845
- * ```
846
- * const iterable = client.listLocationsAsync(request);
847
- * for await (const response of iterable) {
848
- * // process response
849
- * }
850
- * ```
851
- */
680
+ * Lists information about the supported locations for this service. Returns an iterable object.
681
+ *
682
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
683
+ * @param {Object} request
684
+ * The request object that will be sent.
685
+ * @param {string} request.name
686
+ * The resource that owns the locations collection, if applicable.
687
+ * @param {string} request.filter
688
+ * The standard list filter.
689
+ * @param {number} request.pageSize
690
+ * The standard list page size.
691
+ * @param {string} request.pageToken
692
+ * The standard list page token.
693
+ * @param {object} [options]
694
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
695
+ * @returns {Object}
696
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
697
+ * When you iterate the returned iterable, each element will be an object representing
698
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
699
+ * so you can stop the iteration when you don't need more results.
700
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
701
+ * for more details and examples.
702
+ * @example
703
+ * ```
704
+ * const iterable = client.listLocationsAsync(request);
705
+ * for await (const response of iterable) {
706
+ * // process response
707
+ * }
708
+ * ```
709
+ */
852
710
  listLocationsAsync(request, options) {
853
711
  return this.locationsClient.listLocationsAsync(request, options);
854
712
  }
855
713
  /**
856
- * Gets the latest state of a long-running operation. Clients can use this
857
- * method to poll the operation result at intervals as recommended by the API
858
- * service.
859
- *
860
- * @param {Object} request - The request object that will be sent.
861
- * @param {string} request.name - The name of the operation resource.
862
- * @param {Object=} options
863
- * Optional parameters. You can override the default settings for this call,
864
- * e.g, timeout, retries, paginations, etc. See {@link
865
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
866
- * for the details.
867
- * @param {function(?Error, ?Object)=} callback
868
- * The function which will be called with the result of the API call.
869
- *
870
- * The second parameter to the callback is an object representing
871
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
872
- * @return {Promise} - The promise which resolves to an array.
873
- * The first element of the array is an object representing
874
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
875
- * The promise has a method named "cancel" which cancels the ongoing API call.
876
- *
877
- * @example
878
- * ```
879
- * const client = longrunning.operationsClient();
880
- * const name = '';
881
- * const [response] = await client.getOperation({name});
882
- * // doThingsWith(response)
883
- * ```
884
- */
714
+ * Gets the latest state of a long-running operation. Clients can use this
715
+ * method to poll the operation result at intervals as recommended by the API
716
+ * service.
717
+ *
718
+ * @param {Object} request - The request object that will be sent.
719
+ * @param {string} request.name - The name of the operation resource.
720
+ * @param {Object=} options
721
+ * Optional parameters. You can override the default settings for this call,
722
+ * e.g, timeout, retries, paginations, etc. See {@link
723
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
724
+ * for the details.
725
+ * @param {function(?Error, ?Object)=} callback
726
+ * The function which will be called with the result of the API call.
727
+ *
728
+ * The second parameter to the callback is an object representing
729
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
730
+ * @return {Promise} - The promise which resolves to an array.
731
+ * The first element of the array is an object representing
732
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
733
+ * The promise has a method named "cancel" which cancels the ongoing API call.
734
+ *
735
+ * @example
736
+ * ```
737
+ * const client = longrunning.operationsClient();
738
+ * const name = '';
739
+ * const [response] = await client.getOperation({name});
740
+ * // doThingsWith(response)
741
+ * ```
742
+ */
885
743
  getOperation(request, optionsOrCallback, callback) {
886
744
  let options;
887
745
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1115,8 +973,7 @@ class SampleQueryServiceClient {
1115
973
  * @returns {string} A string representing the project.
1116
974
  */
1117
975
  matchProjectFromEvaluationName(evaluationName) {
1118
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1119
- .project;
976
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1120
977
  }
1121
978
  /**
1122
979
  * Parse the location from Evaluation resource.
@@ -1126,8 +983,7 @@ class SampleQueryServiceClient {
1126
983
  * @returns {string} A string representing the location.
1127
984
  */
1128
985
  matchLocationFromEvaluationName(evaluationName) {
1129
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1130
- .location;
986
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1131
987
  }
1132
988
  /**
1133
989
  * Parse the evaluation from Evaluation resource.
@@ -1137,8 +993,7 @@ class SampleQueryServiceClient {
1137
993
  * @returns {string} A string representing the evaluation.
1138
994
  */
1139
995
  matchEvaluationFromEvaluationName(evaluationName) {
1140
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1141
- .evaluation;
996
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1142
997
  }
1143
998
  /**
1144
999
  * Return a fully-qualified groundingConfig resource name string.
@@ -3376,8 +3231,7 @@ class SampleQueryServiceClient {
3376
3231
  * @returns {string} A string representing the project.
3377
3232
  */
3378
3233
  matchProjectFromSampleQueryName(sampleQueryName) {
3379
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3380
- .project;
3234
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3381
3235
  }
3382
3236
  /**
3383
3237
  * Parse the location from SampleQuery resource.
@@ -3387,8 +3241,7 @@ class SampleQueryServiceClient {
3387
3241
  * @returns {string} A string representing the location.
3388
3242
  */
3389
3243
  matchLocationFromSampleQueryName(sampleQueryName) {
3390
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3391
- .location;
3244
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3392
3245
  }
3393
3246
  /**
3394
3247
  * Parse the sample_query_set from SampleQuery resource.
@@ -3398,8 +3251,7 @@ class SampleQueryServiceClient {
3398
3251
  * @returns {string} A string representing the sample_query_set.
3399
3252
  */
3400
3253
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3401
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3402
- .sample_query_set;
3254
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3403
3255
  }
3404
3256
  /**
3405
3257
  * Parse the sample_query from SampleQuery resource.
@@ -3409,8 +3261,7 @@ class SampleQueryServiceClient {
3409
3261
  * @returns {string} A string representing the sample_query.
3410
3262
  */
3411
3263
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3412
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3413
- .sample_query;
3264
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3414
3265
  }
3415
3266
  /**
3416
3267
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3469,8 +3320,8 @@ class SampleQueryServiceClient {
3469
3320
  this._log.info('ending gRPC channel');
3470
3321
  this._terminated = true;
3471
3322
  stub.close();
3472
- this.locationsClient.close();
3473
- this.operationsClient.close();
3323
+ this.locationsClient.close().catch(err => { throw err; });
3324
+ void this.operationsClient.close();
3474
3325
  });
3475
3326
  }
3476
3327
  return Promise.resolve();