@google-cloud/discoveryengine 2.2.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 (129) 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 +5387 -265
  22. package/build/protos/protos.js +77991 -63105
  23. package/build/protos/protos.json +1512 -91
  24. package/build/src/index.d.ts +10 -1
  25. package/build/src/index.js +8 -2
  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 +90 -0
  31. package/build/src/v1/completion_service_client.js +134 -2
  32. package/build/src/v1/completion_service_proto_list.json +6 -1
  33. package/build/src/v1/control_service_client.d.ts +90 -0
  34. package/build/src/v1/control_service_client.js +150 -0
  35. package/build/src/v1/control_service_proto_list.json +6 -1
  36. package/build/src/v1/conversational_search_service_client.d.ts +90 -0
  37. package/build/src/v1/conversational_search_service_client.js +192 -0
  38. package/build/src/v1/conversational_search_service_proto_list.json +6 -1
  39. package/build/src/v1/data_store_service_client.d.ts +96 -0
  40. package/build/src/v1/data_store_service_client.js +140 -2
  41. package/build/src/v1/data_store_service_proto_list.json +6 -1
  42. package/build/src/v1/document_service_client.d.ts +90 -0
  43. package/build/src/v1/document_service_client.js +158 -2
  44. package/build/src/v1/document_service_proto_list.json +6 -1
  45. package/build/src/v1/engine_service_client.d.ts +90 -0
  46. package/build/src/v1/engine_service_client.js +140 -2
  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 +90 -0
  50. package/build/src/v1/grounded_generation_service_client.js +138 -0
  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 +90 -0
  59. package/build/src/v1/project_service_client.js +128 -2
  60. package/build/src/v1/project_service_proto_list.json +6 -1
  61. package/build/src/v1/rank_service_client.d.ts +90 -0
  62. package/build/src/v1/rank_service_client.js +132 -0
  63. package/build/src/v1/rank_service_proto_list.json +6 -1
  64. package/build/src/v1/recommendation_service_client.d.ts +90 -0
  65. package/build/src/v1/recommendation_service_client.js +132 -0
  66. package/build/src/v1/recommendation_service_proto_list.json +6 -1
  67. package/build/src/v1/schema_service_client.d.ts +90 -0
  68. package/build/src/v1/schema_service_client.js +134 -2
  69. package/build/src/v1/schema_service_proto_list.json +6 -1
  70. package/build/src/v1/search_service_client.d.ts +90 -0
  71. package/build/src/v1/search_service_client.js +126 -0
  72. package/build/src/v1/search_service_proto_list.json +6 -1
  73. package/build/src/v1/search_tuning_service_client.d.ts +90 -0
  74. package/build/src/v1/search_tuning_service_client.js +134 -2
  75. package/build/src/v1/search_tuning_service_proto_list.json +6 -1
  76. package/build/src/v1/serving_config_service_client.d.ts +90 -0
  77. package/build/src/v1/serving_config_service_client.js +132 -0
  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 +90 -0
  80. package/build/src/v1/site_search_engine_service_client.js +146 -2
  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 +90 -0
  83. package/build/src/v1/user_event_service_client.js +140 -2
  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.js +12 -0
  90. package/build/src/v1alpha/chunk_service_client.js +6 -0
  91. package/build/src/v1alpha/completion_service_client.js +7 -1
  92. package/build/src/v1alpha/control_service_client.js +24 -0
  93. package/build/src/v1alpha/conversational_search_service_client.js +66 -0
  94. package/build/src/v1alpha/data_store_service_client.js +25 -1
  95. package/build/src/v1alpha/document_service_client.js +37 -1
  96. package/build/src/v1alpha/engine_service_client.js +25 -1
  97. package/build/src/v1alpha/estimate_billing_service_client.js +1 -1
  98. package/build/src/v1alpha/evaluation_service_client.js +7 -1
  99. package/build/src/v1alpha/grounded_generation_service_client.js +6 -0
  100. package/build/src/v1alpha/project_service_client.js +13 -1
  101. package/build/src/v1alpha/rank_service_client.js +6 -0
  102. package/build/src/v1alpha/recommendation_service_client.js +6 -0
  103. package/build/src/v1alpha/sample_query_service_client.js +25 -1
  104. package/build/src/v1alpha/sample_query_set_service_client.js +24 -0
  105. package/build/src/v1alpha/schema_service_client.js +7 -1
  106. package/build/src/v1alpha/search_tuning_service_client.js +7 -1
  107. package/build/src/v1alpha/serving_config_service_client.js +12 -0
  108. package/build/src/v1alpha/site_search_engine_service_client.js +19 -1
  109. package/build/src/v1alpha/user_event_service_client.js +13 -1
  110. package/build/src/v1beta/completion_service_client.js +13 -1
  111. package/build/src/v1beta/control_service_client.js +24 -0
  112. package/build/src/v1beta/conversational_search_service_client.js +66 -0
  113. package/build/src/v1beta/data_store_service_client.js +13 -1
  114. package/build/src/v1beta/document_service_client.js +31 -1
  115. package/build/src/v1beta/engine_service_client.js +25 -1
  116. package/build/src/v1beta/evaluation_service_client.js +7 -1
  117. package/build/src/v1beta/grounded_generation_service_client.js +12 -0
  118. package/build/src/v1beta/project_service_client.js +1 -1
  119. package/build/src/v1beta/rank_service_client.js +6 -0
  120. package/build/src/v1beta/recommendation_service_client.js +6 -0
  121. package/build/src/v1beta/sample_query_service_client.js +25 -1
  122. package/build/src/v1beta/sample_query_set_service_client.js +24 -0
  123. package/build/src/v1beta/schema_service_client.js +7 -1
  124. package/build/src/v1beta/search_tuning_service_client.js +7 -1
  125. package/build/src/v1beta/serving_config_service_client.js +12 -0
  126. package/build/src/v1beta/site_search_engine_service_client.js +19 -1
  127. package/build/src/v1beta/user_event_service_client.js +13 -1
  128. package/package.json +7 -7
  129. package/CHANGELOG.md +0 -274
