@google-cloud/discoveryengine 2.0.1 → 2.2.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/CHANGELOG.md +14 -0
- package/README.md +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
- package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
- package/build/protos/protos.d.ts +4390 -300
- package/build/protos/protos.js +13785 -2922
- package/build/protos/protos.json +1355 -14
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -21
- package/build/src/v1/completion_service_client.d.ts +313 -76
- package/build/src/v1/completion_service_client.js +451 -262
- package/build/src/v1/completion_service_proto_list.json +3 -0
- package/build/src/v1/control_service_client.d.ts +318 -81
- package/build/src/v1/control_service_client.js +422 -132
- package/build/src/v1/control_service_proto_list.json +3 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -134
- package/build/src/v1/conversational_search_service_client.js +395 -223
- package/build/src/v1/conversational_search_service_client_config.json +5 -0
- package/build/src/v1/conversational_search_service_proto_list.json +3 -0
- package/build/src/v1/data_store_service_client.d.ts +359 -122
- package/build/src/v1/data_store_service_client.js +460 -280
- package/build/src/v1/data_store_service_proto_list.json +3 -0
- package/build/src/v1/document_service_client.d.ts +364 -121
- package/build/src/v1/document_service_client.js +469 -300
- package/build/src/v1/document_service_proto_list.json +3 -0
- package/build/src/v1/engine_service_client.d.ts +340 -103
- package/build/src/v1/engine_service_client.js +460 -279
- package/build/src/v1/engine_service_proto_list.json +3 -0
- package/build/src/v1/gapic_metadata.json +59 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
- package/build/src/v1/grounded_generation_service_client.js +405 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/project_service_client.d.ts +313 -76
- package/build/src/v1/project_service_client.js +434 -222
- package/build/src/v1/project_service_proto_list.json +3 -0
- package/build/src/v1/rank_service_client.d.ts +285 -48
- package/build/src/v1/rank_service_client.js +398 -85
- package/build/src/v1/rank_service_proto_list.json +3 -0
- package/build/src/v1/recommendation_service_client.d.ts +142 -49
- package/build/src/v1/recommendation_service_client.js +198 -82
- package/build/src/v1/recommendation_service_proto_list.json +3 -0
- package/build/src/v1/schema_service_client.d.ts +348 -111
- package/build/src/v1/schema_service_client.js +457 -273
- package/build/src/v1/schema_service_proto_list.json +3 -0
- package/build/src/v1/search_service_client.d.ts +748 -559
- package/build/src/v1/search_service_client.js +302 -133
- package/build/src/v1/search_service_proto_list.json +3 -0
- package/build/src/v1/search_tuning_service_client.d.ts +314 -77
- package/build/src/v1/search_tuning_service_client.js +439 -235
- package/build/src/v1/search_tuning_service_proto_list.json +3 -0
- package/build/src/v1/serving_config_service_client.d.ts +1851 -0
- package/build/src/v1/serving_config_service_client.js +2642 -0
- package/build/src/v1/serving_config_service_client_config.json +30 -0
- package/build/src/v1/serving_config_service_proto_list.json +39 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
- package/build/src/v1/site_search_engine_service_client.js +625 -351
- package/build/src/v1/site_search_engine_service_client_config.json +12 -0
- package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
- package/build/src/v1/user_event_service_client.d.ts +335 -86
- package/build/src/v1/user_event_service_client.js +447 -253
- package/build/src/v1/user_event_service_proto_list.json +3 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +82 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +92 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +134 -280
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +105 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +145 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +151 -316
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +156 -328
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +155 -325
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +143 -295
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +126 -262
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +81 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +79 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +144 -301
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +140 -292
- 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 +122 -253
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +97 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +130 -271
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +136 -279
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +103 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +143 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +141 -288
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +150 -309
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +153 -315
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +141 -285
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +86 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +115 -231
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +79 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +77 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +142 -291
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +104 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +138 -282
- 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 +120 -243
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +95 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +186 -386
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +128 -261
- package/package.json +4 -4
@@ -97,28 +97,18 @@ class GroundedGenerationServiceClient {
|
|
97
97
|
*/
|
98
98
|
constructor(opts, gaxInstance) {
|
99
99
|
// Ensure that options include all the required fields.
|
100
|
-
const staticMembers = this
|
101
|
-
|
102
|
-
if (opts?.universe_domain &&
|
103
|
-
opts?.universeDomain &&
|
104
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
100
|
+
const staticMembers = this.constructor;
|
101
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
105
102
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
106
103
|
}
|
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';
|
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';
|
115
106
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
116
107
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
117
108
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
118
109
|
const port = opts?.port || staticMembers.port;
|
119
110
|
const clientConfig = opts?.clientConfig ?? {};
|
120
|
-
const fallback = opts?.fallback ??
|
121
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
111
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
122
112
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
123
113
|
// Request numeric enum values if REST transport is used.
|
124
114
|
opts.numericEnums = true;
|
@@ -148,7 +138,10 @@ class GroundedGenerationServiceClient {
|
|
148
138
|
}
|
149
139
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
150
140
|
// Determine the client header string.
|
151
|
-
const clientHeader = [
|
141
|
+
const clientHeader = [
|
142
|
+
`gax/${this._gaxModule.version}`,
|
143
|
+
`gapic/${version}`,
|
144
|
+
];
|
152
145
|
if (typeof process === 'object' && 'versions' in process) {
|
153
146
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
154
147
|
}
|
@@ -182,12 +175,15 @@ class GroundedGenerationServiceClient {
|
|
182
175
|
projectLocationCollectionDataStoreCustomTuningModelPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}'),
|
183
176
|
projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig'),
|
184
177
|
projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
|
178
|
+
projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
|
185
179
|
projectLocationCollectionDataStoreSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}'),
|
186
180
|
projectLocationCollectionDataStoreSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}'),
|
187
181
|
projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
|
182
|
+
projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}'),
|
188
183
|
projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
|
189
184
|
projectLocationCollectionEngineControlPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/controls/{control}'),
|
190
185
|
projectLocationCollectionEngineConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}'),
|
186
|
+
projectLocationCollectionEngineServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}'),
|
191
187
|
projectLocationCollectionEngineSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}'),
|
192
188
|
projectLocationCollectionEngineSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}'),
|
193
189
|
projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
|
@@ -198,15 +194,17 @@ class GroundedGenerationServiceClient {
|
|
198
194
|
projectLocationDataStoreCustomTuningModelPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}'),
|
199
195
|
projectLocationDataStoreDocumentProcessingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig'),
|
200
196
|
projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
|
197
|
+
projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
|
201
198
|
projectLocationDataStoreSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}'),
|
202
199
|
projectLocationDataStoreSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}'),
|
203
200
|
projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
|
201
|
+
projectLocationDataStoreSiteSearchEngineSitemapPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}'),
|
204
202
|
projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
|
205
203
|
};
|
206
204
|
// Some of the methods on this service provide streaming responses.
|
207
205
|
// Provide descriptors for these.
|
208
206
|
this.descriptors.stream = {
|
209
|
-
streamGenerateGroundedContent: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries)
|
207
|
+
streamGenerateGroundedContent: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries)
|
210
208
|
};
|
211
209
|
// Put together the default options sent with requests.
|
212
210
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.GroundedGenerationService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -235,18 +233,13 @@ class GroundedGenerationServiceClient {
|
|
235
233
|
}
|
236
234
|
// Put together the "service stub" for
|
237
235
|
// google.cloud.discoveryengine.v1.GroundedGenerationService.
|
238
|
-
this.groundedGenerationServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
.GroundedGenerationService, this._opts, this._providedCustomServicePath);
|
236
|
+
this.groundedGenerationServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
237
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.GroundedGenerationService') :
|
238
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
239
|
+
this._protos.google.cloud.discoveryengine.v1.GroundedGenerationService, this._opts, this._providedCustomServicePath);
|
243
240
|
// Iterate over each of the methods that the service provides
|
244
241
|
// and create an API call method for each.
|
245
|
-
const groundedGenerationServiceStubMethods = [
|
246
|
-
'streamGenerateGroundedContent',
|
247
|
-
'generateGroundedContent',
|
248
|
-
'checkGrounding',
|
249
|
-
];
|
242
|
+
const groundedGenerationServiceStubMethods = ['streamGenerateGroundedContent', 'generateGroundedContent', 'checkGrounding'];
|
250
243
|
for (const methodName of groundedGenerationServiceStubMethods) {
|
251
244
|
const callPromise = this.groundedGenerationServiceStub.then(stub => (...args) => {
|
252
245
|
if (this._terminated) {
|
@@ -264,7 +257,8 @@ class GroundedGenerationServiceClient {
|
|
264
257
|
}, (err) => () => {
|
265
258
|
throw err;
|
266
259
|
});
|
267
|
-
const descriptor = this.descriptors.stream[methodName] ||
|
260
|
+
const descriptor = this.descriptors.stream[methodName] ||
|
261
|
+
undefined;
|
268
262
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
269
263
|
this.innerApiCalls[methodName] = apiCall;
|
270
264
|
}
|
@@ -276,8 +270,7 @@ class GroundedGenerationServiceClient {
|
|
276
270
|
* @returns {string} The DNS address for this service.
|
277
271
|
*/
|
278
272
|
static get servicePath() {
|
279
|
-
if (typeof process === 'object' &&
|
280
|
-
typeof process.emitWarning === 'function') {
|
273
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
281
274
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
282
275
|
}
|
283
276
|
return 'discoveryengine.googleapis.com';
|
@@ -288,8 +281,7 @@ class GroundedGenerationServiceClient {
|
|
288
281
|
* @returns {string} The DNS address for this service.
|
289
282
|
*/
|
290
283
|
static get apiEndpoint() {
|
291
|
-
if (typeof process === 'object' &&
|
292
|
-
typeof process.emitWarning === 'function') {
|
284
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
293
285
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
294
286
|
}
|
295
287
|
return 'discoveryengine.googleapis.com';
|
@@ -317,7 +309,9 @@ class GroundedGenerationServiceClient {
|
|
317
309
|
* @returns {string[]} List of default scopes.
|
318
310
|
*/
|
319
311
|
static get scopes() {
|
320
|
-
return [
|
312
|
+
return [
|
313
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
314
|
+
];
|
321
315
|
}
|
322
316
|
/**
|
323
317
|
* Return the project ID used by this class.
|
@@ -343,13 +337,10 @@ class GroundedGenerationServiceClient {
|
|
343
337
|
options = options || {};
|
344
338
|
options.otherArgs = options.otherArgs || {};
|
345
339
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
346
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
347
|
-
|
348
|
-
location: request.location ?? '',
|
349
|
-
});
|
350
|
-
this.initialize().catch(err => {
|
351
|
-
throw err;
|
340
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
341
|
+
'location': request.location ?? '',
|
352
342
|
});
|
343
|
+
this.initialize().catch(err => { throw err; });
|
353
344
|
this._log.info('generateGroundedContent request %j', request);
|
354
345
|
const wrappedCallback = callback
|
355
346
|
? (error, response, options, rawResponse) => {
|
@@ -357,8 +348,7 @@ class GroundedGenerationServiceClient {
|
|
357
348
|
callback(error, response, options, rawResponse); // We verified callback above.
|
358
349
|
}
|
359
350
|
: undefined;
|
360
|
-
return this.innerApiCalls
|
361
|
-
.generateGroundedContent(request, options, wrappedCallback)
|
351
|
+
return this.innerApiCalls.generateGroundedContent(request, options, wrappedCallback)
|
362
352
|
?.then(([response, options, rawResponse]) => {
|
363
353
|
this._log.info('generateGroundedContent response %j', response);
|
364
354
|
return [response, options, rawResponse];
|
@@ -377,13 +367,10 @@ class GroundedGenerationServiceClient {
|
|
377
367
|
options = options || {};
|
378
368
|
options.otherArgs = options.otherArgs || {};
|
379
369
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
380
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
381
|
-
|
382
|
-
grounding_config: request.groundingConfig ?? '',
|
383
|
-
});
|
384
|
-
this.initialize().catch(err => {
|
385
|
-
throw err;
|
370
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
371
|
+
'grounding_config': request.groundingConfig ?? '',
|
386
372
|
});
|
373
|
+
this.initialize().catch(err => { throw err; });
|
387
374
|
this._log.info('checkGrounding request %j', request);
|
388
375
|
const wrappedCallback = callback
|
389
376
|
? (error, response, options, rawResponse) => {
|
@@ -391,8 +378,7 @@ class GroundedGenerationServiceClient {
|
|
391
378
|
callback(error, response, options, rawResponse); // We verified callback above.
|
392
379
|
}
|
393
380
|
: undefined;
|
394
|
-
return this.innerApiCalls
|
395
|
-
.checkGrounding(request, options, wrappedCallback)
|
381
|
+
return this.innerApiCalls.checkGrounding(request, options, wrappedCallback)
|
396
382
|
?.then(([response, options, rawResponse]) => {
|
397
383
|
this._log.info('checkGrounding response %j', response);
|
398
384
|
return [response, options, rawResponse];
|
@@ -413,64 +399,62 @@ class GroundedGenerationServiceClient {
|
|
413
399
|
* region_tag:discoveryengine_v1_generated_GroundedGenerationService_StreamGenerateGroundedContent_async
|
414
400
|
*/
|
415
401
|
streamGenerateGroundedContent(options) {
|
416
|
-
this.initialize().catch(err => {
|
417
|
-
throw err;
|
418
|
-
});
|
402
|
+
this.initialize().catch(err => { throw err; });
|
419
403
|
this._log.info('streamGenerateGroundedContent stream %j', options);
|
420
404
|
return this.innerApiCalls.streamGenerateGroundedContent(null, options);
|
421
405
|
}
|
422
406
|
/**
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
407
|
+
* Gets information about a location.
|
408
|
+
*
|
409
|
+
* @param {Object} request
|
410
|
+
* The request object that will be sent.
|
411
|
+
* @param {string} request.name
|
412
|
+
* Resource name for the location.
|
413
|
+
* @param {object} [options]
|
414
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
415
|
+
* @returns {Promise} - The promise which resolves to an array.
|
416
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
417
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
418
|
+
* for more details and examples.
|
419
|
+
* @example
|
420
|
+
* ```
|
421
|
+
* const [response] = await client.getLocation(request);
|
422
|
+
* ```
|
423
|
+
*/
|
440
424
|
getLocation(request, options, callback) {
|
441
425
|
return this.locationsClient.getLocation(request, options, callback);
|
442
426
|
}
|
443
427
|
/**
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
428
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
429
|
+
*
|
430
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
431
|
+
* @param {Object} request
|
432
|
+
* The request object that will be sent.
|
433
|
+
* @param {string} request.name
|
434
|
+
* The resource that owns the locations collection, if applicable.
|
435
|
+
* @param {string} request.filter
|
436
|
+
* The standard list filter.
|
437
|
+
* @param {number} request.pageSize
|
438
|
+
* The standard list page size.
|
439
|
+
* @param {string} request.pageToken
|
440
|
+
* The standard list page token.
|
441
|
+
* @param {object} [options]
|
442
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
443
|
+
* @returns {Object}
|
444
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
445
|
+
* When you iterate the returned iterable, each element will be an object representing
|
446
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
447
|
+
* so you can stop the iteration when you don't need more results.
|
448
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
449
|
+
* for more details and examples.
|
450
|
+
* @example
|
451
|
+
* ```
|
452
|
+
* const iterable = client.listLocationsAsync(request);
|
453
|
+
* for await (const response of iterable) {
|
454
|
+
* // process response
|
455
|
+
* }
|
456
|
+
* ```
|
457
|
+
*/
|
474
458
|
listLocationsAsync(request, options) {
|
475
459
|
return this.locationsClient.listLocationsAsync(request, options);
|
476
460
|
}
|
@@ -1197,6 +1181,75 @@ class GroundedGenerationServiceClient {
|
|
1197
1181
|
matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
1198
1182
|
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
|
1199
1183
|
}
|
1184
|
+
/**
|
1185
|
+
* Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
|
1186
|
+
*
|
1187
|
+
* @param {string} project
|
1188
|
+
* @param {string} location
|
1189
|
+
* @param {string} collection
|
1190
|
+
* @param {string} data_store
|
1191
|
+
* @param {string} serving_config
|
1192
|
+
* @returns {string} Resource name string.
|
1193
|
+
*/
|
1194
|
+
projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig) {
|
1195
|
+
return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render({
|
1196
|
+
project: project,
|
1197
|
+
location: location,
|
1198
|
+
collection: collection,
|
1199
|
+
data_store: dataStore,
|
1200
|
+
serving_config: servingConfig,
|
1201
|
+
});
|
1202
|
+
}
|
1203
|
+
/**
|
1204
|
+
* Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.
|
1205
|
+
*
|
1206
|
+
* @param {string} projectLocationCollectionDataStoreServingConfigName
|
1207
|
+
* A fully-qualified path representing project_location_collection_data_store_serving_config resource.
|
1208
|
+
* @returns {string} A string representing the project.
|
1209
|
+
*/
|
1210
|
+
matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
|
1211
|
+
return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).project;
|
1212
|
+
}
|
1213
|
+
/**
|
1214
|
+
* Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.
|
1215
|
+
*
|
1216
|
+
* @param {string} projectLocationCollectionDataStoreServingConfigName
|
1217
|
+
* A fully-qualified path representing project_location_collection_data_store_serving_config resource.
|
1218
|
+
* @returns {string} A string representing the location.
|
1219
|
+
*/
|
1220
|
+
matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
|
1221
|
+
return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).location;
|
1222
|
+
}
|
1223
|
+
/**
|
1224
|
+
* Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.
|
1225
|
+
*
|
1226
|
+
* @param {string} projectLocationCollectionDataStoreServingConfigName
|
1227
|
+
* A fully-qualified path representing project_location_collection_data_store_serving_config resource.
|
1228
|
+
* @returns {string} A string representing the collection.
|
1229
|
+
*/
|
1230
|
+
matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
|
1231
|
+
return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).collection;
|
1232
|
+
}
|
1233
|
+
/**
|
1234
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.
|
1235
|
+
*
|
1236
|
+
* @param {string} projectLocationCollectionDataStoreServingConfigName
|
1237
|
+
* A fully-qualified path representing project_location_collection_data_store_serving_config resource.
|
1238
|
+
* @returns {string} A string representing the data_store.
|
1239
|
+
*/
|
1240
|
+
matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
|
1241
|
+
return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).data_store;
|
1242
|
+
}
|
1243
|
+
/**
|
1244
|
+
* Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.
|
1245
|
+
*
|
1246
|
+
* @param {string} projectLocationCollectionDataStoreServingConfigName
|
1247
|
+
* A fully-qualified path representing project_location_collection_data_store_serving_config resource.
|
1248
|
+
* @returns {string} A string representing the serving_config.
|
1249
|
+
*/
|
1250
|
+
matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
|
1251
|
+
return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).serving_config;
|
1252
|
+
}
|
1200
1253
|
/**
|
1201
1254
|
* Return a fully-qualified projectLocationCollectionDataStoreSession resource name string.
|
1202
1255
|
*
|
@@ -1404,6 +1457,75 @@ class GroundedGenerationServiceClient {
|
|
1404
1457
|
matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
|
1405
1458
|
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
|
1406
1459
|
}
|
1460
|
+
/**
|
1461
|
+
* Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineSitemap resource name string.
|
1462
|
+
*
|
1463
|
+
* @param {string} project
|
1464
|
+
* @param {string} location
|
1465
|
+
* @param {string} collection
|
1466
|
+
* @param {string} data_store
|
1467
|
+
* @param {string} sitemap
|
1468
|
+
* @returns {string} Resource name string.
|
1469
|
+
*/
|
1470
|
+
projectLocationCollectionDataStoreSiteSearchEngineSitemapPath(project, location, collection, dataStore, sitemap) {
|
1471
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render({
|
1472
|
+
project: project,
|
1473
|
+
location: location,
|
1474
|
+
collection: collection,
|
1475
|
+
data_store: dataStore,
|
1476
|
+
sitemap: sitemap,
|
1477
|
+
});
|
1478
|
+
}
|
1479
|
+
/**
|
1480
|
+
* Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
|
1481
|
+
*
|
1482
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
|
1483
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
|
1484
|
+
* @returns {string} A string representing the project.
|
1485
|
+
*/
|
1486
|
+
matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
|
1487
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).project;
|
1488
|
+
}
|
1489
|
+
/**
|
1490
|
+
* Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
|
1491
|
+
*
|
1492
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
|
1493
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
|
1494
|
+
* @returns {string} A string representing the location.
|
1495
|
+
*/
|
1496
|
+
matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
|
1497
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).location;
|
1498
|
+
}
|
1499
|
+
/**
|
1500
|
+
* Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
|
1501
|
+
*
|
1502
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
|
1503
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
|
1504
|
+
* @returns {string} A string representing the collection.
|
1505
|
+
*/
|
1506
|
+
matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
|
1507
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).collection;
|
1508
|
+
}
|
1509
|
+
/**
|
1510
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
|
1511
|
+
*
|
1512
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
|
1513
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
|
1514
|
+
* @returns {string} A string representing the data_store.
|
1515
|
+
*/
|
1516
|
+
matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
|
1517
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).data_store;
|
1518
|
+
}
|
1519
|
+
/**
|
1520
|
+
* Parse the sitemap from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
|
1521
|
+
*
|
1522
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
|
1523
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
|
1524
|
+
* @returns {string} A string representing the sitemap.
|
1525
|
+
*/
|
1526
|
+
matchSitemapFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
|
1527
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).sitemap;
|
1528
|
+
}
|
1407
1529
|
/**
|
1408
1530
|
* Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineTargetSite resource name string.
|
1409
1531
|
*
|
@@ -1611,6 +1733,75 @@ class GroundedGenerationServiceClient {
|
|
1611
1733
|
matchConversationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
|
1612
1734
|
return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).conversation;
|
1613
1735
|
}
|
1736
|
+
/**
|
1737
|
+
* Return a fully-qualified projectLocationCollectionEngineServingConfig resource name string.
|
1738
|
+
*
|
1739
|
+
* @param {string} project
|
1740
|
+
* @param {string} location
|
1741
|
+
* @param {string} collection
|
1742
|
+
* @param {string} engine
|
1743
|
+
* @param {string} serving_config
|
1744
|
+
* @returns {string} Resource name string.
|
1745
|
+
*/
|
1746
|
+
projectLocationCollectionEngineServingConfigPath(project, location, collection, engine, servingConfig) {
|
1747
|
+
return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render({
|
1748
|
+
project: project,
|
1749
|
+
location: location,
|
1750
|
+
collection: collection,
|
1751
|
+
engine: engine,
|
1752
|
+
serving_config: servingConfig,
|
1753
|
+
});
|
1754
|
+
}
|
1755
|
+
/**
|
1756
|
+
* Parse the project from ProjectLocationCollectionEngineServingConfig resource.
|
1757
|
+
*
|
1758
|
+
* @param {string} projectLocationCollectionEngineServingConfigName
|
1759
|
+
* A fully-qualified path representing project_location_collection_engine_serving_config resource.
|
1760
|
+
* @returns {string} A string representing the project.
|
1761
|
+
*/
|
1762
|
+
matchProjectFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
|
1763
|
+
return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).project;
|
1764
|
+
}
|
1765
|
+
/**
|
1766
|
+
* Parse the location from ProjectLocationCollectionEngineServingConfig resource.
|
1767
|
+
*
|
1768
|
+
* @param {string} projectLocationCollectionEngineServingConfigName
|
1769
|
+
* A fully-qualified path representing project_location_collection_engine_serving_config resource.
|
1770
|
+
* @returns {string} A string representing the location.
|
1771
|
+
*/
|
1772
|
+
matchLocationFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
|
1773
|
+
return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).location;
|
1774
|
+
}
|
1775
|
+
/**
|
1776
|
+
* Parse the collection from ProjectLocationCollectionEngineServingConfig resource.
|
1777
|
+
*
|
1778
|
+
* @param {string} projectLocationCollectionEngineServingConfigName
|
1779
|
+
* A fully-qualified path representing project_location_collection_engine_serving_config resource.
|
1780
|
+
* @returns {string} A string representing the collection.
|
1781
|
+
*/
|
1782
|
+
matchCollectionFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
|
1783
|
+
return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).collection;
|
1784
|
+
}
|
1785
|
+
/**
|
1786
|
+
* Parse the engine from ProjectLocationCollectionEngineServingConfig resource.
|
1787
|
+
*
|
1788
|
+
* @param {string} projectLocationCollectionEngineServingConfigName
|
1789
|
+
* A fully-qualified path representing project_location_collection_engine_serving_config resource.
|
1790
|
+
* @returns {string} A string representing the engine.
|
1791
|
+
*/
|
1792
|
+
matchEngineFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
|
1793
|
+
return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).engine;
|
1794
|
+
}
|
1795
|
+
/**
|
1796
|
+
* Parse the serving_config from ProjectLocationCollectionEngineServingConfig resource.
|
1797
|
+
*
|
1798
|
+
* @param {string} projectLocationCollectionEngineServingConfigName
|
1799
|
+
* A fully-qualified path representing project_location_collection_engine_serving_config resource.
|
1800
|
+
* @returns {string} A string representing the serving_config.
|
1801
|
+
*/
|
1802
|
+
matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
|
1803
|
+
return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).serving_config;
|
1804
|
+
}
|
1614
1805
|
/**
|
1615
1806
|
* Return a fully-qualified projectLocationCollectionEngineSession resource name string.
|
1616
1807
|
*
|
@@ -2229,6 +2420,63 @@ class GroundedGenerationServiceClient {
|
|
2229
2420
|
matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
2230
2421
|
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
|
2231
2422
|
}
|
2423
|
+
/**
|
2424
|
+
* Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
|
2425
|
+
*
|
2426
|
+
* @param {string} project
|
2427
|
+
* @param {string} location
|
2428
|
+
* @param {string} data_store
|
2429
|
+
* @param {string} serving_config
|
2430
|
+
* @returns {string} Resource name string.
|
2431
|
+
*/
|
2432
|
+
projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig) {
|
2433
|
+
return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render({
|
2434
|
+
project: project,
|
2435
|
+
location: location,
|
2436
|
+
data_store: dataStore,
|
2437
|
+
serving_config: servingConfig,
|
2438
|
+
});
|
2439
|
+
}
|
2440
|
+
/**
|
2441
|
+
* Parse the project from ProjectLocationDataStoreServingConfig resource.
|
2442
|
+
*
|
2443
|
+
* @param {string} projectLocationDataStoreServingConfigName
|
2444
|
+
* A fully-qualified path representing project_location_data_store_serving_config resource.
|
2445
|
+
* @returns {string} A string representing the project.
|
2446
|
+
*/
|
2447
|
+
matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
|
2448
|
+
return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).project;
|
2449
|
+
}
|
2450
|
+
/**
|
2451
|
+
* Parse the location from ProjectLocationDataStoreServingConfig resource.
|
2452
|
+
*
|
2453
|
+
* @param {string} projectLocationDataStoreServingConfigName
|
2454
|
+
* A fully-qualified path representing project_location_data_store_serving_config resource.
|
2455
|
+
* @returns {string} A string representing the location.
|
2456
|
+
*/
|
2457
|
+
matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
|
2458
|
+
return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).location;
|
2459
|
+
}
|
2460
|
+
/**
|
2461
|
+
* Parse the data_store from ProjectLocationDataStoreServingConfig resource.
|
2462
|
+
*
|
2463
|
+
* @param {string} projectLocationDataStoreServingConfigName
|
2464
|
+
* A fully-qualified path representing project_location_data_store_serving_config resource.
|
2465
|
+
* @returns {string} A string representing the data_store.
|
2466
|
+
*/
|
2467
|
+
matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
|
2468
|
+
return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).data_store;
|
2469
|
+
}
|
2470
|
+
/**
|
2471
|
+
* Parse the serving_config from ProjectLocationDataStoreServingConfig resource.
|
2472
|
+
*
|
2473
|
+
* @param {string} projectLocationDataStoreServingConfigName
|
2474
|
+
* A fully-qualified path representing project_location_data_store_serving_config resource.
|
2475
|
+
* @returns {string} A string representing the serving_config.
|
2476
|
+
*/
|
2477
|
+
matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
|
2478
|
+
return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).serving_config;
|
2479
|
+
}
|
2232
2480
|
/**
|
2233
2481
|
* Return a fully-qualified projectLocationDataStoreSession resource name string.
|
2234
2482
|
*
|
@@ -2400,6 +2648,63 @@ class GroundedGenerationServiceClient {
|
|
2400
2648
|
matchDataStoreFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
|
2401
2649
|
return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).data_store;
|
2402
2650
|
}
|
2651
|
+
/**
|
2652
|
+
* Return a fully-qualified projectLocationDataStoreSiteSearchEngineSitemap resource name string.
|
2653
|
+
*
|
2654
|
+
* @param {string} project
|
2655
|
+
* @param {string} location
|
2656
|
+
* @param {string} data_store
|
2657
|
+
* @param {string} sitemap
|
2658
|
+
* @returns {string} Resource name string.
|
2659
|
+
*/
|
2660
|
+
projectLocationDataStoreSiteSearchEngineSitemapPath(project, location, dataStore, sitemap) {
|
2661
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render({
|
2662
|
+
project: project,
|
2663
|
+
location: location,
|
2664
|
+
data_store: dataStore,
|
2665
|
+
sitemap: sitemap,
|
2666
|
+
});
|
2667
|
+
}
|
2668
|
+
/**
|
2669
|
+
* Parse the project from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
|
2670
|
+
*
|
2671
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
|
2672
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
|
2673
|
+
* @returns {string} A string representing the project.
|
2674
|
+
*/
|
2675
|
+
matchProjectFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
|
2676
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).project;
|
2677
|
+
}
|
2678
|
+
/**
|
2679
|
+
* Parse the location from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
|
2680
|
+
*
|
2681
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
|
2682
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
|
2683
|
+
* @returns {string} A string representing the location.
|
2684
|
+
*/
|
2685
|
+
matchLocationFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
|
2686
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).location;
|
2687
|
+
}
|
2688
|
+
/**
|
2689
|
+
* Parse the data_store from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
|
2690
|
+
*
|
2691
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
|
2692
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
|
2693
|
+
* @returns {string} A string representing the data_store.
|
2694
|
+
*/
|
2695
|
+
matchDataStoreFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
|
2696
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).data_store;
|
2697
|
+
}
|
2698
|
+
/**
|
2699
|
+
* Parse the sitemap from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
|
2700
|
+
*
|
2701
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
|
2702
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
|
2703
|
+
* @returns {string} A string representing the sitemap.
|
2704
|
+
*/
|
2705
|
+
matchSitemapFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
|
2706
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).sitemap;
|
2707
|
+
}
|
2403
2708
|
/**
|
2404
2709
|
* Return a fully-qualified projectLocationDataStoreSiteSearchEngineTargetSite resource name string.
|
2405
2710
|
*
|
@@ -2469,7 +2774,7 @@ class GroundedGenerationServiceClient {
|
|
2469
2774
|
this._log.info('ending gRPC channel');
|
2470
2775
|
this._terminated = true;
|
2471
2776
|
stub.close();
|
2472
|
-
this.locationsClient.close();
|
2777
|
+
this.locationsClient.close().catch(err => { throw err; });
|
2473
2778
|
});
|
2474
2779
|
}
|
2475
2780
|
return Promise.resolve();
|