@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
@@ -100,26 +100,17 @@ class ControlServiceClient {
|
|
100
100
|
constructor(opts, gaxInstance) {
|
101
101
|
// Ensure that options include all the required fields.
|
102
102
|
const staticMembers = this.constructor;
|
103
|
-
if (opts?.universe_domain &&
|
104
|
-
opts?.universeDomain &&
|
105
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
103
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
106
104
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
107
105
|
}
|
108
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
109
|
-
|
110
|
-
: undefined;
|
111
|
-
this._universeDomain =
|
112
|
-
opts?.universeDomain ??
|
113
|
-
opts?.universe_domain ??
|
114
|
-
universeDomainEnvVar ??
|
115
|
-
'googleapis.com';
|
106
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
107
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
116
108
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
117
109
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
118
110
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
119
111
|
const port = opts?.port || staticMembers.port;
|
120
112
|
const clientConfig = opts?.clientConfig ?? {};
|
121
|
-
const fallback = opts?.fallback ??
|
122
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
113
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
123
114
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
124
115
|
// Request numeric enum values if REST transport is used.
|
125
116
|
opts.numericEnums = true;
|
@@ -149,7 +140,10 @@ class ControlServiceClient {
|
|
149
140
|
}
|
150
141
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
151
142
|
// Determine the client header string.
|
152
|
-
const clientHeader = [
|
143
|
+
const clientHeader = [
|
144
|
+
`gax/${this._gaxModule.version}`,
|
145
|
+
`gapic/${version}`,
|
146
|
+
];
|
153
147
|
if (typeof process === 'object' && 'versions' in process) {
|
154
148
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
155
149
|
}
|
@@ -172,8 +166,11 @@ class ControlServiceClient {
|
|
172
166
|
// Create useful helper objects for these.
|
173
167
|
this.pathTemplates = {
|
174
168
|
enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
|
169
|
+
identityMappingStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}'),
|
175
170
|
locationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}'),
|
176
171
|
projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
|
172
|
+
projectLocationCmekConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfig'),
|
173
|
+
projectLocationCmekConfigsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfigs/{cmek_config}'),
|
177
174
|
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
178
175
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
179
176
|
projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
|
@@ -212,7 +209,7 @@ class ControlServiceClient {
|
|
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
|
-
listControls: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'controls')
|
212
|
+
listControls: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'controls')
|
216
213
|
};
|
217
214
|
// Put together the default options sent with requests.
|
218
215
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.ControlService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -241,19 +238,13 @@ class ControlServiceClient {
|
|
241
238
|
}
|
242
239
|
// Put together the "service stub" for
|
243
240
|
// google.cloud.discoveryengine.v1.ControlService.
|
244
|
-
this.controlServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
245
|
-
|
246
|
-
|
247
|
-
|
241
|
+
this.controlServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
242
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.ControlService') :
|
243
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
244
|
+
this._protos.google.cloud.discoveryengine.v1.ControlService, this._opts, this._providedCustomServicePath);
|
248
245
|
// Iterate over each of the methods that the service provides
|
249
246
|
// and create an API call method for each.
|
250
|
-
const controlServiceStubMethods = [
|
251
|
-
'createControl',
|
252
|
-
'deleteControl',
|
253
|
-
'updateControl',
|
254
|
-
'getControl',
|
255
|
-
'listControls',
|
256
|
-
];
|
247
|
+
const controlServiceStubMethods = ['createControl', 'deleteControl', 'updateControl', 'getControl', 'listControls'];
|
257
248
|
for (const methodName of controlServiceStubMethods) {
|
258
249
|
const callPromise = this.controlServiceStub.then(stub => (...args) => {
|
259
250
|
if (this._terminated) {
|
@@ -264,7 +255,8 @@ class ControlServiceClient {
|
|
264
255
|
}, (err) => () => {
|
265
256
|
throw err;
|
266
257
|
});
|
267
|
-
const descriptor = this.descriptors.page[methodName] ||
|
258
|
+
const descriptor = this.descriptors.page[methodName] ||
|
259
|
+
undefined;
|
268
260
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
269
261
|
this.innerApiCalls[methodName] = apiCall;
|
270
262
|
}
|
@@ -276,8 +268,7 @@ class ControlServiceClient {
|
|
276
268
|
* @returns {string} The DNS address for this service.
|
277
269
|
*/
|
278
270
|
static get servicePath() {
|
279
|
-
if (typeof process === 'object' &&
|
280
|
-
typeof process.emitWarning === 'function') {
|
271
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
281
272
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
282
273
|
}
|
283
274
|
return 'discoveryengine.googleapis.com';
|
@@ -288,8 +279,7 @@ class ControlServiceClient {
|
|
288
279
|
* @returns {string} The DNS address for this service.
|
289
280
|
*/
|
290
281
|
static get apiEndpoint() {
|
291
|
-
if (typeof process === 'object' &&
|
292
|
-
typeof process.emitWarning === 'function') {
|
282
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
293
283
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
294
284
|
}
|
295
285
|
return 'discoveryengine.googleapis.com';
|
@@ -317,7 +307,9 @@ class ControlServiceClient {
|
|
317
307
|
* @returns {string[]} List of default scopes.
|
318
308
|
*/
|
319
309
|
static get scopes() {
|
320
|
-
return [
|
310
|
+
return [
|
311
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
312
|
+
];
|
321
313
|
}
|
322
314
|
/**
|
323
315
|
* Return the project ID used by this class.
|
@@ -343,13 +335,10 @@ class ControlServiceClient {
|
|
343
335
|
options = options || {};
|
344
336
|
options.otherArgs = options.otherArgs || {};
|
345
337
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
346
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
347
|
-
|
348
|
-
parent: request.parent ?? '',
|
349
|
-
});
|
350
|
-
this.initialize().catch(err => {
|
351
|
-
throw err;
|
338
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
339
|
+
'parent': request.parent ?? '',
|
352
340
|
});
|
341
|
+
this.initialize().catch(err => { throw err; });
|
353
342
|
this._log.info('createControl request %j', request);
|
354
343
|
const wrappedCallback = callback
|
355
344
|
? (error, response, options, rawResponse) => {
|
@@ -357,11 +346,16 @@ class ControlServiceClient {
|
|
357
346
|
callback(error, response, options, rawResponse); // We verified callback above.
|
358
347
|
}
|
359
348
|
: undefined;
|
360
|
-
return this.innerApiCalls
|
361
|
-
.createControl(request, options, wrappedCallback)
|
349
|
+
return this.innerApiCalls.createControl(request, options, wrappedCallback)
|
362
350
|
?.then(([response, options, rawResponse]) => {
|
363
351
|
this._log.info('createControl response %j', response);
|
364
352
|
return [response, options, rawResponse];
|
353
|
+
}).catch((error) => {
|
354
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
355
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
356
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
357
|
+
}
|
358
|
+
throw error;
|
365
359
|
});
|
366
360
|
}
|
367
361
|
deleteControl(request, optionsOrCallback, callback) {
|
@@ -377,13 +371,10 @@ class ControlServiceClient {
|
|
377
371
|
options = options || {};
|
378
372
|
options.otherArgs = options.otherArgs || {};
|
379
373
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
380
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
381
|
-
|
382
|
-
name: request.name ?? '',
|
383
|
-
});
|
384
|
-
this.initialize().catch(err => {
|
385
|
-
throw err;
|
374
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
375
|
+
'name': request.name ?? '',
|
386
376
|
});
|
377
|
+
this.initialize().catch(err => { throw err; });
|
387
378
|
this._log.info('deleteControl request %j', request);
|
388
379
|
const wrappedCallback = callback
|
389
380
|
? (error, response, options, rawResponse) => {
|
@@ -391,11 +382,16 @@ class ControlServiceClient {
|
|
391
382
|
callback(error, response, options, rawResponse); // We verified callback above.
|
392
383
|
}
|
393
384
|
: undefined;
|
394
|
-
return this.innerApiCalls
|
395
|
-
.deleteControl(request, options, wrappedCallback)
|
385
|
+
return this.innerApiCalls.deleteControl(request, options, wrappedCallback)
|
396
386
|
?.then(([response, options, rawResponse]) => {
|
397
387
|
this._log.info('deleteControl response %j', response);
|
398
388
|
return [response, options, rawResponse];
|
389
|
+
}).catch((error) => {
|
390
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
391
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
392
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
393
|
+
}
|
394
|
+
throw error;
|
399
395
|
});
|
400
396
|
}
|
401
397
|
updateControl(request, optionsOrCallback, callback) {
|
@@ -411,13 +407,10 @@ class ControlServiceClient {
|
|
411
407
|
options = options || {};
|
412
408
|
options.otherArgs = options.otherArgs || {};
|
413
409
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
414
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
415
|
-
|
416
|
-
'control.name': request.control.name ?? '',
|
417
|
-
});
|
418
|
-
this.initialize().catch(err => {
|
419
|
-
throw err;
|
410
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
411
|
+
'control.name': request.control.name ?? '',
|
420
412
|
});
|
413
|
+
this.initialize().catch(err => { throw err; });
|
421
414
|
this._log.info('updateControl request %j', request);
|
422
415
|
const wrappedCallback = callback
|
423
416
|
? (error, response, options, rawResponse) => {
|
@@ -425,11 +418,16 @@ class ControlServiceClient {
|
|
425
418
|
callback(error, response, options, rawResponse); // We verified callback above.
|
426
419
|
}
|
427
420
|
: undefined;
|
428
|
-
return this.innerApiCalls
|
429
|
-
.updateControl(request, options, wrappedCallback)
|
421
|
+
return this.innerApiCalls.updateControl(request, options, wrappedCallback)
|
430
422
|
?.then(([response, options, rawResponse]) => {
|
431
423
|
this._log.info('updateControl response %j', response);
|
432
424
|
return [response, options, rawResponse];
|
425
|
+
}).catch((error) => {
|
426
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
427
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
428
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
429
|
+
}
|
430
|
+
throw error;
|
433
431
|
});
|
434
432
|
}
|
435
433
|
getControl(request, optionsOrCallback, callback) {
|
@@ -445,13 +443,10 @@ class ControlServiceClient {
|
|
445
443
|
options = options || {};
|
446
444
|
options.otherArgs = options.otherArgs || {};
|
447
445
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
448
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
449
|
-
|
450
|
-
name: request.name ?? '',
|
451
|
-
});
|
452
|
-
this.initialize().catch(err => {
|
453
|
-
throw err;
|
446
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
447
|
+
'name': request.name ?? '',
|
454
448
|
});
|
449
|
+
this.initialize().catch(err => { throw err; });
|
455
450
|
this._log.info('getControl request %j', request);
|
456
451
|
const wrappedCallback = callback
|
457
452
|
? (error, response, options, rawResponse) => {
|
@@ -459,11 +454,16 @@ class ControlServiceClient {
|
|
459
454
|
callback(error, response, options, rawResponse); // We verified callback above.
|
460
455
|
}
|
461
456
|
: undefined;
|
462
|
-
return this.innerApiCalls
|
463
|
-
.getControl(request, options, wrappedCallback)
|
457
|
+
return this.innerApiCalls.getControl(request, options, wrappedCallback)
|
464
458
|
?.then(([response, options, rawResponse]) => {
|
465
459
|
this._log.info('getControl response %j', response);
|
466
460
|
return [response, options, rawResponse];
|
461
|
+
}).catch((error) => {
|
462
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
463
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
464
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
465
|
+
}
|
466
|
+
throw error;
|
467
467
|
});
|
468
468
|
}
|
469
469
|
listControls(request, optionsOrCallback, callback) {
|
@@ -479,13 +479,10 @@ class ControlServiceClient {
|
|
479
479
|
options = options || {};
|
480
480
|
options.otherArgs = options.otherArgs || {};
|
481
481
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
482
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
483
|
-
|
484
|
-
parent: request.parent ?? '',
|
485
|
-
});
|
486
|
-
this.initialize().catch(err => {
|
487
|
-
throw err;
|
482
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
483
|
+
'parent': request.parent ?? '',
|
488
484
|
});
|
485
|
+
this.initialize().catch(err => { throw err; });
|
489
486
|
const wrappedCallback = callback
|
490
487
|
? (error, values, nextPageRequest, rawResponse) => {
|
491
488
|
this._log.info('listControls values %j', values);
|
@@ -537,15 +534,12 @@ class ControlServiceClient {
|
|
537
534
|
options = options || {};
|
538
535
|
options.otherArgs = options.otherArgs || {};
|
539
536
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
540
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
541
|
-
|
542
|
-
|
543
|
-
});
|
537
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
538
|
+
'parent': request.parent ?? '',
|
539
|
+
});
|
544
540
|
const defaultCallSettings = this._defaults['listControls'];
|
545
541
|
const callSettings = defaultCallSettings.merge(options);
|
546
|
-
this.initialize().catch(err => {
|
547
|
-
throw err;
|
548
|
-
});
|
542
|
+
this.initialize().catch(err => { throw err; });
|
549
543
|
this._log.info('listControls stream %j', request);
|
550
544
|
return this.descriptors.page.listControls.createStream(this.innerApiCalls.listControls, request, callSettings);
|
551
545
|
}
|
@@ -589,70 +583,67 @@ class ControlServiceClient {
|
|
589
583
|
options = options || {};
|
590
584
|
options.otherArgs = options.otherArgs || {};
|
591
585
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
592
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
593
|
-
|
594
|
-
|
595
|
-
});
|
586
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
587
|
+
'parent': request.parent ?? '',
|
588
|
+
});
|
596
589
|
const defaultCallSettings = this._defaults['listControls'];
|
597
590
|
const callSettings = defaultCallSettings.merge(options);
|
598
|
-
this.initialize().catch(err => {
|
599
|
-
throw err;
|
600
|
-
});
|
591
|
+
this.initialize().catch(err => { throw err; });
|
601
592
|
this._log.info('listControls iterate %j', request);
|
602
593
|
return this.descriptors.page.listControls.asyncIterate(this.innerApiCalls['listControls'], request, callSettings);
|
603
594
|
}
|
604
595
|
/**
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
596
|
+
* Gets information about a location.
|
597
|
+
*
|
598
|
+
* @param {Object} request
|
599
|
+
* The request object that will be sent.
|
600
|
+
* @param {string} request.name
|
601
|
+
* Resource name for the location.
|
602
|
+
* @param {object} [options]
|
603
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
604
|
+
* @returns {Promise} - The promise which resolves to an array.
|
605
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
606
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
607
|
+
* for more details and examples.
|
608
|
+
* @example
|
609
|
+
* ```
|
610
|
+
* const [response] = await client.getLocation(request);
|
611
|
+
* ```
|
612
|
+
*/
|
622
613
|
getLocation(request, options, callback) {
|
623
614
|
return this.locationsClient.getLocation(request, options, callback);
|
624
615
|
}
|
625
616
|
/**
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
617
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
618
|
+
*
|
619
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
620
|
+
* @param {Object} request
|
621
|
+
* The request object that will be sent.
|
622
|
+
* @param {string} request.name
|
623
|
+
* The resource that owns the locations collection, if applicable.
|
624
|
+
* @param {string} request.filter
|
625
|
+
* The standard list filter.
|
626
|
+
* @param {number} request.pageSize
|
627
|
+
* The standard list page size.
|
628
|
+
* @param {string} request.pageToken
|
629
|
+
* The standard list page token.
|
630
|
+
* @param {object} [options]
|
631
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
632
|
+
* @returns {Object}
|
633
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
634
|
+
* When you iterate the returned iterable, each element will be an object representing
|
635
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
636
|
+
* so you can stop the iteration when you don't need more results.
|
637
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
638
|
+
* for more details and examples.
|
639
|
+
* @example
|
640
|
+
* ```
|
641
|
+
* const iterable = client.listLocationsAsync(request);
|
642
|
+
* for await (const response of iterable) {
|
643
|
+
* // process response
|
644
|
+
* }
|
645
|
+
* ```
|
646
|
+
*/
|
656
647
|
listLocationsAsync(request, options) {
|
657
648
|
return this.locationsClient.listLocationsAsync(request, options);
|
658
649
|
}
|
@@ -716,6 +707,51 @@ class ControlServiceClient {
|
|
716
707
|
matchEngineFromEngineName(engineName) {
|
717
708
|
return this.pathTemplates.enginePathTemplate.match(engineName).engine;
|
718
709
|
}
|
710
|
+
/**
|
711
|
+
* Return a fully-qualified identityMappingStore resource name string.
|
712
|
+
*
|
713
|
+
* @param {string} project
|
714
|
+
* @param {string} location
|
715
|
+
* @param {string} identity_mapping_store
|
716
|
+
* @returns {string} Resource name string.
|
717
|
+
*/
|
718
|
+
identityMappingStorePath(project, location, identityMappingStore) {
|
719
|
+
return this.pathTemplates.identityMappingStorePathTemplate.render({
|
720
|
+
project: project,
|
721
|
+
location: location,
|
722
|
+
identity_mapping_store: identityMappingStore,
|
723
|
+
});
|
724
|
+
}
|
725
|
+
/**
|
726
|
+
* Parse the project from IdentityMappingStore resource.
|
727
|
+
*
|
728
|
+
* @param {string} identityMappingStoreName
|
729
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
730
|
+
* @returns {string} A string representing the project.
|
731
|
+
*/
|
732
|
+
matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
|
733
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
|
734
|
+
}
|
735
|
+
/**
|
736
|
+
* Parse the location from IdentityMappingStore resource.
|
737
|
+
*
|
738
|
+
* @param {string} identityMappingStoreName
|
739
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
740
|
+
* @returns {string} A string representing the location.
|
741
|
+
*/
|
742
|
+
matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
|
743
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
|
744
|
+
}
|
745
|
+
/**
|
746
|
+
* Parse the identity_mapping_store from IdentityMappingStore resource.
|
747
|
+
*
|
748
|
+
* @param {string} identityMappingStoreName
|
749
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
750
|
+
* @returns {string} A string representing the identity_mapping_store.
|
751
|
+
*/
|
752
|
+
matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
|
753
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
|
754
|
+
}
|
719
755
|
/**
|
720
756
|
* Return a fully-qualified location resource name string.
|
721
757
|
*
|
@@ -770,6 +806,84 @@ class ControlServiceClient {
|
|
770
806
|
matchProjectFromProjectName(projectName) {
|
771
807
|
return this.pathTemplates.projectPathTemplate.match(projectName).project;
|
772
808
|
}
|
809
|
+
/**
|
810
|
+
* Return a fully-qualified projectLocationCmekConfig resource name string.
|
811
|
+
*
|
812
|
+
* @param {string} project
|
813
|
+
* @param {string} location
|
814
|
+
* @returns {string} Resource name string.
|
815
|
+
*/
|
816
|
+
projectLocationCmekConfigPath(project, location) {
|
817
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
|
818
|
+
project: project,
|
819
|
+
location: location,
|
820
|
+
});
|
821
|
+
}
|
822
|
+
/**
|
823
|
+
* Parse the project from ProjectLocationCmekConfig resource.
|
824
|
+
*
|
825
|
+
* @param {string} projectLocationCmekConfigName
|
826
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
827
|
+
* @returns {string} A string representing the project.
|
828
|
+
*/
|
829
|
+
matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
830
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
|
831
|
+
}
|
832
|
+
/**
|
833
|
+
* Parse the location from ProjectLocationCmekConfig resource.
|
834
|
+
*
|
835
|
+
* @param {string} projectLocationCmekConfigName
|
836
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
837
|
+
* @returns {string} A string representing the location.
|
838
|
+
*/
|
839
|
+
matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
840
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
|
841
|
+
}
|
842
|
+
/**
|
843
|
+
* Return a fully-qualified projectLocationCmekConfigs resource name string.
|
844
|
+
*
|
845
|
+
* @param {string} project
|
846
|
+
* @param {string} location
|
847
|
+
* @param {string} cmek_config
|
848
|
+
* @returns {string} Resource name string.
|
849
|
+
*/
|
850
|
+
projectLocationCmekConfigsPath(project, location, cmekConfig) {
|
851
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
|
852
|
+
project: project,
|
853
|
+
location: location,
|
854
|
+
cmek_config: cmekConfig,
|
855
|
+
});
|
856
|
+
}
|
857
|
+
/**
|
858
|
+
* Parse the project from ProjectLocationCmekConfigs resource.
|
859
|
+
*
|
860
|
+
* @param {string} projectLocationCmekConfigsName
|
861
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
862
|
+
* @returns {string} A string representing the project.
|
863
|
+
*/
|
864
|
+
matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
865
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
|
866
|
+
}
|
867
|
+
/**
|
868
|
+
* Parse the location from ProjectLocationCmekConfigs resource.
|
869
|
+
*
|
870
|
+
* @param {string} projectLocationCmekConfigsName
|
871
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
872
|
+
* @returns {string} A string representing the location.
|
873
|
+
*/
|
874
|
+
matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
875
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
|
876
|
+
}
|
877
|
+
/**
|
878
|
+
* Parse the cmek_config from ProjectLocationCmekConfigs resource.
|
879
|
+
*
|
880
|
+
* @param {string} projectLocationCmekConfigsName
|
881
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
882
|
+
* @returns {string} A string representing the cmek_config.
|
883
|
+
*/
|
884
|
+
matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
885
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
|
886
|
+
}
|
773
887
|
/**
|
774
888
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
775
889
|
*
|
@@ -2927,7 +3041,7 @@ class ControlServiceClient {
|
|
2927
3041
|
this._log.info('ending gRPC channel');
|
2928
3042
|
this._terminated = true;
|
2929
3043
|
stub.close();
|
2930
|
-
this.locationsClient.close();
|
3044
|
+
this.locationsClient.close().catch(err => { throw err; });
|
2931
3045
|
});
|
2932
3046
|
}
|
2933
3047
|
return Promise.resolve();
|
@@ -1,6 +1,7 @@
|
|
1
1
|
[
|
2
2
|
"../../protos/google/cloud/discoveryengine/v1/answer.proto",
|
3
3
|
"../../protos/google/cloud/discoveryengine/v1/chunk.proto",
|
4
|
+
"../../protos/google/cloud/discoveryengine/v1/cmek_config_service.proto",
|
4
5
|
"../../protos/google/cloud/discoveryengine/v1/common.proto",
|
5
6
|
"../../protos/google/cloud/discoveryengine/v1/completion.proto",
|
6
7
|
"../../protos/google/cloud/discoveryengine/v1/completion_service.proto",
|
@@ -18,6 +19,8 @@
|
|
18
19
|
"../../protos/google/cloud/discoveryengine/v1/engine_service.proto",
|
19
20
|
"../../protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto",
|
20
21
|
"../../protos/google/cloud/discoveryengine/v1/grounding.proto",
|
22
|
+
"../../protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto",
|
23
|
+
"../../protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto",
|
21
24
|
"../../protos/google/cloud/discoveryengine/v1/import_config.proto",
|
22
25
|
"../../protos/google/cloud/discoveryengine/v1/project.proto",
|
23
26
|
"../../protos/google/cloud/discoveryengine/v1/project_service.proto",
|
@@ -35,5 +38,7 @@
|
|
35
38
|
"../../protos/google/cloud/discoveryengine/v1/site_search_engine.proto",
|
36
39
|
"../../protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto",
|
37
40
|
"../../protos/google/cloud/discoveryengine/v1/user_event.proto",
|
38
|
-
"../../protos/google/cloud/discoveryengine/v1/user_event_service.proto"
|
41
|
+
"../../protos/google/cloud/discoveryengine/v1/user_event_service.proto",
|
42
|
+
"../../protos/google/cloud/discoveryengine/v1/user_license.proto",
|
43
|
+
"../../protos/google/cloud/discoveryengine/v1/user_license_service.proto"
|
39
44
|
]
|