@@ -208,7 +208,7 @@ class SampleQueryServiceClient {
208
208
  this.descriptors.page = {
209
209
  listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries')
210
210
  };
211
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
211
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
212
212
  // This API contains "long-running operations", which return a
213
213
  // an Operation object that allows for tracking of the operation,
214
214
  // rather than holding a request open.
@@ -369,6 +369,12 @@ class SampleQueryServiceClient {
369
369
  ?.then(([response, options, rawResponse]) => {
370
370
  this._log.info('getSampleQuery response %j', response);
371
371
  return [response, options, rawResponse];
372
+ }).catch((error) => {
373
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
374
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
375
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
376
+ }
377
+ throw error;
372
378
  });
373
379
  }
374
380
  createSampleQuery(request, optionsOrCallback, callback) {
@@ -399,6 +405,12 @@ class SampleQueryServiceClient {
399
405
  ?.then(([response, options, rawResponse]) => {
400
406
  this._log.info('createSampleQuery response %j', response);
401
407
  return [response, options, rawResponse];
408
+ }).catch((error) => {
409
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
410
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
411
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
412
+ }
413
+ throw error;
402
414
  });
403
415
  }
404
416
  updateSampleQuery(request, optionsOrCallback, callback) {
@@ -429,6 +441,12 @@ class SampleQueryServiceClient {
429
441
  ?.then(([response, options, rawResponse]) => {
430
442
  this._log.info('updateSampleQuery response %j', response);
431
443
  return [response, options, rawResponse];
444
+ }).catch((error) => {
445
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
446
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
447
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
448
+ }
449
+ throw error;
432
450
  });
433
451
  }
