@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 SiteSearchEngineServiceClient {
|
|
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 SiteSearchEngineServiceClient {
|
|
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
|
}
|
@@ -213,7 +206,7 @@ class SiteSearchEngineServiceClient {
|
|
213
206
|
// pages). Denote the keys used for pagination and results.
|
214
207
|
this.descriptors.page = {
|
215
208
|
listTargetSites: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites'),
|
216
|
-
fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites')
|
209
|
+
fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites')
|
217
210
|
};
|
218
211
|
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
219
212
|
// This API contains "long-running operations", which return a
|
@@ -221,121 +214,16 @@ class SiteSearchEngineServiceClient {
|
|
221
214
|
// rather than holding a request open.
|
222
215
|
const lroOptions = {
|
223
216
|
auth: this.auth,
|
224
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
217
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
225
218
|
};
|
226
219
|
if (opts.fallback) {
|
227
220
|
lroOptions.protoJson = protoFilesRoot;
|
228
|
-
lroOptions.httpRules = [
|
229
|
-
{
|
230
|
-
|
231
|
-
|
232
|
-
body: '*',
|
233
|
-
additional_bindings: [
|
234
|
-
{
|
235
|
-
post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
236
|
-
body: '*',
|
237
|
-
},
|
238
|
-
],
|
239
|
-
},
|
240
|
-
{
|
241
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
242
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
243
|
-
additional_bindings: [
|
244
|
-
{
|
245
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
246
|
-
},
|
247
|
-
{
|
248
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
249
|
-
},
|
250
|
-
{
|
251
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
252
|
-
},
|
253
|
-
{
|
254
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
255
|
-
},
|
256
|
-
{
|
257
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
258
|
-
},
|
259
|
-
{
|
260
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
261
|
-
},
|
262
|
-
{
|
263
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
264
|
-
},
|
265
|
-
{
|
266
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
|
267
|
-
},
|
268
|
-
{
|
269
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
270
|
-
},
|
271
|
-
{
|
272
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
273
|
-
},
|
274
|
-
{
|
275
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
276
|
-
},
|
277
|
-
{
|
278
|
-
get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
279
|
-
},
|
280
|
-
{
|
281
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
|
282
|
-
},
|
283
|
-
{ get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
|
284
|
-
{
|
285
|
-
get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
286
|
-
},
|
287
|
-
{ get: '/v1alpha/{name=projects/*/operations/*}' },
|
288
|
-
],
|
289
|
-
},
|
290
|
-
{
|
291
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
292
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
293
|
-
additional_bindings: [
|
294
|
-
{
|
295
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
296
|
-
},
|
297
|
-
{
|
298
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
299
|
-
},
|
300
|
-
{
|
301
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
302
|
-
},
|
303
|
-
{
|
304
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
305
|
-
},
|
306
|
-
{
|
307
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
308
|
-
},
|
309
|
-
{
|
310
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
311
|
-
},
|
312
|
-
{
|
313
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
314
|
-
},
|
315
|
-
{
|
316
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
|
317
|
-
},
|
318
|
-
{
|
319
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
320
|
-
},
|
321
|
-
{
|
322
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
323
|
-
},
|
324
|
-
{
|
325
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
|
326
|
-
},
|
327
|
-
{
|
328
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
|
329
|
-
},
|
330
|
-
{ get: '/v1alpha/{name=projects/*/locations/*}/operations' },
|
331
|
-
{ get: '/v1alpha/{name=projects/*}/operations' },
|
332
|
-
],
|
333
|
-
},
|
334
|
-
];
|
221
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
222
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/operations/*}', }],
|
223
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*}/operations', }, { get: '/v1alpha/{name=projects/*}/operations', }],
|
224
|
+
}];
|
335
225
|
}
|
336
|
-
this.operationsClient = this._gaxModule
|
337
|
-
.lro(lroOptions)
|
338
|
-
.operationsClient(opts);
|
226
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
339
227
|
const createTargetSiteResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.TargetSite');
|
340
228
|
const createTargetSiteMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.CreateTargetSiteMetadata');
|
341
229
|
const batchCreateTargetSitesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.BatchCreateTargetSitesResponse');
|
@@ -363,7 +251,7 @@ class SiteSearchEngineServiceClient {
|
|
363
251
|
disableAdvancedSiteSearch: new this._gaxModule.LongrunningDescriptor(this.operationsClient, disableAdvancedSiteSearchResponse.decode.bind(disableAdvancedSiteSearchResponse), disableAdvancedSiteSearchMetadata.decode.bind(disableAdvancedSiteSearchMetadata)),
|
364
252
|
recrawlUris: new this._gaxModule.LongrunningDescriptor(this.operationsClient, recrawlUrisResponse.decode.bind(recrawlUrisResponse), recrawlUrisMetadata.decode.bind(recrawlUrisMetadata)),
|
365
253
|
batchVerifyTargetSites: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchVerifyTargetSitesResponse.decode.bind(batchVerifyTargetSitesResponse), batchVerifyTargetSitesMetadata.decode.bind(batchVerifyTargetSitesMetadata)),
|
366
|
-
setUriPatternDocumentData: new this._gaxModule.LongrunningDescriptor(this.operationsClient, setUriPatternDocumentDataResponse.decode.bind(setUriPatternDocumentDataResponse), setUriPatternDocumentDataMetadata.decode.bind(setUriPatternDocumentDataMetadata))
|
254
|
+
setUriPatternDocumentData: new this._gaxModule.LongrunningDescriptor(this.operationsClient, setUriPatternDocumentDataResponse.decode.bind(setUriPatternDocumentDataResponse), setUriPatternDocumentDataMetadata.decode.bind(setUriPatternDocumentDataMetadata))
|
367
255
|
};
|
368
256
|
// Put together the default options sent with requests.
|
369
257
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SiteSearchEngineService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -392,29 +280,13 @@ class SiteSearchEngineServiceClient {
|
|
392
280
|
}
|
393
281
|
// Put together the "service stub" for
|
394
282
|
// google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.
|
395
|
-
this.siteSearchEngineServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
.SiteSearchEngineService, this._opts, this._providedCustomServicePath);
|
283
|
+
this.siteSearchEngineServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
284
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SiteSearchEngineService') :
|
285
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
286
|
+
this._protos.google.cloud.discoveryengine.v1alpha.SiteSearchEngineService, this._opts, this._providedCustomServicePath);
|
400
287
|
// Iterate over each of the methods that the service provides
|
401
288
|
// and create an API call method for each.
|
402
|
-
const siteSearchEngineServiceStubMethods = [
|
403
|
-
'getSiteSearchEngine',
|
404
|
-
'createTargetSite',
|
405
|
-
'batchCreateTargetSites',
|
406
|
-
'getTargetSite',
|
407
|
-
'updateTargetSite',
|
408
|
-
'deleteTargetSite',
|
409
|
-
'listTargetSites',
|
410
|
-
'enableAdvancedSiteSearch',
|
411
|
-
'disableAdvancedSiteSearch',
|
412
|
-
'recrawlUris',
|
413
|
-
'batchVerifyTargetSites',
|
414
|
-
'fetchDomainVerificationStatus',
|
415
|
-
'setUriPatternDocumentData',
|
416
|
-
'getUriPatternDocumentData',
|
417
|
-
];
|
289
|
+
const siteSearchEngineServiceStubMethods = ['getSiteSearchEngine', 'createTargetSite', 'batchCreateTargetSites', 'getTargetSite', 'updateTargetSite', 'deleteTargetSite', 'listTargetSites', 'enableAdvancedSiteSearch', 'disableAdvancedSiteSearch', 'recrawlUris', 'batchVerifyTargetSites', 'fetchDomainVerificationStatus', 'setUriPatternDocumentData', 'getUriPatternDocumentData'];
|
418
290
|
for (const methodName of siteSearchEngineServiceStubMethods) {
|
419
291
|
const callPromise = this.siteSearchEngineServiceStub.then(stub => (...args) => {
|
420
292
|
if (this._terminated) {
|
@@ -439,8 +311,7 @@ class SiteSearchEngineServiceClient {
|
|
439
311
|
* @returns {string} The DNS address for this service.
|
440
312
|
*/
|
441
313
|
static get servicePath() {
|
442
|
-
if (typeof process === 'object' &&
|
443
|
-
typeof process.emitWarning === 'function') {
|
314
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
444
315
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
445
316
|
}
|
446
317
|
return 'discoveryengine.googleapis.com';
|
@@ -451,8 +322,7 @@ class SiteSearchEngineServiceClient {
|
|
451
322
|
* @returns {string} The DNS address for this service.
|
452
323
|
*/
|
453
324
|
static get apiEndpoint() {
|
454
|
-
if (typeof process === 'object' &&
|
455
|
-
typeof process.emitWarning === 'function') {
|
325
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
456
326
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
457
327
|
}
|
458
328
|
return 'discoveryengine.googleapis.com';
|
@@ -480,7 +350,9 @@ class SiteSearchEngineServiceClient {
|
|
480
350
|
* @returns {string[]} List of default scopes.
|
481
351
|
*/
|
482
352
|
static get scopes() {
|
483
|
-
return [
|
353
|
+
return [
|
354
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
355
|
+
];
|
484
356
|
}
|
485
357
|
/**
|
486
358
|
* Return the project ID used by this class.
|
@@ -506,13 +378,10 @@ class SiteSearchEngineServiceClient {
|
|
506
378
|
options = options || {};
|
507
379
|
options.otherArgs = options.otherArgs || {};
|
508
380
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
509
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
510
|
-
|
511
|
-
name: request.name ?? '',
|
512
|
-
});
|
513
|
-
this.initialize().catch(err => {
|
514
|
-
throw err;
|
381
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
382
|
+
'name': request.name ?? '',
|
515
383
|
});
|
384
|
+
this.initialize().catch(err => { throw err; });
|
516
385
|
this._log.info('getSiteSearchEngine request %j', request);
|
517
386
|
const wrappedCallback = callback
|
518
387
|
? (error, response, options, rawResponse) => {
|
@@ -520,8 +389,7 @@ class SiteSearchEngineServiceClient {
|
|
520
389
|
callback(error, response, options, rawResponse); // We verified callback above.
|
521
390
|
}
|
522
391
|
: undefined;
|
523
|
-
return this.innerApiCalls
|
524
|
-
.getSiteSearchEngine(request, options, wrappedCallback)
|
392
|
+
return this.innerApiCalls.getSiteSearchEngine(request, options, wrappedCallback)
|
525
393
|
?.then(([response, options, rawResponse]) => {
|
526
394
|
this._log.info('getSiteSearchEngine response %j', response);
|
527
395
|
return [response, options, rawResponse];
|
@@ -540,13 +408,10 @@ class SiteSearchEngineServiceClient {
|
|
540
408
|
options = options || {};
|
541
409
|
options.otherArgs = options.otherArgs || {};
|
542
410
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
543
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
544
|
-
|
545
|
-
name: request.name ?? '',
|
546
|
-
});
|
547
|
-
this.initialize().catch(err => {
|
548
|
-
throw err;
|
411
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
412
|
+
'name': request.name ?? '',
|
549
413
|
});
|
414
|
+
this.initialize().catch(err => { throw err; });
|
550
415
|
this._log.info('getTargetSite request %j', request);
|
551
416
|
const wrappedCallback = callback
|
552
417
|
? (error, response, options, rawResponse) => {
|
@@ -554,8 +419,7 @@ class SiteSearchEngineServiceClient {
|
|
554
419
|
callback(error, response, options, rawResponse); // We verified callback above.
|
555
420
|
}
|
556
421
|
: undefined;
|
557
|
-
return this.innerApiCalls
|
558
|
-
.getTargetSite(request, options, wrappedCallback)
|
422
|
+
return this.innerApiCalls.getTargetSite(request, options, wrappedCallback)
|
559
423
|
?.then(([response, options, rawResponse]) => {
|
560
424
|
this._log.info('getTargetSite response %j', response);
|
561
425
|
return [response, options, rawResponse];
|
@@ -574,13 +438,10 @@ class SiteSearchEngineServiceClient {
|
|
574
438
|
options = options || {};
|
575
439
|
options.otherArgs = options.otherArgs || {};
|
576
440
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
577
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
578
|
-
|
579
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
580
|
-
});
|
581
|
-
this.initialize().catch(err => {
|
582
|
-
throw err;
|
441
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
442
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
583
443
|
});
|
444
|
+
this.initialize().catch(err => { throw err; });
|
584
445
|
this._log.info('getUriPatternDocumentData request %j', request);
|
585
446
|
const wrappedCallback = callback
|
586
447
|
? (error, response, options, rawResponse) => {
|
@@ -588,8 +449,7 @@ class SiteSearchEngineServiceClient {
|
|
588
449
|
callback(error, response, options, rawResponse); // We verified callback above.
|
589
450
|
}
|
590
451
|
: undefined;
|
591
|
-
return this.innerApiCalls
|
592
|
-
.getUriPatternDocumentData(request, options, wrappedCallback)
|
452
|
+
return this.innerApiCalls.getUriPatternDocumentData(request, options, wrappedCallback)
|
593
453
|
?.then(([response, options, rawResponse]) => {
|
594
454
|
this._log.info('getUriPatternDocumentData response %j', response);
|
595
455
|
return [response, options, rawResponse];
|
@@ -608,13 +468,10 @@ class SiteSearchEngineServiceClient {
|
|
608
468
|
options = options || {};
|
609
469
|
options.otherArgs = options.otherArgs || {};
|
610
470
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
611
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
612
|
-
|
613
|
-
parent: request.parent ?? '',
|
614
|
-
});
|
615
|
-
this.initialize().catch(err => {
|
616
|
-
throw err;
|
471
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
472
|
+
'parent': request.parent ?? '',
|
617
473
|
});
|
474
|
+
this.initialize().catch(err => { throw err; });
|
618
475
|
const wrappedCallback = callback
|
619
476
|
? (error, response, rawResponse, _) => {
|
620
477
|
this._log.info('createTargetSite response %j', rawResponse);
|
@@ -622,8 +479,7 @@ class SiteSearchEngineServiceClient {
|
|
622
479
|
}
|
623
480
|
: undefined;
|
624
481
|
this._log.info('createTargetSite request %j', request);
|
625
|
-
return this.innerApiCalls
|
626
|
-
.createTargetSite(request, options, wrappedCallback)
|
482
|
+
return this.innerApiCalls.createTargetSite(request, options, wrappedCallback)
|
627
483
|
?.then(([response, rawResponse, _]) => {
|
628
484
|
this._log.info('createTargetSite response %j', rawResponse);
|
629
485
|
return [response, rawResponse, _];
|
@@ -660,13 +516,10 @@ class SiteSearchEngineServiceClient {
|
|
660
516
|
options = options || {};
|
661
517
|
options.otherArgs = options.otherArgs || {};
|
662
518
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
663
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
664
|
-
|
665
|
-
parent: request.parent ?? '',
|
666
|
-
});
|
667
|
-
this.initialize().catch(err => {
|
668
|
-
throw err;
|
519
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
520
|
+
'parent': request.parent ?? '',
|
669
521
|
});
|
522
|
+
this.initialize().catch(err => { throw err; });
|
670
523
|
const wrappedCallback = callback
|
671
524
|
? (error, response, rawResponse, _) => {
|
672
525
|
this._log.info('batchCreateTargetSites response %j', rawResponse);
|
@@ -674,8 +527,7 @@ class SiteSearchEngineServiceClient {
|
|
674
527
|
}
|
675
528
|
: undefined;
|
676
529
|
this._log.info('batchCreateTargetSites request %j', request);
|
677
|
-
return this.innerApiCalls
|
678
|
-
.batchCreateTargetSites(request, options, wrappedCallback)
|
530
|
+
return this.innerApiCalls.batchCreateTargetSites(request, options, wrappedCallback)
|
679
531
|
?.then(([response, rawResponse, _]) => {
|
680
532
|
this._log.info('batchCreateTargetSites response %j', rawResponse);
|
681
533
|
return [response, rawResponse, _];
|
@@ -712,13 +564,10 @@ class SiteSearchEngineServiceClient {
|
|
712
564
|
options = options || {};
|
713
565
|
options.otherArgs = options.otherArgs || {};
|
714
566
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
715
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
716
|
-
|
717
|
-
'target_site.name': request.targetSite.name ?? '',
|
718
|
-
});
|
719
|
-
this.initialize().catch(err => {
|
720
|
-
throw err;
|
567
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
568
|
+
'target_site.name': request.targetSite.name ?? '',
|
721
569
|
});
|
570
|
+
this.initialize().catch(err => { throw err; });
|
722
571
|
const wrappedCallback = callback
|
723
572
|
? (error, response, rawResponse, _) => {
|
724
573
|
this._log.info('updateTargetSite response %j', rawResponse);
|
@@ -726,8 +575,7 @@ class SiteSearchEngineServiceClient {
|
|
726
575
|
}
|
727
576
|
: undefined;
|
728
577
|
this._log.info('updateTargetSite request %j', request);
|
729
|
-
return this.innerApiCalls
|
730
|
-
.updateTargetSite(request, options, wrappedCallback)
|
578
|
+
return this.innerApiCalls.updateTargetSite(request, options, wrappedCallback)
|
731
579
|
?.then(([response, rawResponse, _]) => {
|
732
580
|
this._log.info('updateTargetSite response %j', rawResponse);
|
733
581
|
return [response, rawResponse, _];
|
@@ -764,13 +612,10 @@ class SiteSearchEngineServiceClient {
|
|
764
612
|
options = options || {};
|
765
613
|
options.otherArgs = options.otherArgs || {};
|
766
614
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
767
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
768
|
-
|
769
|
-
name: request.name ?? '',
|
770
|
-
});
|
771
|
-
this.initialize().catch(err => {
|
772
|
-
throw err;
|
615
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
616
|
+
'name': request.name ?? '',
|
773
617
|
});
|
618
|
+
this.initialize().catch(err => { throw err; });
|
774
619
|
const wrappedCallback = callback
|
775
620
|
? (error, response, rawResponse, _) => {
|
776
621
|
this._log.info('deleteTargetSite response %j', rawResponse);
|
@@ -778,8 +623,7 @@ class SiteSearchEngineServiceClient {
|
|
778
623
|
}
|
779
624
|
: undefined;
|
780
625
|
this._log.info('deleteTargetSite request %j', request);
|
781
|
-
return this.innerApiCalls
|
782
|
-
.deleteTargetSite(request, options, wrappedCallback)
|
626
|
+
return this.innerApiCalls.deleteTargetSite(request, options, wrappedCallback)
|
783
627
|
?.then(([response, rawResponse, _]) => {
|
784
628
|
this._log.info('deleteTargetSite response %j', rawResponse);
|
785
629
|
return [response, rawResponse, _];
|
@@ -816,13 +660,10 @@ class SiteSearchEngineServiceClient {
|
|
816
660
|
options = options || {};
|
817
661
|
options.otherArgs = options.otherArgs || {};
|
818
662
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
819
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
820
|
-
|
821
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
822
|
-
});
|
823
|
-
this.initialize().catch(err => {
|
824
|
-
throw err;
|
663
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
664
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
825
665
|
});
|
666
|
+
this.initialize().catch(err => { throw err; });
|
826
667
|
const wrappedCallback = callback
|
827
668
|
? (error, response, rawResponse, _) => {
|
828
669
|
this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
|
@@ -830,8 +671,7 @@ class SiteSearchEngineServiceClient {
|
|
830
671
|
}
|
831
672
|
: undefined;
|
832
673
|
this._log.info('enableAdvancedSiteSearch request %j', request);
|
833
|
-
return this.innerApiCalls
|
834
|
-
.enableAdvancedSiteSearch(request, options, wrappedCallback)
|
674
|
+
return this.innerApiCalls.enableAdvancedSiteSearch(request, options, wrappedCallback)
|
835
675
|
?.then(([response, rawResponse, _]) => {
|
836
676
|
this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
|
837
677
|
return [response, rawResponse, _];
|
@@ -868,13 +708,10 @@ class SiteSearchEngineServiceClient {
|
|
868
708
|
options = options || {};
|
869
709
|
options.otherArgs = options.otherArgs || {};
|
870
710
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
871
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
872
|
-
|
873
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
874
|
-
});
|
875
|
-
this.initialize().catch(err => {
|
876
|
-
throw err;
|
711
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
712
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
877
713
|
});
|
714
|
+
this.initialize().catch(err => { throw err; });
|
878
715
|
const wrappedCallback = callback
|
879
716
|
? (error, response, rawResponse, _) => {
|
880
717
|
this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
|
@@ -882,8 +719,7 @@ class SiteSearchEngineServiceClient {
|
|
882
719
|
}
|
883
720
|
: undefined;
|
884
721
|
this._log.info('disableAdvancedSiteSearch request %j', request);
|
885
|
-
return this.innerApiCalls
|
886
|
-
.disableAdvancedSiteSearch(request, options, wrappedCallback)
|
722
|
+
return this.innerApiCalls.disableAdvancedSiteSearch(request, options, wrappedCallback)
|
887
723
|
?.then(([response, rawResponse, _]) => {
|
888
724
|
this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
|
889
725
|
return [response, rawResponse, _];
|
@@ -920,13 +756,10 @@ class SiteSearchEngineServiceClient {
|
|
920
756
|
options = options || {};
|
921
757
|
options.otherArgs = options.otherArgs || {};
|
922
758
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
923
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
924
|
-
|
925
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
926
|
-
});
|
927
|
-
this.initialize().catch(err => {
|
928
|
-
throw err;
|
759
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
760
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
929
761
|
});
|
762
|
+
this.initialize().catch(err => { throw err; });
|
930
763
|
const wrappedCallback = callback
|
931
764
|
? (error, response, rawResponse, _) => {
|
932
765
|
this._log.info('recrawlUris response %j', rawResponse);
|
@@ -934,8 +767,7 @@ class SiteSearchEngineServiceClient {
|
|
934
767
|
}
|
935
768
|
: undefined;
|
936
769
|
this._log.info('recrawlUris request %j', request);
|
937
|
-
return this.innerApiCalls
|
938
|
-
.recrawlUris(request, options, wrappedCallback)
|
770
|
+
return this.innerApiCalls.recrawlUris(request, options, wrappedCallback)
|
939
771
|
?.then(([response, rawResponse, _]) => {
|
940
772
|
this._log.info('recrawlUris response %j', rawResponse);
|
941
773
|
return [response, rawResponse, _];
|
@@ -972,13 +804,10 @@ class SiteSearchEngineServiceClient {
|
|
972
804
|
options = options || {};
|
973
805
|
options.otherArgs = options.otherArgs || {};
|
974
806
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
975
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
976
|
-
|
977
|
-
parent: request.parent ?? '',
|
978
|
-
});
|
979
|
-
this.initialize().catch(err => {
|
980
|
-
throw err;
|
807
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
808
|
+
'parent': request.parent ?? '',
|
981
809
|
});
|
810
|
+
this.initialize().catch(err => { throw err; });
|
982
811
|
const wrappedCallback = callback
|
983
812
|
? (error, response, rawResponse, _) => {
|
984
813
|
this._log.info('batchVerifyTargetSites response %j', rawResponse);
|
@@ -986,8 +815,7 @@ class SiteSearchEngineServiceClient {
|
|
986
815
|
}
|
987
816
|
: undefined;
|
988
817
|
this._log.info('batchVerifyTargetSites request %j', request);
|
989
|
-
return this.innerApiCalls
|
990
|
-
.batchVerifyTargetSites(request, options, wrappedCallback)
|
818
|
+
return this.innerApiCalls.batchVerifyTargetSites(request, options, wrappedCallback)
|
991
819
|
?.then(([response, rawResponse, _]) => {
|
992
820
|
this._log.info('batchVerifyTargetSites response %j', rawResponse);
|
993
821
|
return [response, rawResponse, _];
|
@@ -1024,13 +852,10 @@ class SiteSearchEngineServiceClient {
|
|
1024
852
|
options = options || {};
|
1025
853
|
options.otherArgs = options.otherArgs || {};
|
1026
854
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1027
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1028
|
-
|
1029
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
1030
|
-
});
|
1031
|
-
this.initialize().catch(err => {
|
1032
|
-
throw err;
|
855
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
856
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
1033
857
|
});
|
858
|
+
this.initialize().catch(err => { throw err; });
|
1034
859
|
const wrappedCallback = callback
|
1035
860
|
? (error, response, rawResponse, _) => {
|
1036
861
|
this._log.info('setUriPatternDocumentData response %j', rawResponse);
|
@@ -1038,8 +863,7 @@ class SiteSearchEngineServiceClient {
|
|
1038
863
|
}
|
1039
864
|
: undefined;
|
1040
865
|
this._log.info('setUriPatternDocumentData request %j', request);
|
1041
|
-
return this.innerApiCalls
|
1042
|
-
.setUriPatternDocumentData(request, options, wrappedCallback)
|
866
|
+
return this.innerApiCalls.setUriPatternDocumentData(request, options, wrappedCallback)
|
1043
867
|
?.then(([response, rawResponse, _]) => {
|
1044
868
|
this._log.info('setUriPatternDocumentData response %j', rawResponse);
|
1045
869
|
return [response, rawResponse, _];
|
@@ -1076,13 +900,10 @@ class SiteSearchEngineServiceClient {
|
|
1076
900
|
options = options || {};
|
1077
901
|
options.otherArgs = options.otherArgs || {};
|
1078
902
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1079
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1080
|
-
|
1081
|
-
parent: request.parent ?? '',
|
1082
|
-
});
|
1083
|
-
this.initialize().catch(err => {
|
1084
|
-
throw err;
|
903
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
904
|
+
'parent': request.parent ?? '',
|
1085
905
|
});
|
906
|
+
this.initialize().catch(err => { throw err; });
|
1086
907
|
const wrappedCallback = callback
|
1087
908
|
? (error, values, nextPageRequest, rawResponse) => {
|
1088
909
|
this._log.info('listTargetSites values %j', values);
|
@@ -1137,15 +958,12 @@ class SiteSearchEngineServiceClient {
|
|
1137
958
|
options = options || {};
|
1138
959
|
options.otherArgs = options.otherArgs || {};
|
1139
960
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1140
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1141
|
-
|
1142
|
-
|
1143
|
-
});
|
961
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
962
|
+
'parent': request.parent ?? '',
|
963
|
+
});
|
1144
964
|
const defaultCallSettings = this._defaults['listTargetSites'];
|
1145
965
|
const callSettings = defaultCallSettings.merge(options);
|
1146
|
-
this.initialize().catch(err => {
|
1147
|
-
throw err;
|
1148
|
-
});
|
966
|
+
this.initialize().catch(err => { throw err; });
|
1149
967
|
this._log.info('listTargetSites stream %j', request);
|
1150
968
|
return this.descriptors.page.listTargetSites.createStream(this.innerApiCalls.listTargetSites, request, callSettings);
|
1151
969
|
}
|
@@ -1192,15 +1010,12 @@ class SiteSearchEngineServiceClient {
|
|
1192
1010
|
options = options || {};
|
1193
1011
|
options.otherArgs = options.otherArgs || {};
|
1194
1012
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1195
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1196
|
-
|
1197
|
-
|
1198
|
-
});
|
1013
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1014
|
+
'parent': request.parent ?? '',
|
1015
|
+
});
|
1199
1016
|
const defaultCallSettings = this._defaults['listTargetSites'];
|
1200
1017
|
const callSettings = defaultCallSettings.merge(options);
|
1201
|
-
this.initialize().catch(err => {
|
1202
|
-
throw err;
|
1203
|
-
});
|
1018
|
+
this.initialize().catch(err => { throw err; });
|
1204
1019
|
this._log.info('listTargetSites iterate %j', request);
|
1205
1020
|
return this.descriptors.page.listTargetSites.asyncIterate(this.innerApiCalls['listTargetSites'], request, callSettings);
|
1206
1021
|
}
|
@@ -1217,13 +1032,10 @@ class SiteSearchEngineServiceClient {
|
|
1217
1032
|
options = options || {};
|
1218
1033
|
options.otherArgs = options.otherArgs || {};
|
1219
1034
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1220
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1221
|
-
|
1222
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
1223
|
-
});
|
1224
|
-
this.initialize().catch(err => {
|
1225
|
-
throw err;
|
1035
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1036
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
1226
1037
|
});
|
1038
|
+
this.initialize().catch(err => { throw err; });
|
1227
1039
|
const wrappedCallback = callback
|
1228
1040
|
? (error, values, nextPageRequest, rawResponse) => {
|
1229
1041
|
this._log.info('fetchDomainVerificationStatus values %j', values);
|
@@ -1275,15 +1087,12 @@ class SiteSearchEngineServiceClient {
|
|
1275
1087
|
options = options || {};
|
1276
1088
|
options.otherArgs = options.otherArgs || {};
|
1277
1089
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1278
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1279
|
-
|
1280
|
-
|
1281
|
-
});
|
1090
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1091
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
1092
|
+
});
|
1282
1093
|
const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
|
1283
1094
|
const callSettings = defaultCallSettings.merge(options);
|
1284
|
-
this.initialize().catch(err => {
|
1285
|
-
throw err;
|
1286
|
-
});
|
1095
|
+
this.initialize().catch(err => { throw err; });
|
1287
1096
|
this._log.info('fetchDomainVerificationStatus stream %j', request);
|
1288
1097
|
return this.descriptors.page.fetchDomainVerificationStatus.createStream(this.innerApiCalls.fetchDomainVerificationStatus, request, callSettings);
|
1289
1098
|
}
|
@@ -1327,103 +1136,100 @@ class SiteSearchEngineServiceClient {
|
|
1327
1136
|
options = options || {};
|
1328
1137
|
options.otherArgs = options.otherArgs || {};
|
1329
1138
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1330
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1331
|
-
|
1332
|
-
|
1333
|
-
});
|
1139
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1140
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
1141
|
+
});
|
1334
1142
|
const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
|
1335
1143
|
const callSettings = defaultCallSettings.merge(options);
|
1336
|
-
this.initialize().catch(err => {
|
1337
|
-
throw err;
|
1338
|
-
});
|
1144
|
+
this.initialize().catch(err => { throw err; });
|
1339
1145
|
this._log.info('fetchDomainVerificationStatus iterate %j', request);
|
1340
1146
|
return this.descriptors.page.fetchDomainVerificationStatus.asyncIterate(this.innerApiCalls['fetchDomainVerificationStatus'], request, callSettings);
|
1341
1147
|
}
|
1342
1148
|
/**
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1149
|
+
* Gets information about a location.
|
1150
|
+
*
|
1151
|
+
* @param {Object} request
|
1152
|
+
* The request object that will be sent.
|
1153
|
+
* @param {string} request.name
|
1154
|
+
* Resource name for the location.
|
1155
|
+
* @param {object} [options]
|
1156
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
1157
|
+
* @returns {Promise} - The promise which resolves to an array.
|
1158
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
1159
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
1160
|
+
* for more details and examples.
|
1161
|
+
* @example
|
1162
|
+
* ```
|
1163
|
+
* const [response] = await client.getLocation(request);
|
1164
|
+
* ```
|
1165
|
+
*/
|
1360
1166
|
getLocation(request, options, callback) {
|
1361
1167
|
return this.locationsClient.getLocation(request, options, callback);
|
1362
1168
|
}
|
1363
1169
|
/**
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1170
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
1171
|
+
*
|
1172
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
1173
|
+
* @param {Object} request
|
1174
|
+
* The request object that will be sent.
|
1175
|
+
* @param {string} request.name
|
1176
|
+
* The resource that owns the locations collection, if applicable.
|
1177
|
+
* @param {string} request.filter
|
1178
|
+
* The standard list filter.
|
1179
|
+
* @param {number} request.pageSize
|
1180
|
+
* The standard list page size.
|
1181
|
+
* @param {string} request.pageToken
|
1182
|
+
* The standard list page token.
|
1183
|
+
* @param {object} [options]
|
1184
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
1185
|
+
* @returns {Object}
|
1186
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
1187
|
+
* When you iterate the returned iterable, each element will be an object representing
|
1188
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
1189
|
+
* so you can stop the iteration when you don't need more results.
|
1190
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
1191
|
+
* for more details and examples.
|
1192
|
+
* @example
|
1193
|
+
* ```
|
1194
|
+
* const iterable = client.listLocationsAsync(request);
|
1195
|
+
* for await (const response of iterable) {
|
1196
|
+
* // process response
|
1197
|
+
* }
|
1198
|
+
* ```
|
1199
|
+
*/
|
1394
1200
|
listLocationsAsync(request, options) {
|
1395
1201
|
return this.locationsClient.listLocationsAsync(request, options);
|
1396
1202
|
}
|
1397
1203
|
/**
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1204
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
1205
|
+
* method to poll the operation result at intervals as recommended by the API
|
1206
|
+
* service.
|
1207
|
+
*
|
1208
|
+
* @param {Object} request - The request object that will be sent.
|
1209
|
+
* @param {string} request.name - The name of the operation resource.
|
1210
|
+
* @param {Object=} options
|
1211
|
+
* Optional parameters. You can override the default settings for this call,
|
1212
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
1213
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
1214
|
+
* for the details.
|
1215
|
+
* @param {function(?Error, ?Object)=} callback
|
1216
|
+
* The function which will be called with the result of the API call.
|
1217
|
+
*
|
1218
|
+
* The second parameter to the callback is an object representing
|
1219
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
1220
|
+
* @return {Promise} - The promise which resolves to an array.
|
1221
|
+
* The first element of the array is an object representing
|
1222
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
1223
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
1224
|
+
*
|
1225
|
+
* @example
|
1226
|
+
* ```
|
1227
|
+
* const client = longrunning.operationsClient();
|
1228
|
+
* const name = '';
|
1229
|
+
* const [response] = await client.getOperation({name});
|
1230
|
+
* // doThingsWith(response)
|
1231
|
+
* ```
|
1232
|
+
*/
|
1427
1233
|
getOperation(request, optionsOrCallback, callback) {
|
1428
1234
|
let options;
|
1429
1235
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1598,8 +1404,7 @@ class SiteSearchEngineServiceClient {
|
|
1598
1404
|
* @returns {string} A string representing the project.
|
1599
1405
|
*/
|
1600
1406
|
matchProjectFromAclConfigName(aclConfigName) {
|
1601
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1602
|
-
.project;
|
1407
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
1603
1408
|
}
|
1604
1409
|
/**
|
1605
1410
|
* Parse the location from AclConfig resource.
|
@@ -1609,8 +1414,7 @@ class SiteSearchEngineServiceClient {
|
|
1609
1414
|
* @returns {string} A string representing the location.
|
1610
1415
|
*/
|
1611
1416
|
matchLocationFromAclConfigName(aclConfigName) {
|
1612
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1613
|
-
.location;
|
1417
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
1614
1418
|
}
|
1615
1419
|
/**
|
1616
1420
|
* Return a fully-qualified engine resource name string.
|
@@ -1692,8 +1496,7 @@ class SiteSearchEngineServiceClient {
|
|
1692
1496
|
* @returns {string} A string representing the project.
|
1693
1497
|
*/
|
1694
1498
|
matchProjectFromEvaluationName(evaluationName) {
|
1695
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1696
|
-
.project;
|
1499
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1697
1500
|
}
|
1698
1501
|
/**
|
1699
1502
|
* Parse the location from Evaluation resource.
|
@@ -1703,8 +1506,7 @@ class SiteSearchEngineServiceClient {
|
|
1703
1506
|
* @returns {string} A string representing the location.
|
1704
1507
|
*/
|
1705
1508
|
matchLocationFromEvaluationName(evaluationName) {
|
1706
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1707
|
-
.location;
|
1509
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1708
1510
|
}
|
1709
1511
|
/**
|
1710
1512
|
* Parse the evaluation from Evaluation resource.
|
@@ -1714,8 +1516,7 @@ class SiteSearchEngineServiceClient {
|
|
1714
1516
|
* @returns {string} A string representing the evaluation.
|
1715
1517
|
*/
|
1716
1518
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1717
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1718
|
-
.evaluation;
|
1519
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1719
1520
|
}
|
1720
1521
|
/**
|
1721
1522
|
* Return a fully-qualified project resource name string.
|
@@ -3782,8 +3583,7 @@ class SiteSearchEngineServiceClient {
|
|
3782
3583
|
* @returns {string} A string representing the project.
|
3783
3584
|
*/
|
3784
3585
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3785
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3786
|
-
.project;
|
3586
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3787
3587
|
}
|
3788
3588
|
/**
|
3789
3589
|
* Parse the location from SampleQuery resource.
|
@@ -3793,8 +3593,7 @@ class SiteSearchEngineServiceClient {
|
|
3793
3593
|
* @returns {string} A string representing the location.
|
3794
3594
|
*/
|
3795
3595
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3796
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3797
|
-
.location;
|
3596
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3798
3597
|
}
|
3799
3598
|
/**
|
3800
3599
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3804,8 +3603,7 @@ class SiteSearchEngineServiceClient {
|
|
3804
3603
|
* @returns {string} A string representing the sample_query_set.
|
3805
3604
|
*/
|
3806
3605
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3807
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3808
|
-
.sample_query_set;
|
3606
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3809
3607
|
}
|
3810
3608
|
/**
|
3811
3609
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3815,8 +3613,7 @@ class SiteSearchEngineServiceClient {
|
|
3815
3613
|
* @returns {string} A string representing the sample_query.
|
3816
3614
|
*/
|
3817
3615
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3818
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3819
|
-
.sample_query;
|
3616
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3820
3617
|
}
|
3821
3618
|
/**
|
3822
3619
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3875,8 +3672,8 @@ class SiteSearchEngineServiceClient {
|
|
3875
3672
|
this._log.info('ending gRPC channel');
|
3876
3673
|
this._terminated = true;
|
3877
3674
|
stub.close();
|
3878
|
-
this.locationsClient.close();
|
3879
|
-
this.operationsClient.close();
|
3675
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3676
|
+
void this.operationsClient.close();
|
3880
3677
|
});
|
3881
3678
|
}
|
3882
3679
|
return Promise.resolve();
|