@google-cloud/discoveryengine 2.0.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +7 -2
  3. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
  5. package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
  6. package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
  9. package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
  10. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
  12. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
  13. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
  14. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
  15. package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
  16. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
  17. package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
  19. package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
  21. package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
  22. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
  23. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
  24. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
  25. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
  26. package/build/protos/protos.d.ts +4390 -300
  27. package/build/protos/protos.js +13785 -2922
  28. package/build/protos/protos.json +1355 -14
  29. package/build/src/index.d.ts +4 -1
  30. package/build/src/index.js +4 -21
  31. package/build/src/v1/completion_service_client.d.ts +313 -76
  32. package/build/src/v1/completion_service_client.js +451 -262
  33. package/build/src/v1/completion_service_proto_list.json +3 -0
  34. package/build/src/v1/control_service_client.d.ts +318 -81
  35. package/build/src/v1/control_service_client.js +422 -132
  36. package/build/src/v1/control_service_proto_list.json +3 -0
  37. package/build/src/v1/conversational_search_service_client.d.ts +341 -134
  38. package/build/src/v1/conversational_search_service_client.js +395 -223
  39. package/build/src/v1/conversational_search_service_client_config.json +5 -0
  40. package/build/src/v1/conversational_search_service_proto_list.json +3 -0
  41. package/build/src/v1/data_store_service_client.d.ts +359 -122
  42. package/build/src/v1/data_store_service_client.js +460 -280
  43. package/build/src/v1/data_store_service_proto_list.json +3 -0
  44. package/build/src/v1/document_service_client.d.ts +364 -121
  45. package/build/src/v1/document_service_client.js +469 -300
  46. package/build/src/v1/document_service_proto_list.json +3 -0
  47. package/build/src/v1/engine_service_client.d.ts +340 -103
  48. package/build/src/v1/engine_service_client.js +460 -279
  49. package/build/src/v1/engine_service_proto_list.json +3 -0
  50. package/build/src/v1/gapic_metadata.json +59 -0
  51. package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
  52. package/build/src/v1/grounded_generation_service_client.js +405 -100
  53. package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
  54. package/build/src/v1/index.d.ts +1 -0
  55. package/build/src/v1/index.js +3 -1
  56. package/build/src/v1/project_service_client.d.ts +313 -76
  57. package/build/src/v1/project_service_client.js +434 -222
  58. package/build/src/v1/project_service_proto_list.json +3 -0
  59. package/build/src/v1/rank_service_client.d.ts +285 -48
  60. package/build/src/v1/rank_service_client.js +398 -85
  61. package/build/src/v1/rank_service_proto_list.json +3 -0
  62. package/build/src/v1/recommendation_service_client.d.ts +142 -49
  63. package/build/src/v1/recommendation_service_client.js +198 -82
  64. package/build/src/v1/recommendation_service_proto_list.json +3 -0
  65. package/build/src/v1/schema_service_client.d.ts +348 -111
  66. package/build/src/v1/schema_service_client.js +457 -273
  67. package/build/src/v1/schema_service_proto_list.json +3 -0
  68. package/build/src/v1/search_service_client.d.ts +748 -559
  69. package/build/src/v1/search_service_client.js +302 -133
  70. package/build/src/v1/search_service_proto_list.json +3 -0
  71. package/build/src/v1/search_tuning_service_client.d.ts +314 -77
  72. package/build/src/v1/search_tuning_service_client.js +439 -235
  73. package/build/src/v1/search_tuning_service_proto_list.json +3 -0
  74. package/build/src/v1/serving_config_service_client.d.ts +1851 -0
  75. package/build/src/v1/serving_config_service_client.js +2642 -0
  76. package/build/src/v1/serving_config_service_client_config.json +30 -0
  77. package/build/src/v1/serving_config_service_proto_list.json +39 -0
  78. package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
  79. package/build/src/v1/site_search_engine_service_client.js +625 -351
  80. package/build/src/v1/site_search_engine_service_client_config.json +12 -0
  81. package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
  82. package/build/src/v1/user_event_service_client.d.ts +335 -86
  83. package/build/src/v1/user_event_service_client.js +447 -253
  84. package/build/src/v1/user_event_service_proto_list.json +3 -0
  85. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  86. package/build/src/v1alpha/acl_config_service_client.js +82 -106
  87. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  88. package/build/src/v1alpha/chunk_service_client.js +92 -120
  89. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  90. package/build/src/v1alpha/completion_service_client.js +134 -280
  91. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  92. package/build/src/v1alpha/control_service_client.js +105 -151
  93. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  94. package/build/src/v1alpha/conversational_search_service_client.js +145 -237
  95. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  96. package/build/src/v1alpha/data_store_service_client.js +151 -316
  97. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  98. package/build/src/v1alpha/document_service_client.js +156 -328
  99. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  100. package/build/src/v1alpha/engine_service_client.js +155 -325
  101. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  102. package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
  103. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  104. package/build/src/v1alpha/evaluation_service_client.js +143 -295
  105. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  106. package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
  107. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  108. package/build/src/v1alpha/project_service_client.js +126 -262
  109. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  110. package/build/src/v1alpha/rank_service_client.js +81 -104
  111. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  112. package/build/src/v1alpha/recommendation_service_client.js +79 -100
  113. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  114. package/build/src/v1alpha/sample_query_service_client.js +144 -301
  115. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  116. package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
  117. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  118. package/build/src/v1alpha/schema_service_client.js +140 -292
  119. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  120. package/build/src/v1alpha/search_service_client.js +88 -112
  121. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  122. package/build/src/v1alpha/search_tuning_service_client.js +122 -253
  123. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  124. package/build/src/v1alpha/serving_config_service_client.js +97 -133
  125. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  126. package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
  127. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  128. package/build/src/v1alpha/user_event_service_client.js +130 -271
  129. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  130. package/build/src/v1beta/completion_service_client.js +136 -279
  131. package/build/src/v1beta/control_service_client.d.ts +84 -84
  132. package/build/src/v1beta/control_service_client.js +103 -147
  133. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  134. package/build/src/v1beta/conversational_search_service_client.js +143 -233
  135. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  136. package/build/src/v1beta/data_store_service_client.js +141 -288
  137. package/build/src/v1beta/document_service_client.d.ts +124 -124
  138. package/build/src/v1beta/document_service_client.js +150 -309
  139. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  140. package/build/src/v1beta/engine_service_client.js +153 -315
  141. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  142. package/build/src/v1beta/evaluation_service_client.js +141 -285
  143. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  144. package/build/src/v1beta/grounded_generation_service_client.js +86 -114
  145. package/build/src/v1beta/project_service_client.d.ts +76 -76
  146. package/build/src/v1beta/project_service_client.js +115 -231
  147. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  148. package/build/src/v1beta/rank_service_client.js +79 -99
  149. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  150. package/build/src/v1beta/recommendation_service_client.js +77 -96
  151. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  152. package/build/src/v1beta/sample_query_service_client.js +142 -291
  153. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  154. package/build/src/v1beta/sample_query_set_service_client.js +104 -149
  155. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  156. package/build/src/v1beta/schema_service_client.js +138 -282
  157. package/build/src/v1beta/search_service_client.d.ts +665 -665
  158. package/build/src/v1beta/search_service_client.js +97 -128
  159. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  160. package/build/src/v1beta/search_tuning_service_client.js +120 -243
  161. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  162. package/build/src/v1beta/serving_config_service_client.js +95 -129
  163. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  164. package/build/src/v1beta/site_search_engine_service_client.js +186 -386
  165. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  166. package/build/src/v1beta/user_event_service_client.js +128 -261
  167. package/package.json +4 -4
