@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
@@ -98,26 +98,17 @@ class SchemaServiceClient {
98
98
  constructor(opts, gaxInstance) {
99
99
  // Ensure that options include all the required fields.
100
100
  const staticMembers = this.constructor;
101
- if (opts?.universe_domain &&
102
- opts?.universeDomain &&
103
- opts?.universe_domain !== opts?.universeDomain) {
101
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
104
102
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
105
103
  }
106
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
107
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
108
- : undefined;
109
- this._universeDomain =
110
- opts?.universeDomain ??
111
- opts?.universe_domain ??
112
- universeDomainEnvVar ??
113
- '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';
114
106
  this._servicePath = 'discoveryengine.' + this._universeDomain;
115
107
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
116
108
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
117
109
  const port = opts?.port || staticMembers.port;
118
110
  const clientConfig = opts?.clientConfig ?? {};
119
- const fallback = opts?.fallback ??
120
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
111
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
121
112
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
122
113
  // Request numeric enum values if REST transport is used.
123
114
  opts.numericEnums = true;
@@ -147,7 +138,10 @@ class SchemaServiceClient {
147
138
  }
148
139
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
149
140
  // Determine the client header string.
150
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
141
+ const clientHeader = [
142
+ `gax/${this._gaxModule.version}`,
143
+ `gapic/${version}`,
144
+ ];
151
145
  if (typeof process === 'object' && 'versions' in process) {
152
146
  clientHeader.push(`gl-node/${process.versions.node}`);
153
147
  }
@@ -179,12 +173,15 @@ class SchemaServiceClient {
179
173
  projectLocationCollectionDataStoreCustomTuningModelPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}'),
180
174
  projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig'),
181
175
  projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
176
+ projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
182
177
  projectLocationCollectionDataStoreSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}'),
183
178
  projectLocationCollectionDataStoreSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}'),
184
179
  projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
180
+ projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}'),
185
181
  projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
186
182
  projectLocationCollectionEngineControlPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/controls/{control}'),
187
183
  projectLocationCollectionEngineConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}'),
184
+ projectLocationCollectionEngineServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}'),
188
185
  projectLocationCollectionEngineSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}'),
189
186
  projectLocationCollectionEngineSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}'),
190
187
  projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
@@ -195,16 +192,18 @@ class SchemaServiceClient {
195
192
  projectLocationDataStoreCustomTuningModelPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}'),
196
193
  projectLocationDataStoreDocumentProcessingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig'),
197
194
  projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
195
+ projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
198
196
  projectLocationDataStoreSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}'),
199
197
  projectLocationDataStoreSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}'),
200
198
  projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
199
+ projectLocationDataStoreSiteSearchEngineSitemapPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}'),
201
200
  projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
202
201
  };
203
202
  // Some of the methods on this service return "paged" results,
204
203
  // (e.g. 50 results at a time, with tokens to get subsequent
205
204
  // pages). Denote the keys used for pagination and results.
206
205
  this.descriptors.page = {
207
- listSchemas: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'schemas'),
206
+ listSchemas: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'schemas')
208
207
  };
209
208
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
210
209
  // This API contains "long-running operations", which return a