434
452
  deleteSampleQuery(request, optionsOrCallback, callback) {
@@ -459,6 +477,12 @@ class SampleQueryServiceClient {
459
477
  ?.then(([response, options, rawResponse]) => {
460
478
  this._log.info('deleteSampleQuery response %j', response);
461
479
  return [response, options, rawResponse];
480
+ }).catch((error) => {
481
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
482
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
483
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
484
+ }
485
+ throw error;
462
486
  });
463
487
  }
464
488
  importSampleQueries(request, optionsOrCallback, callback) {
@@ -347,6 +347,12 @@ class SampleQuerySetServiceClient {
347
347
  ?.then(([response, options, rawResponse]) => {
348
348
  this._log.info('getSampleQuerySet response %j', response);
349
349
  return [response, options, rawResponse];
350
+ }).catch((error) => {
351
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
352
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
353
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
354
+ }
355
+ throw error;
350
356
  });
351
357
  }
352
358
  createSampleQuerySet(request, optionsOrCallback, callback) {
@@ -377,6 +383,12 @@ class SampleQuerySetServiceClient {
377
383
  ?.then(([response, options, rawResponse]) => {
378
384
  this._log.info('createSampleQuerySet response %j', response);
379
385
  return [response, options, rawResponse];
386
+ }).catch((error) => {
387
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
388
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
389
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
390
+ }
391
+ throw error;
380
392
  });
381
393
  }
382
394
  updateSampleQuerySet(request, optionsOrCallback, callback) {
@@ -407,6 +419,12 @@ class SampleQuerySetServiceClient {
407
419
  ?.then(([response, options, rawResponse]) => {
408
420
  this._log.info('updateSampleQuerySet response %j', response);
409
421
  return [response, options, rawResponse];
422
+ }).catch((error) => {
423
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
424
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
425
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
426
+ }
427
+ throw error;
410
428
  });
411
429
  }
412
430
  deleteSampleQuerySet(request, optionsOrCallback, callback) {
@@ -437,6 +455,12 @@ class SampleQuerySetServiceClient {
437
455
  ?.then(([response, options, rawResponse]) => {
438
456
  this._log.info('deleteSampleQuerySet response %j', response);
439
457
  return [response, options, rawResponse];
458
+ }).catch((error) => {
459
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
460
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
461
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
462
+ }
463
+ throw error;
440
464
  });
441
465
  }
442
466
  listSampleQuerySets(request, optionsOrCallback, callback) {
@@ -207,7 +207,7 @@ class SchemaServiceClient {
207
207
  this.descriptors.page = {
208
208
  listSchemas: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'schemas')
209
209
  };
210
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
210
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
211
211
  // This API contains "long-running operations", which return a
212
212
  // an Operation object that allows for tracking of the operation,
213
213
  // rather than holding a request open.
@@ -374,6 +374,12 @@ class SchemaServiceClient {
374
374
  ?.then(([response, options, rawResponse]) => {
375
375
  this._log.info('getSchema response %j', response);
376
376
  return [response, options, rawResponse];
377
+ }).catch((error) => {
378
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
379
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
380
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
381
+ }
382
+ throw error;
377
383
  });
378
384
  }
379
385
  createSchema(request, optionsOrCallback, callback) {
@@ -201,7 +201,7 @@ class SearchTuningServiceClient {
201
201
  sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
202
202
  sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
203
203
  };
204
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
204
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
205
205
  // This API contains "long-running operations", which return a
206
206
  // an Operation object that allows for tracking of the operation,
207
207
  // rather than holding a request open.
@@ -361,6 +361,12 @@ class SearchTuningServiceClient {
361
361
  ?.then(([response, options, rawResponse]) => {
362
362
  this._log.info('listCustomModels response %j', response);
363
363
  return [response, options, rawResponse];
364
+ }).catch((error) => {
365
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
366
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
367
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
368
+ }
369
+ throw error;
364
370
  });
365
371
  }
