@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
@@ -98,26 +98,17 @@ class SearchTuningServiceClient {
|
|
98
98
|
constructor(opts, gaxInstance) {
|
99
99
|
// Ensure that options include all the required fields.
|
100
100
|
const staticMembers = this.constructor;
|
101
|
-
if (opts?.universe_domain &&
|
102
|
-
opts?.universeDomain &&
|
103
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
101
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
104
102
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
105
103
|
}
|
106
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
107
|
-
|
108
|
-
: undefined;
|
109
|
-
this._universeDomain =
|
110
|
-
opts?.universeDomain ??
|
111
|
-
opts?.universe_domain ??
|
112
|
-
universeDomainEnvVar ??
|
113
|
-
'googleapis.com';
|
104
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
105
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
114
106
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
115
107
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
116
108
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
117
109
|
const port = opts?.port || staticMembers.port;
|
118
110
|
const clientConfig = opts?.clientConfig ?? {};
|
119
|
-
const fallback = opts?.fallback ??
|
120
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
111
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
121
112
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
122
113
|
// Request numeric enum values if REST transport is used.
|
123
114
|
opts.numericEnums = true;
|
@@ -147,7 +138,10 @@ class SearchTuningServiceClient {
|
|
147
138
|
}
|
148
139
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
149
140
|
// Determine the client header string.
|
150
|
-
const clientHeader = [
|
141
|
+
const clientHeader = [
|
142
|
+
`gax/${this._gaxModule.version}`,
|
143
|
+
`gapic/${version}`,
|
144
|
+
];
|
151
145
|
if (typeof process === 'object' && 'versions' in process) {
|
152
146
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
153
147
|
}
|
@@ -170,7 +164,10 @@ class SearchTuningServiceClient {
|
|
170
164
|
// Create useful helper objects for these.
|
171
165
|
this.pathTemplates = {
|
172
166
|
enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
|
167
|
+
identityMappingStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}'),
|
173
168
|
projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
|
169
|
+
projectLocationCmekConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfig'),
|
170
|
+
projectLocationCmekConfigsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfigs/{cmek_config}'),
|
174
171
|
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
175
172
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
176
173
|
projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
|
@@ -205,131 +202,26 @@ class SearchTuningServiceClient {
|
|
205
202
|
projectLocationDataStoreSiteSearchEngineSitemapPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}'),
|
206
203
|
projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
|
207
204
|
};
|
208
|
-
const protoFilesRoot = this._gaxModule.
|
205
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
209
206
|
// This API contains "long-running operations", which return a
|
210
207
|
// an Operation object that allows for tracking of the operation,
|
211
208
|
// rather than holding a request open.
|
212
209
|
const lroOptions = {
|
213
210
|
auth: this.auth,
|
214
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
211
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
215
212
|
};
|
216
213
|
if (opts.fallback) {
|
217
214
|
lroOptions.protoJson = protoFilesRoot;
|
218
|
-
lroOptions.httpRules = [
|
219
|
-
{
|
220
|
-
|
221
|
-
|
222
|
-
body: '*',
|
223
|
-
additional_bindings: [
|
224
|
-
{
|
225
|
-
post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
|
226
|
-
body: '*',
|
227
|
-
},
|
228
|
-
{
|
229
|
-
post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
230
|
-
body: '*',
|
231
|
-
},
|
232
|
-
],
|
233
|
-
},
|
234
|
-
{
|
235
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
236
|
-
get: '/v1/{name=projects/*/operations/*}',
|
237
|
-
additional_bindings: [
|
238
|
-
{
|
239
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
240
|
-
},
|
241
|
-
{
|
242
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
243
|
-
},
|
244
|
-
{
|
245
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
246
|
-
},
|
247
|
-
{
|
248
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
249
|
-
},
|
250
|
-
{
|
251
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
252
|
-
},
|
253
|
-
{
|
254
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
255
|
-
},
|
256
|
-
{
|
257
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
258
|
-
},
|
259
|
-
{
|
260
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
261
|
-
},
|
262
|
-
{
|
263
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
|
264
|
-
},
|
265
|
-
{
|
266
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
267
|
-
},
|
268
|
-
{
|
269
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
270
|
-
},
|
271
|
-
{
|
272
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
273
|
-
},
|
274
|
-
{
|
275
|
-
get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}',
|
276
|
-
},
|
277
|
-
{ get: '/v1/{name=projects/*/locations/*/operations/*}' },
|
278
|
-
{ get: '/v1/{name=projects/*/operations/*}' },
|
279
|
-
],
|
280
|
-
},
|
281
|
-
{
|
282
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
283
|
-
get: '/v1/{name=projects/*}/operations',
|
284
|
-
additional_bindings: [
|
285
|
-
{
|
286
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
287
|
-
},
|
288
|
-
{
|
289
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
290
|
-
},
|
291
|
-
{
|
292
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
293
|
-
},
|
294
|
-
{
|
295
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
296
|
-
},
|
297
|
-
{
|
298
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
299
|
-
},
|
300
|
-
{
|
301
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
302
|
-
},
|
303
|
-
{
|
304
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
305
|
-
},
|
306
|
-
{
|
307
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
308
|
-
},
|
309
|
-
{ get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
|
310
|
-
{
|
311
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
312
|
-
},
|
313
|
-
{
|
314
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
315
|
-
},
|
316
|
-
{ get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
|
317
|
-
{
|
318
|
-
get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
|
319
|
-
},
|
320
|
-
{ get: '/v1/{name=projects/*/locations/*}/operations' },
|
321
|
-
{ get: '/v1/{name=projects/*}/operations' },
|
322
|
-
],
|
323
|
-
},
|
324
|
-
];
|
215
|
+
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: '*', }],
|
216
|
+
}, { 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/*}', }],
|
217
|
+
}, { 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', }],
|
218
|
+
}];
|
325
219
|
}
|
326
|
-
this.operationsClient = this._gaxModule
|
327
|
-
.lro(lroOptions)
|
328
|
-
.operationsClient(opts);
|
220
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
329
221
|
const trainCustomModelResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.TrainCustomModelResponse');
|
330
222
|
const trainCustomModelMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.TrainCustomModelMetadata');
|
331
223
|
this.descriptors.longrunning = {
|
332
|
-
trainCustomModel: new this._gaxModule.LongrunningDescriptor(this.operationsClient, trainCustomModelResponse.decode.bind(trainCustomModelResponse), trainCustomModelMetadata.decode.bind(trainCustomModelMetadata))
|
224
|
+
trainCustomModel: new this._gaxModule.LongrunningDescriptor(this.operationsClient, trainCustomModelResponse.decode.bind(trainCustomModelResponse), trainCustomModelMetadata.decode.bind(trainCustomModelMetadata))
|
333
225
|
};
|
334
226
|
// Put together the default options sent with requests.
|
335
227
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.SearchTuningService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -358,17 +250,13 @@ class SearchTuningServiceClient {
|
|
358
250
|
}
|
359
251
|
// Put together the "service stub" for
|
360
252
|
// google.cloud.discoveryengine.v1.SearchTuningService.
|
361
|
-
this.searchTuningServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
.SearchTuningService, this._opts, this._providedCustomServicePath);
|
253
|
+
this.searchTuningServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
254
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.SearchTuningService') :
|
255
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
256
|
+
this._protos.google.cloud.discoveryengine.v1.SearchTuningService, this._opts, this._providedCustomServicePath);
|
366
257
|
// Iterate over each of the methods that the service provides
|
367
258
|
// and create an API call method for each.
|
368
|
-
const searchTuningServiceStubMethods = [
|
369
|
-
'trainCustomModel',
|
370
|
-
'listCustomModels',
|
371
|
-
];
|
259
|
+
const searchTuningServiceStubMethods = ['trainCustomModel', 'listCustomModels'];
|
372
260
|
for (const methodName of searchTuningServiceStubMethods) {
|
373
261
|
const callPromise = this.searchTuningServiceStub.then(stub => (...args) => {
|
374
262
|
if (this._terminated) {
|
@@ -379,7 +267,8 @@ class SearchTuningServiceClient {
|
|
379
267
|
}, (err) => () => {
|
380
268
|
throw err;
|
381
269
|
});
|
382
|
-
const descriptor = this.descriptors.longrunning[methodName] ||
|
270
|
+
const descriptor = this.descriptors.longrunning[methodName] ||
|
271
|
+
undefined;
|
383
272
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
384
273
|
this.innerApiCalls[methodName] = apiCall;
|
385
274
|
}
|
@@ -391,8 +280,7 @@ class SearchTuningServiceClient {
|
|
391
280
|
* @returns {string} The DNS address for this service.
|
392
281
|
*/
|
393
282
|
static get servicePath() {
|
394
|
-
if (typeof process === 'object' &&
|
395
|
-
typeof process.emitWarning === 'function') {
|
283
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
396
284
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
397
285
|
}
|
398
286
|
return 'discoveryengine.googleapis.com';
|
@@ -403,8 +291,7 @@ class SearchTuningServiceClient {
|
|
403
291
|
* @returns {string} The DNS address for this service.
|
404
292
|
*/
|
405
293
|
static get apiEndpoint() {
|
406
|
-
if (typeof process === 'object' &&
|
407
|
-
typeof process.emitWarning === 'function') {
|
294
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
408
295
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
409
296
|
}
|
410
297
|
return 'discoveryengine.googleapis.com';
|
@@ -432,7 +319,9 @@ class SearchTuningServiceClient {
|
|
432
319
|
* @returns {string[]} List of default scopes.
|
433
320
|
*/
|
434
321
|
static get scopes() {
|
435
|
-
return [
|
322
|
+
return [
|
323
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
324
|
+
];
|
436
325
|
}
|
437
326
|
/**
|
438
327
|
* Return the project ID used by this class.
|
@@ -458,13 +347,10 @@ class SearchTuningServiceClient {
|
|
458
347
|
options = options || {};
|
459
348
|
options.otherArgs = options.otherArgs || {};
|
460
349
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
461
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
462
|
-
|
463
|
-
data_store: request.dataStore ?? '',
|
464
|
-
});
|
465
|
-
this.initialize().catch(err => {
|
466
|
-
throw err;
|
350
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
351
|
+
'data_store': request.dataStore ?? '',
|
467
352
|
});
|
353
|
+
this.initialize().catch(err => { throw err; });
|
468
354
|
this._log.info('listCustomModels request %j', request);
|
469
355
|
const wrappedCallback = callback
|
470
356
|
? (error, response, options, rawResponse) => {
|
@@ -472,11 +358,16 @@ class SearchTuningServiceClient {
|
|
472
358
|
callback(error, response, options, rawResponse); // We verified callback above.
|
473
359
|
}
|
474
360
|
: undefined;
|
475
|
-
return this.innerApiCalls
|
476
|
-
.listCustomModels(request, options, wrappedCallback)
|
361
|
+
return this.innerApiCalls.listCustomModels(request, options, wrappedCallback)
|
477
362
|
?.then(([response, options, rawResponse]) => {
|
478
363
|
this._log.info('listCustomModels response %j', response);
|
479
364
|
return [response, options, rawResponse];
|
365
|
+
}).catch((error) => {
|
366
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
367
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
368
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
369
|
+
}
|
370
|
+
throw error;
|
480
371
|
});
|
481
372
|
}
|
482
373
|
trainCustomModel(request, optionsOrCallback, callback) {
|
@@ -492,13 +383,10 @@ class SearchTuningServiceClient {
|
|
492
383
|
options = options || {};
|
493
384
|
options.otherArgs = options.otherArgs || {};
|
494
385
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
495
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
496
|
-
|
497
|
-
data_store: request.dataStore ?? '',
|
498
|
-
});
|
499
|
-
this.initialize().catch(err => {
|
500
|
-
throw err;
|
386
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
387
|
+
'data_store': request.dataStore ?? '',
|
501
388
|
});
|
389
|
+
this.initialize().catch(err => { throw err; });
|
502
390
|
const wrappedCallback = callback
|
503
391
|
? (error, response, rawResponse, _) => {
|
504
392
|
this._log.info('trainCustomModel response %j', rawResponse);
|
@@ -506,8 +394,7 @@ class SearchTuningServiceClient {
|
|
506
394
|
}
|
507
395
|
: undefined;
|
508
396
|
this._log.info('trainCustomModel request %j', request);
|
509
|
-
return this.innerApiCalls
|
510
|
-
.trainCustomModel(request, options, wrappedCallback)
|
397
|
+
return this.innerApiCalls.trainCustomModel(request, options, wrappedCallback)
|
511
398
|
?.then(([response, rawResponse, _]) => {
|
512
399
|
this._log.info('trainCustomModel response %j', rawResponse);
|
513
400
|
return [response, rawResponse, _];
|
@@ -532,90 +419,90 @@ class SearchTuningServiceClient {
|
|
532
419
|
return decodeOperation;
|
533
420
|
}
|
534
421
|
/**
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
422
|
+
* Gets information about a location.
|
423
|
+
*
|
424
|
+
* @param {Object} request
|
425
|
+
* The request object that will be sent.
|
426
|
+
* @param {string} request.name
|
427
|
+
* Resource name for the location.
|
428
|
+
* @param {object} [options]
|
429
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
430
|
+
* @returns {Promise} - The promise which resolves to an array.
|
431
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
432
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
433
|
+
* for more details and examples.
|
434
|
+
* @example
|
435
|
+
* ```
|
436
|
+
* const [response] = await client.getLocation(request);
|
437
|
+
* ```
|
438
|
+
*/
|
552
439
|
getLocation(request, options, callback) {
|
553
440
|
return this.locationsClient.getLocation(request, options, callback);
|
554
441
|
}
|
555
442
|
/**
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
443
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
444
|
+
*
|
445
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
446
|
+
* @param {Object} request
|
447
|
+
* The request object that will be sent.
|
448
|
+
* @param {string} request.name
|
449
|
+
* The resource that owns the locations collection, if applicable.
|
450
|
+
* @param {string} request.filter
|
451
|
+
* The standard list filter.
|
452
|
+
* @param {number} request.pageSize
|
453
|
+
* The standard list page size.
|
454
|
+
* @param {string} request.pageToken
|
455
|
+
* The standard list page token.
|
456
|
+
* @param {object} [options]
|
457
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
458
|
+
* @returns {Object}
|
459
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
460
|
+
* When you iterate the returned iterable, each element will be an object representing
|
461
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
462
|
+
* so you can stop the iteration when you don't need more results.
|
463
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
464
|
+
* for more details and examples.
|
465
|
+
* @example
|
466
|
+
* ```
|
467
|
+
* const iterable = client.listLocationsAsync(request);
|
468
|
+
* for await (const response of iterable) {
|
469
|
+
* // process response
|
470
|
+
* }
|
471
|
+
* ```
|
472
|
+
*/
|
586
473
|
listLocationsAsync(request, options) {
|
587
474
|
return this.locationsClient.listLocationsAsync(request, options);
|
588
475
|
}
|
589
476
|
/**
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
477
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
478
|
+
* method to poll the operation result at intervals as recommended by the API
|
479
|
+
* service.
|
480
|
+
*
|
481
|
+
* @param {Object} request - The request object that will be sent.
|
482
|
+
* @param {string} request.name - The name of the operation resource.
|
483
|
+
* @param {Object=} options
|
484
|
+
* Optional parameters. You can override the default settings for this call,
|
485
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
486
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
487
|
+
* for the details.
|
488
|
+
* @param {function(?Error, ?Object)=} callback
|
489
|
+
* The function which will be called with the result of the API call.
|
490
|
+
*
|
491
|
+
* The second parameter to the callback is an object representing
|
492
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
493
|
+
* @return {Promise} - The promise which resolves to an array.
|
494
|
+
* The first element of the array is an object representing
|
495
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
496
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
497
|
+
*
|
498
|
+
* @example
|
499
|
+
* ```
|
500
|
+
* const client = longrunning.operationsClient();
|
501
|
+
* const name = '';
|
502
|
+
* const [response] = await client.getOperation({name});
|
503
|
+
* // doThingsWith(response)
|
504
|
+
* ```
|
505
|
+
*/
|
619
506
|
getOperation(request, optionsOrCallback, callback) {
|
620
507
|
let options;
|
621
508
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -826,6 +713,51 @@ class SearchTuningServiceClient {
|
|
826
713
|
matchEngineFromEngineName(engineName) {
|
827
714
|
return this.pathTemplates.enginePathTemplate.match(engineName).engine;
|
828
715
|
}
|
716
|
+
/**
|
717
|
+
* Return a fully-qualified identityMappingStore resource name string.
|
718
|
+
*
|
719
|
+
* @param {string} project
|
720
|
+
* @param {string} location
|
721
|
+
* @param {string} identity_mapping_store
|
722
|
+
* @returns {string} Resource name string.
|
723
|
+
*/
|
724
|
+
identityMappingStorePath(project, location, identityMappingStore) {
|
725
|
+
return this.pathTemplates.identityMappingStorePathTemplate.render({
|
726
|
+
project: project,
|
727
|
+
location: location,
|
728
|
+
identity_mapping_store: identityMappingStore,
|
729
|
+
});
|
730
|
+
}
|
731
|
+
/**
|
732
|
+
* Parse the project from IdentityMappingStore resource.
|
733
|
+
*
|
734
|
+
* @param {string} identityMappingStoreName
|
735
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
736
|
+
* @returns {string} A string representing the project.
|
737
|
+
*/
|
738
|
+
matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
|
739
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
|
740
|
+
}
|
741
|
+
/**
|
742
|
+
* Parse the location from IdentityMappingStore resource.
|
743
|
+
*
|
744
|
+
* @param {string} identityMappingStoreName
|
745
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
746
|
+
* @returns {string} A string representing the location.
|
747
|
+
*/
|
748
|
+
matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
|
749
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
|
750
|
+
}
|
751
|
+
/**
|
752
|
+
* Parse the identity_mapping_store from IdentityMappingStore resource.
|
753
|
+
*
|
754
|
+
* @param {string} identityMappingStoreName
|
755
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
756
|
+
* @returns {string} A string representing the identity_mapping_store.
|
757
|
+
*/
|
758
|
+
matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
|
759
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
|
760
|
+
}
|
829
761
|
/**
|
830
762
|
* Return a fully-qualified project resource name string.
|
831
763
|
*
|
@@ -847,6 +779,84 @@ class SearchTuningServiceClient {
|
|
847
779
|
matchProjectFromProjectName(projectName) {
|
848
780
|
return this.pathTemplates.projectPathTemplate.match(projectName).project;
|
849
781
|
}
|
782
|
+
/**
|
783
|
+
* Return a fully-qualified projectLocationCmekConfig resource name string.
|
784
|
+
*
|
785
|
+
* @param {string} project
|
786
|
+
* @param {string} location
|
787
|
+
* @returns {string} Resource name string.
|
788
|
+
*/
|
789
|
+
projectLocationCmekConfigPath(project, location) {
|
790
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
|
791
|
+
project: project,
|
792
|
+
location: location,
|
793
|
+
});
|
794
|
+
}
|
795
|
+
/**
|
796
|
+
* Parse the project from ProjectLocationCmekConfig resource.
|
797
|
+
*
|
798
|
+
* @param {string} projectLocationCmekConfigName
|
799
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
800
|
+
* @returns {string} A string representing the project.
|
801
|
+
*/
|
802
|
+
matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
803
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
|
804
|
+
}
|
805
|
+
/**
|
806
|
+
* Parse the location from ProjectLocationCmekConfig resource.
|
807
|
+
*
|
808
|
+
* @param {string} projectLocationCmekConfigName
|
809
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
810
|
+
* @returns {string} A string representing the location.
|
811
|
+
*/
|
812
|
+
matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
813
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
|
814
|
+
}
|
815
|
+
/**
|
816
|
+
* Return a fully-qualified projectLocationCmekConfigs resource name string.
|
817
|
+
*
|
818
|
+
* @param {string} project
|
819
|
+
* @param {string} location
|
820
|
+
* @param {string} cmek_config
|
821
|
+
* @returns {string} Resource name string.
|
822
|
+
*/
|
823
|
+
projectLocationCmekConfigsPath(project, location, cmekConfig) {
|
824
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
|
825
|
+
project: project,
|
826
|
+
location: location,
|
827
|
+
cmek_config: cmekConfig,
|
828
|
+
});
|
829
|
+
}
|
830
|
+
/**
|
831
|
+
* Parse the project from ProjectLocationCmekConfigs resource.
|
832
|
+
*
|
833
|
+
* @param {string} projectLocationCmekConfigsName
|
834
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
835
|
+
* @returns {string} A string representing the project.
|
836
|
+
*/
|
837
|
+
matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
838
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
|
839
|
+
}
|
840
|
+
/**
|
841
|
+
* Parse the location from ProjectLocationCmekConfigs resource.
|
842
|
+
*
|
843
|
+
* @param {string} projectLocationCmekConfigsName
|
844
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
845
|
+
* @returns {string} A string representing the location.
|
846
|
+
*/
|
847
|
+
matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
848
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
|
849
|
+
}
|
850
|
+
/**
|
851
|
+
* Parse the cmek_config from ProjectLocationCmekConfigs resource.
|
852
|
+
*
|
853
|
+
* @param {string} projectLocationCmekConfigsName
|
854
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
855
|
+
* @returns {string} A string representing the cmek_config.
|
856
|
+
*/
|
857
|
+
matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
858
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
|
859
|
+
}
|
850
860
|
/**
|
851
861
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
852
862
|
*
|
@@ -3004,8 +3014,8 @@ class SearchTuningServiceClient {
|
|
3004
3014
|
this._log.info('ending gRPC channel');
|
3005
3015
|
this._terminated = true;
|
3006
3016
|
stub.close();
|
3007
|
-
this.locationsClient.close();
|
3008
|
-
this.operationsClient.close();
|
3017
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3018
|
+
void this.operationsClient.close();
|
3009
3019
|
});
|
3010
3020
|
}
|
3011
3021
|
return Promise.resolve();
|