@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
@@ -0,0 +1,34 @@
1
+ {
2
+ "interfaces": {
3
+ "google.cloud.discoveryengine.v1.UserLicenseService": {
4
+ "retry_codes": {
5
+ "non_idempotent": [],
6
+ "idempotent": [
7
+ "DEADLINE_EXCEEDED",
8
+ "UNAVAILABLE"
9
+ ]
10
+ },
11
+ "retry_params": {
12
+ "default": {
13
+ "initial_retry_delay_millis": 100,
14
+ "retry_delay_multiplier": 1.3,
15
+ "max_retry_delay_millis": 60000,
16
+ "initial_rpc_timeout_millis": 60000,
17
+ "rpc_timeout_multiplier": 1,
18
+ "max_rpc_timeout_millis": 60000,
19
+ "total_timeout_millis": 600000
20
+ }
21
+ },
22
+ "methods": {
23
+ "ListUserLicenses": {
24
+ "retry_codes_name": "non_idempotent",
25
+ "retry_params_name": "default"
26
+ },
27
+ "BatchUpdateUserLicenses": {
28
+ "retry_codes_name": "non_idempotent",
29
+ "retry_params_name": "default"
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,44 @@
1
+ [
2
+ "../../protos/google/cloud/discoveryengine/v1/answer.proto",
3
+ "../../protos/google/cloud/discoveryengine/v1/chunk.proto",
4
+ "../../protos/google/cloud/discoveryengine/v1/cmek_config_service.proto",
5
+ "../../protos/google/cloud/discoveryengine/v1/common.proto",
6
+ "../../protos/google/cloud/discoveryengine/v1/completion.proto",
7
+ "../../protos/google/cloud/discoveryengine/v1/completion_service.proto",
8
+ "../../protos/google/cloud/discoveryengine/v1/control.proto",
9
+ "../../protos/google/cloud/discoveryengine/v1/control_service.proto",
10
+ "../../protos/google/cloud/discoveryengine/v1/conversation.proto",
11
+ "../../protos/google/cloud/discoveryengine/v1/conversational_search_service.proto",
12
+ "../../protos/google/cloud/discoveryengine/v1/custom_tuning_model.proto",
13
+ "../../protos/google/cloud/discoveryengine/v1/data_store.proto",
14
+ "../../protos/google/cloud/discoveryengine/v1/data_store_service.proto",
15
+ "../../protos/google/cloud/discoveryengine/v1/document.proto",
16
+ "../../protos/google/cloud/discoveryengine/v1/document_processing_config.proto",
17
+ "../../protos/google/cloud/discoveryengine/v1/document_service.proto",
18
+ "../../protos/google/cloud/discoveryengine/v1/engine.proto",
19
+ "../../protos/google/cloud/discoveryengine/v1/engine_service.proto",
20
+ "../../protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto",
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",
24
+ "../../protos/google/cloud/discoveryengine/v1/import_config.proto",
25
+ "../../protos/google/cloud/discoveryengine/v1/project.proto",
26
+ "../../protos/google/cloud/discoveryengine/v1/project_service.proto",
27
+ "../../protos/google/cloud/discoveryengine/v1/purge_config.proto",
28
+ "../../protos/google/cloud/discoveryengine/v1/rank_service.proto",
29
+ "../../protos/google/cloud/discoveryengine/v1/recommendation_service.proto",
30
+ "../../protos/google/cloud/discoveryengine/v1/safety.proto",
31
+ "../../protos/google/cloud/discoveryengine/v1/schema.proto",
32
+ "../../protos/google/cloud/discoveryengine/v1/schema_service.proto",
33
+ "../../protos/google/cloud/discoveryengine/v1/search_service.proto",
34
+ "../../protos/google/cloud/discoveryengine/v1/search_tuning_service.proto",
35
+ "../../protos/google/cloud/discoveryengine/v1/serving_config.proto",
36
+ "../../protos/google/cloud/discoveryengine/v1/serving_config_service.proto",
37
+ "../../protos/google/cloud/discoveryengine/v1/session.proto",
38
+ "../../protos/google/cloud/discoveryengine/v1/site_search_engine.proto",
39
+ "../../protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto",
40
+ "../../protos/google/cloud/discoveryengine/v1/user_event.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"
44
+ ]
@@ -338,6 +338,12 @@ class AclConfigServiceClient {
338
338
  ?.then(([response, options, rawResponse]) => {
339
339
  this._log.info('updateAclConfig response %j', response);
340
340
  return [response, options, rawResponse];
341
+ }).catch((error) => {
342
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
343
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
344
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
345
+ }
346
+ throw error;
341
347
  });
342
348
  }
343
349
  getAclConfig(request, optionsOrCallback, callback) {
@@ -368,6 +374,12 @@ class AclConfigServiceClient {
368
374
  ?.then(([response, options, rawResponse]) => {
369
375
  this._log.info('getAclConfig response %j', response);
370
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;
371
383
  });
372
384
  }
373
385
  /**
@@ -347,6 +347,12 @@ class ChunkServiceClient {
347
347
  ?.then(([response, options, rawResponse]) => {
348
348
  this._log.info('getChunk 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
  listChunks(request, optionsOrCallback, callback) {
@@ -201,7 +201,7 @@ class CompletionServiceClient {
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.
@@ -370,6 +370,12 @@ class CompletionServiceClient {
370
370
  ?.then(([response, options, rawResponse]) => {
371
371
  this._log.info('completeQuery response %j', response);
372
372
  return [response, options, rawResponse];
373
+ }).catch((error) => {
374
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
375
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
376
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
377
+ }
378
+ throw error;
373
379
  });
374
380
  }
375
381
  importSuggestionDenyListEntries(request, optionsOrCallback, callback) {
@@ -349,6 +349,12 @@ class ControlServiceClient {
349
349
  ?.then(([response, options, rawResponse]) => {
350
350
  this._log.info('createControl response %j', response);
351
351
  return [response, options, rawResponse];
352
+ }).catch((error) => {
353
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
354
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
355
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
356
+ }
357
+ throw error;
352
358
  });
353
359
  }
354
360
  deleteControl(request, optionsOrCallback, callback) {
@@ -379,6 +385,12 @@ class ControlServiceClient {
379
385
  ?.then(([response, options, rawResponse]) => {
380
386
  this._log.info('deleteControl response %j', response);
381
387
  return [response, options, rawResponse];
388
+ }).catch((error) => {
389
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
390
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
391
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
392
+ }
393
+ throw error;
382
394
  });
383
395
  }
384
396
  updateControl(request, optionsOrCallback, callback) {
@@ -409,6 +421,12 @@ class ControlServiceClient {
409
421
  ?.then(([response, options, rawResponse]) => {
410
422
  this._log.info('updateControl response %j', response);
411
423
  return [response, options, rawResponse];
424
+ }).catch((error) => {
425
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
426
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
427
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
428
+ }
429
+ throw error;
412
430
  });
413
431
  }
414
432
  getControl(request, optionsOrCallback, callback) {
@@ -439,6 +457,12 @@ class ControlServiceClient {
439
457
  ?.then(([response, options, rawResponse]) => {
440
458
  this._log.info('getControl response %j', response);
441
459
  return [response, options, rawResponse];
460
+ }).catch((error) => {
461
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
462
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
463
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
464
+ }
465
+ throw error;
442
466
  });
443
467
  }
444
468
  listControls(request, optionsOrCallback, callback) {
@@ -346,6 +346,12 @@ class ConversationalSearchServiceClient {
346
346
  ?.then(([response, options, rawResponse]) => {
347
347
  this._log.info('converseConversation response %j', response);
348
348
  return [response, options, rawResponse];
349
+ }).catch((error) => {
350
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
351
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
352
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
353
+ }
354
+ throw error;
349
355
  });
350
356
  }
351
357
  createConversation(request, optionsOrCallback, callback) {
@@ -376,6 +382,12 @@ class ConversationalSearchServiceClient {
376
382
  ?.then(([response, options, rawResponse]) => {
377
383
  this._log.info('createConversation response %j', response);
378
384
  return [response, options, rawResponse];
385
+ }).catch((error) => {
386
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
387
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
388
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
389
+ }
390
+ throw error;
379
391
  });
380
392
  }
381
393
  deleteConversation(request, optionsOrCallback, callback) {
@@ -406,6 +418,12 @@ class ConversationalSearchServiceClient {
406
418
  ?.then(([response, options, rawResponse]) => {
407
419
  this._log.info('deleteConversation response %j', response);
408
420
  return [response, options, rawResponse];
421
+ }).catch((error) => {
422
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
423
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
424
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
425
+ }
426
+ throw error;
409
427
  });
410
428
  }
411
429
  updateConversation(request, optionsOrCallback, callback) {
@@ -436,6 +454,12 @@ class ConversationalSearchServiceClient {
436
454
  ?.then(([response, options, rawResponse]) => {
437
455
  this._log.info('updateConversation response %j', response);
438
456
  return [response, options, rawResponse];
457
+ }).catch((error) => {
458
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
459
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
460
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
461
+ }
462
+ throw error;
439
463
  });
440
464
  }
441
465
  getConversation(request, optionsOrCallback, callback) {
@@ -466,6 +490,12 @@ class ConversationalSearchServiceClient {
466
490
  ?.then(([response, options, rawResponse]) => {
467
491
  this._log.info('getConversation response %j', response);
468
492
  return [response, options, rawResponse];
493
+ }).catch((error) => {
494
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
495
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
496
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
497
+ }
498
+ throw error;
469
499
  });
470
500
  }
471
501
  answerQuery(request, optionsOrCallback, callback) {
@@ -496,6 +526,12 @@ class ConversationalSearchServiceClient {
496
526
  ?.then(([response, options, rawResponse]) => {
497
527
  this._log.info('answerQuery response %j', response);
498
528
  return [response, options, rawResponse];
529
+ }).catch((error) => {
530
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
531
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
532
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
533
+ }
534
+ throw error;
499
535
  });
500
536
  }
501
537
  getAnswer(request, optionsOrCallback, callback) {
@@ -526,6 +562,12 @@ class ConversationalSearchServiceClient {
526
562
  ?.then(([response, options, rawResponse]) => {
527
563
  this._log.info('getAnswer response %j', response);
528
564
  return [response, options, rawResponse];
565
+ }).catch((error) => {
566
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
567
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
568
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
569
+ }
570
+ throw error;
529
571
  });
530
572
  }
531
573
  createSession(request, optionsOrCallback, callback) {
@@ -556,6 +598,12 @@ class ConversationalSearchServiceClient {
556
598
  ?.then(([response, options, rawResponse]) => {
557
599
  this._log.info('createSession response %j', response);
558
600
  return [response, options, rawResponse];
601
+ }).catch((error) => {
602
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
603
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
604
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
605
+ }
606
+ throw error;
559
607
  });
560
608
  }
561
609
  deleteSession(request, optionsOrCallback, callback) {
@@ -586,6 +634,12 @@ class ConversationalSearchServiceClient {
586
634
  ?.then(([response, options, rawResponse]) => {
587
635
  this._log.info('deleteSession response %j', response);
588
636
  return [response, options, rawResponse];
637
+ }).catch((error) => {
638
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
639
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
640
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
641
+ }
642
+ throw error;
589
643
  });
590
644
  }
591
645
  updateSession(request, optionsOrCallback, callback) {
@@ -616,6 +670,12 @@ class ConversationalSearchServiceClient {
616
670
  ?.then(([response, options, rawResponse]) => {
617
671
  this._log.info('updateSession response %j', response);
618
672
  return [response, options, rawResponse];
673
+ }).catch((error) => {
674
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
675
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
676
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
677
+ }
678
+ throw error;
619
679
  });
620
680
  }
621
681
  getSession(request, optionsOrCallback, callback) {
@@ -646,6 +706,12 @@ class ConversationalSearchServiceClient {
646
706
  ?.then(([response, options, rawResponse]) => {
647
707
  this._log.info('getSession response %j', response);
648
708
  return [response, options, rawResponse];
709
+ }).catch((error) => {
710
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
711
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
712
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
713
+ }
714
+ throw error;
649
715
  });
650
716
  }
651
717
  listConversations(request, optionsOrCallback, callback) {
@@ -209,7 +209,7 @@ class DataStoreServiceClient {
209
209
  this.descriptors.page = {
210
210
  listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores')
211
211
  };
212
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
212
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
213
213
  // This API contains "long-running operations", which return a
214
214
  // an Operation object that allows for tracking of the operation,
215
215
  // rather than holding a request open.
@@ -373,6 +373,12 @@ class DataStoreServiceClient {
373
373
  ?.then(([response, options, rawResponse]) => {
374
374
  this._log.info('getDataStore response %j', response);
375
375
  return [response, options, rawResponse];
376
+ }).catch((error) => {
377
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
378
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
379
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
380
+ }
381
+ throw error;
376
382
  });
377
383
  }
378
384
  updateDataStore(request, optionsOrCallback, callback) {
@@ -403,6 +409,12 @@ class DataStoreServiceClient {
403
409
  ?.then(([response, options, rawResponse]) => {
404
410
  this._log.info('updateDataStore response %j', response);
405
411
  return [response, options, rawResponse];
412
+ }).catch((error) => {
413
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
414
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
415
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
416
+ }
417
+ throw error;
406
418
  });
407
419
  }
408
420
  getDocumentProcessingConfig(request, optionsOrCallback, callback) {
@@ -433,6 +445,12 @@ class DataStoreServiceClient {
433
445
  ?.then(([response, options, rawResponse]) => {
434
446
  this._log.info('getDocumentProcessingConfig response %j', response);
435
447
  return [response, options, rawResponse];
448
+ }).catch((error) => {
449
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
450
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
451
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
452
+ }
453
+ throw error;
436
454
  });
437
455
  }
438
456
  updateDocumentProcessingConfig(request, optionsOrCallback, callback) {
@@ -463,6 +481,12 @@ class DataStoreServiceClient {
463
481
  ?.then(([response, options, rawResponse]) => {
464
482
  this._log.info('updateDocumentProcessingConfig response %j', response);
465
483
  return [response, options, rawResponse];
484
+ }).catch((error) => {
485
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
486
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
487
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
488
+ }
489
+ throw error;
466
490
  });
467
491
  }
468
492
  createDataStore(request, optionsOrCallback, callback) {
@@ -211,7 +211,7 @@ class DocumentServiceClient {
211
211
  this.descriptors.page = {
212
212
  listDocuments: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'documents')
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 DocumentServiceClient {
375
375
  ?.then(([response, options, rawResponse]) => {
376
376
  this._log.info('getDocument 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
  createDocument(request, optionsOrCallback, callback) {
@@ -405,6 +411,12 @@ class DocumentServiceClient {
405
411
  ?.then(([response, options, rawResponse]) => {
406
412
  this._log.info('createDocument 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
  updateDocument(request, optionsOrCallback, callback) {
@@ -435,6 +447,12 @@ class DocumentServiceClient {
435
447
  ?.then(([response, options, rawResponse]) => {
436
448
  this._log.info('updateDocument response %j', response);
437
449
  return [response, options, rawResponse];
450
+ }).catch((error) => {
451
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
452
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
453
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
454
+ }
455
+ throw error;
438
456
  });
439
457
  }
440
458
  deleteDocument(request, optionsOrCallback, callback) {
@@ -465,6 +483,12 @@ class DocumentServiceClient {
465
483
  ?.then(([response, options, rawResponse]) => {
466
484
  this._log.info('deleteDocument response %j', response);
467
485
  return [response, options, rawResponse];
486
+ }).catch((error) => {
487
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
488
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
489
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
490
+ }
491
+ throw error;
468
492
  });
469
493
  }
470
494
  getProcessedDocument(request, optionsOrCallback, callback) {
@@ -495,6 +519,12 @@ class DocumentServiceClient {
495
519
  ?.then(([response, options, rawResponse]) => {
496
520
  this._log.info('getProcessedDocument response %j', response);
497
521
  return [response, options, rawResponse];
522
+ }).catch((error) => {
523
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
524
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
525
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
526
+ }
527
+ throw error;
498
528
  });
499
529
  }
500
530
  batchGetDocumentsMetadata(request, optionsOrCallback, callback) {
@@ -525,6 +555,12 @@ class DocumentServiceClient {
525
555
  ?.then(([response, options, rawResponse]) => {
526
556
  this._log.info('batchGetDocumentsMetadata response %j', response);
527
557
  return [response, options, rawResponse];
558
+ }).catch((error) => {
559
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
560
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
561
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
562
+ }
563
+ throw error;
528
564
  });
529
565
  }
530
566
  importDocuments(request, optionsOrCallback, callback) {
@@ -209,7 +209,7 @@ class EngineServiceClient {
209
209
  this.descriptors.page = {
210
210
  listEngines: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'engines')
211
211
  };
212
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
212
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
213
213
  // This API contains "long-running operations", which return a
214
214
  // an Operation object that allows for tracking of the operation,
215
215
  // rather than holding a request open.
@@ -376,6 +376,12 @@ class EngineServiceClient {
376
376
  ?.then(([response, options, rawResponse]) => {
377
377
  this._log.info('updateEngine response %j', response);
378
378
  return [response, options, rawResponse];
379
+ }).catch((error) => {
380
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
381
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
382
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
383
+ }
384
+ throw error;
379
385
  });
380
386
  }
381
387
  getEngine(request, optionsOrCallback, callback) {
@@ -406,6 +412,12 @@ class EngineServiceClient {
406
412
  ?.then(([response, options, rawResponse]) => {
407
413
  this._log.info('getEngine response %j', response);
408
414
  return [response, options, rawResponse];
415
+ }).catch((error) => {
416
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
417
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
418
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
419
+ }
420
+ throw error;
409
421
  });
410
422
  }
411
423
  pauseEngine(request, optionsOrCallback, callback) {
@@ -436,6 +448,12 @@ class EngineServiceClient {
436
448
  ?.then(([response, options, rawResponse]) => {
437
449
  this._log.info('pauseEngine response %j', response);
438
450
  return [response, options, rawResponse];
451
+ }).catch((error) => {
452
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
453
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
454
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
455
+ }
456
+ throw error;
439
457
  });
440
458
  }
441
459
  resumeEngine(request, optionsOrCallback, callback) {
@@ -466,6 +484,12 @@ class EngineServiceClient {
466
484
  ?.then(([response, options, rawResponse]) => {
467
485
  this._log.info('resumeEngine response %j', response);
468
486
  return [response, options, rawResponse];
487
+ }).catch((error) => {
488
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
489
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
490
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
491
+ }
492
+ throw error;
469
493
  });
470
494
  }
471
495
  createEngine(request, optionsOrCallback, callback) {
@@ -202,7 +202,7 @@ class EstimateBillingServiceClient {
202
202
  sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
203
203
  sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
204
204
  };
205
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
205
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
206
206
  // This API contains "long-running operations", which return a
207
207
  // an Operation object that allows for tracking of the operation,
208
208
  // rather than holding a request open.
@@ -210,7 +210,7 @@ class EvaluationServiceClient {
210
210
  listEvaluations: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'evaluations'),
211
211
  listEvaluationResults: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'evaluationResults')
212
212
  };
213
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
213
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
214
214
  // This API contains "long-running operations", which return a
215
215
  // an Operation object that allows for tracking of the operation,
216
216
  // rather than holding a request open.
@@ -371,6 +371,12 @@ class EvaluationServiceClient {
371
371
  ?.then(([response, options, rawResponse]) => {
372
372
  this._log.info('getEvaluation response %j', response);
373
373
  return [response, options, rawResponse];
374
+ }).catch((error) => {
375
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
376
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
377
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
378
+ }
379
+ throw error;
374
380
  });
375
381
  }
376
382
  createEvaluation(request, optionsOrCallback, callback) {
@@ -339,6 +339,12 @@ class GroundedGenerationServiceClient {
339
339
  ?.then(([response, options, rawResponse]) => {
340
340
  this._log.info('checkGrounding response %j', response);
341
341
  return [response, options, rawResponse];
342
+ }).catch((error) => {
343
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
344
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
345
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
346
+ }
347
+ throw error;
342
348
  });
343
349
  }
344
350
  /**
@@ -202,7 +202,7 @@ class ProjectServiceClient {
202
202
  sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
203
203
  sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
204
204
  };
205
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
205
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
206
206
  // This API contains "long-running operations", which return a
207
207
  // an Operation object that allows for tracking of the operation,
208
208
  // rather than holding a request open.
@@ -362,6 +362,12 @@ class ProjectServiceClient {
362
362
  ?.then(([response, options, rawResponse]) => {
363
363
  this._log.info('getProject response %j', response);
364
364
  return [response, options, rawResponse];
365
+ }).catch((error) => {
366
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
367
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
368
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
369
+ }
370
+ throw error;
365
371
  });
366
372
  }
367
373
  reportConsentChange(request, optionsOrCallback, callback) {
@@ -392,6 +398,12 @@ class ProjectServiceClient {
392
398
  ?.then(([response, options, rawResponse]) => {
393
399
  this._log.info('reportConsentChange response %j', response);
394
400
  return [response, options, rawResponse];
401
+ }).catch((error) => {
402
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
403
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
404
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
405
+ }
406
+ throw error;
395
407
  });
396
408
  }
397
409
  provisionProject(request, optionsOrCallback, callback) {
@@ -339,6 +339,12 @@ class RankServiceClient {
339
339
  ?.then(([response, options, rawResponse]) => {
340
340
  this._log.info('rank response %j', response);
341
341
  return [response, options, rawResponse];
342
+ }).catch((error) => {
343
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
344
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
345
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
346
+ }
347
+ throw error;
342
348
  });
343
349
  }
344
350
  /**
@@ -338,6 +338,12 @@ class RecommendationServiceClient {
338
338
  ?.then(([response, options, rawResponse]) => {
339
339
  this._log.info('recommend response %j', response);
340
340
  return [response, options, rawResponse];
341
+ }).catch((error) => {
342
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
343
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
344
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
345
+ }
346
+ throw error;
341
347
  });
342
348
  }
343
349
  /**