@@ -212,121 +211,16 @@ class SchemaServiceClient {
212
211
  // rather than holding a request open.
213
212
  const lroOptions = {
214
213
  auth: this.auth,
215
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
214
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
216
215
  };
217
216
  if (opts.fallback) {
218
217
  lroOptions.protoJson = protoFilesRoot;
219
- lroOptions.httpRules = [
220
- {
221
- selector: 'google.longrunning.Operations.CancelOperation',
222
- post: '/v1/{name=projects/*/operations/*}:cancel',
223
- body: '*',
224
- additional_bindings: [
225
- {
226
- post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
227
- body: '*',
228
- },
229
- {
230
- post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
231
- body: '*',
232
- },
233
- ],
234
- },
235
- {
236
- selector: 'google.longrunning.Operations.GetOperation',
237
- get: '/v1/{name=projects/*/operations/*}',
238
- additional_bindings: [
239
- {
240
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
241
- },
242
- {
243
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
244
- },
245
- {
246
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
247
- },
248
- {
249
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
250
- },
251
- {
252
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
253
- },
254
- {
255
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
256
- },
257
- {
258
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
259
- },
260
- {
261
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
262
- },
263
- {
264
- get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
265
- },
266
- {
267
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
268
- },
269
- {
270
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
271
- },
272
- {
273
- get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
274
- },
275
- {
276
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}',
277
- },
278
- { get: '/v1/{name=projects/*/locations/*/operations/*}' },
279
- { get: '/v1/{name=projects/*/operations/*}' },
280
- ],
281
- },
282
- {
283
- selector: 'google.longrunning.Operations.ListOperations',
284
- get: '/v1/{name=projects/*}/operations',
285
- additional_bindings: [
286
- {
287
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
288
- },
289
- {
290
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
291
- },
292
- {
293
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
294
- },
295
- {
296
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
297
- },
298
- {
299
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
300
- },
301
- {
302
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
303
- },
304
- {
305
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
306
- },
307
- {
308
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
309
- },
310
- { get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
311
- {
312
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
313
- },
314
- {
315
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
316
- },
317
- { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
318
- {
319
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
320
- },
321
- { get: '/v1/{name=projects/*/locations/*}/operations' },
322
- { get: '/v1/{name=projects/*}/operations' },
323
- ],
324
- },
325
- ];
218
+ lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }, { post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
219
+ }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/operations/*}', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/operations/*}', }, { get: '/v1/{name=projects/*/operations/*}', }],
220
+ }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*}/operations', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*}/operations', }, { get: '/v1/{name=projects/*}/operations', }],
221
+ }];
326
222
  }
327
- this.operationsClient = this._gaxModule
328
- .lro(lroOptions)
329
- .operationsClient(opts);
223
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
330
224
  const createSchemaResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.Schema');
331
225
  const createSchemaMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.CreateSchemaMetadata');
332
226
  const updateSchemaResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.Schema');
@@ -336,7 +230,7 @@ class SchemaServiceClient {
336
230
  this.descriptors.longrunning = {
337
231
  createSchema: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createSchemaResponse.decode.bind(createSchemaResponse), createSchemaMetadata.decode.bind(createSchemaMetadata)),
338
232
  updateSchema: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateSchemaResponse.decode.bind(updateSchemaResponse), updateSchemaMetadata.decode.bind(updateSchemaMetadata)),
339
- deleteSchema: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteSchemaResponse.decode.bind(deleteSchemaResponse), deleteSchemaMetadata.decode.bind(deleteSchemaMetadata)),
233
+ deleteSchema: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteSchemaResponse.decode.bind(deleteSchemaResponse), deleteSchemaMetadata.decode.bind(deleteSchemaMetadata))
340
234
  };
341
235
  // Put together the default options sent with requests.
342
236
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.SchemaService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -365,19 +259,13 @@ class SchemaServiceClient {
365
259
  }
366
260
  // Put together the "service stub" for
367
261
  // google.cloud.discoveryengine.v1.SchemaService.
368
- this.schemaServiceStub = this._gaxGrpc.createStub(this._opts.fallback
369
- ? this._protos.lookupService('google.cloud.discoveryengine.v1.SchemaService')
370
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
371
- this._protos.google.cloud.discoveryengine.v1.SchemaService, this._opts, this._providedCustomServicePath);
262
+ this.schemaServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
263
+ this._protos.lookupService('google.cloud.discoveryengine.v1.SchemaService') :
264
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
265
+ this._protos.google.cloud.discoveryengine.v1.SchemaService, this._opts, this._providedCustomServicePath);
372
266
  // Iterate over each of the methods that the service provides
373
267
  // and create an API call method for each.
374
- const schemaServiceStubMethods = [
375
- 'getSchema',
376
- 'listSchemas',
377
- 'createSchema',
378
- 'updateSchema',
379
- 'deleteSchema',
380
- ];
268
+ const schemaServiceStubMethods = ['getSchema', 'listSchemas', 'createSchema', 'updateSchema', 'deleteSchema'];
381
269
  for (const methodName of schemaServiceStubMethods) {
382
270
  const callPromise = this.schemaServiceStub.then(stub => (...args) => {
383
271
  if (this._terminated) {
@@ -402,8 +290,7 @@ class SchemaServiceClient {
402
290
  * @returns {string} The DNS address for this service.
403
291
  */
404
292
  static get servicePath() {
405
- if (typeof process === 'object' &&
406
- typeof process.emitWarning === 'function') {
293
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
407
294
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
408
295
  }
409
296
  return 'discoveryengine.googleapis.com';
@@ -414,8 +301,7 @@ class SchemaServiceClient {
414
301
  * @returns {string} The DNS address for this service.
415
302
  */
416
303
  static get apiEndpoint() {
417
- if (typeof process === 'object' &&
418
- typeof process.emitWarning === 'function') {
304
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
419
305
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
420
306
  }
421
307
  return 'discoveryengine.googleapis.com';
@@ -443,7 +329,9 @@ class SchemaServiceClient {
443
329
  * @returns {string[]} List of default scopes.
444
330
  */
445
331
  static get scopes() {
446
- return ['https://www.googleapis.com/auth/cloud-platform'];
332
+ return [
333
+ 'https://www.googleapis.com/auth/cloud-platform'
334
+ ];
447
335
  }
448
336
  /**
449
337
  * Return the project ID used by this class.
@@ -469,13 +357,10 @@ class SchemaServiceClient {
469
357
  options = options || {};
470
358
  options.otherArgs = options.otherArgs || {};
471
359
  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;
360
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
361
+ 'name': request.name ?? '',
478
362
  });
363
+ this.initialize().catch(err => { throw err; });
479
364
  this._log.info('getSchema request %j', request);
480
365
  const wrappedCallback = callback
481
366
  ? (error, response, options, rawResponse) => {
@@ -483,8 +368,7 @@ class SchemaServiceClient {
483
368
  callback(error, response, options, rawResponse); // We verified callback above.
484
369
  }
485
370
  : undefined;
486
- return this.innerApiCalls
487
- .getSchema(request, options, wrappedCallback)
371
+ return this.innerApiCalls.getSchema(request, options, wrappedCallback)
488
372
  ?.then(([response, options, rawResponse]) => {
489
373
  this._log.info('getSchema response %j', response);
490
374
  return [response, options, rawResponse];
@@ -503,13 +387,10 @@ class SchemaServiceClient {
503
387
  options = options || {};
504
388
  options.otherArgs = options.otherArgs || {};
505
389
  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;
390
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
391
+ 'parent': request.parent ?? '',
512
392
  });
393
+ this.initialize().catch(err => { throw err; });
513
394
  const wrappedCallback = callback
514
395
  ? (error, response, rawResponse, _) => {
515
396
  this._log.info('createSchema response %j', rawResponse);
@@ -517,8 +398,7 @@ class SchemaServiceClient {
517
398
  }
518
399
  : undefined;
519
400
  this._log.info('createSchema request %j', request);
520
- return this.innerApiCalls
521
- .createSchema(request, options, wrappedCallback)
401
+ return this.innerApiCalls.createSchema(request, options, wrappedCallback)
522
402
  ?.then(([response, rawResponse, _]) => {
523
403
  this._log.info('createSchema response %j', rawResponse);
524
404
  return [response, rawResponse, _];
@@ -555,13 +435,10 @@ class SchemaServiceClient {
555
435
  options = options || {};
556
436
  options.otherArgs = options.otherArgs || {};
557
437
  options.otherArgs.headers = options.otherArgs.headers || {};
558
- options.otherArgs.headers['x-goog-request-params'] =
559
- this._gaxModule.routingHeader.fromParams({
560
- 'schema.name': request.schema.name ?? '',
561
- });
562
- this.initialize().catch(err => {
563
- throw err;
438
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
439
+ 'schema.name': request.schema.name ?? '',
564
440
  });
441
+ this.initialize().catch(err => { throw err; });
565
442
  const wrappedCallback = callback
566
443
  ? (error, response, rawResponse, _) => {
567
444
  this._log.info('updateSchema response %j', rawResponse);
@@ -569,8 +446,7 @@ class SchemaServiceClient {
569
446
  }
570
447
  : undefined;
571
448
  this._log.info('updateSchema request %j', request);
572
- return this.innerApiCalls
573
- .updateSchema(request, options, wrappedCallback)
449
+ return this.innerApiCalls.updateSchema(request, options, wrappedCallback)
574
450
  ?.then(([response, rawResponse, _]) => {
575
451
  this._log.info('updateSchema response %j', rawResponse);
576
452
  return [response, rawResponse, _];
@@ -607,13 +483,10 @@ class SchemaServiceClient {
607
483
  options = options || {};
608
484
  options.otherArgs = options.otherArgs || {};
609
485
  options.otherArgs.headers = options.otherArgs.headers || {};
610
- options.otherArgs.headers['x-goog-request-params'] =
611
- this._gaxModule.routingHeader.fromParams({
612
- name: request.name ?? '',
613
- });
614
- this.initialize().catch(err => {
615
- throw err;
486
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
487
+ 'name': request.name ?? '',
616
488
  });
489
+ this.initialize().catch(err => { throw err; });
617
490
  const wrappedCallback = callback
618
491
  ? (error, response, rawResponse, _) => {
619
492
  this._log.info('deleteSchema response %j', rawResponse);
@@ -621,8 +494,7 @@ class SchemaServiceClient {
621
494
  }
622
495
  : undefined;
623
496
  this._log.info('deleteSchema request %j', request);
624
- return this.innerApiCalls
625
- .deleteSchema(request, options, wrappedCallback)
497
+ return this.innerApiCalls.deleteSchema(request, options, wrappedCallback)
626
498
  ?.then(([response, rawResponse, _]) => {
627
499
  this._log.info('deleteSchema response %j', rawResponse);
628
500
  return [response, rawResponse, _];
@@ -659,13 +531,10 @@ class SchemaServiceClient {
659
531
  options = options || {};
660
532
  options.otherArgs = options.otherArgs || {};
661
533
  options.otherArgs.headers = options.otherArgs.headers || {};
662
- options.otherArgs.headers['x-goog-request-params'] =
663
- this._gaxModule.routingHeader.fromParams({
664
- parent: request.parent ?? '',
665
- });
666
- this.initialize().catch(err => {
667
- throw err;
534
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
535
+ 'parent': request.parent ?? '',
668
536
  });
537
+ this.initialize().catch(err => { throw err; });
669
538
  const wrappedCallback = callback
670
539
  ? (error, values, nextPageRequest, rawResponse) => {
671
540
  this._log.info('listSchemas values %j', values);
@@ -719,15 +588,12 @@ class SchemaServiceClient {
719
588
  options = options || {};
720
589
  options.otherArgs = options.otherArgs || {};
721
590
  options.otherArgs.headers = options.otherArgs.headers || {};
722
- options.otherArgs.headers['x-goog-request-params'] =
723
- this._gaxModule.routingHeader.fromParams({
724
- parent: request.parent ?? '',
725
- });
591
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
592
+ 'parent': request.parent ?? '',
593
+ });
726
594
  const defaultCallSettings = this._defaults['listSchemas'];
727
595
  const callSettings = defaultCallSettings.merge(options);
728
- this.initialize().catch(err => {
729
- throw err;
730
- });
596
+ this.initialize().catch(err => { throw err; });
731
597
  this._log.info('listSchemas stream %j', request);
732
598
  return this.descriptors.page.listSchemas.createStream(this.innerApiCalls.listSchemas, request, callSettings);
733
599
  }
@@ -773,103 +639,100 @@ class SchemaServiceClient {
773
639
  options = options || {};
774
640
  options.otherArgs = options.otherArgs || {};
775
641
  options.otherArgs.headers = options.otherArgs.headers || {};
776
- options.otherArgs.headers['x-goog-request-params'] =
777
- this._gaxModule.routingHeader.fromParams({
778
- parent: request.parent ?? '',
779
- });
642
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
643
+ 'parent': request.parent ?? '',
644
+ });
780
645
  const defaultCallSettings = this._defaults['listSchemas'];
781
646
  const callSettings = defaultCallSettings.merge(options);
782
- this.initialize().catch(err => {
783
- throw err;
784
- });
647
+ this.initialize().catch(err => { throw err; });
785
648
  this._log.info('listSchemas iterate %j', request);
786
649
  return this.descriptors.page.listSchemas.asyncIterate(this.innerApiCalls['listSchemas'], request, callSettings);
787
650
  }
788
651
  /**
789
- * Gets information about a location.
790
- *
791
- * @param {Object} request
792
- * The request object that will be sent.
793
- * @param {string} request.name
794
- * Resource name for the location.
795
- * @param {object} [options]
796
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
797
- * @returns {Promise} - The promise which resolves to an array.
798
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
799
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
800
- * for more details and examples.
801
- * @example
802
- * ```
803
- * const [response] = await client.getLocation(request);
804
- * ```
805
- */
652
+ * Gets information about a location.
653
+ *
654
+ * @param {Object} request
655
+ * The request object that will be sent.
656
+ * @param {string} request.name
657
+ * Resource name for the location.
658
+ * @param {object} [options]
659
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
660
+ * @returns {Promise} - The promise which resolves to an array.
661
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
662
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
663
+ * for more details and examples.
664
+ * @example
665
+ * ```
666
+ * const [response] = await client.getLocation(request);
667
+ * ```
668
+ */
806
669
  getLocation(request, options, callback) {
807
670
  return this.locationsClient.getLocation(request, options, callback);
808
671
  }
809
672
  /**
810
- * Lists information about the supported locations for this service. Returns an iterable object.
811
- *
812
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
813
- * @param {Object} request
814
- * The request object that will be sent.
815
- * @param {string} request.name
816
- * The resource that owns the locations collection, if applicable.
817
- * @param {string} request.filter
818
- * The standard list filter.
819
- * @param {number} request.pageSize
820
- * The standard list page size.
821
- * @param {string} request.pageToken
822
- * The standard list page token.
823
- * @param {object} [options]
824
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
825
- * @returns {Object}
826
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
827
- * When you iterate the returned iterable, each element will be an object representing
828
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
829
- * so you can stop the iteration when you don't need more results.
830
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
831
- * for more details and examples.
832
- * @example
833
- * ```
834
- * const iterable = client.listLocationsAsync(request);
835
- * for await (const response of iterable) {
836
- * // process response
837
- * }
838
- * ```
839
- */
673
+ * Lists information about the supported locations for this service. Returns an iterable object.
674
+ *
675
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
676
+ * @param {Object} request
677
+ * The request object that will be sent.
678
+ * @param {string} request.name
679
+ * The resource that owns the locations collection, if applicable.
680
+ * @param {string} request.filter
681
+ * The standard list filter.
682
+ * @param {number} request.pageSize
683
+ * The standard list page size.
684
+ * @param {string} request.pageToken
685
+ * The standard list page token.
686
+ * @param {object} [options]
687
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
688
+ * @returns {Object}
689
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
690
+ * When you iterate the returned iterable, each element will be an object representing
691
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
692
+ * so you can stop the iteration when you don't need more results.
693
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
694
+ * for more details and examples.
695
+ * @example
696
+ * ```
697
+ * const iterable = client.listLocationsAsync(request);
698
+ * for await (const response of iterable) {
699
+ * // process response
700
+ * }
701
+ * ```
702
+ */
840
703
  listLocationsAsync(request, options) {
841
704
  return this.locationsClient.listLocationsAsync(request, options);
842
705
  }
843
706
  /**
844
- * Gets the latest state of a long-running operation. Clients can use this
845
- * method to poll the operation result at intervals as recommended by the API
846
- * service.
847
- *
848
- * @param {Object} request - The request object that will be sent.
849
- * @param {string} request.name - The name of the operation resource.
850
- * @param {Object=} options
851
- * Optional parameters. You can override the default settings for this call,
852
- * e.g, timeout, retries, paginations, etc. See {@link
853
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
854
- * for the details.
855
- * @param {function(?Error, ?Object)=} callback
856
- * The function which will be called with the result of the API call.
857
- *
858
- * The second parameter to the callback is an object representing
859
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
860
- * @return {Promise} - The promise which resolves to an array.
861
- * The first element of the array is an object representing
862
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
863
- * The promise has a method named "cancel" which cancels the ongoing API call.
864
- *
865
- * @example
866
- * ```
867
- * const client = longrunning.operationsClient();
868
- * const name = '';
869
- * const [response] = await client.getOperation({name});
870
- * // doThingsWith(response)
871
- * ```
872
- */
707
+ * Gets the latest state of a long-running operation. Clients can use this
708
+ * method to poll the operation result at intervals as recommended by the API
709
+ * service.
710
+ *
711
+ * @param {Object} request - The request object that will be sent.
712
+ * @param {string} request.name - The name of the operation resource.
713
+ * @param {Object=} options
714
+ * Optional parameters. You can override the default settings for this call,
715
+ * e.g, timeout, retries, paginations, etc. See {@link
716
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
717
+ * for the details.
718
+ * @param {function(?Error, ?Object)=} callback
719
+ * The function which will be called with the result of the API call.
720
+ *
721
+ * The second parameter to the callback is an object representing
722
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
723
+ * @return {Promise} - The promise which resolves to an array.
724
+ * The first element of the array is an object representing
725
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
726
+ * The promise has a method named "cancel" which cancels the ongoing API call.
727
+ *
728
+ * @example
729
+ * ```
730
+ * const client = longrunning.operationsClient();
731
+ * const name = '';
732
+ * const [response] = await client.getOperation({name});
733
+ * // doThingsWith(response)
734
+ * ```
735
+ */
873
736
  getOperation(request, optionsOrCallback, callback) {
874
737
  let options;
875
738
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1665,6 +1528,75 @@ class SchemaServiceClient {
1665
1528
  matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1666
1529
  return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
1667
1530
  }
1531
+ /**
1532
+ * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
1533
+ *
1534
+ * @param {string} project
1535
+ * @param {string} location
1536
+ * @param {string} collection
1537
+ * @param {string} data_store
1538
+ * @param {string} serving_config
1539
+ * @returns {string} Resource name string.
1540
+ */
1541
+ projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig) {
1542
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render({
1543
+ project: project,
1544
+ location: location,
1545
+ collection: collection,
1546
+ data_store: dataStore,
1547
+ serving_config: servingConfig,
1548
+ });
1549
+ }
1550
+ /**
1551
+ * Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.
1552
+ *
1553
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1554
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1555
+ * @returns {string} A string representing the project.
1556
+ */
1557
+ matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1558
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).project;
1559
+ }
1560
+ /**
1561
+ * Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.
1562
+ *
1563
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1564
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1565
+ * @returns {string} A string representing the location.
1566
+ */
1567
+ matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1568
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).location;
1569
+ }
1570
+ /**
1571
+ * Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.
1572
+ *
1573
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1574
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1575
+ * @returns {string} A string representing the collection.
1576
+ */
1577
+ matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1578
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).collection;
1579
+ }
1580
+ /**
1581
+ * Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.
1582
+ *
1583
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1584
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1585
+ * @returns {string} A string representing the data_store.
1586
+ */
1587
+ matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1588
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).data_store;
1589
+ }
1590
+ /**
1591
+ * Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.
1592
+ *
1593
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1594
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1595
+ * @returns {string} A string representing the serving_config.
1596
+ */
1597
+ matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1598
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).serving_config;
1599
+ }
1668
1600
  /**
1669
1601
  * Return a fully-qualified projectLocationCollectionDataStoreSession resource name string.
1670
1602
  *
@@ -1872,6 +1804,75 @@ class SchemaServiceClient {
1872
1804
  matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
1873
1805
  return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
1874
1806
  }
1807
+ /**
1808
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineSitemap resource name string.
1809
+ *
1810
+ * @param {string} project
1811
+ * @param {string} location
1812
+ * @param {string} collection
1813
+ * @param {string} data_store
1814
+ * @param {string} sitemap
1815
+ * @returns {string} Resource name string.
1816
+ */
1817
+ projectLocationCollectionDataStoreSiteSearchEngineSitemapPath(project, location, collection, dataStore, sitemap) {
1818
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render({
1819
+ project: project,
1820
+ location: location,
1821
+ collection: collection,
1822
+ data_store: dataStore,
1823
+ sitemap: sitemap,
1824
+ });
1825
+ }
1826
+ /**
1827
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
1828
+ *
1829
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
1830
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
1831
+ * @returns {string} A string representing the project.
1832
+ */
1833
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
1834
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).project;
1835
+ }
1836
+ /**
1837
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
1838
+ *
1839
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
1840
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
1841
+ * @returns {string} A string representing the location.
1842
+ */
1843
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
1844
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).location;
1845
+ }
1846
+ /**
1847
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
1848
+ *
1849
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
1850
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
1851
+ * @returns {string} A string representing the collection.
1852
+ */
1853
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
1854
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).collection;
1855
+ }
1856
+ /**
1857
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
1858
+ *
1859
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
1860
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
1861
+ * @returns {string} A string representing the data_store.
1862
+ */
1863
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
1864
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).data_store;
1865
+ }
1866
+ /**
1867
+ * Parse the sitemap from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
1868
+ *
1869
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
1870
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
1871
+ * @returns {string} A string representing the sitemap.
1872
+ */
1873
+ matchSitemapFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
1874
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).sitemap;
1875
+ }
1875
1876
  /**
1876
1877
  * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineTargetSite resource name string.
1877
1878
  *
@@ -2079,6 +2080,75 @@ class SchemaServiceClient {
2079
2080
  matchConversationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
2080
2081
  return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).conversation;
2081
2082
  }
2083
+ /**
2084
+ * Return a fully-qualified projectLocationCollectionEngineServingConfig resource name string.
2085
+ *
2086
+ * @param {string} project
2087
+ * @param {string} location
2088
+ * @param {string} collection
2089
+ * @param {string} engine
2090
+ * @param {string} serving_config
2091
+ * @returns {string} Resource name string.
2092
+ */
2093
+ projectLocationCollectionEngineServingConfigPath(project, location, collection, engine, servingConfig) {
2094
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render({
2095
+ project: project,
2096
+ location: location,
2097
+ collection: collection,
2098
+ engine: engine,
2099
+ serving_config: servingConfig,
2100
+ });
2101
+ }
2102
+ /**
2103
+ * Parse the project from ProjectLocationCollectionEngineServingConfig resource.
2104
+ *
2105
+ * @param {string} projectLocationCollectionEngineServingConfigName
2106
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2107
+ * @returns {string} A string representing the project.
2108
+ */
2109
+ matchProjectFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2110
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).project;
2111
+ }
2112
+ /**
2113
+ * Parse the location from ProjectLocationCollectionEngineServingConfig resource.
2114
+ *
2115
+ * @param {string} projectLocationCollectionEngineServingConfigName
2116
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2117
+ * @returns {string} A string representing the location.
2118
+ */
2119
+ matchLocationFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2120
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).location;
2121
+ }
2122
+ /**
2123
+ * Parse the collection from ProjectLocationCollectionEngineServingConfig resource.
2124
+ *
2125
+ * @param {string} projectLocationCollectionEngineServingConfigName
2126
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2127
+ * @returns {string} A string representing the collection.
2128
+ */
2129
+ matchCollectionFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2130
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).collection;
2131
+ }
2132
+ /**
2133
+ * Parse the engine from ProjectLocationCollectionEngineServingConfig resource.
2134
+ *
2135
+ * @param {string} projectLocationCollectionEngineServingConfigName
2136
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2137
+ * @returns {string} A string representing the engine.
2138
+ */
2139
+ matchEngineFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2140
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).engine;
2141
+ }
2142
+ /**
2143
+ * Parse the serving_config from ProjectLocationCollectionEngineServingConfig resource.
2144
+ *
2145
+ * @param {string} projectLocationCollectionEngineServingConfigName
2146
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2147
+ * @returns {string} A string representing the serving_config.
2148
+ */
2149
+ matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2150
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).serving_config;
2151
+ }
2082
2152
  /**
2083
2153
  * Return a fully-qualified projectLocationCollectionEngineSession resource name string.
2084
2154
  *
@@ -2697,6 +2767,63 @@ class SchemaServiceClient {
2697
2767
  matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
2698
2768
  return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
2699
2769
  }
2770
+ /**
2771
+ * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
2772
+ *
2773
+ * @param {string} project
2774
+ * @param {string} location
2775
+ * @param {string} data_store
2776
+ * @param {string} serving_config
2777
+ * @returns {string} Resource name string.
2778
+ */
2779
+ projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig) {
2780
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render({
2781
+ project: project,
2782
+ location: location,
2783
+ data_store: dataStore,
2784
+ serving_config: servingConfig,
2785
+ });
2786
+ }
2787
+ /**
2788
+ * Parse the project from ProjectLocationDataStoreServingConfig resource.
2789
+ *
2790
+ * @param {string} projectLocationDataStoreServingConfigName
2791
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
2792
+ * @returns {string} A string representing the project.
2793
+ */
2794
+ matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
2795
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).project;
2796
+ }
2797
+ /**
2798
+ * Parse the location from ProjectLocationDataStoreServingConfig resource.
2799
+ *
2800
+ * @param {string} projectLocationDataStoreServingConfigName
2801
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
2802
+ * @returns {string} A string representing the location.
2803
+ */
2804
+ matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
2805
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).location;
2806
+ }
2807
+ /**
2808
+ * Parse the data_store from ProjectLocationDataStoreServingConfig resource.
2809
+ *
2810
+ * @param {string} projectLocationDataStoreServingConfigName
2811
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
2812
+ * @returns {string} A string representing the data_store.
2813
+ */
2814
+ matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
2815
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).data_store;
2816
+ }
2817
+ /**
2818
+ * Parse the serving_config from ProjectLocationDataStoreServingConfig resource.
2819
+ *
2820
+ * @param {string} projectLocationDataStoreServingConfigName
2821
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
2822
+ * @returns {string} A string representing the serving_config.
2823
+ */
2824
+ matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
2825
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).serving_config;
2826
+ }
2700
2827
  /**
2701
2828
  * Return a fully-qualified projectLocationDataStoreSession resource name string.
2702
2829
  *
@@ -2868,6 +2995,63 @@ class SchemaServiceClient {
2868
2995
  matchDataStoreFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
2869
2996
  return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).data_store;
2870
2997
  }
2998
+ /**
2999
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngineSitemap resource name string.
3000
+ *
3001
+ * @param {string} project
3002
+ * @param {string} location
3003
+ * @param {string} data_store
3004
+ * @param {string} sitemap
3005
+ * @returns {string} Resource name string.
3006
+ */
3007
+ projectLocationDataStoreSiteSearchEngineSitemapPath(project, location, dataStore, sitemap) {
3008
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render({
3009
+ project: project,
3010
+ location: location,
3011
+ data_store: dataStore,
3012
+ sitemap: sitemap,
3013
+ });
3014
+ }
3015
+ /**
3016
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3017
+ *
3018
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3019
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3020
+ * @returns {string} A string representing the project.
3021
+ */
3022
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3023
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).project;
3024
+ }
3025
+ /**
3026
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3027
+ *
3028
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3029
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3030
+ * @returns {string} A string representing the location.
3031
+ */
3032
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3033
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).location;
3034
+ }
3035
+ /**
3036
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3037
+ *
3038
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3039
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3040
+ * @returns {string} A string representing the data_store.
3041
+ */
3042
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3043
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).data_store;
3044
+ }
3045
+ /**
3046
+ * Parse the sitemap from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3047
+ *
3048
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3049
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3050
+ * @returns {string} A string representing the sitemap.
3051
+ */
3052
+ matchSitemapFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3053
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).sitemap;
3054
+ }
2871
3055
  /**
2872
3056
  * Return a fully-qualified projectLocationDataStoreSiteSearchEngineTargetSite resource name string.
2873
3057
  *
@@ -2937,8 +3121,8 @@ class SchemaServiceClient {
2937
3121
  this._log.info('ending gRPC channel');
2938
3122
  this._terminated = true;
2939
3123
  stub.close();
2940
- this.locationsClient.close();
2941
- this.operationsClient.close();
3124
+ this.locationsClient.close().catch(err => { throw err; });
3125
+ void this.operationsClient.close();
2942
3126
  });
2943
3127
  }
2944
3128
  return Promise.resolve();