366
372
  trainCustomModel(request, optionsOrCallback, callback) {
@@ -347,6 +347,12 @@ class ServingConfigServiceClient {
347
347
  ?.then(([response, options, rawResponse]) => {
348
348
  this._log.info('updateServingConfig response %j', response);
349
349
  return [response, options, rawResponse];
350
+ }).catch((error) => {
351
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
352
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
353
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
354
+ }
355
+ throw error;
350
356
  });
351
357
  }
352
358
  getServingConfig(request, optionsOrCallback, callback) {
@@ -377,6 +383,12 @@ class ServingConfigServiceClient {
377
383
  ?.then(([response, options, rawResponse]) => {
378
384
  this._log.info('getServingConfig response %j', response);
379
385
  return [response, options, rawResponse];
386
+ }).catch((error) => {
387
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
388
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
389
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
390
+ }
391
+ throw error;
380
392
  });
381
393
  }
382
394
  listServingConfigs(request, optionsOrCallback, callback) {
@@ -208,7 +208,7 @@ class SiteSearchEngineServiceClient {
208
208
  listTargetSites: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites'),
209
209
  fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites')
210
210
  };
211
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
211
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
212
212
  // This API contains "long-running operations", which return a
213
213
  // an Operation object that allows for tracking of the operation,
214
214
  // rather than holding a request open.
@@ -393,6 +393,12 @@ class SiteSearchEngineServiceClient {
393
393
  ?.then(([response, options, rawResponse]) => {
394
394
  this._log.info('getSiteSearchEngine response %j', response);
395
395
  return [response, options, rawResponse];
396
+ }).catch((error) => {
397
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
398
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
399
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
400
+ }
401
+ throw error;
396
402
  });
397
403
  }
398
404
  getTargetSite(request, optionsOrCallback, callback) {
@@ -423,6 +429,12 @@ class SiteSearchEngineServiceClient {
423
429
  ?.then(([response, options, rawResponse]) => {
424
430
  this._log.info('getTargetSite response %j', response);
425
431
  return [response, options, rawResponse];
432
+ }).catch((error) => {
433
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
434
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
435
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
436
+ }
437
+ throw error;
426
438
  });
427
439
  }
428
440
  getUriPatternDocumentData(request, optionsOrCallback, callback) {
@@ -453,6 +465,12 @@ class SiteSearchEngineServiceClient {
453
465
  ?.then(([response, options, rawResponse]) => {
454
466
  this._log.info('getUriPatternDocumentData response %j', response);
455
467
  return [response, options, rawResponse];
468
+ }).catch((error) => {
469
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
470
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
471
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
472
+ }
473
+ throw error;
456
474
  });
457
475
  }
458
476
  createTargetSite(request, optionsOrCallback, callback) {
@@ -201,7 +201,7 @@ class UserEventServiceClient {
201
201
  sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
202
202
  sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
203
203
  };
204
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
204
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
205
205
  // This API contains "long-running operations", which return a
206
206
  // an Operation object that allows for tracking of the operation,
207
207
  // rather than holding a request open.
@@ -364,6 +364,12 @@ class UserEventServiceClient {
364
364
  ?.then(([response, options, rawResponse]) => {
365
365
  this._log.info('writeUserEvent response %j', response);
366
366
  return [response, options, rawResponse];
367
+ }).catch((error) => {
368
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
369
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
370
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
371
+ }
372
+ throw error;
367
373
  });
368
374
  }
369
375
  collectUserEvent(request, optionsOrCallback, callback) {
@@ -394,6 +400,12 @@ class UserEventServiceClient {
394
400
  ?.then(([response, options, rawResponse]) => {
395
401
  this._log.info('collectUserEvent response %j', response);
396
402
  return [response, options, rawResponse];
403
+ }).catch((error) => {
404
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
405
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
406
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
407
+ }
408
+ throw error;
397
409
  });
398
410
  }
