@google-cloud/discoveryengine 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +13 -0
  2. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
  3. package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
  4. package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
  5. package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
  9. package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
  10. package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
  11. package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
  12. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
  13. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
  14. package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
  15. package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
  16. package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
  17. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
  19. package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
  21. package/build/protos/protos.d.ts +5415 -578
  22. package/build/protos/protos.js +77830 -63391
  23. package/build/protos/protos.json +1537 -92
  24. package/build/src/index.d.ts +10 -1
  25. package/build/src/index.js +8 -22
  26. package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
  27. package/build/src/v1/cmek_config_service_client.js +3274 -0
  28. package/build/src/v1/cmek_config_service_client_config.json +42 -0
  29. package/build/src/v1/cmek_config_service_proto_list.json +44 -0
  30. package/build/src/v1/completion_service_client.d.ts +166 -76
  31. package/build/src/v1/completion_service_client.js +258 -263
  32. package/build/src/v1/completion_service_proto_list.json +6 -1
  33. package/build/src/v1/control_service_client.d.ts +171 -81
  34. package/build/src/v1/control_service_client.js +246 -132
  35. package/build/src/v1/control_service_proto_list.json +6 -1
  36. package/build/src/v1/conversational_search_service_client.d.ts +233 -143
  37. package/build/src/v1/conversational_search_service_client.js +330 -226
  38. package/build/src/v1/conversational_search_service_proto_list.json +6 -1
  39. package/build/src/v1/data_store_service_client.d.ts +218 -122
  40. package/build/src/v1/data_store_service_client.js +273 -281
  41. package/build/src/v1/data_store_service_proto_list.json +6 -1
  42. package/build/src/v1/document_service_client.d.ts +210 -120
  43. package/build/src/v1/document_service_client.js +300 -301
  44. package/build/src/v1/document_service_proto_list.json +6 -1
  45. package/build/src/v1/engine_service_client.d.ts +193 -103
  46. package/build/src/v1/engine_service_client.js +273 -280
  47. package/build/src/v1/engine_service_proto_list.json +6 -1
  48. package/build/src/v1/gapic_metadata.json +184 -0
  49. package/build/src/v1/grounded_generation_service_client.d.ts +138 -48
  50. package/build/src/v1/grounded_generation_service_client.js +217 -100
  51. package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
  52. package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
  53. package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
  54. package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
  55. package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -0
  56. package/build/src/v1/index.d.ts +3 -0
  57. package/build/src/v1/index.js +7 -1
  58. package/build/src/v1/project_service_client.d.ts +166 -76
  59. package/build/src/v1/project_service_client.js +235 -223
  60. package/build/src/v1/project_service_proto_list.json +6 -1
  61. package/build/src/v1/rank_service_client.d.ts +137 -47
  62. package/build/src/v1/rank_service_client.js +204 -85
  63. package/build/src/v1/rank_service_proto_list.json +6 -1
  64. package/build/src/v1/recommendation_service_client.d.ts +137 -47
  65. package/build/src/v1/recommendation_service_client.js +202 -82
  66. package/build/src/v1/recommendation_service_proto_list.json +6 -1
  67. package/build/src/v1/schema_service_client.d.ts +201 -111
  68. package/build/src/v1/schema_service_client.js +264 -274
  69. package/build/src/v1/schema_service_proto_list.json +6 -1
  70. package/build/src/v1/search_service_client.d.ts +661 -571
  71. package/build/src/v1/search_service_client.js +216 -113
  72. package/build/src/v1/search_service_proto_list.json +6 -1
  73. package/build/src/v1/search_tuning_service_client.d.ts +167 -77
  74. package/build/src/v1/search_tuning_service_client.js +246 -236
  75. package/build/src/v1/search_tuning_service_proto_list.json +6 -1
  76. package/build/src/v1/serving_config_service_client.d.ts +138 -48
  77. package/build/src/v1/serving_config_service_client.js +201 -80
  78. package/build/src/v1/serving_config_service_proto_list.json +6 -1
  79. package/build/src/v1/site_search_engine_service_client.d.ts +238 -148
  80. package/build/src/v1/site_search_engine_service_client.js +324 -379
  81. package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
  82. package/build/src/v1/user_event_service_client.d.ts +167 -77
  83. package/build/src/v1/user_event_service_client.js +260 -254
  84. package/build/src/v1/user_event_service_proto_list.json +6 -1
  85. package/build/src/v1/user_license_service_client.d.ts +2256 -0
  86. package/build/src/v1/user_license_service_client.js +3194 -0
  87. package/build/src/v1/user_license_service_client_config.json +34 -0
  88. package/build/src/v1/user_license_service_proto_list.json +44 -0
  89. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  90. package/build/src/v1alpha/acl_config_service_client.js +94 -106
  91. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  92. package/build/src/v1alpha/chunk_service_client.js +98 -120
  93. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  94. package/build/src/v1alpha/completion_service_client.js +141 -281
  95. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  96. package/build/src/v1alpha/control_service_client.js +129 -151
  97. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  98. package/build/src/v1alpha/conversational_search_service_client.js +211 -237
  99. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  100. package/build/src/v1alpha/data_store_service_client.js +176 -317
  101. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  102. package/build/src/v1alpha/document_service_client.js +193 -329
  103. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  104. package/build/src/v1alpha/engine_service_client.js +180 -326
  105. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  106. package/build/src/v1alpha/estimate_billing_service_client.js +119 -244
  107. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  108. package/build/src/v1alpha/evaluation_service_client.js +150 -296
  109. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  110. package/build/src/v1alpha/grounded_generation_service_client.js +85 -100
  111. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  112. package/build/src/v1alpha/project_service_client.js +139 -263
  113. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  114. package/build/src/v1alpha/rank_service_client.js +87 -104
  115. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  116. package/build/src/v1alpha/recommendation_service_client.js +85 -100
  117. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  118. package/build/src/v1alpha/sample_query_service_client.js +169 -302
  119. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  120. package/build/src/v1alpha/sample_query_set_service_client.js +130 -153
  121. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  122. package/build/src/v1alpha/schema_service_client.js +147 -293
  123. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  124. package/build/src/v1alpha/search_service_client.js +88 -112
  125. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  126. package/build/src/v1alpha/search_tuning_service_client.js +129 -254
  127. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  128. package/build/src/v1alpha/serving_config_service_client.js +109 -133
  129. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  130. package/build/src/v1alpha/site_search_engine_service_client.js +203 -388
  131. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  132. package/build/src/v1alpha/user_event_service_client.js +143 -272
  133. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  134. package/build/src/v1beta/completion_service_client.js +149 -280
  135. package/build/src/v1beta/control_service_client.d.ts +84 -84
  136. package/build/src/v1beta/control_service_client.js +127 -147
  137. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  138. package/build/src/v1beta/conversational_search_service_client.js +209 -233
  139. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  140. package/build/src/v1beta/data_store_service_client.js +154 -289
  141. package/build/src/v1beta/document_service_client.d.ts +124 -124
  142. package/build/src/v1beta/document_service_client.js +181 -310
  143. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  144. package/build/src/v1beta/engine_service_client.js +178 -316
  145. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  146. package/build/src/v1beta/evaluation_service_client.js +148 -286
  147. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  148. package/build/src/v1beta/grounded_generation_service_client.js +98 -114
  149. package/build/src/v1beta/project_service_client.d.ts +76 -76
  150. package/build/src/v1beta/project_service_client.js +116 -232
  151. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  152. package/build/src/v1beta/rank_service_client.js +85 -99
  153. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  154. package/build/src/v1beta/recommendation_service_client.js +83 -96
  155. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  156. package/build/src/v1beta/sample_query_service_client.js +167 -292
  157. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  158. package/build/src/v1beta/sample_query_set_service_client.js +128 -149
  159. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  160. package/build/src/v1beta/schema_service_client.js +145 -283
  161. package/build/src/v1beta/search_service_client.d.ts +665 -665
  162. package/build/src/v1beta/search_service_client.js +97 -128
  163. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  164. package/build/src/v1beta/search_tuning_service_client.js +127 -244
  165. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  166. package/build/src/v1beta/serving_config_service_client.js +107 -129
  167. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  168. package/build/src/v1beta/site_search_engine_service_client.js +205 -387
  169. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  170. package/build/src/v1beta/user_event_service_client.js +141 -262
  171. package/package.json +7 -7
  172. package/CHANGELOG.md +0 -267
