@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
@@ -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
+ ]
@@ -134,7 +134,7 @@ export declare class AclConfigServiceClient {
134
134
  */
135
135
  updateAclConfig(request?: protos.google.cloud.discoveryengine.v1alpha.IUpdateAclConfigRequest, options?: CallOptions): Promise<[
136
136
  protos.google.cloud.discoveryengine.v1alpha.IAclConfig,
137
- (protos.google.cloud.discoveryengine.v1alpha.IUpdateAclConfigRequest | undefined),
137
+ protos.google.cloud.discoveryengine.v1alpha.IUpdateAclConfigRequest | undefined,
138
138
  {} | undefined
139
139
  ]>;
140
140
  updateAclConfig(request: protos.google.cloud.discoveryengine.v1alpha.IUpdateAclConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IAclConfig, protos.google.cloud.discoveryengine.v1alpha.IUpdateAclConfigRequest | null | undefined, {} | null | undefined>): void;
@@ -163,61 +163,61 @@ export declare class AclConfigServiceClient {
163
163
  */
164
164
  getAclConfig(request?: protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest, options?: CallOptions): Promise<[
165
165
  protos.google.cloud.discoveryengine.v1alpha.IAclConfig,
166
- (protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest | undefined),
166
+ protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest | undefined,
167
167
  {} | undefined
168
168
  ]>;
169
169
  getAclConfig(request: protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IAclConfig, protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest | null | undefined, {} | null | undefined>): void;
170
170
  getAclConfig(request: protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IAclConfig, protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest | null | undefined, {} | null | undefined>): void;
171
171
  /**
172
- * Gets information about a location.
173
- *
174
- * @param {Object} request
175
- * The request object that will be sent.
176
- * @param {string} request.name
177
- * Resource name for the location.
178
- * @param {object} [options]
179
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
180
- * @returns {Promise} - The promise which resolves to an array.
181
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
182
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
183
- * for more details and examples.
184
- * @example
185
- * ```
186
- * const [response] = await client.getLocation(request);
187
- * ```
188
- */
172
+ * Gets information about a location.
173
+ *
174
+ * @param {Object} request
175
+ * The request object that will be sent.
176
+ * @param {string} request.name
177
+ * Resource name for the location.
178
+ * @param {object} [options]
179
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
180
+ * @returns {Promise} - The promise which resolves to an array.
181
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
182
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
183
+ * for more details and examples.
184
+ * @example
185
+ * ```
186
+ * const [response] = await client.getLocation(request);
187
+ * ```
188
+ */
189
189
  getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
190
190
  /**
191
- * Lists information about the supported locations for this service. Returns an iterable object.
192
- *
193
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
194
- * @param {Object} request
195
- * The request object that will be sent.
196
- * @param {string} request.name
197
- * The resource that owns the locations collection, if applicable.
198
- * @param {string} request.filter
199
- * The standard list filter.
200
- * @param {number} request.pageSize
201
- * The standard list page size.
202
- * @param {string} request.pageToken
203
- * The standard list page token.
204
- * @param {object} [options]
205
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
206
- * @returns {Object}
207
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
208
- * When you iterate the returned iterable, each element will be an object representing
209
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
210
- * so you can stop the iteration when you don't need more results.
211
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
212
- * for more details and examples.
213
- * @example
214
- * ```
215
- * const iterable = client.listLocationsAsync(request);
216
- * for await (const response of iterable) {
217
- * // process response
218
- * }
219
- * ```
220
- */
191
+ * Lists information about the supported locations for this service. Returns an iterable object.
192
+ *
193
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
194
+ * @param {Object} request
195
+ * The request object that will be sent.
196
+ * @param {string} request.name
197
+ * The resource that owns the locations collection, if applicable.
198
+ * @param {string} request.filter
199
+ * The standard list filter.
200
+ * @param {number} request.pageSize
201
+ * The standard list page size.
202
+ * @param {string} request.pageToken
203
+ * The standard list page token.
204
+ * @param {object} [options]
205
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
206
+ * @returns {Object}
207
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
208
+ * When you iterate the returned iterable, each element will be an object representing
209
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
210
+ * so you can stop the iteration when you don't need more results.
211
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
212
+ * for more details and examples.
213
+ * @example
214
+ * ```
215
+ * const iterable = client.listLocationsAsync(request);
216
+ * for await (const response of iterable) {
217
+ * // process response
218
+ * }
219
+ * ```
220
+ */
221
221
  listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
222
222
  /**
223
223
  * Return a fully-qualified aclConfig resource name string.
@@ -97,26 +97,17 @@ class AclConfigServiceClient {
97
97
  constructor(opts, gaxInstance) {
98
98
  // Ensure that options include all the required fields.
99
99
  const staticMembers = this.constructor;
100
- if (opts?.universe_domain &&
101
- opts?.universeDomain &&
102
- opts?.universe_domain !== opts?.universeDomain) {
100
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
103
101
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
104
102
  }
105
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
106
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
107
- : undefined;
108
- this._universeDomain =
109
- opts?.universeDomain ??
110
- opts?.universe_domain ??
111
- universeDomainEnvVar ??
112
- 'googleapis.com';
103
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
104
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
113
105
  this._servicePath = 'discoveryengine.' + this._universeDomain;
114
106
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
115
107
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
116
108
  const port = opts?.port || staticMembers.port;
117
109
  const clientConfig = opts?.clientConfig ?? {};
118
- const fallback = opts?.fallback ??
119
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
110
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
120
111
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
121
112
  // Request numeric enum values if REST transport is used.
122
113
  opts.numericEnums = true;
@@ -146,7 +137,10 @@ class AclConfigServiceClient {
146
137
  }
147
138
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
148
139
  // Determine the client header string.
149
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
140
+ const clientHeader = [
141
+ `gax/${this._gaxModule.version}`,
142
+ `gapic/${version}`,
143
+ ];
150
144
  if (typeof process === 'object' && 'versions' in process) {
151
145
  clientHeader.push(`gl-node/${process.versions.node}`);
152
146
  }
@@ -233,11 +227,10 @@ class AclConfigServiceClient {
233
227
  }
234
228
  // Put together the "service stub" for
235
229
  // google.cloud.discoveryengine.v1alpha.AclConfigService.
236
- this.aclConfigServiceStub = this._gaxGrpc.createStub(this._opts.fallback
237
- ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.AclConfigService')
238
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
239
- this._protos.google.cloud.discoveryengine.v1alpha
240
- .AclConfigService, this._opts, this._providedCustomServicePath);
230
+ this.aclConfigServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
231
+ this._protos.lookupService('google.cloud.discoveryengine.v1alpha.AclConfigService') :
232
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
233
+ this._protos.google.cloud.discoveryengine.v1alpha.AclConfigService, this._opts, this._providedCustomServicePath);
241
234
  // Iterate over each of the methods that the service provides
242
235
  // and create an API call method for each.
243
236
  const aclConfigServiceStubMethods = ['updateAclConfig', 'getAclConfig'];
@@ -263,8 +256,7 @@ class AclConfigServiceClient {
263
256
  * @returns {string} The DNS address for this service.
264
257
  */
265
258
  static get servicePath() {
266
- if (typeof process === 'object' &&
267
- typeof process.emitWarning === 'function') {
259
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
268
260
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
269
261
  }
270
262
  return 'discoveryengine.googleapis.com';
@@ -275,8 +267,7 @@ class AclConfigServiceClient {
275
267
  * @returns {string} The DNS address for this service.
276
268
  */
277
269
  static get apiEndpoint() {
278
- if (typeof process === 'object' &&
279
- typeof process.emitWarning === 'function') {
270
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
280
271
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
281
272
  }
282
273
  return 'discoveryengine.googleapis.com';
@@ -304,7 +295,9 @@ class AclConfigServiceClient {
304
295
  * @returns {string[]} List of default scopes.
305
296
  */
306
297
  static get scopes() {
307
- return ['https://www.googleapis.com/auth/cloud-platform'];
298
+ return [
299
+ 'https://www.googleapis.com/auth/cloud-platform'
300
+ ];
308
301
  }
309
302
  /**
310
303
  * Return the project ID used by this class.
@@ -330,13 +323,10 @@ class AclConfigServiceClient {
330
323
  options = options || {};
331
324
  options.otherArgs = options.otherArgs || {};
332
325
  options.otherArgs.headers = options.otherArgs.headers || {};
333
- options.otherArgs.headers['x-goog-request-params'] =
334
- this._gaxModule.routingHeader.fromParams({
335
- 'acl_config.name': request.aclConfig.name ?? '',
336
- });
337
- this.initialize().catch(err => {
338
- throw err;
326
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
327
+ 'acl_config.name': request.aclConfig.name ?? '',
339
328
  });
329
+ this.initialize().catch(err => { throw err; });
340
330
  this._log.info('updateAclConfig request %j', request);
341
331
  const wrappedCallback = callback
342
332
  ? (error, response, options, rawResponse) => {
@@ -344,11 +334,16 @@ class AclConfigServiceClient {
344
334
  callback(error, response, options, rawResponse); // We verified callback above.
345
335
  }
346
336
  : undefined;
347
- return this.innerApiCalls
348
- .updateAclConfig(request, options, wrappedCallback)
337
+ return this.innerApiCalls.updateAclConfig(request, options, wrappedCallback)
349
338
  ?.then(([response, options, rawResponse]) => {
350
339
  this._log.info('updateAclConfig response %j', response);
351
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;
352
347
  });
353
348
  }
354
349
  getAclConfig(request, optionsOrCallback, callback) {
@@ -364,13 +359,10 @@ class AclConfigServiceClient {
364
359
  options = options || {};
365
360
  options.otherArgs = options.otherArgs || {};
366
361
  options.otherArgs.headers = options.otherArgs.headers || {};
367
- options.otherArgs.headers['x-goog-request-params'] =
368
- this._gaxModule.routingHeader.fromParams({
369
- name: request.name ?? '',
370
- });
371
- this.initialize().catch(err => {
372
- throw err;
362
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
363
+ 'name': request.name ?? '',
373
364
  });
365
+ this.initialize().catch(err => { throw err; });
374
366
  this._log.info('getAclConfig request %j', request);
375
367
  const wrappedCallback = callback
376
368
  ? (error, response, options, rawResponse) => {
@@ -378,65 +370,70 @@ class AclConfigServiceClient {
378
370
  callback(error, response, options, rawResponse); // We verified callback above.
379
371
  }
380
372
  : undefined;
381
- return this.innerApiCalls
382
- .getAclConfig(request, options, wrappedCallback)
373
+ return this.innerApiCalls.getAclConfig(request, options, wrappedCallback)
383
374
  ?.then(([response, options, rawResponse]) => {
384
375
  this._log.info('getAclConfig response %j', response);
385
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;
386
383
  });
387
384
  }
388
385
  /**
389
- * Gets information about a location.
390
- *
391
- * @param {Object} request
392
- * The request object that will be sent.
393
- * @param {string} request.name
394
- * Resource name for the location.
395
- * @param {object} [options]
396
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
397
- * @returns {Promise} - The promise which resolves to an array.
398
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
399
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
400
- * for more details and examples.
401
- * @example
402
- * ```
403
- * const [response] = await client.getLocation(request);
404
- * ```
405
- */
386
+ * Gets information about a location.
387
+ *
388
+ * @param {Object} request
389
+ * The request object that will be sent.
390
+ * @param {string} request.name
391
+ * Resource name for the location.
392
+ * @param {object} [options]
393
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
394
+ * @returns {Promise} - The promise which resolves to an array.
395
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
396
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
397
+ * for more details and examples.
398
+ * @example
399
+ * ```
400
+ * const [response] = await client.getLocation(request);
401
+ * ```
402
+ */
406
403
  getLocation(request, options, callback) {
407
404
  return this.locationsClient.getLocation(request, options, callback);
408
405
  }
409
406
  /**
410
- * Lists information about the supported locations for this service. Returns an iterable object.
411
- *
412
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
413
- * @param {Object} request
414
- * The request object that will be sent.
415
- * @param {string} request.name
416
- * The resource that owns the locations collection, if applicable.
417
- * @param {string} request.filter
418
- * The standard list filter.
419
- * @param {number} request.pageSize
420
- * The standard list page size.
421
- * @param {string} request.pageToken
422
- * The standard list page token.
423
- * @param {object} [options]
424
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
425
- * @returns {Object}
426
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
427
- * When you iterate the returned iterable, each element will be an object representing
428
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
429
- * so you can stop the iteration when you don't need more results.
430
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
431
- * for more details and examples.
432
- * @example
433
- * ```
434
- * const iterable = client.listLocationsAsync(request);
435
- * for await (const response of iterable) {
436
- * // process response
437
- * }
438
- * ```
439
- */
407
+ * Lists information about the supported locations for this service. Returns an iterable object.
408
+ *
409
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
410
+ * @param {Object} request
411
+ * The request object that will be sent.
412
+ * @param {string} request.name
413
+ * The resource that owns the locations collection, if applicable.
414
+ * @param {string} request.filter
415
+ * The standard list filter.
416
+ * @param {number} request.pageSize
417
+ * The standard list page size.
418
+ * @param {string} request.pageToken
419
+ * The standard list page token.
420
+ * @param {object} [options]
421
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
422
+ * @returns {Object}
423
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
424
+ * When you iterate the returned iterable, each element will be an object representing
425
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
426
+ * so you can stop the iteration when you don't need more results.
427
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
428
+ * for more details and examples.
429
+ * @example
430
+ * ```
431
+ * const iterable = client.listLocationsAsync(request);
432
+ * for await (const response of iterable) {
433
+ * // process response
434
+ * }
435
+ * ```
436
+ */
440
437
  listLocationsAsync(request, options) {
441
438
  return this.locationsClient.listLocationsAsync(request, options);
442
439
  }
@@ -464,8 +461,7 @@ class AclConfigServiceClient {
464
461
  * @returns {string} A string representing the project.
465
462
  */
466
463
  matchProjectFromAclConfigName(aclConfigName) {
467
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
468
- .project;
464
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
469
465
  }
470
466
  /**
471
467
  * Parse the location from AclConfig resource.
@@ -475,8 +471,7 @@ class AclConfigServiceClient {
475
471
  * @returns {string} A string representing the location.
476
472
  */
477
473
  matchLocationFromAclConfigName(aclConfigName) {
478
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
479
- .location;
474
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
480
475
  }
481
476
  /**
482
477
  * Return a fully-qualified engine resource name string.
@@ -558,8 +553,7 @@ class AclConfigServiceClient {
558
553
  * @returns {string} A string representing the project.
559
554
  */
560
555
  matchProjectFromEvaluationName(evaluationName) {
561
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
562
- .project;
556
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
563
557
  }
564
558
  /**
565
559
  * Parse the location from Evaluation resource.
@@ -569,8 +563,7 @@ class AclConfigServiceClient {
569
563
  * @returns {string} A string representing the location.
570
564
  */
571
565
  matchLocationFromEvaluationName(evaluationName) {
572
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
573
- .location;
566
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
574
567
  }
575
568
  /**
576
569
  * Parse the evaluation from Evaluation resource.
@@ -580,8 +573,7 @@ class AclConfigServiceClient {
580
573
  * @returns {string} A string representing the evaluation.
581
574
  */
582
575
  matchEvaluationFromEvaluationName(evaluationName) {
583
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
584
- .evaluation;
576
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
585
577
  }
586
578
  /**
587
579
  * Return a fully-qualified project resource name string.
@@ -2648,8 +2640,7 @@ class AclConfigServiceClient {
2648
2640
  * @returns {string} A string representing the project.
2649
2641
  */
2650
2642
  matchProjectFromSampleQueryName(sampleQueryName) {
2651
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
2652
- .project;
2643
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
2653
2644
  }
2654
2645
  /**
2655
2646
  * Parse the location from SampleQuery resource.
@@ -2659,8 +2650,7 @@ class AclConfigServiceClient {
2659
2650
  * @returns {string} A string representing the location.
2660
2651
  */
2661
2652
  matchLocationFromSampleQueryName(sampleQueryName) {
2662
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
2663
- .location;
2653
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
2664
2654
  }
2665
2655
  /**
2666
2656
  * Parse the sample_query_set from SampleQuery resource.
@@ -2670,8 +2660,7 @@ class AclConfigServiceClient {
2670
2660
  * @returns {string} A string representing the sample_query_set.
2671
2661
  */
2672
2662
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
2673
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
2674
- .sample_query_set;
2663
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
2675
2664
  }
2676
2665
  /**
2677
2666
  * Parse the sample_query from SampleQuery resource.
@@ -2681,8 +2670,7 @@ class AclConfigServiceClient {
2681
2670
  * @returns {string} A string representing the sample_query.
2682
2671
  */
2683
2672
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
2684
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
2685
- .sample_query;
2673
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
2686
2674
  }
2687
2675
  /**
2688
2676
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -2741,7 +2729,7 @@ class AclConfigServiceClient {
2741
2729
  this._log.info('ending gRPC channel');
2742
2730
  this._terminated = true;
2743
2731
  stub.close();
2744
- this.locationsClient.close();
2732
+ this.locationsClient.close().catch(err => { throw err; });
2745
2733
  });
2746
2734
  }
2747
2735
  return Promise.resolve();