399
411
  purgeUserEvents(request, optionsOrCallback, callback) {
@@ -206,7 +206,7 @@ class CompletionServiceClient {
206
206
  sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
207
207
  sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
208
208
  };
209
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
209
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
210
210
  // This API contains "long-running operations", which return a
211
211
  // an Operation object that allows for tracking of the operation,
212
212
  // rather than holding a request open.
@@ -375,6 +375,12 @@ class CompletionServiceClient {
375
375
  ?.then(([response, options, rawResponse]) => {
376
376
  this._log.info('completeQuery response %j', response);
377
377
  return [response, options, rawResponse];
378
+ }).catch((error) => {
379
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
380
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
381
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
382
+ }
383
+ throw error;
378
384
  });
379
385
  }
380
386
  advancedCompleteQuery(request, optionsOrCallback, callback) {
@@ -405,6 +411,12 @@ class CompletionServiceClient {
405
411
  ?.then(([response, options, rawResponse]) => {
406
412
  this._log.info('advancedCompleteQuery response %j', response);
407
413
  return [response, options, rawResponse];
414
+ }).catch((error) => {
415
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
416
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
417
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
418
+ }
419
+ throw error;
408
420
  });
409
421
  }
410
422
  importSuggestionDenyListEntries(request, optionsOrCallback, callback) {
@@ -351,6 +351,12 @@ class ControlServiceClient {
351
351
  ?.then(([response, options, rawResponse]) => {
352
352
  this._log.info('createControl response %j', response);
353
353
  return [response, options, rawResponse];
354
+ }).catch((error) => {
355
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
356
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
357
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
358
+ }
359
+ throw error;
354
360
  });
355
361
  }
356
362
  deleteControl(request, optionsOrCallback, callback) {
@@ -381,6 +387,12 @@ class ControlServiceClient {
381
387
  ?.then(([response, options, rawResponse]) => {
382
388
  this._log.info('deleteControl response %j', response);
383
389
  return [response, options, rawResponse];
390
+ }).catch((error) => {
391
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
392
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
393
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
394
+ }
395
+ throw error;
384
396
  });
385
397
  }
386
398
  updateControl(request, optionsOrCallback, callback) {
@@ -411,6 +423,12 @@ class ControlServiceClient {
411
423
  ?.then(([response, options, rawResponse]) => {
412
424
  this._log.info('updateControl response %j', response);
413
425
  return [response, options, rawResponse];
426
+ }).catch((error) => {
427
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
428
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
429
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
430
+ }
431
+ throw error;
414
432
  });
415
433
  }
416
434
  getControl(request, optionsOrCallback, callback) {
@@ -441,6 +459,12 @@ class ControlServiceClient {
441
459
  ?.then(([response, options, rawResponse]) => {
442
460
  this._log.info('getControl response %j', response);
443
461
  return [response, options, rawResponse];
462
+ }).catch((error) => {
463
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
464
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
465
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
466
+ }
467
+ throw error;
444
468
  });
445
469
  }
446
470
  listControls(request, optionsOrCallback, callback) {
@@ -348,6 +348,12 @@ class ConversationalSearchServiceClient {
348
348
  ?.then(([response, options, rawResponse]) => {
349
349
  this._log.info('converseConversation response %j', response);
350
350
  return [response, options, rawResponse];
351
+ }).catch((error) => {
352
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
353
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
354
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
355
+ }
356
+ throw error;
351
357
  });
352
358
  }
353
359
  createConversation(request, optionsOrCallback, callback) {
@@ -378,6 +384,12 @@ class ConversationalSearchServiceClient {
378
384
  ?.then(([response, options, rawResponse]) => {
379
385
  this._log.info('createConversation response %j', response);
380
386
  return [response, options, rawResponse];
387
+ }).catch((error) => {
388
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
389
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
390
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
391
+ }
392
+ throw error;
381
393
  });
382
394
  }