@@ -97,28 +97,18 @@ class SiteSearchEngineServiceClient {
97
97
  */
98
98
  constructor(opts, gaxInstance) {
99
99
  // Ensure that options include all the required fields.
100
- const staticMembers = this
101
- .constructor;
102
- if (opts?.universe_domain &&
103
- opts?.universeDomain &&
104
- opts?.universe_domain !== opts?.universeDomain) {
100
+ const staticMembers = this.constructor;
101
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
105
102
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
106
103
  }
107
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
108
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
109
- : undefined;
110
- this._universeDomain =
111
- opts?.universeDomain ??
112
- opts?.universe_domain ??
113
- universeDomainEnvVar ??
114
- 'googleapis.com';
104
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
105
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
115
106
  this._servicePath = 'discoveryengine.' + this._universeDomain;
116
107
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
117
108
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
118
109
  const port = opts?.port || staticMembers.port;
119
110
  const clientConfig = opts?.clientConfig ?? {};
120
- const fallback = opts?.fallback ??
121
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
111
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
122
112
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
123
113
  // Request numeric enum values if REST transport is used.
124
114
  opts.numericEnums = true;
@@ -148,7 +138,10 @@ class SiteSearchEngineServiceClient {
148
138
  }
149
139
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
150
140
  // Determine the client header string.
151
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
141
+ const clientHeader = [
142
+ `gax/${this._gaxModule.version}`,
143
+ `gapic/${version}`,
144
+ ];
152
145
  if (typeof process === 'object' && 'versions' in process) {
153
146
  clientHeader.push(`gl-node/${process.versions.node}`);
154
147
  }
@@ -180,12 +173,15 @@ class SiteSearchEngineServiceClient {
180
173
  projectLocationCollectionDataStoreCustomTuningModelPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}'),
181
174
  projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig'),
182
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}'),
183
177
  projectLocationCollectionDataStoreSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}'),
184
178
  projectLocationCollectionDataStoreSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}'),
185
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}'),
186
181
  projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
187
182
  projectLocationCollectionEngineControlPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/controls/{control}'),
188
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}'),
189
185
  projectLocationCollectionEngineSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}'),
190
186
  projectLocationCollectionEngineSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}'),
191
187
  projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
@@ -196,9 +192,11 @@ class SiteSearchEngineServiceClient {
196
192
  projectLocationDataStoreCustomTuningModelPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}'),
197
193
  projectLocationDataStoreDocumentProcessingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig'),
198
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}'),
199
196
  projectLocationDataStoreSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}'),
200
197
  projectLocationDataStoreSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}'),
201
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}'),
202
200
  projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
203
201
  };
204
202
  // Some of the methods on this service return "paged" results,