@@ -99,26 +99,17 @@ class ProjectServiceClient {
99
99
  constructor(opts, gaxInstance) {
100
100
  // Ensure that options include all the required fields.
101
101
  const staticMembers = this.constructor;
102
- if (opts?.universe_domain &&
103
- opts?.universeDomain &&
104
- opts?.universe_domain !== opts?.universeDomain) {
102
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
105
103
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
106
104
  }
107
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
108
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
109
- : undefined;
110
- this._universeDomain =
111
- opts?.universeDomain ??
112
- opts?.universe_domain ??
113
- universeDomainEnvVar ??
114
- 'googleapis.com';
105
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
106
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
115
107
  this._servicePath = 'discoveryengine.' + this._universeDomain;
116
108
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
117
109
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
118
110
  const port = opts?.port || staticMembers.port;
119
111
  const clientConfig = opts?.clientConfig ?? {};
120
- const fallback = opts?.fallback ??
121
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
112
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
122
113
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
123
114
  // Request numeric enum values if REST transport is used.
124
115
  opts.numericEnums = true;
@@ -148,7 +139,10 @@ class ProjectServiceClient {
148
139
  }
149
140
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
150
141
  // Determine the client header string.
151
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
142
+ const clientHeader = [
143
+ `gax/${this._gaxModule.version}`,
144
+ `gapic/${version}`,
145
+ ];
152
146
  if (typeof process === 'object' && 'versions' in process) {
153
147
  clientHeader.push(`gl-node/${process.versions.node}`);
154
148
  }
@@ -171,7 +165,10 @@ class ProjectServiceClient {
171
165
  // Create useful helper objects for these.
172
166
  this.pathTemplates = {
173
167
  enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
168
+ identityMappingStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}'),
174
169
  projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
170
+ projectLocationCmekConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfig'),
171
+ projectLocationCmekConfigsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfigs/{cmek_config}'),
175
172
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
176
173
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
177
174
  projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
@@ -206,131 +203,26 @@ class ProjectServiceClient {
206
203
  projectLocationDataStoreSiteSearchEngineSitemapPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}'),
207
204
  projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
208
205
  };
209
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
206
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
210
207
  // This API contains "long-running operations", which return a
211
208
  // an Operation object that allows for tracking of the operation,
212
209
  // rather than holding a request open.
213
210
  const lroOptions = {
214
211
  auth: this.auth,
215
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
212
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
216
213
  };
217
214
  if (opts.fallback) {
218
215
  lroOptions.protoJson = protoFilesRoot;
219
- lroOptions.httpRules = [
220
- {
221
- selector: 'google.longrunning.Operations.CancelOperation',
222
- post: '/v1/{name=projects/*/operations/*}:cancel',
223
- body: '*',
224
- additional_bindings: [
225
- {
226
- post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
227
- body: '*',
228
- },
229
- {
230
- post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
231
- body: '*',
232
- },
233
- ],
234
- },
235
- {
236
- selector: 'google.longrunning.Operations.GetOperation',
237
- get: '/v1/{name=projects/*/operations/*}',
238
- additional_bindings: [
239
- {
240
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
241
- },
242
- {
243
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
244
- },
245
- {
246
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
247
- },
248
- {
249
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
250
- },
251
- {
252
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
253
- },
254
- {
255
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
256
- },
257
- {
258
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
259
- },
260
- {
261
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
262
- },
263
- {
264
- get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
265
- },
266
- {
267
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
268
- },
269
- {
270
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
271
- },
272
- {
273
- get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
274
- },
275
- {
276
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}',
277
- },
278
- { get: '/v1/{name=projects/*/locations/*/operations/*}' },
279
- { get: '/v1/{name=projects/*/operations/*}' },
280
- ],
281
- },
282
- {
283
- selector: 'google.longrunning.Operations.ListOperations',
284
- get: '/v1/{name=projects/*}/operations',
285
- additional_bindings: [
286
- {
287
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
288
- },
289
- {
290
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
291
- },
292
- {
293
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
294
- },
295
- {
296
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
297
- },
298
- {
299
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
300
- },
301
- {
302
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
303
- },
304
- {
305
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
306
- },
307
- {
308
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
309
- },
310
- { get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
311
- {
312
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
313
- },
314
- {
315
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
316
- },
317
- { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
318
- {
319
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
320
- },
321
- { get: '/v1/{name=projects/*/locations/*}/operations' },
322
- { get: '/v1/{name=projects/*}/operations' },
323
- ],
324
- },
325
- ];
216
+ 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/*/collections/*/engines/*/operations/*}:cancel', body: '*', }, { post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
217
+ }, { 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/*}', }],
218
+ }, { 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', }],
219
+ }];
326
220
  }
327
- this.operationsClient = this._gaxModule
328
- .lro(lroOptions)
329
- .operationsClient(opts);
221
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
330
222
  const provisionProjectResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.Project');
331
223
  const provisionProjectMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ProvisionProjectMetadata');
332
224
  this.descriptors.longrunning = {
333
- provisionProject: new this._gaxModule.LongrunningDescriptor(this.operationsClient, provisionProjectResponse.decode.bind(provisionProjectResponse), provisionProjectMetadata.decode.bind(provisionProjectMetadata)),
225
+ provisionProject: new this._gaxModule.LongrunningDescriptor(this.operationsClient, provisionProjectResponse.decode.bind(provisionProjectResponse), provisionProjectMetadata.decode.bind(provisionProjectMetadata))
334
226
  };
335
227
  // Put together the default options sent with requests.
336
228
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.ProjectService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -359,10 +251,10 @@ class ProjectServiceClient {
359
251
  }
360
252
  // Put together the "service stub" for
361
253
  // google.cloud.discoveryengine.v1.ProjectService.
362
- this.projectServiceStub = this._gaxGrpc.createStub(this._opts.fallback
363
- ? this._protos.lookupService('google.cloud.discoveryengine.v1.ProjectService')
364
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
365
- this._protos.google.cloud.discoveryengine.v1.ProjectService, this._opts, this._providedCustomServicePath);
254
+ this.projectServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
255
+ this._protos.lookupService('google.cloud.discoveryengine.v1.ProjectService') :
256
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
257
+ this._protos.google.cloud.discoveryengine.v1.ProjectService, this._opts, this._providedCustomServicePath);
366
258
  // Iterate over each of the methods that the service provides
367
259
  // and create an API call method for each.
368
260
  const projectServiceStubMethods = ['provisionProject'];
@@ -376,7 +268,8 @@ class ProjectServiceClient {
376
268
  }, (err) => () => {
377
269
  throw err;
378
270
  });
379
- const descriptor = this.descriptors.longrunning[methodName] || undefined;
271
+ const descriptor = this.descriptors.longrunning[methodName] ||
272
+ undefined;
380
273
  const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
381
274
  this.innerApiCalls[methodName] = apiCall;
382
275
  }
@@ -388,8 +281,7 @@ class ProjectServiceClient {
388
281
  * @returns {string} The DNS address for this service.
389
282
  */
390
283
  static get servicePath() {
391
- if (typeof process === 'object' &&
392
- typeof process.emitWarning === 'function') {
284
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
393
285
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
394
286
  }
395
287
  return 'discoveryengine.googleapis.com';
@@ -400,8 +292,7 @@ class ProjectServiceClient {
400
292
  * @returns {string} The DNS address for this service.
401
293
  */
402
294
  static get apiEndpoint() {
403
- if (typeof process === 'object' &&
404
- typeof process.emitWarning === 'function') {
295
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
405
296
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
406
297
  }
407
298
  return 'discoveryengine.googleapis.com';
@@ -429,7 +320,9 @@ class ProjectServiceClient {
429
320
  * @returns {string[]} List of default scopes.
430
321
  */
431
322
  static get scopes() {
432
- return ['https://www.googleapis.com/auth/cloud-platform'];
323
+ return [
324
+ 'https://www.googleapis.com/auth/cloud-platform'
325
+ ];
433
326
  }
434
327
  /**
435
328
  * Return the project ID used by this class.
@@ -455,13 +348,10 @@ class ProjectServiceClient {
455
348
  options = options || {};
456
349
  options.otherArgs = options.otherArgs || {};
457
350
  options.otherArgs.headers = options.otherArgs.headers || {};
458
- options.otherArgs.headers['x-goog-request-params'] =
459
- this._gaxModule.routingHeader.fromParams({
460
- name: request.name ?? '',
461
- });
462
- this.initialize().catch(err => {
463
- throw err;
351
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
352
+ 'name': request.name ?? '',
464
353
  });
354
+ this.initialize().catch(err => { throw err; });
465
355
  const wrappedCallback = callback
466
356
  ? (error, response, rawResponse, _) => {
467
357
  this._log.info('provisionProject response %j', rawResponse);
@@ -469,8 +359,7 @@ class ProjectServiceClient {
469
359
  }
470
360
  : undefined;
471
361
  this._log.info('provisionProject request %j', request);
472
- return this.innerApiCalls
473
- .provisionProject(request, options, wrappedCallback)
362
+ return this.innerApiCalls.provisionProject(request, options, wrappedCallback)
474
363
  ?.then(([response, rawResponse, _]) => {
475
364
  this._log.info('provisionProject response %j', rawResponse);
476
365
  return [response, rawResponse, _];
@@ -495,90 +384,90 @@ class ProjectServiceClient {
495
384
  return decodeOperation;
496
385
  }
497
386
  /**
498
- * Gets information about a location.
499
- *
500
- * @param {Object} request
501
- * The request object that will be sent.
502
- * @param {string} request.name
503
- * Resource name for the location.
504
- * @param {object} [options]
505
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
506
- * @returns {Promise} - The promise which resolves to an array.
507
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
508
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
509
- * for more details and examples.
510
- * @example
511
- * ```
512
- * const [response] = await client.getLocation(request);
513
- * ```
514
- */
387
+ * Gets information about a location.
388
+ *
389
+ * @param {Object} request
390
+ * The request object that will be sent.
391
+ * @param {string} request.name
392
+ * Resource name for the location.
393
+ * @param {object} [options]
394
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
395
+ * @returns {Promise} - The promise which resolves to an array.
396
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
397
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
398
+ * for more details and examples.
399
+ * @example
400
+ * ```
401
+ * const [response] = await client.getLocation(request);
402
+ * ```
403
+ */
515
404
  getLocation(request, options, callback) {
516
405
  return this.locationsClient.getLocation(request, options, callback);
517
406
  }
518
407
  /**
519
- * Lists information about the supported locations for this service. Returns an iterable object.
520
- *
521
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
522
- * @param {Object} request
523
- * The request object that will be sent.
524
- * @param {string} request.name
525
- * The resource that owns the locations collection, if applicable.
526
- * @param {string} request.filter
527
- * The standard list filter.
528
- * @param {number} request.pageSize
529
- * The standard list page size.
530
- * @param {string} request.pageToken
531
- * The standard list page token.
532
- * @param {object} [options]
533
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
534
- * @returns {Object}
535
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
536
- * When you iterate the returned iterable, each element will be an object representing
537
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
538
- * so you can stop the iteration when you don't need more results.
539
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
540
- * for more details and examples.
541
- * @example
542
- * ```
543
- * const iterable = client.listLocationsAsync(request);
544
- * for await (const response of iterable) {
545
- * // process response
546
- * }
547
- * ```
548
- */
408
+ * Lists information about the supported locations for this service. Returns an iterable object.
409
+ *
410
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
411
+ * @param {Object} request
412
+ * The request object that will be sent.
413
+ * @param {string} request.name
414
+ * The resource that owns the locations collection, if applicable.
415
+ * @param {string} request.filter
416
+ * The standard list filter.
417
+ * @param {number} request.pageSize
418
+ * The standard list page size.
419
+ * @param {string} request.pageToken
420
+ * The standard list page token.
421
+ * @param {object} [options]
422
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
423
+ * @returns {Object}
424
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
425
+ * When you iterate the returned iterable, each element will be an object representing
426
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
427
+ * so you can stop the iteration when you don't need more results.
428
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
429
+ * for more details and examples.
430
+ * @example
431
+ * ```
432
+ * const iterable = client.listLocationsAsync(request);
433
+ * for await (const response of iterable) {
434
+ * // process response
435
+ * }
436
+ * ```
437
+ */
549
438
  listLocationsAsync(request, options) {
550
439
  return this.locationsClient.listLocationsAsync(request, options);
551
440
  }
552
441
  /**
553
- * Gets the latest state of a long-running operation. Clients can use this
554
- * method to poll the operation result at intervals as recommended by the API
555
- * service.
556
- *
557
- * @param {Object} request - The request object that will be sent.
558
- * @param {string} request.name - The name of the operation resource.
559
- * @param {Object=} options
560
- * Optional parameters. You can override the default settings for this call,
561
- * e.g, timeout, retries, paginations, etc. See {@link
562
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
563
- * for the details.
564
- * @param {function(?Error, ?Object)=} callback
565
- * The function which will be called with the result of the API call.
566
- *
567
- * The second parameter to the callback is an object representing
568
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
569
- * @return {Promise} - The promise which resolves to an array.
570
- * The first element of the array is an object representing
571
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
572
- * The promise has a method named "cancel" which cancels the ongoing API call.
573
- *
574
- * @example
575
- * ```
576
- * const client = longrunning.operationsClient();
577
- * const name = '';
578
- * const [response] = await client.getOperation({name});
579
- * // doThingsWith(response)
580
- * ```
581
- */
442
+ * Gets the latest state of a long-running operation. Clients can use this
443
+ * method to poll the operation result at intervals as recommended by the API
444
+ * service.
445
+ *
446
+ * @param {Object} request - The request object that will be sent.
447
+ * @param {string} request.name - The name of the operation resource.
448
+ * @param {Object=} options
449
+ * Optional parameters. You can override the default settings for this call,
450
+ * e.g, timeout, retries, paginations, etc. See {@link
451
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
452
+ * for the details.
453
+ * @param {function(?Error, ?Object)=} callback
454
+ * The function which will be called with the result of the API call.
455
+ *
456
+ * The second parameter to the callback is an object representing
457
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
458
+ * @return {Promise} - The promise which resolves to an array.
459
+ * The first element of the array is an object representing
460
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
461
+ * The promise has a method named "cancel" which cancels the ongoing API call.
462
+ *
463
+ * @example
464
+ * ```
465
+ * const client = longrunning.operationsClient();
466
+ * const name = '';
467
+ * const [response] = await client.getOperation({name});
468
+ * // doThingsWith(response)
469
+ * ```
470
+ */
582
471
  getOperation(request, optionsOrCallback, callback) {
583
472
  let options;
584
473
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -789,6 +678,51 @@ class ProjectServiceClient {
789
678
  matchEngineFromEngineName(engineName) {
790
679
  return this.pathTemplates.enginePathTemplate.match(engineName).engine;
791
680
  }
681
+ /**
682
+ * Return a fully-qualified identityMappingStore resource name string.
683
+ *
684
+ * @param {string} project
685
+ * @param {string} location
686
+ * @param {string} identity_mapping_store
687
+ * @returns {string} Resource name string.
688
+ */
689
+ identityMappingStorePath(project, location, identityMappingStore) {
690
+ return this.pathTemplates.identityMappingStorePathTemplate.render({
691
+ project: project,
692
+ location: location,
693
+ identity_mapping_store: identityMappingStore,
694
+ });
695
+ }
696
+ /**
697
+ * Parse the project from IdentityMappingStore resource.
698
+ *
699
+ * @param {string} identityMappingStoreName
700
+ * A fully-qualified path representing IdentityMappingStore resource.
701
+ * @returns {string} A string representing the project.
702
+ */
703
+ matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
704
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
705
+ }
706
+ /**
707
+ * Parse the location from IdentityMappingStore resource.
708
+ *
709
+ * @param {string} identityMappingStoreName
710
+ * A fully-qualified path representing IdentityMappingStore resource.
711
+ * @returns {string} A string representing the location.
712
+ */
713
+ matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
714
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
715
+ }
716
+ /**
717
+ * Parse the identity_mapping_store from IdentityMappingStore resource.
718
+ *
719
+ * @param {string} identityMappingStoreName
720
+ * A fully-qualified path representing IdentityMappingStore resource.
721
+ * @returns {string} A string representing the identity_mapping_store.
722
+ */
723
+ matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
724
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
725
+ }
792
726
  /**
793
727
  * Return a fully-qualified project resource name string.
794
728
  *
@@ -810,6 +744,84 @@ class ProjectServiceClient {
810
744
  matchProjectFromProjectName(projectName) {
811
745
  return this.pathTemplates.projectPathTemplate.match(projectName).project;
812
746
  }
747
+ /**
748
+ * Return a fully-qualified projectLocationCmekConfig resource name string.
749
+ *
750
+ * @param {string} project
751
+ * @param {string} location
752
+ * @returns {string} Resource name string.
753
+ */
754
+ projectLocationCmekConfigPath(project, location) {
755
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
756
+ project: project,
757
+ location: location,
758
+ });
759
+ }
760
+ /**
761
+ * Parse the project from ProjectLocationCmekConfig resource.
762
+ *
763
+ * @param {string} projectLocationCmekConfigName
764
+ * A fully-qualified path representing project_location_cmekConfig resource.
765
+ * @returns {string} A string representing the project.
766
+ */
767
+ matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
768
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
769
+ }
770
+ /**
771
+ * Parse the location from ProjectLocationCmekConfig resource.
772
+ *
773
+ * @param {string} projectLocationCmekConfigName
774
+ * A fully-qualified path representing project_location_cmekConfig resource.
775
+ * @returns {string} A string representing the location.
776
+ */
777
+ matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
778
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
779
+ }
780
+ /**
781
+ * Return a fully-qualified projectLocationCmekConfigs resource name string.
782
+ *
783
+ * @param {string} project
784
+ * @param {string} location
785
+ * @param {string} cmek_config
786
+ * @returns {string} Resource name string.
787
+ */
788
+ projectLocationCmekConfigsPath(project, location, cmekConfig) {
789
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
790
+ project: project,
791
+ location: location,
792
+ cmek_config: cmekConfig,
793
+ });
794
+ }
795
+ /**
796
+ * Parse the project from ProjectLocationCmekConfigs resource.
797
+ *
798
+ * @param {string} projectLocationCmekConfigsName
799
+ * A fully-qualified path representing project_location_cmekConfigs resource.
800
+ * @returns {string} A string representing the project.
801
+ */
802
+ matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
803
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
804
+ }
805
+ /**
806
+ * Parse the location from ProjectLocationCmekConfigs resource.
807
+ *
808
+ * @param {string} projectLocationCmekConfigsName
809
+ * A fully-qualified path representing project_location_cmekConfigs resource.
810
+ * @returns {string} A string representing the location.
811
+ */
812
+ matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
813
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
814
+ }
815
+ /**
816
+ * Parse the cmek_config from ProjectLocationCmekConfigs resource.
817
+ *
818
+ * @param {string} projectLocationCmekConfigsName
819
+ * A fully-qualified path representing project_location_cmekConfigs resource.
820
+ * @returns {string} A string representing the cmek_config.
821
+ */
822
+ matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
823
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
824
+ }
813
825
  /**
814
826
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
815
827
  *
@@ -2967,8 +2979,8 @@ class ProjectServiceClient {
2967
2979
  this._log.info('ending gRPC channel');
2968
2980
  this._terminated = true;
2969
2981
  stub.close();
2970
- this.locationsClient.close();
2971
- this.operationsClient.close();
2982
+ this.locationsClient.close().catch(err => { throw err; });
2983
+ void this.operationsClient.close();
2972
2984
  });
2973
2985
  }
2974
2986
  return Promise.resolve();
@@ -1,6 +1,7 @@
1
1
  [
2
2
  "../../protos/google/cloud/discoveryengine/v1/answer.proto",
3
3
  "../../protos/google/cloud/discoveryengine/v1/chunk.proto",
4
+ "../../protos/google/cloud/discoveryengine/v1/cmek_config_service.proto",
4
5
  "../../protos/google/cloud/discoveryengine/v1/common.proto",
5
6
  "../../protos/google/cloud/discoveryengine/v1/completion.proto",
6
7
  "../../protos/google/cloud/discoveryengine/v1/completion_service.proto",
@@ -18,6 +19,8 @@
18
19
  "../../protos/google/cloud/discoveryengine/v1/engine_service.proto",
19
20
  "../../protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto",
20
21
  "../../protos/google/cloud/discoveryengine/v1/grounding.proto",
22
+ "../../protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto",
23
+ "../../protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto",
21
24
  "../../protos/google/cloud/discoveryengine/v1/import_config.proto",
22
25
  "../../protos/google/cloud/discoveryengine/v1/project.proto",
23
26
  "../../protos/google/cloud/discoveryengine/v1/project_service.proto",
@@ -35,5 +38,7 @@
35
38
  "../../protos/google/cloud/discoveryengine/v1/site_search_engine.proto",
36
39
  "../../protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto",
37
40
  "../../protos/google/cloud/discoveryengine/v1/user_event.proto",
38
- "../../protos/google/cloud/discoveryengine/v1/user_event_service.proto"
41
+ "../../protos/google/cloud/discoveryengine/v1/user_event_service.proto",
42
+ "../../protos/google/cloud/discoveryengine/v1/user_license.proto",
43
+ "../../protos/google/cloud/discoveryengine/v1/user_license_service.proto"
39
44
  ]