383
395
  deleteConversation(request, optionsOrCallback, callback) {
@@ -408,6 +420,12 @@ class ConversationalSearchServiceClient {
408
420
  ?.then(([response, options, rawResponse]) => {
409
421
  this._log.info('deleteConversation response %j', response);
410
422
  return [response, options, rawResponse];
423
+ }).catch((error) => {
424
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
425
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
426
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
427
+ }
428
+ throw error;
411
429
  });
412
430
  }
413
431
  updateConversation(request, optionsOrCallback, callback) {
@@ -438,6 +456,12 @@ class ConversationalSearchServiceClient {
438
456
  ?.then(([response, options, rawResponse]) => {
439
457
  this._log.info('updateConversation response %j', response);
440
458
  return [response, options, rawResponse];
459
+ }).catch((error) => {
460
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
461
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
462
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
463
+ }
464
+ throw error;
441
465
  });
442
466
  }
443
467
  getConversation(request, optionsOrCallback, callback) {
@@ -468,6 +492,12 @@ class ConversationalSearchServiceClient {
468
492
  ?.then(([response, options, rawResponse]) => {
469
493
  this._log.info('getConversation response %j', response);
470
494
  return [response, options, rawResponse];
495
+ }).catch((error) => {
496
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
497
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
498
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
499
+ }
500
+ throw error;
471
501
  });
472
502
  }
473
503
  answerQuery(request, optionsOrCallback, callback) {
@@ -498,6 +528,12 @@ class ConversationalSearchServiceClient {
498
528
  ?.then(([response, options, rawResponse]) => {
499
529
  this._log.info('answerQuery response %j', response);
500
530
  return [response, options, rawResponse];
531
+ }).catch((error) => {
532
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
533
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
534
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
535
+ }
536
+ throw error;
501
537
  });
502
538
  }
503
539
  getAnswer(request, optionsOrCallback, callback) {
@@ -528,6 +564,12 @@ class ConversationalSearchServiceClient {
528
564
  ?.then(([response, options, rawResponse]) => {
529
565
  this._log.info('getAnswer response %j', response);
530
566
  return [response, options, rawResponse];
567
+ }).catch((error) => {
568
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
569
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
570
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
571
+ }
572
+ throw error;
531
573
  });
532
574
  }
533
575
  createSession(request, optionsOrCallback, callback) {
@@ -558,6 +600,12 @@ class ConversationalSearchServiceClient {
558
600
  ?.then(([response, options, rawResponse]) => {
559
601
  this._log.info('createSession response %j', response);
560
602
  return [response, options, rawResponse];
603
+ }).catch((error) => {
604
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
605
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
606
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
607
+ }
608
+ throw error;
561
609
  });
562
610
  }
563
611
  deleteSession(request, optionsOrCallback, callback) {
@@ -588,6 +636,12 @@ class ConversationalSearchServiceClient {
588
636
  ?.then(([response, options, rawResponse]) => {
589
637
  this._log.info('deleteSession response %j', response);
590
638
  return [response, options, rawResponse];
639
+ }).catch((error) => {
640
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
641
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
642
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
643
+ }
644
+ throw error;
591
645
  });
592
646
  }
593
647
  updateSession(request, optionsOrCallback, callback) {
@@ -618,6 +672,12 @@ class ConversationalSearchServiceClient {
618
672
  ?.then(([response, options, rawResponse]) => {
619
673
  this._log.info('updateSession response %j', response);
620
674
  return [response, options, rawResponse];
675
+ }).catch((error) => {
676
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
677
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
678
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
679
+ }
680
+ throw error;
621
681
  });
622
682
  }
623
683
  getSession(request, optionsOrCallback, callback) {
@@ -648,6 +708,12 @@ class ConversationalSearchServiceClient {
648
708
  ?.then(([response, options, rawResponse]) => {
649
709
  this._log.info('getSession response %j', response);
650
710
  return [response, options, rawResponse];
711
+ }).catch((error) => {
712
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
713
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
714
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
715
+ }
716
+ throw error;
651
717
  });
652
718
  }
