@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.
- package/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
- package/build/protos/protos.d.ts +5415 -578
- package/build/protos/protos.js +77830 -63391
- package/build/protos/protos.json +1537 -92
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +8 -22
- package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
- package/build/src/v1/cmek_config_service_client.js +3274 -0
- package/build/src/v1/cmek_config_service_client_config.json +42 -0
- package/build/src/v1/cmek_config_service_proto_list.json +44 -0
- package/build/src/v1/completion_service_client.d.ts +166 -76
- package/build/src/v1/completion_service_client.js +258 -263
- package/build/src/v1/completion_service_proto_list.json +6 -1
- package/build/src/v1/control_service_client.d.ts +171 -81
- package/build/src/v1/control_service_client.js +246 -132
- package/build/src/v1/control_service_proto_list.json +6 -1
- package/build/src/v1/conversational_search_service_client.d.ts +233 -143
- package/build/src/v1/conversational_search_service_client.js +330 -226
- package/build/src/v1/conversational_search_service_proto_list.json +6 -1
- package/build/src/v1/data_store_service_client.d.ts +218 -122
- package/build/src/v1/data_store_service_client.js +273 -281
- package/build/src/v1/data_store_service_proto_list.json +6 -1
- package/build/src/v1/document_service_client.d.ts +210 -120
- package/build/src/v1/document_service_client.js +300 -301
- package/build/src/v1/document_service_proto_list.json +6 -1
- package/build/src/v1/engine_service_client.d.ts +193 -103
- package/build/src/v1/engine_service_client.js +273 -280
- package/build/src/v1/engine_service_proto_list.json +6 -1
- package/build/src/v1/gapic_metadata.json +184 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +138 -48
- package/build/src/v1/grounded_generation_service_client.js +217 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
- package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
- package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
- package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
- package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/project_service_client.d.ts +166 -76
- package/build/src/v1/project_service_client.js +235 -223
- package/build/src/v1/project_service_proto_list.json +6 -1
- package/build/src/v1/rank_service_client.d.ts +137 -47
- package/build/src/v1/rank_service_client.js +204 -85
- package/build/src/v1/rank_service_proto_list.json +6 -1
- package/build/src/v1/recommendation_service_client.d.ts +137 -47
- package/build/src/v1/recommendation_service_client.js +202 -82
- package/build/src/v1/recommendation_service_proto_list.json +6 -1
- package/build/src/v1/schema_service_client.d.ts +201 -111
- package/build/src/v1/schema_service_client.js +264 -274
- package/build/src/v1/schema_service_proto_list.json +6 -1
- package/build/src/v1/search_service_client.d.ts +661 -571
- package/build/src/v1/search_service_client.js +216 -113
- package/build/src/v1/search_service_proto_list.json +6 -1
- package/build/src/v1/search_tuning_service_client.d.ts +167 -77
- package/build/src/v1/search_tuning_service_client.js +246 -236
- package/build/src/v1/search_tuning_service_proto_list.json +6 -1
- package/build/src/v1/serving_config_service_client.d.ts +138 -48
- package/build/src/v1/serving_config_service_client.js +201 -80
- package/build/src/v1/serving_config_service_proto_list.json +6 -1
- package/build/src/v1/site_search_engine_service_client.d.ts +238 -148
- package/build/src/v1/site_search_engine_service_client.js +324 -379
- package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
- package/build/src/v1/user_event_service_client.d.ts +167 -77
- package/build/src/v1/user_event_service_client.js +260 -254
- package/build/src/v1/user_event_service_proto_list.json +6 -1
- package/build/src/v1/user_license_service_client.d.ts +2256 -0
- package/build/src/v1/user_license_service_client.js +3194 -0
- package/build/src/v1/user_license_service_client_config.json +34 -0
- package/build/src/v1/user_license_service_proto_list.json +44 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +94 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +98 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +141 -281
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +129 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +211 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +176 -317
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +193 -329
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +180 -326
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +119 -244
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +150 -296
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +85 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +139 -263
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +87 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +85 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +169 -302
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +130 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +147 -293
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +129 -254
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +109 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +203 -388
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +143 -272
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +149 -280
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +127 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +209 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +154 -289
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +181 -310
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +178 -316
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +148 -286
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +98 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +116 -232
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +85 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +83 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +167 -292
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +128 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +145 -283
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +127 -244
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +107 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +205 -387
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +141 -262
- package/package.json +7 -7
- package/CHANGELOG.md +0 -267
@@ -99,26 +99,17 @@ class DocumentServiceClient {
|
|
99
99
|
constructor(opts, gaxInstance) {
|
100
100
|
// Ensure that options include all the required fields.
|
101
101
|
const staticMembers = this.constructor;
|
102
|
-
if (opts?.universe_domain &&
|
103
|
-
opts?.universeDomain &&
|
104
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
102
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
105
103
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
106
104
|
}
|
107
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
108
|
-
|
109
|
-
: undefined;
|
110
|
-
this._universeDomain =
|
111
|
-
opts?.universeDomain ??
|
112
|
-
opts?.universe_domain ??
|
113
|
-
universeDomainEnvVar ??
|
114
|
-
'googleapis.com';
|
105
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
106
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
115
107
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
116
108
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
117
109
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
118
110
|
const port = opts?.port || staticMembers.port;
|
119
111
|
const clientConfig = opts?.clientConfig ?? {};
|
120
|
-
const fallback = opts?.fallback ??
|
121
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
112
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
122
113
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
123
114
|
// Request numeric enum values if REST transport is used.
|
124
115
|
opts.numericEnums = true;
|
@@ -148,7 +139,10 @@ class DocumentServiceClient {
|
|
148
139
|
}
|
149
140
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
150
141
|
// Determine the client header string.
|
151
|
-
const clientHeader = [
|
142
|
+
const clientHeader = [
|
143
|
+
`gax/${this._gaxModule.version}`,
|
144
|
+
`gapic/${version}`,
|
145
|
+
];
|
152
146
|
if (typeof process === 'object' && 'versions' in process) {
|
153
147
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
154
148
|
}
|
@@ -171,7 +165,10 @@ class DocumentServiceClient {
|
|
171
165
|
// Create useful helper objects for these.
|
172
166
|
this.pathTemplates = {
|
173
167
|
enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
|
168
|
+
identityMappingStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}'),
|
174
169
|
projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
|
170
|
+
projectLocationCmekConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfig'),
|
171
|
+
projectLocationCmekConfigsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfigs/{cmek_config}'),
|
175
172
|
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
176
173
|
projectLocationCollectionDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}'),
|
177
174
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
@@ -212,136 +209,31 @@ class DocumentServiceClient {
|
|
212
209
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
213
210
|
// pages). Denote the keys used for pagination and results.
|
214
211
|
this.descriptors.page = {
|
215
|
-
listDocuments: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'documents')
|
212
|
+
listDocuments: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'documents')
|
216
213
|
};
|
217
|
-
const protoFilesRoot = this._gaxModule.
|
214
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
218
215
|
// This API contains "long-running operations", which return a
|
219
216
|
// an Operation object that allows for tracking of the operation,
|
220
217
|
// rather than holding a request open.
|
221
218
|
const lroOptions = {
|
222
219
|
auth: this.auth,
|
223
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
220
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
224
221
|
};
|
225
222
|
if (opts.fallback) {
|
226
223
|
lroOptions.protoJson = protoFilesRoot;
|
227
|
-
lroOptions.httpRules = [
|
228
|
-
{
|
229
|
-
|
230
|
-
|
231
|
-
body: '*',
|
232
|
-
additional_bindings: [
|
233
|
-
{
|
234
|
-
post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
|
235
|
-
body: '*',
|
236
|
-
},
|
237
|
-
{
|
238
|
-
post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
239
|
-
body: '*',
|
240
|
-
},
|
241
|
-
],
|
242
|
-
},
|
243
|
-
{
|
244
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
245
|
-
get: '/v1/{name=projects/*/operations/*}',
|
246
|
-
additional_bindings: [
|
247
|
-
{
|
248
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
249
|
-
},
|
250
|
-
{
|
251
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
252
|
-
},
|
253
|
-
{
|
254
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
255
|
-
},
|
256
|
-
{
|
257
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
258
|
-
},
|
259
|
-
{
|
260
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
261
|
-
},
|
262
|
-
{
|
263
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
264
|
-
},
|
265
|
-
{
|
266
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
267
|
-
},
|
268
|
-
{
|
269
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
270
|
-
},
|
271
|
-
{
|
272
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
|
273
|
-
},
|
274
|
-
{
|
275
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
276
|
-
},
|
277
|
-
{
|
278
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
279
|
-
},
|
280
|
-
{
|
281
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
282
|
-
},
|
283
|
-
{
|
284
|
-
get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}',
|
285
|
-
},
|
286
|
-
{ get: '/v1/{name=projects/*/locations/*/operations/*}' },
|
287
|
-
{ get: '/v1/{name=projects/*/operations/*}' },
|
288
|
-
],
|
289
|
-
},
|
290
|
-
{
|
291
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
292
|
-
get: '/v1/{name=projects/*}/operations',
|
293
|
-
additional_bindings: [
|
294
|
-
{
|
295
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
296
|
-
},
|
297
|
-
{
|
298
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
299
|
-
},
|
300
|
-
{
|
301
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
302
|
-
},
|
303
|
-
{
|
304
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
305
|
-
},
|
306
|
-
{
|
307
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
308
|
-
},
|
309
|
-
{
|
310
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
311
|
-
},
|
312
|
-
{
|
313
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
314
|
-
},
|
315
|
-
{
|
316
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
317
|
-
},
|
318
|
-
{ get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
|
319
|
-
{
|
320
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
321
|
-
},
|
322
|
-
{
|
323
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
324
|
-
},
|
325
|
-
{ get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
|
326
|
-
{
|
327
|
-
get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
|
328
|
-
},
|
329
|
-
{ get: '/v1/{name=projects/*/locations/*}/operations' },
|
330
|
-
{ get: '/v1/{name=projects/*}/operations' },
|
331
|
-
],
|
332
|
-
},
|
333
|
-
];
|
224
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }, { post: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}:cancel', body: '*', }, { post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
225
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/operations/*}', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/operations/*}', }, { get: '/v1/{name=projects/*/operations/*}', }],
|
226
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*}/operations', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*}/operations', }, { get: '/v1/{name=projects/*}/operations', }],
|
227
|
+
}];
|
334
228
|
}
|
335
|
-
this.operationsClient = this._gaxModule
|
336
|
-
.lro(lroOptions)
|
337
|
-
.operationsClient(opts);
|
229
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
338
230
|
const importDocumentsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportDocumentsResponse');
|
339
231
|
const importDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportDocumentsMetadata');
|
340
232
|
const purgeDocumentsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.PurgeDocumentsResponse');
|
341
233
|
const purgeDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata');
|
342
234
|
this.descriptors.longrunning = {
|
343
235
|
importDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importDocumentsResponse.decode.bind(importDocumentsResponse), importDocumentsMetadata.decode.bind(importDocumentsMetadata)),
|
344
|
-
purgeDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeDocumentsResponse.decode.bind(purgeDocumentsResponse), purgeDocumentsMetadata.decode.bind(purgeDocumentsMetadata))
|
236
|
+
purgeDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeDocumentsResponse.decode.bind(purgeDocumentsResponse), purgeDocumentsMetadata.decode.bind(purgeDocumentsMetadata))
|
345
237
|
};
|
346
238
|
// Put together the default options sent with requests.
|
347
239
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.DocumentService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -370,22 +262,13 @@ class DocumentServiceClient {
|
|
370
262
|
}
|
371
263
|
// Put together the "service stub" for
|
372
264
|
// google.cloud.discoveryengine.v1.DocumentService.
|
373
|
-
this.documentServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
374
|
-
|
375
|
-
|
376
|
-
|
265
|
+
this.documentServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
266
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.DocumentService') :
|
267
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
268
|
+
this._protos.google.cloud.discoveryengine.v1.DocumentService, this._opts, this._providedCustomServicePath);
|
377
269
|
// Iterate over each of the methods that the service provides
|
378
270
|
// and create an API call method for each.
|
379
|
-
const documentServiceStubMethods = [
|
380
|
-
'getDocument',
|
381
|
-
'listDocuments',
|
382
|
-
'createDocument',
|
383
|
-
'updateDocument',
|
384
|
-
'deleteDocument',
|
385
|
-
'importDocuments',
|
386
|
-
'purgeDocuments',
|
387
|
-
'batchGetDocumentsMetadata',
|
388
|
-
];
|
271
|
+
const documentServiceStubMethods = ['getDocument', 'listDocuments', 'createDocument', 'updateDocument', 'deleteDocument', 'importDocuments', 'purgeDocuments', 'batchGetDocumentsMetadata'];
|
389
272
|
for (const methodName of documentServiceStubMethods) {
|
390
273
|
const callPromise = this.documentServiceStub.then(stub => (...args) => {
|
391
274
|
if (this._terminated) {
|
@@ -410,8 +293,7 @@ class DocumentServiceClient {
|
|
410
293
|
* @returns {string} The DNS address for this service.
|
411
294
|
*/
|
412
295
|
static get servicePath() {
|
413
|
-
if (typeof process === 'object' &&
|
414
|
-
typeof process.emitWarning === 'function') {
|
296
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
415
297
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
416
298
|
}
|
417
299
|
return 'discoveryengine.googleapis.com';
|
@@ -422,8 +304,7 @@ class DocumentServiceClient {
|
|
422
304
|
* @returns {string} The DNS address for this service.
|
423
305
|
*/
|
424
306
|
static get apiEndpoint() {
|
425
|
-
if (typeof process === 'object' &&
|
426
|
-
typeof process.emitWarning === 'function') {
|
307
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
427
308
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
428
309
|
}
|
429
310
|
return 'discoveryengine.googleapis.com';
|
@@ -451,7 +332,9 @@ class DocumentServiceClient {
|
|
451
332
|
* @returns {string[]} List of default scopes.
|
452
333
|
*/
|
453
334
|
static get scopes() {
|
454
|
-
return [
|
335
|
+
return [
|
336
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
337
|
+
];
|
455
338
|
}
|
456
339
|
/**
|
457
340
|
* Return the project ID used by this class.
|
@@ -477,13 +360,10 @@ class DocumentServiceClient {
|
|
477
360
|
options = options || {};
|
478
361
|
options.otherArgs = options.otherArgs || {};
|
479
362
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
480
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
481
|
-
|
482
|
-
name: request.name ?? '',
|
483
|
-
});
|
484
|
-
this.initialize().catch(err => {
|
485
|
-
throw err;
|
363
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
364
|
+
'name': request.name ?? '',
|
486
365
|
});
|
366
|
+
this.initialize().catch(err => { throw err; });
|
487
367
|
this._log.info('getDocument request %j', request);
|
488
368
|
const wrappedCallback = callback
|
489
369
|
? (error, response, options, rawResponse) => {
|
@@ -491,11 +371,16 @@ class DocumentServiceClient {
|
|
491
371
|
callback(error, response, options, rawResponse); // We verified callback above.
|
492
372
|
}
|
493
373
|
: undefined;
|
494
|
-
return this.innerApiCalls
|
495
|
-
.getDocument(request, options, wrappedCallback)
|
374
|
+
return this.innerApiCalls.getDocument(request, options, wrappedCallback)
|
496
375
|
?.then(([response, options, rawResponse]) => {
|
497
376
|
this._log.info('getDocument response %j', response);
|
498
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;
|
499
384
|
});
|
500
385
|
}
|
501
386
|
createDocument(request, optionsOrCallback, callback) {
|
@@ -511,13 +396,10 @@ class DocumentServiceClient {
|
|
511
396
|
options = options || {};
|
512
397
|
options.otherArgs = options.otherArgs || {};
|
513
398
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
514
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
515
|
-
|
516
|
-
parent: request.parent ?? '',
|
517
|
-
});
|
518
|
-
this.initialize().catch(err => {
|
519
|
-
throw err;
|
399
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
400
|
+
'parent': request.parent ?? '',
|
520
401
|
});
|
402
|
+
this.initialize().catch(err => { throw err; });
|
521
403
|
this._log.info('createDocument request %j', request);
|
522
404
|
const wrappedCallback = callback
|
523
405
|
? (error, response, options, rawResponse) => {
|
@@ -525,11 +407,16 @@ class DocumentServiceClient {
|
|
525
407
|
callback(error, response, options, rawResponse); // We verified callback above.
|
526
408
|
}
|
527
409
|
: undefined;
|
528
|
-
return this.innerApiCalls
|
529
|
-
.createDocument(request, options, wrappedCallback)
|
410
|
+
return this.innerApiCalls.createDocument(request, options, wrappedCallback)
|
530
411
|
?.then(([response, options, rawResponse]) => {
|
531
412
|
this._log.info('createDocument response %j', response);
|
532
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;
|
533
420
|
});
|
534
421
|
}
|
535
422
|
updateDocument(request, optionsOrCallback, callback) {
|
@@ -545,13 +432,10 @@ class DocumentServiceClient {
|
|
545
432
|
options = options || {};
|
546
433
|
options.otherArgs = options.otherArgs || {};
|
547
434
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
548
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
549
|
-
|
550
|
-
'document.name': request.document.name ?? '',
|
551
|
-
});
|
552
|
-
this.initialize().catch(err => {
|
553
|
-
throw err;
|
435
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
436
|
+
'document.name': request.document.name ?? '',
|
554
437
|
});
|
438
|
+
this.initialize().catch(err => { throw err; });
|
555
439
|
this._log.info('updateDocument request %j', request);
|
556
440
|
const wrappedCallback = callback
|
557
441
|
? (error, response, options, rawResponse) => {
|
@@ -559,11 +443,16 @@ class DocumentServiceClient {
|
|
559
443
|
callback(error, response, options, rawResponse); // We verified callback above.
|
560
444
|
}
|
561
445
|
: undefined;
|
562
|
-
return this.innerApiCalls
|
563
|
-
.updateDocument(request, options, wrappedCallback)
|
446
|
+
return this.innerApiCalls.updateDocument(request, options, wrappedCallback)
|
564
447
|
?.then(([response, options, rawResponse]) => {
|
565
448
|
this._log.info('updateDocument response %j', response);
|
566
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;
|
567
456
|
});
|
568
457
|
}
|
569
458
|
deleteDocument(request, optionsOrCallback, callback) {
|
@@ -579,13 +468,10 @@ class DocumentServiceClient {
|
|
579
468
|
options = options || {};
|
580
469
|
options.otherArgs = options.otherArgs || {};
|
581
470
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
582
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
583
|
-
|
584
|
-
name: request.name ?? '',
|
585
|
-
});
|
586
|
-
this.initialize().catch(err => {
|
587
|
-
throw err;
|
471
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
472
|
+
'name': request.name ?? '',
|
588
473
|
});
|
474
|
+
this.initialize().catch(err => { throw err; });
|
589
475
|
this._log.info('deleteDocument request %j', request);
|
590
476
|
const wrappedCallback = callback
|
591
477
|
? (error, response, options, rawResponse) => {
|
@@ -593,11 +479,16 @@ class DocumentServiceClient {
|
|
593
479
|
callback(error, response, options, rawResponse); // We verified callback above.
|
594
480
|
}
|
595
481
|
: undefined;
|
596
|
-
return this.innerApiCalls
|
597
|
-
.deleteDocument(request, options, wrappedCallback)
|
482
|
+
return this.innerApiCalls.deleteDocument(request, options, wrappedCallback)
|
598
483
|
?.then(([response, options, rawResponse]) => {
|
599
484
|
this._log.info('deleteDocument response %j', response);
|
600
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;
|
601
492
|
});
|
602
493
|
}
|
603
494
|
batchGetDocumentsMetadata(request, optionsOrCallback, callback) {
|
@@ -613,13 +504,10 @@ class DocumentServiceClient {
|
|
613
504
|
options = options || {};
|
614
505
|
options.otherArgs = options.otherArgs || {};
|
615
506
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
616
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
617
|
-
|
618
|
-
parent: request.parent ?? '',
|
619
|
-
});
|
620
|
-
this.initialize().catch(err => {
|
621
|
-
throw err;
|
507
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
508
|
+
'parent': request.parent ?? '',
|
622
509
|
});
|
510
|
+
this.initialize().catch(err => { throw err; });
|
623
511
|
this._log.info('batchGetDocumentsMetadata request %j', request);
|
624
512
|
const wrappedCallback = callback
|
625
513
|
? (error, response, options, rawResponse) => {
|
@@ -627,11 +515,16 @@ class DocumentServiceClient {
|
|
627
515
|
callback(error, response, options, rawResponse); // We verified callback above.
|
628
516
|
}
|
629
517
|
: undefined;
|
630
|
-
return this.innerApiCalls
|
631
|
-
.batchGetDocumentsMetadata(request, options, wrappedCallback)
|
518
|
+
return this.innerApiCalls.batchGetDocumentsMetadata(request, options, wrappedCallback)
|
632
519
|
?.then(([response, options, rawResponse]) => {
|
633
520
|
this._log.info('batchGetDocumentsMetadata response %j', response);
|
634
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;
|
635
528
|
});
|
636
529
|
}
|
637
530
|
importDocuments(request, optionsOrCallback, callback) {
|
@@ -647,13 +540,10 @@ class DocumentServiceClient {
|
|
647
540
|
options = options || {};
|
648
541
|
options.otherArgs = options.otherArgs || {};
|
649
542
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
650
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
651
|
-
|
652
|
-
parent: request.parent ?? '',
|
653
|
-
});
|
654
|
-
this.initialize().catch(err => {
|
655
|
-
throw err;
|
543
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
544
|
+
'parent': request.parent ?? '',
|
656
545
|
});
|
546
|
+
this.initialize().catch(err => { throw err; });
|
657
547
|
const wrappedCallback = callback
|
658
548
|
? (error, response, rawResponse, _) => {
|
659
549
|
this._log.info('importDocuments response %j', rawResponse);
|
@@ -661,8 +551,7 @@ class DocumentServiceClient {
|
|
661
551
|
}
|
662
552
|
: undefined;
|
663
553
|
this._log.info('importDocuments request %j', request);
|
664
|
-
return this.innerApiCalls
|
665
|
-
.importDocuments(request, options, wrappedCallback)
|
554
|
+
return this.innerApiCalls.importDocuments(request, options, wrappedCallback)
|
666
555
|
?.then(([response, rawResponse, _]) => {
|
667
556
|
this._log.info('importDocuments response %j', rawResponse);
|
668
557
|
return [response, rawResponse, _];
|
@@ -699,13 +588,10 @@ class DocumentServiceClient {
|
|
699
588
|
options = options || {};
|
700
589
|
options.otherArgs = options.otherArgs || {};
|
701
590
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
702
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
703
|
-
|
704
|
-
parent: request.parent ?? '',
|
705
|
-
});
|
706
|
-
this.initialize().catch(err => {
|
707
|
-
throw err;
|
591
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
592
|
+
'parent': request.parent ?? '',
|
708
593
|
});
|
594
|
+
this.initialize().catch(err => { throw err; });
|
709
595
|
const wrappedCallback = callback
|
710
596
|
? (error, response, rawResponse, _) => {
|
711
597
|
this._log.info('purgeDocuments response %j', rawResponse);
|
@@ -713,8 +599,7 @@ class DocumentServiceClient {
|
|
713
599
|
}
|
714
600
|
: undefined;
|
715
601
|
this._log.info('purgeDocuments request %j', request);
|
716
|
-
return this.innerApiCalls
|
717
|
-
.purgeDocuments(request, options, wrappedCallback)
|
602
|
+
return this.innerApiCalls.purgeDocuments(request, options, wrappedCallback)
|
718
603
|
?.then(([response, rawResponse, _]) => {
|
719
604
|
this._log.info('purgeDocuments response %j', rawResponse);
|
720
605
|
return [response, rawResponse, _];
|
@@ -751,13 +636,10 @@ class DocumentServiceClient {
|
|
751
636
|
options = options || {};
|
752
637
|
options.otherArgs = options.otherArgs || {};
|
753
638
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
754
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
755
|
-
|
756
|
-
parent: request.parent ?? '',
|
757
|
-
});
|
758
|
-
this.initialize().catch(err => {
|
759
|
-
throw err;
|
639
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
640
|
+
'parent': request.parent ?? '',
|
760
641
|
});
|
642
|
+
this.initialize().catch(err => { throw err; });
|
761
643
|
const wrappedCallback = callback
|
762
644
|
? (error, values, nextPageRequest, rawResponse) => {
|
763
645
|
this._log.info('listDocuments values %j', values);
|
@@ -819,15 +701,12 @@ class DocumentServiceClient {
|
|
819
701
|
options = options || {};
|
820
702
|
options.otherArgs = options.otherArgs || {};
|
821
703
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
822
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
823
|
-
|
824
|
-
|
825
|
-
});
|
704
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
705
|
+
'parent': request.parent ?? '',
|
706
|
+
});
|
826
707
|
const defaultCallSettings = this._defaults['listDocuments'];
|
827
708
|
const callSettings = defaultCallSettings.merge(options);
|
828
|
-
this.initialize().catch(err => {
|
829
|
-
throw err;
|
830
|
-
});
|
709
|
+
this.initialize().catch(err => { throw err; });
|
831
710
|
this._log.info('listDocuments stream %j', request);
|
832
711
|
return this.descriptors.page.listDocuments.createStream(this.innerApiCalls.listDocuments, request, callSettings);
|
833
712
|
}
|
@@ -881,103 +760,100 @@ class DocumentServiceClient {
|
|
881
760
|
options = options || {};
|
882
761
|
options.otherArgs = options.otherArgs || {};
|
883
762
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
884
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
885
|
-
|
886
|
-
|
887
|
-
});
|
763
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
764
|
+
'parent': request.parent ?? '',
|
765
|
+
});
|
888
766
|
const defaultCallSettings = this._defaults['listDocuments'];
|
889
767
|
const callSettings = defaultCallSettings.merge(options);
|
890
|
-
this.initialize().catch(err => {
|
891
|
-
throw err;
|
892
|
-
});
|
768
|
+
this.initialize().catch(err => { throw err; });
|
893
769
|
this._log.info('listDocuments iterate %j', request);
|
894
770
|
return this.descriptors.page.listDocuments.asyncIterate(this.innerApiCalls['listDocuments'], request, callSettings);
|
895
771
|
}
|
896
772
|
/**
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
773
|
+
* Gets information about a location.
|
774
|
+
*
|
775
|
+
* @param {Object} request
|
776
|
+
* The request object that will be sent.
|
777
|
+
* @param {string} request.name
|
778
|
+
* Resource name for the location.
|
779
|
+
* @param {object} [options]
|
780
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
781
|
+
* @returns {Promise} - The promise which resolves to an array.
|
782
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
783
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
784
|
+
* for more details and examples.
|
785
|
+
* @example
|
786
|
+
* ```
|
787
|
+
* const [response] = await client.getLocation(request);
|
788
|
+
* ```
|
789
|
+
*/
|
914
790
|
getLocation(request, options, callback) {
|
915
791
|
return this.locationsClient.getLocation(request, options, callback);
|
916
792
|
}
|
917
793
|
/**
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
794
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
795
|
+
*
|
796
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
797
|
+
* @param {Object} request
|
798
|
+
* The request object that will be sent.
|
799
|
+
* @param {string} request.name
|
800
|
+
* The resource that owns the locations collection, if applicable.
|
801
|
+
* @param {string} request.filter
|
802
|
+
* The standard list filter.
|
803
|
+
* @param {number} request.pageSize
|
804
|
+
* The standard list page size.
|
805
|
+
* @param {string} request.pageToken
|
806
|
+
* The standard list page token.
|
807
|
+
* @param {object} [options]
|
808
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
809
|
+
* @returns {Object}
|
810
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
811
|
+
* When you iterate the returned iterable, each element will be an object representing
|
812
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
813
|
+
* so you can stop the iteration when you don't need more results.
|
814
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
815
|
+
* for more details and examples.
|
816
|
+
* @example
|
817
|
+
* ```
|
818
|
+
* const iterable = client.listLocationsAsync(request);
|
819
|
+
* for await (const response of iterable) {
|
820
|
+
* // process response
|
821
|
+
* }
|
822
|
+
* ```
|
823
|
+
*/
|
948
824
|
listLocationsAsync(request, options) {
|
949
825
|
return this.locationsClient.listLocationsAsync(request, options);
|
950
826
|
}
|
951
827
|
/**
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
828
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
829
|
+
* method to poll the operation result at intervals as recommended by the API
|
830
|
+
* service.
|
831
|
+
*
|
832
|
+
* @param {Object} request - The request object that will be sent.
|
833
|
+
* @param {string} request.name - The name of the operation resource.
|
834
|
+
* @param {Object=} options
|
835
|
+
* Optional parameters. You can override the default settings for this call,
|
836
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
837
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
838
|
+
* for the details.
|
839
|
+
* @param {function(?Error, ?Object)=} callback
|
840
|
+
* The function which will be called with the result of the API call.
|
841
|
+
*
|
842
|
+
* The second parameter to the callback is an object representing
|
843
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
844
|
+
* @return {Promise} - The promise which resolves to an array.
|
845
|
+
* The first element of the array is an object representing
|
846
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
847
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
848
|
+
*
|
849
|
+
* @example
|
850
|
+
* ```
|
851
|
+
* const client = longrunning.operationsClient();
|
852
|
+
* const name = '';
|
853
|
+
* const [response] = await client.getOperation({name});
|
854
|
+
* // doThingsWith(response)
|
855
|
+
* ```
|
856
|
+
*/
|
981
857
|
getOperation(request, optionsOrCallback, callback) {
|
982
858
|
let options;
|
983
859
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1188,6 +1064,51 @@ class DocumentServiceClient {
|
|
1188
1064
|
matchEngineFromEngineName(engineName) {
|
1189
1065
|
return this.pathTemplates.enginePathTemplate.match(engineName).engine;
|
1190
1066
|
}
|
1067
|
+
/**
|
1068
|
+
* Return a fully-qualified identityMappingStore resource name string.
|
1069
|
+
*
|
1070
|
+
* @param {string} project
|
1071
|
+
* @param {string} location
|
1072
|
+
* @param {string} identity_mapping_store
|
1073
|
+
* @returns {string} Resource name string.
|
1074
|
+
*/
|
1075
|
+
identityMappingStorePath(project, location, identityMappingStore) {
|
1076
|
+
return this.pathTemplates.identityMappingStorePathTemplate.render({
|
1077
|
+
project: project,
|
1078
|
+
location: location,
|
1079
|
+
identity_mapping_store: identityMappingStore,
|
1080
|
+
});
|
1081
|
+
}
|
1082
|
+
/**
|
1083
|
+
* Parse the project from IdentityMappingStore resource.
|
1084
|
+
*
|
1085
|
+
* @param {string} identityMappingStoreName
|
1086
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
1087
|
+
* @returns {string} A string representing the project.
|
1088
|
+
*/
|
1089
|
+
matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
|
1090
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
|
1091
|
+
}
|
1092
|
+
/**
|
1093
|
+
* Parse the location from IdentityMappingStore resource.
|
1094
|
+
*
|
1095
|
+
* @param {string} identityMappingStoreName
|
1096
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
1097
|
+
* @returns {string} A string representing the location.
|
1098
|
+
*/
|
1099
|
+
matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
|
1100
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
|
1101
|
+
}
|
1102
|
+
/**
|
1103
|
+
* Parse the identity_mapping_store from IdentityMappingStore resource.
|
1104
|
+
*
|
1105
|
+
* @param {string} identityMappingStoreName
|
1106
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
1107
|
+
* @returns {string} A string representing the identity_mapping_store.
|
1108
|
+
*/
|
1109
|
+
matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
|
1110
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
|
1111
|
+
}
|
1191
1112
|
/**
|
1192
1113
|
* Return a fully-qualified project resource name string.
|
1193
1114
|
*
|
@@ -1209,6 +1130,84 @@ class DocumentServiceClient {
|
|
1209
1130
|
matchProjectFromProjectName(projectName) {
|
1210
1131
|
return this.pathTemplates.projectPathTemplate.match(projectName).project;
|
1211
1132
|
}
|
1133
|
+
/**
|
1134
|
+
* Return a fully-qualified projectLocationCmekConfig resource name string.
|
1135
|
+
*
|
1136
|
+
* @param {string} project
|
1137
|
+
* @param {string} location
|
1138
|
+
* @returns {string} Resource name string.
|
1139
|
+
*/
|
1140
|
+
projectLocationCmekConfigPath(project, location) {
|
1141
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
|
1142
|
+
project: project,
|
1143
|
+
location: location,
|
1144
|
+
});
|
1145
|
+
}
|
1146
|
+
/**
|
1147
|
+
* Parse the project from ProjectLocationCmekConfig resource.
|
1148
|
+
*
|
1149
|
+
* @param {string} projectLocationCmekConfigName
|
1150
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
1151
|
+
* @returns {string} A string representing the project.
|
1152
|
+
*/
|
1153
|
+
matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
1154
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
|
1155
|
+
}
|
1156
|
+
/**
|
1157
|
+
* Parse the location from ProjectLocationCmekConfig resource.
|
1158
|
+
*
|
1159
|
+
* @param {string} projectLocationCmekConfigName
|
1160
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
1161
|
+
* @returns {string} A string representing the location.
|
1162
|
+
*/
|
1163
|
+
matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
1164
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
|
1165
|
+
}
|
1166
|
+
/**
|
1167
|
+
* Return a fully-qualified projectLocationCmekConfigs resource name string.
|
1168
|
+
*
|
1169
|
+
* @param {string} project
|
1170
|
+
* @param {string} location
|
1171
|
+
* @param {string} cmek_config
|
1172
|
+
* @returns {string} Resource name string.
|
1173
|
+
*/
|
1174
|
+
projectLocationCmekConfigsPath(project, location, cmekConfig) {
|
1175
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
|
1176
|
+
project: project,
|
1177
|
+
location: location,
|
1178
|
+
cmek_config: cmekConfig,
|
1179
|
+
});
|
1180
|
+
}
|
1181
|
+
/**
|
1182
|
+
* Parse the project from ProjectLocationCmekConfigs resource.
|
1183
|
+
*
|
1184
|
+
* @param {string} projectLocationCmekConfigsName
|
1185
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
1186
|
+
* @returns {string} A string representing the project.
|
1187
|
+
*/
|
1188
|
+
matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
1189
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
|
1190
|
+
}
|
1191
|
+
/**
|
1192
|
+
* Parse the location from ProjectLocationCmekConfigs resource.
|
1193
|
+
*
|
1194
|
+
* @param {string} projectLocationCmekConfigsName
|
1195
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
1196
|
+
* @returns {string} A string representing the location.
|
1197
|
+
*/
|
1198
|
+
matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
1199
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
|
1200
|
+
}
|
1201
|
+
/**
|
1202
|
+
* Parse the cmek_config from ProjectLocationCmekConfigs resource.
|
1203
|
+
*
|
1204
|
+
* @param {string} projectLocationCmekConfigsName
|
1205
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
1206
|
+
* @returns {string} A string representing the cmek_config.
|
1207
|
+
*/
|
1208
|
+
matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
1209
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
|
1210
|
+
}
|
1212
1211
|
/**
|
1213
1212
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
1214
1213
|
*
|
@@ -3492,8 +3491,8 @@ class DocumentServiceClient {
|
|
3492
3491
|
this._log.info('ending gRPC channel');
|
3493
3492
|
this._terminated = true;
|
3494
3493
|
stub.close();
|
3495
|
-
this.locationsClient.close();
|
3496
|
-
this.operationsClient.close();
|
3494
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3495
|
+
void this.operationsClient.close();
|
3497
3496
|
});
|
3498
3497
|
}
|
3499
3498
|
return Promise.resolve();
|