@@ -206,7 +204,7 @@ class SiteSearchEngineServiceClient {
206
204
  // pages). Denote the keys used for pagination and results.
207
205
  this.descriptors.page = {
208
206
  listTargetSites: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites'),
209
- fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites'),
207
+ fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites')
210
208
  };
211
209
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
212
210
  // This API contains "long-running operations", which return a
@@ -214,121 +212,16 @@ class SiteSearchEngineServiceClient {
214
212
  // rather than holding a request open.
215
213
  const lroOptions = {
216
214
  auth: this.auth,
217
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
215
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
218
216
  };
219
217
  if (opts.fallback) {
220
218
  lroOptions.protoJson = protoFilesRoot;
221
- lroOptions.httpRules = [
222
- {
223
- selector: 'google.longrunning.Operations.CancelOperation',
224
- post: '/v1/{name=projects/*/operations/*}:cancel',
225
- body: '*',
226
- additional_bindings: [
227
- {
228
- post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
229
- body: '*',
230
- },
231
- {
232
- post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
233
- body: '*',
234
- },
235
- ],
236
- },
237
- {
238
- selector: 'google.longrunning.Operations.GetOperation',
239
- get: '/v1/{name=projects/*/operations/*}',
240
- additional_bindings: [
241
- {
242
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
243
- },
244
- {
245
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
246
- },
247
- {
248
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
249
- },
250
- {
251
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
252
- },
253
- {
254
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
255
- },
256
- {
257
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
258
- },
259
- {
260
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
261
- },
262
- {
263
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
264
- },
265
- {
266
- get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
267
- },
268
- {
269
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
270
- },
271
- {
272
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
273
- },
274
- {
275
- get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
276
- },
277
- {
278
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}',
279
- },
280
- { get: '/v1/{name=projects/*/locations/*/operations/*}' },
281
- { get: '/v1/{name=projects/*/operations/*}' },
282
- ],
283
- },
284
- {
285
- selector: 'google.longrunning.Operations.ListOperations',
286
- get: '/v1/{name=projects/*}/operations',
287
- additional_bindings: [
288
- {
289
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
290
- },
291
- {
292
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
293
- },
294
- {
295
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
296
- },
297
- {
298
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
299
- },
300
- {
301
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
302
- },
303
- {
304
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
305
- },
306
- {
307
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
308
- },
309
- {
310
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
311
- },
312
- { get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
313
- {
314
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
315
- },
316
- {
317
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
318
- },
319
- { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
320
- {
321
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
322
- },
323
- { get: '/v1/{name=projects/*/locations/*}/operations' },
324
- { get: '/v1/{name=projects/*}/operations' },
325
- ],
326
- },
327
- ];
219
+ 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: '*', }],
220
+ }, { 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/*}', }],
221
+ }, { 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', }],
222
+ }];
328
223
  }
329
- this.operationsClient = this._gaxModule
330
- .lro(lroOptions)
331
- .operationsClient(opts);
224
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
332
225
  const createTargetSiteResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.TargetSite');
333
226
  const createTargetSiteMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.CreateTargetSiteMetadata');
334
227
  const batchCreateTargetSitesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.BatchCreateTargetSitesResponse');
@@ -337,6 +230,10 @@ class SiteSearchEngineServiceClient {
337
230
  const updateTargetSiteMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.UpdateTargetSiteMetadata');
338
231
  const deleteTargetSiteResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
339
232
  const deleteTargetSiteMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.DeleteTargetSiteMetadata');
233
+ const createSitemapResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.Sitemap');
234
+ const createSitemapMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.CreateSitemapMetadata');
235
+ const deleteSitemapResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
236
+ const deleteSitemapMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.DeleteSitemapMetadata');
340
237
  const enableAdvancedSiteSearchResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.EnableAdvancedSiteSearchResponse');
341
238
  const enableAdvancedSiteSearchMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.EnableAdvancedSiteSearchMetadata');
342
239
  const disableAdvancedSiteSearchResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.DisableAdvancedSiteSearchResponse');
@@ -350,10 +247,12 @@ class SiteSearchEngineServiceClient {
350
247
  batchCreateTargetSites: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchCreateTargetSitesResponse.decode.bind(batchCreateTargetSitesResponse), batchCreateTargetSitesMetadata.decode.bind(batchCreateTargetSitesMetadata)),
351
248
  updateTargetSite: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateTargetSiteResponse.decode.bind(updateTargetSiteResponse), updateTargetSiteMetadata.decode.bind(updateTargetSiteMetadata)),
352
249
  deleteTargetSite: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteTargetSiteResponse.decode.bind(deleteTargetSiteResponse), deleteTargetSiteMetadata.decode.bind(deleteTargetSiteMetadata)),
250
+ createSitemap: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createSitemapResponse.decode.bind(createSitemapResponse), createSitemapMetadata.decode.bind(createSitemapMetadata)),
251
+ deleteSitemap: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteSitemapResponse.decode.bind(deleteSitemapResponse), deleteSitemapMetadata.decode.bind(deleteSitemapMetadata)),
353
252
  enableAdvancedSiteSearch: new this._gaxModule.LongrunningDescriptor(this.operationsClient, enableAdvancedSiteSearchResponse.decode.bind(enableAdvancedSiteSearchResponse), enableAdvancedSiteSearchMetadata.decode.bind(enableAdvancedSiteSearchMetadata)),
354
253
  disableAdvancedSiteSearch: new this._gaxModule.LongrunningDescriptor(this.operationsClient, disableAdvancedSiteSearchResponse.decode.bind(disableAdvancedSiteSearchResponse), disableAdvancedSiteSearchMetadata.decode.bind(disableAdvancedSiteSearchMetadata)),
355
254
  recrawlUris: new this._gaxModule.LongrunningDescriptor(this.operationsClient, recrawlUrisResponse.decode.bind(recrawlUrisResponse), recrawlUrisMetadata.decode.bind(recrawlUrisMetadata)),
356
- batchVerifyTargetSites: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchVerifyTargetSitesResponse.decode.bind(batchVerifyTargetSitesResponse), batchVerifyTargetSitesMetadata.decode.bind(batchVerifyTargetSitesMetadata)),
255
+ batchVerifyTargetSites: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchVerifyTargetSitesResponse.decode.bind(batchVerifyTargetSitesResponse), batchVerifyTargetSitesMetadata.decode.bind(batchVerifyTargetSitesMetadata))
357
256
  };
358
257
  // Put together the default options sent with requests.
359
258
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.SiteSearchEngineService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -382,27 +281,13 @@ class SiteSearchEngineServiceClient {
382
281
  }
383
282
  // Put together the "service stub" for
384
283
  // google.cloud.discoveryengine.v1.SiteSearchEngineService.
385
- this.siteSearchEngineServiceStub = this._gaxGrpc.createStub(this._opts.fallback
386
- ? this._protos.lookupService('google.cloud.discoveryengine.v1.SiteSearchEngineService')
387
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
388
- this._protos.google.cloud.discoveryengine.v1
389
- .SiteSearchEngineService, this._opts, this._providedCustomServicePath);
284
+ this.siteSearchEngineServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
285
+ this._protos.lookupService('google.cloud.discoveryengine.v1.SiteSearchEngineService') :
286
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
287
+ this._protos.google.cloud.discoveryengine.v1.SiteSearchEngineService, this._opts, this._providedCustomServicePath);
390
288
  // Iterate over each of the methods that the service provides
391
289
  // and create an API call method for each.
392
- const siteSearchEngineServiceStubMethods = [
393
- 'getSiteSearchEngine',
394
- 'createTargetSite',
395
- 'batchCreateTargetSites',
396
- 'getTargetSite',
397
- 'updateTargetSite',
398
- 'deleteTargetSite',
399
- 'listTargetSites',
400
- 'enableAdvancedSiteSearch',
401
- 'disableAdvancedSiteSearch',
402
- 'recrawlUris',
403
- 'batchVerifyTargetSites',
404
- 'fetchDomainVerificationStatus',
405
- ];
290
+ const siteSearchEngineServiceStubMethods = ['getSiteSearchEngine', 'createTargetSite', 'batchCreateTargetSites', 'getTargetSite', 'updateTargetSite', 'deleteTargetSite', 'listTargetSites', 'createSitemap', 'deleteSitemap', 'fetchSitemaps', 'enableAdvancedSiteSearch', 'disableAdvancedSiteSearch', 'recrawlUris', 'batchVerifyTargetSites', 'fetchDomainVerificationStatus'];
406
291
  for (const methodName of siteSearchEngineServiceStubMethods) {
407
292
  const callPromise = this.siteSearchEngineServiceStub.then(stub => (...args) => {
408
293
  if (this._terminated) {
@@ -427,8 +312,7 @@ class SiteSearchEngineServiceClient {
427
312
  * @returns {string} The DNS address for this service.
428
313
  */
429
314
  static get servicePath() {
430
- if (typeof process === 'object' &&
431
- typeof process.emitWarning === 'function') {
315
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
432
316
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
433
317
  }
434
318
  return 'discoveryengine.googleapis.com';
@@ -439,8 +323,7 @@ class SiteSearchEngineServiceClient {
439
323
  * @returns {string} The DNS address for this service.
440
324
  */
441
325
  static get apiEndpoint() {
442
- if (typeof process === 'object' &&
443
- typeof process.emitWarning === 'function') {
326
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
444
327
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
445
328
  }
446
329
  return 'discoveryengine.googleapis.com';
@@ -468,7 +351,9 @@ class SiteSearchEngineServiceClient {
468
351
  * @returns {string[]} List of default scopes.
469
352
  */
470
353
  static get scopes() {
471
- return ['https://www.googleapis.com/auth/cloud-platform'];
354
+ return [
355
+ 'https://www.googleapis.com/auth/cloud-platform'
356
+ ];
472
357
  }
473
358
  /**
474
359
  * Return the project ID used by this class.
@@ -494,13 +379,10 @@ class SiteSearchEngineServiceClient {
494
379
  options = options || {};
495
380
  options.otherArgs = options.otherArgs || {};
496
381
  options.otherArgs.headers = options.otherArgs.headers || {};
497
- options.otherArgs.headers['x-goog-request-params'] =
498
- this._gaxModule.routingHeader.fromParams({
499
- name: request.name ?? '',
500
- });
501
- this.initialize().catch(err => {
502
- throw err;
382
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
383
+ 'name': request.name ?? '',
503
384
  });
385
+ this.initialize().catch(err => { throw err; });
504
386
  this._log.info('getSiteSearchEngine request %j', request);
505
387
  const wrappedCallback = callback
506
388
  ? (error, response, options, rawResponse) => {
@@ -508,8 +390,7 @@ class SiteSearchEngineServiceClient {
508
390
  callback(error, response, options, rawResponse); // We verified callback above.
509
391
  }
510
392
  : undefined;
511
- return this.innerApiCalls
512
- .getSiteSearchEngine(request, options, wrappedCallback)
393
+ return this.innerApiCalls.getSiteSearchEngine(request, options, wrappedCallback)
513
394
  ?.then(([response, options, rawResponse]) => {
514
395
  this._log.info('getSiteSearchEngine response %j', response);
515
396
  return [response, options, rawResponse];
@@ -528,13 +409,10 @@ class SiteSearchEngineServiceClient {
528
409
  options = options || {};
529
410
  options.otherArgs = options.otherArgs || {};
530
411
  options.otherArgs.headers = options.otherArgs.headers || {};
531
- options.otherArgs.headers['x-goog-request-params'] =
532
- this._gaxModule.routingHeader.fromParams({
533
- name: request.name ?? '',
534
- });
535
- this.initialize().catch(err => {
536
- throw err;
412
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
413
+ 'name': request.name ?? '',
537
414
  });
415
+ this.initialize().catch(err => { throw err; });
538
416
  this._log.info('getTargetSite request %j', request);
539
417
  const wrappedCallback = callback
540
418
  ? (error, response, options, rawResponse) => {
@@ -542,13 +420,42 @@ class SiteSearchEngineServiceClient {
542
420
  callback(error, response, options, rawResponse); // We verified callback above.
543
421
  }
544
422
  : undefined;
545
- return this.innerApiCalls
546
- .getTargetSite(request, options, wrappedCallback)
423
+ return this.innerApiCalls.getTargetSite(request, options, wrappedCallback)
547
424
  ?.then(([response, options, rawResponse]) => {
548
425
  this._log.info('getTargetSite response %j', response);
549
426
  return [response, options, rawResponse];
550
427
  });
551
428
  }
429
+ fetchSitemaps(request, optionsOrCallback, callback) {
430
+ request = request || {};
431
+ let options;
432
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
433
+ callback = optionsOrCallback;
434
+ options = {};
435
+ }
436
+ else {
437
+ options = optionsOrCallback;
438
+ }
439
+ options = options || {};
440
+ options.otherArgs = options.otherArgs || {};
441
+ options.otherArgs.headers = options.otherArgs.headers || {};
442
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
443
+ 'parent': request.parent ?? '',
444
+ });
445
+ this.initialize().catch(err => { throw err; });
446
+ this._log.info('fetchSitemaps request %j', request);
447
+ const wrappedCallback = callback
448
+ ? (error, response, options, rawResponse) => {
449
+ this._log.info('fetchSitemaps response %j', response);
450
+ callback(error, response, options, rawResponse); // We verified callback above.
451
+ }
452
+ : undefined;
453
+ return this.innerApiCalls.fetchSitemaps(request, options, wrappedCallback)
454
+ ?.then(([response, options, rawResponse]) => {
455
+ this._log.info('fetchSitemaps response %j', response);
456
+ return [response, options, rawResponse];
457
+ });
458
+ }
552
459
  createTargetSite(request, optionsOrCallback, callback) {
553
460
  request = request || {};
554
461
  let options;
@@ -562,13 +469,10 @@ class SiteSearchEngineServiceClient {
562
469
  options = options || {};
563
470
  options.otherArgs = options.otherArgs || {};
564
471
  options.otherArgs.headers = options.otherArgs.headers || {};
565
- options.otherArgs.headers['x-goog-request-params'] =
566
- this._gaxModule.routingHeader.fromParams({
567
- parent: request.parent ?? '',
568
- });
569
- this.initialize().catch(err => {
570
- throw err;
472
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
473
+ 'parent': request.parent ?? '',
571
474
  });
475
+ this.initialize().catch(err => { throw err; });
572
476
  const wrappedCallback = callback
573
477
  ? (error, response, rawResponse, _) => {
574
478
  this._log.info('createTargetSite response %j', rawResponse);
@@ -576,8 +480,7 @@ class SiteSearchEngineServiceClient {
576
480
  }
577
481
  : undefined;
578
482
  this._log.info('createTargetSite request %j', request);
579
- return this.innerApiCalls
580
- .createTargetSite(request, options, wrappedCallback)
483
+ return this.innerApiCalls.createTargetSite(request, options, wrappedCallback)
581
484
  ?.then(([response, rawResponse, _]) => {
582
485
  this._log.info('createTargetSite response %j', rawResponse);
583
486
  return [response, rawResponse, _];
@@ -614,13 +517,10 @@ class SiteSearchEngineServiceClient {
614
517
  options = options || {};
615
518
  options.otherArgs = options.otherArgs || {};
616
519
  options.otherArgs.headers = options.otherArgs.headers || {};
617
- options.otherArgs.headers['x-goog-request-params'] =
618
- this._gaxModule.routingHeader.fromParams({
619
- parent: request.parent ?? '',
620
- });
621
- this.initialize().catch(err => {
622
- throw err;
520
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
521
+ 'parent': request.parent ?? '',
623
522
  });
523
+ this.initialize().catch(err => { throw err; });
624
524
  const wrappedCallback = callback
625
525
  ? (error, response, rawResponse, _) => {
626
526
  this._log.info('batchCreateTargetSites response %j', rawResponse);
@@ -628,8 +528,7 @@ class SiteSearchEngineServiceClient {
628
528
  }
629
529
  : undefined;
630
530
  this._log.info('batchCreateTargetSites request %j', request);
631
- return this.innerApiCalls
632
- .batchCreateTargetSites(request, options, wrappedCallback)
531
+ return this.innerApiCalls.batchCreateTargetSites(request, options, wrappedCallback)
633
532
  ?.then(([response, rawResponse, _]) => {
634
533
  this._log.info('batchCreateTargetSites response %j', rawResponse);
635
534
  return [response, rawResponse, _];
@@ -666,13 +565,10 @@ class SiteSearchEngineServiceClient {
666
565
  options = options || {};
667
566
  options.otherArgs = options.otherArgs || {};
668
567
  options.otherArgs.headers = options.otherArgs.headers || {};
669
- options.otherArgs.headers['x-goog-request-params'] =
670
- this._gaxModule.routingHeader.fromParams({
671
- 'target_site.name': request.targetSite.name ?? '',
672
- });
673
- this.initialize().catch(err => {
674
- throw err;
568
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
569
+ 'target_site.name': request.targetSite.name ?? '',
675
570
  });
571
+ this.initialize().catch(err => { throw err; });
676
572
  const wrappedCallback = callback
677
573
  ? (error, response, rawResponse, _) => {
678
574
  this._log.info('updateTargetSite response %j', rawResponse);
@@ -680,8 +576,7 @@ class SiteSearchEngineServiceClient {
680
576
  }
681
577
  : undefined;
682
578
  this._log.info('updateTargetSite request %j', request);
683
- return this.innerApiCalls
684
- .updateTargetSite(request, options, wrappedCallback)
579
+ return this.innerApiCalls.updateTargetSite(request, options, wrappedCallback)
685
580
  ?.then(([response, rawResponse, _]) => {
686
581
  this._log.info('updateTargetSite response %j', rawResponse);
687
582
  return [response, rawResponse, _];
@@ -718,13 +613,10 @@ class SiteSearchEngineServiceClient {
718
613
  options = options || {};
719
614
  options.otherArgs = options.otherArgs || {};
720
615
  options.otherArgs.headers = options.otherArgs.headers || {};
721
- options.otherArgs.headers['x-goog-request-params'] =
722
- this._gaxModule.routingHeader.fromParams({
723
- name: request.name ?? '',
724
- });
725
- this.initialize().catch(err => {
726
- throw err;
616
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
617
+ 'name': request.name ?? '',
727
618
  });
619
+ this.initialize().catch(err => { throw err; });
728
620
  const wrappedCallback = callback
729
621
  ? (error, response, rawResponse, _) => {
730
622
  this._log.info('deleteTargetSite response %j', rawResponse);
@@ -732,8 +624,7 @@ class SiteSearchEngineServiceClient {
732
624
  }
733
625
  : undefined;
734
626
  this._log.info('deleteTargetSite request %j', request);
735
- return this.innerApiCalls
736
- .deleteTargetSite(request, options, wrappedCallback)
627
+ return this.innerApiCalls.deleteTargetSite(request, options, wrappedCallback)
737
628
  ?.then(([response, rawResponse, _]) => {
738
629
  this._log.info('deleteTargetSite response %j', rawResponse);
739
630
  return [response, rawResponse, _];
@@ -757,6 +648,102 @@ class SiteSearchEngineServiceClient {
757
648
  const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteTargetSite, this._gaxModule.createDefaultBackoffSettings());
758
649
  return decodeOperation;
759
650
  }
651
+ createSitemap(request, optionsOrCallback, callback) {
652
+ request = request || {};
653
+ let options;
654
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
655
+ callback = optionsOrCallback;
656
+ options = {};
657
+ }
658
+ else {
659
+ options = optionsOrCallback;
660
+ }
661
+ options = options || {};
662
+ options.otherArgs = options.otherArgs || {};
663
+ options.otherArgs.headers = options.otherArgs.headers || {};
664
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
665
+ 'parent': request.parent ?? '',
666
+ });
667
+ this.initialize().catch(err => { throw err; });
668
+ const wrappedCallback = callback
669
+ ? (error, response, rawResponse, _) => {
670
+ this._log.info('createSitemap response %j', rawResponse);
671
+ callback(error, response, rawResponse, _); // We verified callback above.
672
+ }
673
+ : undefined;
674
+ this._log.info('createSitemap request %j', request);
675
+ return this.innerApiCalls.createSitemap(request, options, wrappedCallback)
676
+ ?.then(([response, rawResponse, _]) => {
677
+ this._log.info('createSitemap response %j', rawResponse);
678
+ return [response, rawResponse, _];
679
+ });
680
+ }
681
+ /**
682
+ * Check the status of the long running operation returned by `createSitemap()`.
683
+ * @param {String} name
684
+ * The operation name that will be passed.
685
+ * @returns {Promise} - The promise which resolves to an object.
686
+ * The decoded operation object has result and metadata field to get information from.
687
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
688
+ * for more details and examples.
689
+ * @example <caption>include:samples/generated/v1/site_search_engine_service.create_sitemap.js</caption>
690
+ * region_tag:discoveryengine_v1_generated_SiteSearchEngineService_CreateSitemap_async
691
+ */
692
+ async checkCreateSitemapProgress(name) {
693
+ this._log.info('createSitemap long-running');
694
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
695
+ const [operation] = await this.operationsClient.getOperation(request);
696
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createSitemap, this._gaxModule.createDefaultBackoffSettings());
697
+ return decodeOperation;
698
+ }
699
+ deleteSitemap(request, optionsOrCallback, callback) {
700
+ request = request || {};
701
+ let options;
702
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
703
+ callback = optionsOrCallback;
704
+ options = {};
705
+ }
706
+ else {
707
+ options = optionsOrCallback;
708
+ }
709
+ options = options || {};
710
+ options.otherArgs = options.otherArgs || {};
711
+ options.otherArgs.headers = options.otherArgs.headers || {};
712
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
713
+ 'name': request.name ?? '',
714
+ });
715
+ this.initialize().catch(err => { throw err; });
716
+ const wrappedCallback = callback
717
+ ? (error, response, rawResponse, _) => {
718
+ this._log.info('deleteSitemap response %j', rawResponse);
719
+ callback(error, response, rawResponse, _); // We verified callback above.
720
+ }
721
+ : undefined;
722
+ this._log.info('deleteSitemap request %j', request);
723
+ return this.innerApiCalls.deleteSitemap(request, options, wrappedCallback)
724
+ ?.then(([response, rawResponse, _]) => {
725
+ this._log.info('deleteSitemap response %j', rawResponse);
726
+ return [response, rawResponse, _];
727
+ });
728
+ }
729
+ /**
730
+ * Check the status of the long running operation returned by `deleteSitemap()`.
731
+ * @param {String} name
732
+ * The operation name that will be passed.
733
+ * @returns {Promise} - The promise which resolves to an object.
734
+ * The decoded operation object has result and metadata field to get information from.
735
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
736
+ * for more details and examples.
737
+ * @example <caption>include:samples/generated/v1/site_search_engine_service.delete_sitemap.js</caption>
738
+ * region_tag:discoveryengine_v1_generated_SiteSearchEngineService_DeleteSitemap_async
739
+ */
740
+ async checkDeleteSitemapProgress(name) {
741
+ this._log.info('deleteSitemap long-running');
742
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
743
+ const [operation] = await this.operationsClient.getOperation(request);
744
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteSitemap, this._gaxModule.createDefaultBackoffSettings());
745
+ return decodeOperation;
746
+ }
760
747
  enableAdvancedSiteSearch(request, optionsOrCallback, callback) {
761
748
  request = request || {};
762
749
  let options;
@@ -770,13 +757,10 @@ class SiteSearchEngineServiceClient {
770
757
  options = options || {};
771
758
  options.otherArgs = options.otherArgs || {};
772
759
  options.otherArgs.headers = options.otherArgs.headers || {};
773
- options.otherArgs.headers['x-goog-request-params'] =
774
- this._gaxModule.routingHeader.fromParams({
775
- site_search_engine: request.siteSearchEngine ?? '',
776
- });
777
- this.initialize().catch(err => {
778
- throw err;
760
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
761
+ 'site_search_engine': request.siteSearchEngine ?? '',
779
762
  });
763
+ this.initialize().catch(err => { throw err; });
780
764
  const wrappedCallback = callback
781
765
  ? (error, response, rawResponse, _) => {
782
766
  this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
@@ -784,8 +768,7 @@ class SiteSearchEngineServiceClient {
784
768
  }
785
769
  : undefined;
786
770
  this._log.info('enableAdvancedSiteSearch request %j', request);
787
- return this.innerApiCalls
788
- .enableAdvancedSiteSearch(request, options, wrappedCallback)
771
+ return this.innerApiCalls.enableAdvancedSiteSearch(request, options, wrappedCallback)
789
772
  ?.then(([response, rawResponse, _]) => {
790
773
  this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
791
774
  return [response, rawResponse, _];
@@ -822,13 +805,10 @@ class SiteSearchEngineServiceClient {
822
805
  options = options || {};
823
806
  options.otherArgs = options.otherArgs || {};
824
807
  options.otherArgs.headers = options.otherArgs.headers || {};
825
- options.otherArgs.headers['x-goog-request-params'] =
826
- this._gaxModule.routingHeader.fromParams({
827
- site_search_engine: request.siteSearchEngine ?? '',
828
- });
829
- this.initialize().catch(err => {
830
- throw err;
808
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
809
+ 'site_search_engine': request.siteSearchEngine ?? '',
831
810
  });
811
+ this.initialize().catch(err => { throw err; });
832
812
  const wrappedCallback = callback
833
813
  ? (error, response, rawResponse, _) => {
834
814
  this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
@@ -836,8 +816,7 @@ class SiteSearchEngineServiceClient {
836
816
  }
837
817
  : undefined;
838
818
  this._log.info('disableAdvancedSiteSearch request %j', request);
839
- return this.innerApiCalls
840
- .disableAdvancedSiteSearch(request, options, wrappedCallback)
819
+ return this.innerApiCalls.disableAdvancedSiteSearch(request, options, wrappedCallback)
841
820
  ?.then(([response, rawResponse, _]) => {
842
821
  this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
843
822
  return [response, rawResponse, _];
@@ -874,13 +853,10 @@ class SiteSearchEngineServiceClient {
874
853
  options = options || {};
875
854
  options.otherArgs = options.otherArgs || {};
876
855
  options.otherArgs.headers = options.otherArgs.headers || {};
877
- options.otherArgs.headers['x-goog-request-params'] =
878
- this._gaxModule.routingHeader.fromParams({
879
- site_search_engine: request.siteSearchEngine ?? '',
880
- });
881
- this.initialize().catch(err => {
882
- throw err;
856
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
857
+ 'site_search_engine': request.siteSearchEngine ?? '',
883
858
  });
859
+ this.initialize().catch(err => { throw err; });
884
860
  const wrappedCallback = callback
885
861
  ? (error, response, rawResponse, _) => {
886
862
  this._log.info('recrawlUris response %j', rawResponse);
@@ -888,8 +864,7 @@ class SiteSearchEngineServiceClient {
888
864
  }
889
865
  : undefined;
890
866
  this._log.info('recrawlUris request %j', request);
891
- return this.innerApiCalls
892
- .recrawlUris(request, options, wrappedCallback)
867
+ return this.innerApiCalls.recrawlUris(request, options, wrappedCallback)
893
868
  ?.then(([response, rawResponse, _]) => {
894
869
  this._log.info('recrawlUris response %j', rawResponse);
895
870
  return [response, rawResponse, _];
@@ -926,13 +901,10 @@ class SiteSearchEngineServiceClient {
926
901
  options = options || {};
927
902
  options.otherArgs = options.otherArgs || {};
928
903
  options.otherArgs.headers = options.otherArgs.headers || {};
929
- options.otherArgs.headers['x-goog-request-params'] =
930
- this._gaxModule.routingHeader.fromParams({
931
- parent: request.parent ?? '',
932
- });
933
- this.initialize().catch(err => {
934
- throw err;
904
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
905
+ 'parent': request.parent ?? '',
935
906
  });
907
+ this.initialize().catch(err => { throw err; });
936
908
  const wrappedCallback = callback
937
909
  ? (error, response, rawResponse, _) => {
938
910
  this._log.info('batchVerifyTargetSites response %j', rawResponse);
@@ -940,8 +912,7 @@ class SiteSearchEngineServiceClient {
940
912
  }
941
913
  : undefined;
942
914
  this._log.info('batchVerifyTargetSites request %j', request);
943
- return this.innerApiCalls
944
- .batchVerifyTargetSites(request, options, wrappedCallback)
915
+ return this.innerApiCalls.batchVerifyTargetSites(request, options, wrappedCallback)
945
916
  ?.then(([response, rawResponse, _]) => {
946
917
  this._log.info('batchVerifyTargetSites response %j', rawResponse);
947
918
  return [response, rawResponse, _];
@@ -978,13 +949,10 @@ class SiteSearchEngineServiceClient {
978
949
  options = options || {};
979
950
  options.otherArgs = options.otherArgs || {};
980
951
  options.otherArgs.headers = options.otherArgs.headers || {};
981
- options.otherArgs.headers['x-goog-request-params'] =
982
- this._gaxModule.routingHeader.fromParams({
983
- parent: request.parent ?? '',
984
- });
985
- this.initialize().catch(err => {
986
- throw err;
952
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
953
+ 'parent': request.parent ?? '',
987
954
  });
955
+ this.initialize().catch(err => { throw err; });
988
956
  const wrappedCallback = callback
989
957
  ? (error, values, nextPageRequest, rawResponse) => {
990
958
  this._log.info('listTargetSites values %j', values);
@@ -1039,15 +1007,12 @@ class SiteSearchEngineServiceClient {
1039
1007
  options = options || {};
1040
1008
  options.otherArgs = options.otherArgs || {};
1041
1009
  options.otherArgs.headers = options.otherArgs.headers || {};
1042
- options.otherArgs.headers['x-goog-request-params'] =
1043
- this._gaxModule.routingHeader.fromParams({
1044
- parent: request.parent ?? '',
1045
- });
1010
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1011
+ 'parent': request.parent ?? '',
1012
+ });
1046
1013
  const defaultCallSettings = this._defaults['listTargetSites'];
1047
1014
  const callSettings = defaultCallSettings.merge(options);
1048
- this.initialize().catch(err => {
1049
- throw err;
1050
- });
1015
+ this.initialize().catch(err => { throw err; });
1051
1016
  this._log.info('listTargetSites stream %j', request);
1052
1017
  return this.descriptors.page.listTargetSites.createStream(this.innerApiCalls.listTargetSites, request, callSettings);
1053
1018
  }
@@ -1094,15 +1059,12 @@ class SiteSearchEngineServiceClient {
1094
1059
  options = options || {};
1095
1060
  options.otherArgs = options.otherArgs || {};
1096
1061
  options.otherArgs.headers = options.otherArgs.headers || {};
1097
- options.otherArgs.headers['x-goog-request-params'] =
1098
- this._gaxModule.routingHeader.fromParams({
1099
- parent: request.parent ?? '',
1100
- });
1062
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1063
+ 'parent': request.parent ?? '',
1064
+ });
1101
1065
  const defaultCallSettings = this._defaults['listTargetSites'];
1102
1066
  const callSettings = defaultCallSettings.merge(options);
1103
- this.initialize().catch(err => {
1104
- throw err;
1105
- });
1067
+ this.initialize().catch(err => { throw err; });
1106
1068
  this._log.info('listTargetSites iterate %j', request);
1107
1069
  return this.descriptors.page.listTargetSites.asyncIterate(this.innerApiCalls['listTargetSites'], request, callSettings);
1108
1070
  }
@@ -1119,13 +1081,10 @@ class SiteSearchEngineServiceClient {
1119
1081
  options = options || {};
1120
1082
  options.otherArgs = options.otherArgs || {};
1121
1083
  options.otherArgs.headers = options.otherArgs.headers || {};
1122
- options.otherArgs.headers['x-goog-request-params'] =
1123
- this._gaxModule.routingHeader.fromParams({
1124
- site_search_engine: request.siteSearchEngine ?? '',
1125
- });
1126
- this.initialize().catch(err => {
1127
- throw err;
1084
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1085
+ 'site_search_engine': request.siteSearchEngine ?? '',
1128
1086
  });
1087
+ this.initialize().catch(err => { throw err; });
1129
1088
  const wrappedCallback = callback
1130
1089
  ? (error, values, nextPageRequest, rawResponse) => {
1131
1090
  this._log.info('fetchDomainVerificationStatus values %j', values);
@@ -1177,15 +1136,12 @@ class SiteSearchEngineServiceClient {
1177
1136
  options = options || {};
1178
1137
  options.otherArgs = options.otherArgs || {};
1179
1138
  options.otherArgs.headers = options.otherArgs.headers || {};
1180
- options.otherArgs.headers['x-goog-request-params'] =
1181
- this._gaxModule.routingHeader.fromParams({
1182
- site_search_engine: request.siteSearchEngine ?? '',
1183
- });
1139
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1140
+ 'site_search_engine': request.siteSearchEngine ?? '',
1141
+ });
1184
1142
  const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
1185
1143
  const callSettings = defaultCallSettings.merge(options);
1186
- this.initialize().catch(err => {
1187
- throw err;
1188
- });
1144
+ this.initialize().catch(err => { throw err; });
1189
1145
  this._log.info('fetchDomainVerificationStatus stream %j', request);
1190
1146
  return this.descriptors.page.fetchDomainVerificationStatus.createStream(this.innerApiCalls.fetchDomainVerificationStatus, request, callSettings);
1191
1147
  }
@@ -1229,103 +1185,100 @@ class SiteSearchEngineServiceClient {
1229
1185
  options = options || {};
1230
1186
  options.otherArgs = options.otherArgs || {};
1231
1187
  options.otherArgs.headers = options.otherArgs.headers || {};
1232
- options.otherArgs.headers['x-goog-request-params'] =
1233
- this._gaxModule.routingHeader.fromParams({
1234
- site_search_engine: request.siteSearchEngine ?? '',
1235
- });
1188
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1189
+ 'site_search_engine': request.siteSearchEngine ?? '',
1190
+ });
1236
1191
  const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
1237
1192
  const callSettings = defaultCallSettings.merge(options);
1238
- this.initialize().catch(err => {
1239
- throw err;
1240
- });
1193
+ this.initialize().catch(err => { throw err; });
1241
1194
  this._log.info('fetchDomainVerificationStatus iterate %j', request);
1242
1195
  return this.descriptors.page.fetchDomainVerificationStatus.asyncIterate(this.innerApiCalls['fetchDomainVerificationStatus'], request, callSettings);
1243
1196
  }
1244
1197
  /**
1245
- * Gets information about a location.
1246
- *
1247
- * @param {Object} request
1248
- * The request object that will be sent.
1249
- * @param {string} request.name
1250
- * Resource name for the location.
1251
- * @param {object} [options]
1252
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1253
- * @returns {Promise} - The promise which resolves to an array.
1254
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1255
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1256
- * for more details and examples.
1257
- * @example
1258
- * ```
1259
- * const [response] = await client.getLocation(request);
1260
- * ```
1261
- */
1198
+ * Gets information about a location.
1199
+ *
1200
+ * @param {Object} request
1201
+ * The request object that will be sent.
1202
+ * @param {string} request.name
1203
+ * Resource name for the location.
1204
+ * @param {object} [options]
1205
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1206
+ * @returns {Promise} - The promise which resolves to an array.
1207
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1208
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1209
+ * for more details and examples.
1210
+ * @example
1211
+ * ```
1212
+ * const [response] = await client.getLocation(request);
1213
+ * ```
1214
+ */
1262
1215
  getLocation(request, options, callback) {
1263
1216
  return this.locationsClient.getLocation(request, options, callback);
1264
1217
  }
1265
1218
  /**
1266
- * Lists information about the supported locations for this service. Returns an iterable object.
1267
- *
1268
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1269
- * @param {Object} request
1270
- * The request object that will be sent.
1271
- * @param {string} request.name
1272
- * The resource that owns the locations collection, if applicable.
1273
- * @param {string} request.filter
1274
- * The standard list filter.
1275
- * @param {number} request.pageSize
1276
- * The standard list page size.
1277
- * @param {string} request.pageToken
1278
- * The standard list page token.
1279
- * @param {object} [options]
1280
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1281
- * @returns {Object}
1282
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1283
- * When you iterate the returned iterable, each element will be an object representing
1284
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1285
- * so you can stop the iteration when you don't need more results.
1286
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1287
- * for more details and examples.
1288
- * @example
1289
- * ```
1290
- * const iterable = client.listLocationsAsync(request);
1291
- * for await (const response of iterable) {
1292
- * // process response
1293
- * }
1294
- * ```
1295
- */
1219
+ * Lists information about the supported locations for this service. Returns an iterable object.
1220
+ *
1221
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1222
+ * @param {Object} request
1223
+ * The request object that will be sent.
1224
+ * @param {string} request.name
1225
+ * The resource that owns the locations collection, if applicable.
1226
+ * @param {string} request.filter
1227
+ * The standard list filter.
1228
+ * @param {number} request.pageSize
1229
+ * The standard list page size.
1230
+ * @param {string} request.pageToken
1231
+ * The standard list page token.
1232
+ * @param {object} [options]
1233
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1234
+ * @returns {Object}
1235
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1236
+ * When you iterate the returned iterable, each element will be an object representing
1237
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1238
+ * so you can stop the iteration when you don't need more results.
1239
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1240
+ * for more details and examples.
1241
+ * @example
1242
+ * ```
1243
+ * const iterable = client.listLocationsAsync(request);
1244
+ * for await (const response of iterable) {
1245
+ * // process response
1246
+ * }
1247
+ * ```
1248
+ */
1296
1249
  listLocationsAsync(request, options) {
1297
1250
  return this.locationsClient.listLocationsAsync(request, options);
1298
1251
  }
1299
1252
  /**
1300
- * Gets the latest state of a long-running operation. Clients can use this
1301
- * method to poll the operation result at intervals as recommended by the API
1302
- * service.
1303
- *
1304
- * @param {Object} request - The request object that will be sent.
1305
- * @param {string} request.name - The name of the operation resource.
1306
- * @param {Object=} options
1307
- * Optional parameters. You can override the default settings for this call,
1308
- * e.g, timeout, retries, paginations, etc. See {@link
1309
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1310
- * for the details.
1311
- * @param {function(?Error, ?Object)=} callback
1312
- * The function which will be called with the result of the API call.
1313
- *
1314
- * The second parameter to the callback is an object representing
1315
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
1316
- * @return {Promise} - The promise which resolves to an array.
1317
- * The first element of the array is an object representing
1318
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
1319
- * The promise has a method named "cancel" which cancels the ongoing API call.
1320
- *
1321
- * @example
1322
- * ```
1323
- * const client = longrunning.operationsClient();
1324
- * const name = '';
1325
- * const [response] = await client.getOperation({name});
1326
- * // doThingsWith(response)
1327
- * ```
1328
- */
1253
+ * Gets the latest state of a long-running operation. Clients can use this
1254
+ * method to poll the operation result at intervals as recommended by the API
1255
+ * service.
1256
+ *
1257
+ * @param {Object} request - The request object that will be sent.
1258
+ * @param {string} request.name - The name of the operation resource.
1259
+ * @param {Object=} options
1260
+ * Optional parameters. You can override the default settings for this call,
1261
+ * e.g, timeout, retries, paginations, etc. See {@link
1262
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1263
+ * for the details.
1264
+ * @param {function(?Error, ?Object)=} callback
1265
+ * The function which will be called with the result of the API call.
1266
+ *
1267
+ * The second parameter to the callback is an object representing
1268
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1269
+ * @return {Promise} - The promise which resolves to an array.
1270
+ * The first element of the array is an object representing
1271
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1272
+ * The promise has a method named "cancel" which cancels the ongoing API call.
1273
+ *
1274
+ * @example
1275
+ * ```
1276
+ * const client = longrunning.operationsClient();
1277
+ * const name = '';
1278
+ * const [response] = await client.getOperation({name});
1279
+ * // doThingsWith(response)
1280
+ * ```
1281
+ */
1329
1282
  getOperation(request, optionsOrCallback, callback) {
1330
1283
  let options;
1331
1284
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -2121,6 +2074,75 @@ class SiteSearchEngineServiceClient {
2121
2074
  matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
2122
2075
  return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
2123
2076
  }
2077
+ /**
2078
+ * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
2079
+ *
2080
+ * @param {string} project
2081
+ * @param {string} location
2082
+ * @param {string} collection
2083
+ * @param {string} data_store
2084
+ * @param {string} serving_config
2085
+ * @returns {string} Resource name string.
2086
+ */
2087
+ projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig) {
2088
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render({
2089
+ project: project,
2090
+ location: location,
2091
+ collection: collection,
2092
+ data_store: dataStore,
2093
+ serving_config: servingConfig,
2094
+ });
2095
+ }
2096
+ /**
2097
+ * Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.
2098
+ *
2099
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
2100
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
2101
+ * @returns {string} A string representing the project.
2102
+ */
2103
+ matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
2104
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).project;
2105
+ }
2106
+ /**
2107
+ * Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.
2108
+ *
2109
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
2110
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
2111
+ * @returns {string} A string representing the location.
2112
+ */
2113
+ matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
2114
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).location;
2115
+ }
2116
+ /**
2117
+ * Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.
2118
+ *
2119
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
2120
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
2121
+ * @returns {string} A string representing the collection.
2122
+ */
2123
+ matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
2124
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).collection;
2125
+ }
2126
+ /**
2127
+ * Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.
2128
+ *
2129
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
2130
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
2131
+ * @returns {string} A string representing the data_store.
2132
+ */
2133
+ matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
2134
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).data_store;
2135
+ }
2136
+ /**
2137
+ * Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.
2138
+ *
2139
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
2140
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
2141
+ * @returns {string} A string representing the serving_config.
2142
+ */
2143
+ matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
2144
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).serving_config;
2145
+ }
2124
2146
  /**
2125
2147
  * Return a fully-qualified projectLocationCollectionDataStoreSession resource name string.
2126
2148
  *
@@ -2328,6 +2350,75 @@ class SiteSearchEngineServiceClient {
2328
2350
  matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
2329
2351
  return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
2330
2352
  }
2353
+ /**
2354
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineSitemap resource name string.
2355
+ *
2356
+ * @param {string} project
2357
+ * @param {string} location
2358
+ * @param {string} collection
2359
+ * @param {string} data_store
2360
+ * @param {string} sitemap
2361
+ * @returns {string} Resource name string.
2362
+ */
2363
+ projectLocationCollectionDataStoreSiteSearchEngineSitemapPath(project, location, collection, dataStore, sitemap) {
2364
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render({
2365
+ project: project,
2366
+ location: location,
2367
+ collection: collection,
2368
+ data_store: dataStore,
2369
+ sitemap: sitemap,
2370
+ });
2371
+ }
2372
+ /**
2373
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2374
+ *
2375
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2376
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2377
+ * @returns {string} A string representing the project.
2378
+ */
2379
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2380
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).project;
2381
+ }
2382
+ /**
2383
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2384
+ *
2385
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2386
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2387
+ * @returns {string} A string representing the location.
2388
+ */
2389
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2390
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).location;
2391
+ }
2392
+ /**
2393
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2394
+ *
2395
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2396
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2397
+ * @returns {string} A string representing the collection.
2398
+ */
2399
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2400
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).collection;
2401
+ }
2402
+ /**
2403
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2404
+ *
2405
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2406
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2407
+ * @returns {string} A string representing the data_store.
2408
+ */
2409
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2410
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).data_store;
2411
+ }
2412
+ /**
2413
+ * Parse the sitemap from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2414
+ *
2415
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2416
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2417
+ * @returns {string} A string representing the sitemap.
2418
+ */
2419
+ matchSitemapFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2420
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).sitemap;
2421
+ }
2331
2422
  /**
2332
2423
  * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineTargetSite resource name string.
2333
2424
  *
@@ -2535,6 +2626,75 @@ class SiteSearchEngineServiceClient {
2535
2626
  matchConversationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
2536
2627
  return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).conversation;
2537
2628
  }
2629
+ /**
2630
+ * Return a fully-qualified projectLocationCollectionEngineServingConfig resource name string.
2631
+ *
2632
+ * @param {string} project
2633
+ * @param {string} location
2634
+ * @param {string} collection
2635
+ * @param {string} engine
2636
+ * @param {string} serving_config
2637
+ * @returns {string} Resource name string.
2638
+ */
2639
+ projectLocationCollectionEngineServingConfigPath(project, location, collection, engine, servingConfig) {
2640
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render({
2641
+ project: project,
2642
+ location: location,
2643
+ collection: collection,
2644
+ engine: engine,
2645
+ serving_config: servingConfig,
2646
+ });
2647
+ }
2648
+ /**
2649
+ * Parse the project from ProjectLocationCollectionEngineServingConfig resource.
2650
+ *
2651
+ * @param {string} projectLocationCollectionEngineServingConfigName
2652
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2653
+ * @returns {string} A string representing the project.
2654
+ */
2655
+ matchProjectFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2656
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).project;
2657
+ }
2658
+ /**
2659
+ * Parse the location from ProjectLocationCollectionEngineServingConfig resource.
2660
+ *
2661
+ * @param {string} projectLocationCollectionEngineServingConfigName
2662
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2663
+ * @returns {string} A string representing the location.
2664
+ */
2665
+ matchLocationFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2666
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).location;
2667
+ }
2668
+ /**
2669
+ * Parse the collection from ProjectLocationCollectionEngineServingConfig resource.
2670
+ *
2671
+ * @param {string} projectLocationCollectionEngineServingConfigName
2672
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2673
+ * @returns {string} A string representing the collection.
2674
+ */
2675
+ matchCollectionFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2676
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).collection;
2677
+ }
2678
+ /**
2679
+ * Parse the engine from ProjectLocationCollectionEngineServingConfig resource.
2680
+ *
2681
+ * @param {string} projectLocationCollectionEngineServingConfigName
2682
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2683
+ * @returns {string} A string representing the engine.
2684
+ */
2685
+ matchEngineFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2686
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).engine;
2687
+ }
2688
+ /**
2689
+ * Parse the serving_config from ProjectLocationCollectionEngineServingConfig resource.
2690
+ *
2691
+ * @param {string} projectLocationCollectionEngineServingConfigName
2692
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
2693
+ * @returns {string} A string representing the serving_config.
2694
+ */
2695
+ matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
2696
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).serving_config;
2697
+ }
2538
2698
  /**
2539
2699
  * Return a fully-qualified projectLocationCollectionEngineSession resource name string.
2540
2700
  *
@@ -3153,6 +3313,63 @@ class SiteSearchEngineServiceClient {
3153
3313
  matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
3154
3314
  return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
3155
3315
  }
3316
+ /**
3317
+ * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
3318
+ *
3319
+ * @param {string} project
3320
+ * @param {string} location
3321
+ * @param {string} data_store
3322
+ * @param {string} serving_config
3323
+ * @returns {string} Resource name string.
3324
+ */
3325
+ projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig) {
3326
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render({
3327
+ project: project,
3328
+ location: location,
3329
+ data_store: dataStore,
3330
+ serving_config: servingConfig,
3331
+ });
3332
+ }
3333
+ /**
3334
+ * Parse the project from ProjectLocationDataStoreServingConfig resource.
3335
+ *
3336
+ * @param {string} projectLocationDataStoreServingConfigName
3337
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
3338
+ * @returns {string} A string representing the project.
3339
+ */
3340
+ matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
3341
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).project;
3342
+ }
3343
+ /**
3344
+ * Parse the location from ProjectLocationDataStoreServingConfig resource.
3345
+ *
3346
+ * @param {string} projectLocationDataStoreServingConfigName
3347
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
3348
+ * @returns {string} A string representing the location.
3349
+ */
3350
+ matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
3351
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).location;
3352
+ }
3353
+ /**
3354
+ * Parse the data_store from ProjectLocationDataStoreServingConfig resource.
3355
+ *
3356
+ * @param {string} projectLocationDataStoreServingConfigName
3357
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
3358
+ * @returns {string} A string representing the data_store.
3359
+ */
3360
+ matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
3361
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).data_store;
3362
+ }
3363
+ /**
3364
+ * Parse the serving_config from ProjectLocationDataStoreServingConfig resource.
3365
+ *
3366
+ * @param {string} projectLocationDataStoreServingConfigName
3367
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
3368
+ * @returns {string} A string representing the serving_config.
3369
+ */
3370
+ matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
3371
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).serving_config;
3372
+ }
3156
3373
  /**
3157
3374
  * Return a fully-qualified projectLocationDataStoreSession resource name string.
3158
3375
  *
@@ -3324,6 +3541,63 @@ class SiteSearchEngineServiceClient {
3324
3541
  matchDataStoreFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
3325
3542
  return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).data_store;
3326
3543
  }
3544
+ /**
3545
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngineSitemap resource name string.
3546
+ *
3547
+ * @param {string} project
3548
+ * @param {string} location
3549
+ * @param {string} data_store
3550
+ * @param {string} sitemap
3551
+ * @returns {string} Resource name string.
3552
+ */
3553
+ projectLocationDataStoreSiteSearchEngineSitemapPath(project, location, dataStore, sitemap) {
3554
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render({
3555
+ project: project,
3556
+ location: location,
3557
+ data_store: dataStore,
3558
+ sitemap: sitemap,
3559
+ });
3560
+ }
3561
+ /**
3562
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3563
+ *
3564
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3565
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3566
+ * @returns {string} A string representing the project.
3567
+ */
3568
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3569
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).project;
3570
+ }
3571
+ /**
3572
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3573
+ *
3574
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3575
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3576
+ * @returns {string} A string representing the location.
3577
+ */
3578
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3579
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).location;
3580
+ }
3581
+ /**
3582
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3583
+ *
3584
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3585
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3586
+ * @returns {string} A string representing the data_store.
3587
+ */
3588
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3589
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).data_store;
3590
+ }
3591
+ /**
3592
+ * Parse the sitemap from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3593
+ *
3594
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3595
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3596
+ * @returns {string} A string representing the sitemap.
3597
+ */
3598
+ matchSitemapFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3599
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).sitemap;
3600
+ }
3327
3601
  /**
3328
3602
  * Return a fully-qualified projectLocationDataStoreSiteSearchEngineTargetSite resource name string.
3329
3603
  *
@@ -3393,8 +3667,8 @@ class SiteSearchEngineServiceClient {
3393
3667
  this._log.info('ending gRPC channel');
3394
3668
  this._terminated = true;
3395
3669
  stub.close();
3396
- this.locationsClient.close();
3397
- this.operationsClient.close();
3670
+ this.locationsClient.close().catch(err => { throw err; });
3671
+ void this.operationsClient.close();
3398
3672
  });
3399
3673
  }
3400
3674
  return Promise.resolve();