653
719
  listConversations(request, optionsOrCallback, callback) {
@@ -211,7 +211,7 @@ class DataStoreServiceClient {
211
211
  this.descriptors.page = {
212
212
  listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores')
213
213
  };
214
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
214
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
215
215
  // This API contains "long-running operations", which return a
216
216
  // an Operation object that allows for tracking of the operation,
217
217
  // rather than holding a request open.
@@ -375,6 +375,12 @@ class DataStoreServiceClient {
375
375
  ?.then(([response, options, rawResponse]) => {
376
376
  this._log.info('getDataStore response %j', response);
377
377
  return [response, options, rawResponse];
378
+ }).catch((error) => {
379
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
380
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
381
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
382
+ }
383
+ throw error;
378
384
  });
379
385
  }
380
386
  updateDataStore(request, optionsOrCallback, callback) {
@@ -405,6 +411,12 @@ class DataStoreServiceClient {
405
411
  ?.then(([response, options, rawResponse]) => {
406
412
  this._log.info('updateDataStore response %j', response);
407
413
  return [response, options, rawResponse];
414
+ }).catch((error) => {
415
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
416
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
417
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
418
+ }
419
+ throw error;
408
420
  });
409
421
  }
410
422
  createDataStore(request, optionsOrCallback, callback) {
@@ -213,7 +213,7 @@ class DocumentServiceClient {
213
213
  this.descriptors.page = {
214
214
  listDocuments: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'documents')
215
215
  };
216
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
216
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
217
217
  // This API contains "long-running operations", which return a
218
218
  // an Operation object that allows for tracking of the operation,
219
219
  // rather than holding a request open.
@@ -377,6 +377,12 @@ class DocumentServiceClient {
377
377
  ?.then(([response, options, rawResponse]) => {
378
378
  this._log.info('getDocument response %j', response);
379
379
  return [response, options, rawResponse];
380
+ }).catch((error) => {
381
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
382
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
383
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
384
+ }
385
+ throw error;
380
386
  });
381
387
  }
382
388
  createDocument(request, optionsOrCallback, callback) {
@@ -407,6 +413,12 @@ class DocumentServiceClient {
407
413
  ?.then(([response, options, rawResponse]) => {
408
414
  this._log.info('createDocument response %j', response);
409
415
  return [response, options, rawResponse];
416
+ }).catch((error) => {
417
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
418
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
419
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
420
+ }
421
+ throw error;
410
422
  });
411
423
  }
412
424
  updateDocument(request, optionsOrCallback, callback) {
@@ -437,6 +449,12 @@ class DocumentServiceClient {
437
449
  ?.then(([response, options, rawResponse]) => {
438
450
  this._log.info('updateDocument response %j', response);
439
451
  return [response, options, rawResponse];
452
+ }).catch((error) => {
453
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
454
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
455
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
456
+ }
457
+ throw error;
440
458
  });
441
459
  }
442
460
  deleteDocument(request, optionsOrCallback, callback) {
@@ -467,6 +485,12 @@ class DocumentServiceClient {
467
485
  ?.then(([response, options, rawResponse]) => {
468
486
  this._log.info('deleteDocument response %j', response);
469
487
  return [response, options, rawResponse];
488
+ }).catch((error) => {
489
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
490
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
491
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
492
+ }
493
+ throw error;
470
494
  });
471
495
  }
472
496
  batchGetDocumentsMetadata(request, optionsOrCallback, callback) {
@@ -497,6 +521,12 @@ class DocumentServiceClient {
497
521
  ?.then(([response, options, rawResponse]) => {
498
522
  this._log.info('batchGetDocumentsMetadata response %j', response);
499
523
  return [response, options, rawResponse];
524
+ }).catch((error) => {
525
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
526
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
527
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
528
+ }
529
+ throw error;
500
530
  });
501
531
  }
502
532
  importDocuments(request, optionsOrCallback, callback) {