@google-cloud/discoveryengine 2.1.0 → 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 +7 -0
- package/build/protos/protos.d.ts +31 -316
- package/build/protos/protos.js +146 -593
- package/build/protos/protos.json +25 -1
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +1 -21
- package/build/src/v1/completion_service_client.d.ts +76 -76
- package/build/src/v1/completion_service_client.js +125 -262
- package/build/src/v1/control_service_client.d.ts +81 -81
- package/build/src/v1/control_service_client.js +96 -132
- package/build/src/v1/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1/conversational_search_service_client.js +138 -226
- package/build/src/v1/data_store_service_client.d.ts +122 -122
- package/build/src/v1/data_store_service_client.js +134 -280
- package/build/src/v1/document_service_client.d.ts +120 -120
- package/build/src/v1/document_service_client.js +143 -300
- package/build/src/v1/engine_service_client.d.ts +103 -103
- package/build/src/v1/engine_service_client.js +134 -279
- package/build/src/v1/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1/grounded_generation_service_client.js +79 -100
- package/build/src/v1/project_service_client.d.ts +76 -76
- package/build/src/v1/project_service_client.js +108 -222
- package/build/src/v1/rank_service_client.d.ts +47 -47
- package/build/src/v1/rank_service_client.js +72 -85
- package/build/src/v1/recommendation_service_client.d.ts +47 -47
- package/build/src/v1/recommendation_service_client.js +70 -82
- package/build/src/v1/schema_service_client.d.ts +111 -111
- package/build/src/v1/schema_service_client.js +131 -273
- package/build/src/v1/search_service_client.d.ts +545 -545
- package/build/src/v1/search_service_client.js +90 -113
- package/build/src/v1/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1/search_tuning_service_client.js +113 -235
- package/build/src/v1/serving_config_service_client.d.ts +48 -48
- package/build/src/v1/serving_config_service_client.js +69 -80
- package/build/src/v1/site_search_engine_service_client.d.ts +148 -148
- package/build/src/v1/site_search_engine_service_client.js +179 -378
- package/build/src/v1/user_event_service_client.d.ts +77 -77
- package/build/src/v1/user_event_service_client.js +121 -253
- 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 +1 -1
@@ -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
|
}
|
@@ -211,7 +204,7 @@ class SiteSearchEngineServiceClient {
|
|
211
204
|
// pages). Denote the keys used for pagination and results.
|
212
205
|
this.descriptors.page = {
|
213
206
|
listTargetSites: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites'),
|
214
|
-
fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites')
|
207
|
+
fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites')
|
215
208
|
};
|
216
209
|
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
217
210
|
// This API contains "long-running operations", which return a
|
@@ -219,121 +212,16 @@ class SiteSearchEngineServiceClient {
|
|
219
212
|
// rather than holding a request open.
|
220
213
|
const lroOptions = {
|
221
214
|
auth: this.auth,
|
222
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
215
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
223
216
|
};
|
224
217
|
if (opts.fallback) {
|
225
218
|
lroOptions.protoJson = protoFilesRoot;
|
226
|
-
lroOptions.httpRules = [
|
227
|
-
{
|
228
|
-
|
229
|
-
|
230
|
-
body: '*',
|
231
|
-
additional_bindings: [
|
232
|
-
{
|
233
|
-
post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
|
234
|
-
body: '*',
|
235
|
-
},
|
236
|
-
{
|
237
|
-
post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
238
|
-
body: '*',
|
239
|
-
},
|
240
|
-
],
|
241
|
-
},
|
242
|
-
{
|
243
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
244
|
-
get: '/v1/{name=projects/*/operations/*}',
|
245
|
-
additional_bindings: [
|
246
|
-
{
|
247
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
248
|
-
},
|
249
|
-
{
|
250
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
251
|
-
},
|
252
|
-
{
|
253
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
254
|
-
},
|
255
|
-
{
|
256
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
257
|
-
},
|
258
|
-
{
|
259
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
260
|
-
},
|
261
|
-
{
|
262
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
263
|
-
},
|
264
|
-
{
|
265
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
266
|
-
},
|
267
|
-
{
|
268
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
269
|
-
},
|
270
|
-
{
|
271
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
|
272
|
-
},
|
273
|
-
{
|
274
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
275
|
-
},
|
276
|
-
{
|
277
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
278
|
-
},
|
279
|
-
{
|
280
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
281
|
-
},
|
282
|
-
{
|
283
|
-
get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}',
|
284
|
-
},
|
285
|
-
{ get: '/v1/{name=projects/*/locations/*/operations/*}' },
|
286
|
-
{ get: '/v1/{name=projects/*/operations/*}' },
|
287
|
-
],
|
288
|
-
},
|
289
|
-
{
|
290
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
291
|
-
get: '/v1/{name=projects/*}/operations',
|
292
|
-
additional_bindings: [
|
293
|
-
{
|
294
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
295
|
-
},
|
296
|
-
{
|
297
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
298
|
-
},
|
299
|
-
{
|
300
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
301
|
-
},
|
302
|
-
{
|
303
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
304
|
-
},
|
305
|
-
{
|
306
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
307
|
-
},
|
308
|
-
{
|
309
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
310
|
-
},
|
311
|
-
{
|
312
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
313
|
-
},
|
314
|
-
{
|
315
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
316
|
-
},
|
317
|
-
{ get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
|
318
|
-
{
|
319
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
320
|
-
},
|
321
|
-
{
|
322
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
323
|
-
},
|
324
|
-
{ get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
|
325
|
-
{
|
326
|
-
get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
|
327
|
-
},
|
328
|
-
{ get: '/v1/{name=projects/*/locations/*}/operations' },
|
329
|
-
{ get: '/v1/{name=projects/*}/operations' },
|
330
|
-
],
|
331
|
-
},
|
332
|
-
];
|
219
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }, { post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
220
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/operations/*}', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/operations/*}', }, { get: '/v1/{name=projects/*/operations/*}', }],
|
221
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*}/operations', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*}/operations', }, { get: '/v1/{name=projects/*}/operations', }],
|
222
|
+
}];
|
333
223
|
}
|
334
|
-
this.operationsClient = this._gaxModule
|
335
|
-
.lro(lroOptions)
|
336
|
-
.operationsClient(opts);
|
224
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
337
225
|
const createTargetSiteResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.TargetSite');
|
338
226
|
const createTargetSiteMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.CreateTargetSiteMetadata');
|
339
227
|
const batchCreateTargetSitesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.BatchCreateTargetSitesResponse');
|
@@ -364,7 +252,7 @@ class SiteSearchEngineServiceClient {
|
|
364
252
|
enableAdvancedSiteSearch: new this._gaxModule.LongrunningDescriptor(this.operationsClient, enableAdvancedSiteSearchResponse.decode.bind(enableAdvancedSiteSearchResponse), enableAdvancedSiteSearchMetadata.decode.bind(enableAdvancedSiteSearchMetadata)),
|
365
253
|
disableAdvancedSiteSearch: new this._gaxModule.LongrunningDescriptor(this.operationsClient, disableAdvancedSiteSearchResponse.decode.bind(disableAdvancedSiteSearchResponse), disableAdvancedSiteSearchMetadata.decode.bind(disableAdvancedSiteSearchMetadata)),
|
366
254
|
recrawlUris: new this._gaxModule.LongrunningDescriptor(this.operationsClient, recrawlUrisResponse.decode.bind(recrawlUrisResponse), recrawlUrisMetadata.decode.bind(recrawlUrisMetadata)),
|
367
|
-
batchVerifyTargetSites: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchVerifyTargetSitesResponse.decode.bind(batchVerifyTargetSitesResponse), batchVerifyTargetSitesMetadata.decode.bind(batchVerifyTargetSitesMetadata))
|
255
|
+
batchVerifyTargetSites: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchVerifyTargetSitesResponse.decode.bind(batchVerifyTargetSitesResponse), batchVerifyTargetSitesMetadata.decode.bind(batchVerifyTargetSitesMetadata))
|
368
256
|
};
|
369
257
|
// Put together the default options sent with requests.
|
370
258
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.SiteSearchEngineService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -393,30 +281,13 @@ class SiteSearchEngineServiceClient {
|
|
393
281
|
}
|
394
282
|
// Put together the "service stub" for
|
395
283
|
// google.cloud.discoveryengine.v1.SiteSearchEngineService.
|
396
|
-
this.siteSearchEngineServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
.SiteSearchEngineService, this._opts, this._providedCustomServicePath);
|
284
|
+
this.siteSearchEngineServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
285
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.SiteSearchEngineService') :
|
286
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
287
|
+
this._protos.google.cloud.discoveryengine.v1.SiteSearchEngineService, this._opts, this._providedCustomServicePath);
|
401
288
|
// Iterate over each of the methods that the service provides
|
402
289
|
// and create an API call method for each.
|
403
|
-
const siteSearchEngineServiceStubMethods = [
|
404
|
-
'getSiteSearchEngine',
|
405
|
-
'createTargetSite',
|
406
|
-
'batchCreateTargetSites',
|
407
|
-
'getTargetSite',
|
408
|
-
'updateTargetSite',
|
409
|
-
'deleteTargetSite',
|
410
|
-
'listTargetSites',
|
411
|
-
'createSitemap',
|
412
|
-
'deleteSitemap',
|
413
|
-
'fetchSitemaps',
|
414
|
-
'enableAdvancedSiteSearch',
|
415
|
-
'disableAdvancedSiteSearch',
|
416
|
-
'recrawlUris',
|
417
|
-
'batchVerifyTargetSites',
|
418
|
-
'fetchDomainVerificationStatus',
|
419
|
-
];
|
290
|
+
const siteSearchEngineServiceStubMethods = ['getSiteSearchEngine', 'createTargetSite', 'batchCreateTargetSites', 'getTargetSite', 'updateTargetSite', 'deleteTargetSite', 'listTargetSites', 'createSitemap', 'deleteSitemap', 'fetchSitemaps', 'enableAdvancedSiteSearch', 'disableAdvancedSiteSearch', 'recrawlUris', 'batchVerifyTargetSites', 'fetchDomainVerificationStatus'];
|
420
291
|
for (const methodName of siteSearchEngineServiceStubMethods) {
|
421
292
|
const callPromise = this.siteSearchEngineServiceStub.then(stub => (...args) => {
|
422
293
|
if (this._terminated) {
|
@@ -441,8 +312,7 @@ class SiteSearchEngineServiceClient {
|
|
441
312
|
* @returns {string} The DNS address for this service.
|
442
313
|
*/
|
443
314
|
static get servicePath() {
|
444
|
-
if (typeof process === 'object' &&
|
445
|
-
typeof process.emitWarning === 'function') {
|
315
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
446
316
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
447
317
|
}
|
448
318
|
return 'discoveryengine.googleapis.com';
|
@@ -453,8 +323,7 @@ class SiteSearchEngineServiceClient {
|
|
453
323
|
* @returns {string} The DNS address for this service.
|
454
324
|
*/
|
455
325
|
static get apiEndpoint() {
|
456
|
-
if (typeof process === 'object' &&
|
457
|
-
typeof process.emitWarning === 'function') {
|
326
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
458
327
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
459
328
|
}
|
460
329
|
return 'discoveryengine.googleapis.com';
|
@@ -482,7 +351,9 @@ class SiteSearchEngineServiceClient {
|
|
482
351
|
* @returns {string[]} List of default scopes.
|
483
352
|
*/
|
484
353
|
static get scopes() {
|
485
|
-
return [
|
354
|
+
return [
|
355
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
356
|
+
];
|
486
357
|
}
|
487
358
|
/**
|
488
359
|
* Return the project ID used by this class.
|
@@ -508,13 +379,10 @@ class SiteSearchEngineServiceClient {
|
|
508
379
|
options = options || {};
|
509
380
|
options.otherArgs = options.otherArgs || {};
|
510
381
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
511
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
512
|
-
|
513
|
-
name: request.name ?? '',
|
514
|
-
});
|
515
|
-
this.initialize().catch(err => {
|
516
|
-
throw err;
|
382
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
383
|
+
'name': request.name ?? '',
|
517
384
|
});
|
385
|
+
this.initialize().catch(err => { throw err; });
|
518
386
|
this._log.info('getSiteSearchEngine request %j', request);
|
519
387
|
const wrappedCallback = callback
|
520
388
|
? (error, response, options, rawResponse) => {
|
@@ -522,8 +390,7 @@ class SiteSearchEngineServiceClient {
|
|
522
390
|
callback(error, response, options, rawResponse); // We verified callback above.
|
523
391
|
}
|
524
392
|
: undefined;
|
525
|
-
return this.innerApiCalls
|
526
|
-
.getSiteSearchEngine(request, options, wrappedCallback)
|
393
|
+
return this.innerApiCalls.getSiteSearchEngine(request, options, wrappedCallback)
|
527
394
|
?.then(([response, options, rawResponse]) => {
|
528
395
|
this._log.info('getSiteSearchEngine response %j', response);
|
529
396
|
return [response, options, rawResponse];
|
@@ -542,13 +409,10 @@ class SiteSearchEngineServiceClient {
|
|
542
409
|
options = options || {};
|
543
410
|
options.otherArgs = options.otherArgs || {};
|
544
411
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
545
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
546
|
-
|
547
|
-
name: request.name ?? '',
|
548
|
-
});
|
549
|
-
this.initialize().catch(err => {
|
550
|
-
throw err;
|
412
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
413
|
+
'name': request.name ?? '',
|
551
414
|
});
|
415
|
+
this.initialize().catch(err => { throw err; });
|
552
416
|
this._log.info('getTargetSite request %j', request);
|
553
417
|
const wrappedCallback = callback
|
554
418
|
? (error, response, options, rawResponse) => {
|
@@ -556,8 +420,7 @@ class SiteSearchEngineServiceClient {
|
|
556
420
|
callback(error, response, options, rawResponse); // We verified callback above.
|
557
421
|
}
|
558
422
|
: undefined;
|
559
|
-
return this.innerApiCalls
|
560
|
-
.getTargetSite(request, options, wrappedCallback)
|
423
|
+
return this.innerApiCalls.getTargetSite(request, options, wrappedCallback)
|
561
424
|
?.then(([response, options, rawResponse]) => {
|
562
425
|
this._log.info('getTargetSite response %j', response);
|
563
426
|
return [response, options, rawResponse];
|
@@ -576,13 +439,10 @@ class SiteSearchEngineServiceClient {
|
|
576
439
|
options = options || {};
|
577
440
|
options.otherArgs = options.otherArgs || {};
|
578
441
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
579
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
580
|
-
|
581
|
-
parent: request.parent ?? '',
|
582
|
-
});
|
583
|
-
this.initialize().catch(err => {
|
584
|
-
throw err;
|
442
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
443
|
+
'parent': request.parent ?? '',
|
585
444
|
});
|
445
|
+
this.initialize().catch(err => { throw err; });
|
586
446
|
this._log.info('fetchSitemaps request %j', request);
|
587
447
|
const wrappedCallback = callback
|
588
448
|
? (error, response, options, rawResponse) => {
|
@@ -590,8 +450,7 @@ class SiteSearchEngineServiceClient {
|
|
590
450
|
callback(error, response, options, rawResponse); // We verified callback above.
|
591
451
|
}
|
592
452
|
: undefined;
|
593
|
-
return this.innerApiCalls
|
594
|
-
.fetchSitemaps(request, options, wrappedCallback)
|
453
|
+
return this.innerApiCalls.fetchSitemaps(request, options, wrappedCallback)
|
595
454
|
?.then(([response, options, rawResponse]) => {
|
596
455
|
this._log.info('fetchSitemaps response %j', response);
|
597
456
|
return [response, options, rawResponse];
|
@@ -610,13 +469,10 @@ class SiteSearchEngineServiceClient {
|
|
610
469
|
options = options || {};
|
611
470
|
options.otherArgs = options.otherArgs || {};
|
612
471
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
613
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
614
|
-
|
615
|
-
parent: request.parent ?? '',
|
616
|
-
});
|
617
|
-
this.initialize().catch(err => {
|
618
|
-
throw err;
|
472
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
473
|
+
'parent': request.parent ?? '',
|
619
474
|
});
|
475
|
+
this.initialize().catch(err => { throw err; });
|
620
476
|
const wrappedCallback = callback
|
621
477
|
? (error, response, rawResponse, _) => {
|
622
478
|
this._log.info('createTargetSite response %j', rawResponse);
|
@@ -624,8 +480,7 @@ class SiteSearchEngineServiceClient {
|
|
624
480
|
}
|
625
481
|
: undefined;
|
626
482
|
this._log.info('createTargetSite request %j', request);
|
627
|
-
return this.innerApiCalls
|
628
|
-
.createTargetSite(request, options, wrappedCallback)
|
483
|
+
return this.innerApiCalls.createTargetSite(request, options, wrappedCallback)
|
629
484
|
?.then(([response, rawResponse, _]) => {
|
630
485
|
this._log.info('createTargetSite response %j', rawResponse);
|
631
486
|
return [response, rawResponse, _];
|
@@ -662,13 +517,10 @@ class SiteSearchEngineServiceClient {
|
|
662
517
|
options = options || {};
|
663
518
|
options.otherArgs = options.otherArgs || {};
|
664
519
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
665
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
666
|
-
|
667
|
-
parent: request.parent ?? '',
|
668
|
-
});
|
669
|
-
this.initialize().catch(err => {
|
670
|
-
throw err;
|
520
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
521
|
+
'parent': request.parent ?? '',
|
671
522
|
});
|
523
|
+
this.initialize().catch(err => { throw err; });
|
672
524
|
const wrappedCallback = callback
|
673
525
|
? (error, response, rawResponse, _) => {
|
674
526
|
this._log.info('batchCreateTargetSites response %j', rawResponse);
|
@@ -676,8 +528,7 @@ class SiteSearchEngineServiceClient {
|
|
676
528
|
}
|
677
529
|
: undefined;
|
678
530
|
this._log.info('batchCreateTargetSites request %j', request);
|
679
|
-
return this.innerApiCalls
|
680
|
-
.batchCreateTargetSites(request, options, wrappedCallback)
|
531
|
+
return this.innerApiCalls.batchCreateTargetSites(request, options, wrappedCallback)
|
681
532
|
?.then(([response, rawResponse, _]) => {
|
682
533
|
this._log.info('batchCreateTargetSites response %j', rawResponse);
|
683
534
|
return [response, rawResponse, _];
|
@@ -714,13 +565,10 @@ class SiteSearchEngineServiceClient {
|
|
714
565
|
options = options || {};
|
715
566
|
options.otherArgs = options.otherArgs || {};
|
716
567
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
717
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
718
|
-
|
719
|
-
'target_site.name': request.targetSite.name ?? '',
|
720
|
-
});
|
721
|
-
this.initialize().catch(err => {
|
722
|
-
throw err;
|
568
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
569
|
+
'target_site.name': request.targetSite.name ?? '',
|
723
570
|
});
|
571
|
+
this.initialize().catch(err => { throw err; });
|
724
572
|
const wrappedCallback = callback
|
725
573
|
? (error, response, rawResponse, _) => {
|
726
574
|
this._log.info('updateTargetSite response %j', rawResponse);
|
@@ -728,8 +576,7 @@ class SiteSearchEngineServiceClient {
|
|
728
576
|
}
|
729
577
|
: undefined;
|
730
578
|
this._log.info('updateTargetSite request %j', request);
|
731
|
-
return this.innerApiCalls
|
732
|
-
.updateTargetSite(request, options, wrappedCallback)
|
579
|
+
return this.innerApiCalls.updateTargetSite(request, options, wrappedCallback)
|
733
580
|
?.then(([response, rawResponse, _]) => {
|
734
581
|
this._log.info('updateTargetSite response %j', rawResponse);
|
735
582
|
return [response, rawResponse, _];
|
@@ -766,13 +613,10 @@ class SiteSearchEngineServiceClient {
|
|
766
613
|
options = options || {};
|
767
614
|
options.otherArgs = options.otherArgs || {};
|
768
615
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
769
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
770
|
-
|
771
|
-
name: request.name ?? '',
|
772
|
-
});
|
773
|
-
this.initialize().catch(err => {
|
774
|
-
throw err;
|
616
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
617
|
+
'name': request.name ?? '',
|
775
618
|
});
|
619
|
+
this.initialize().catch(err => { throw err; });
|
776
620
|
const wrappedCallback = callback
|
777
621
|
? (error, response, rawResponse, _) => {
|
778
622
|
this._log.info('deleteTargetSite response %j', rawResponse);
|
@@ -780,8 +624,7 @@ class SiteSearchEngineServiceClient {
|
|
780
624
|
}
|
781
625
|
: undefined;
|
782
626
|
this._log.info('deleteTargetSite request %j', request);
|
783
|
-
return this.innerApiCalls
|
784
|
-
.deleteTargetSite(request, options, wrappedCallback)
|
627
|
+
return this.innerApiCalls.deleteTargetSite(request, options, wrappedCallback)
|
785
628
|
?.then(([response, rawResponse, _]) => {
|
786
629
|
this._log.info('deleteTargetSite response %j', rawResponse);
|
787
630
|
return [response, rawResponse, _];
|
@@ -818,13 +661,10 @@ class SiteSearchEngineServiceClient {
|
|
818
661
|
options = options || {};
|
819
662
|
options.otherArgs = options.otherArgs || {};
|
820
663
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
821
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
822
|
-
|
823
|
-
parent: request.parent ?? '',
|
824
|
-
});
|
825
|
-
this.initialize().catch(err => {
|
826
|
-
throw err;
|
664
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
665
|
+
'parent': request.parent ?? '',
|
827
666
|
});
|
667
|
+
this.initialize().catch(err => { throw err; });
|
828
668
|
const wrappedCallback = callback
|
829
669
|
? (error, response, rawResponse, _) => {
|
830
670
|
this._log.info('createSitemap response %j', rawResponse);
|
@@ -832,8 +672,7 @@ class SiteSearchEngineServiceClient {
|
|
832
672
|
}
|
833
673
|
: undefined;
|
834
674
|
this._log.info('createSitemap request %j', request);
|
835
|
-
return this.innerApiCalls
|
836
|
-
.createSitemap(request, options, wrappedCallback)
|
675
|
+
return this.innerApiCalls.createSitemap(request, options, wrappedCallback)
|
837
676
|
?.then(([response, rawResponse, _]) => {
|
838
677
|
this._log.info('createSitemap response %j', rawResponse);
|
839
678
|
return [response, rawResponse, _];
|
@@ -870,13 +709,10 @@ class SiteSearchEngineServiceClient {
|
|
870
709
|
options = options || {};
|
871
710
|
options.otherArgs = options.otherArgs || {};
|
872
711
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
873
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
874
|
-
|
875
|
-
name: request.name ?? '',
|
876
|
-
});
|
877
|
-
this.initialize().catch(err => {
|
878
|
-
throw err;
|
712
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
713
|
+
'name': request.name ?? '',
|
879
714
|
});
|
715
|
+
this.initialize().catch(err => { throw err; });
|
880
716
|
const wrappedCallback = callback
|
881
717
|
? (error, response, rawResponse, _) => {
|
882
718
|
this._log.info('deleteSitemap response %j', rawResponse);
|
@@ -884,8 +720,7 @@ class SiteSearchEngineServiceClient {
|
|
884
720
|
}
|
885
721
|
: undefined;
|
886
722
|
this._log.info('deleteSitemap request %j', request);
|
887
|
-
return this.innerApiCalls
|
888
|
-
.deleteSitemap(request, options, wrappedCallback)
|
723
|
+
return this.innerApiCalls.deleteSitemap(request, options, wrappedCallback)
|
889
724
|
?.then(([response, rawResponse, _]) => {
|
890
725
|
this._log.info('deleteSitemap response %j', rawResponse);
|
891
726
|
return [response, rawResponse, _];
|
@@ -922,13 +757,10 @@ class SiteSearchEngineServiceClient {
|
|
922
757
|
options = options || {};
|
923
758
|
options.otherArgs = options.otherArgs || {};
|
924
759
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
925
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
926
|
-
|
927
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
928
|
-
});
|
929
|
-
this.initialize().catch(err => {
|
930
|
-
throw err;
|
760
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
761
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
931
762
|
});
|
763
|
+
this.initialize().catch(err => { throw err; });
|
932
764
|
const wrappedCallback = callback
|
933
765
|
? (error, response, rawResponse, _) => {
|
934
766
|
this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
|
@@ -936,8 +768,7 @@ class SiteSearchEngineServiceClient {
|
|
936
768
|
}
|
937
769
|
: undefined;
|
938
770
|
this._log.info('enableAdvancedSiteSearch request %j', request);
|
939
|
-
return this.innerApiCalls
|
940
|
-
.enableAdvancedSiteSearch(request, options, wrappedCallback)
|
771
|
+
return this.innerApiCalls.enableAdvancedSiteSearch(request, options, wrappedCallback)
|
941
772
|
?.then(([response, rawResponse, _]) => {
|
942
773
|
this._log.info('enableAdvancedSiteSearch response %j', rawResponse);
|
943
774
|
return [response, rawResponse, _];
|
@@ -974,13 +805,10 @@ class SiteSearchEngineServiceClient {
|
|
974
805
|
options = options || {};
|
975
806
|
options.otherArgs = options.otherArgs || {};
|
976
807
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
977
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
978
|
-
|
979
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
980
|
-
});
|
981
|
-
this.initialize().catch(err => {
|
982
|
-
throw err;
|
808
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
809
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
983
810
|
});
|
811
|
+
this.initialize().catch(err => { throw err; });
|
984
812
|
const wrappedCallback = callback
|
985
813
|
? (error, response, rawResponse, _) => {
|
986
814
|
this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
|
@@ -988,8 +816,7 @@ class SiteSearchEngineServiceClient {
|
|
988
816
|
}
|
989
817
|
: undefined;
|
990
818
|
this._log.info('disableAdvancedSiteSearch request %j', request);
|
991
|
-
return this.innerApiCalls
|
992
|
-
.disableAdvancedSiteSearch(request, options, wrappedCallback)
|
819
|
+
return this.innerApiCalls.disableAdvancedSiteSearch(request, options, wrappedCallback)
|
993
820
|
?.then(([response, rawResponse, _]) => {
|
994
821
|
this._log.info('disableAdvancedSiteSearch response %j', rawResponse);
|
995
822
|
return [response, rawResponse, _];
|
@@ -1026,13 +853,10 @@ class SiteSearchEngineServiceClient {
|
|
1026
853
|
options = options || {};
|
1027
854
|
options.otherArgs = options.otherArgs || {};
|
1028
855
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1029
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1030
|
-
|
1031
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
1032
|
-
});
|
1033
|
-
this.initialize().catch(err => {
|
1034
|
-
throw err;
|
856
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
857
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
1035
858
|
});
|
859
|
+
this.initialize().catch(err => { throw err; });
|
1036
860
|
const wrappedCallback = callback
|
1037
861
|
? (error, response, rawResponse, _) => {
|
1038
862
|
this._log.info('recrawlUris response %j', rawResponse);
|
@@ -1040,8 +864,7 @@ class SiteSearchEngineServiceClient {
|
|
1040
864
|
}
|
1041
865
|
: undefined;
|
1042
866
|
this._log.info('recrawlUris request %j', request);
|
1043
|
-
return this.innerApiCalls
|
1044
|
-
.recrawlUris(request, options, wrappedCallback)
|
867
|
+
return this.innerApiCalls.recrawlUris(request, options, wrappedCallback)
|
1045
868
|
?.then(([response, rawResponse, _]) => {
|
1046
869
|
this._log.info('recrawlUris response %j', rawResponse);
|
1047
870
|
return [response, rawResponse, _];
|
@@ -1078,13 +901,10 @@ class SiteSearchEngineServiceClient {
|
|
1078
901
|
options = options || {};
|
1079
902
|
options.otherArgs = options.otherArgs || {};
|
1080
903
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1081
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1082
|
-
|
1083
|
-
parent: request.parent ?? '',
|
1084
|
-
});
|
1085
|
-
this.initialize().catch(err => {
|
1086
|
-
throw err;
|
904
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
905
|
+
'parent': request.parent ?? '',
|
1087
906
|
});
|
907
|
+
this.initialize().catch(err => { throw err; });
|
1088
908
|
const wrappedCallback = callback
|
1089
909
|
? (error, response, rawResponse, _) => {
|
1090
910
|
this._log.info('batchVerifyTargetSites response %j', rawResponse);
|
@@ -1092,8 +912,7 @@ class SiteSearchEngineServiceClient {
|
|
1092
912
|
}
|
1093
913
|
: undefined;
|
1094
914
|
this._log.info('batchVerifyTargetSites request %j', request);
|
1095
|
-
return this.innerApiCalls
|
1096
|
-
.batchVerifyTargetSites(request, options, wrappedCallback)
|
915
|
+
return this.innerApiCalls.batchVerifyTargetSites(request, options, wrappedCallback)
|
1097
916
|
?.then(([response, rawResponse, _]) => {
|
1098
917
|
this._log.info('batchVerifyTargetSites response %j', rawResponse);
|
1099
918
|
return [response, rawResponse, _];
|
@@ -1130,13 +949,10 @@ class SiteSearchEngineServiceClient {
|
|
1130
949
|
options = options || {};
|
1131
950
|
options.otherArgs = options.otherArgs || {};
|
1132
951
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1133
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1134
|
-
|
1135
|
-
parent: request.parent ?? '',
|
1136
|
-
});
|
1137
|
-
this.initialize().catch(err => {
|
1138
|
-
throw err;
|
952
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
953
|
+
'parent': request.parent ?? '',
|
1139
954
|
});
|
955
|
+
this.initialize().catch(err => { throw err; });
|
1140
956
|
const wrappedCallback = callback
|
1141
957
|
? (error, values, nextPageRequest, rawResponse) => {
|
1142
958
|
this._log.info('listTargetSites values %j', values);
|
@@ -1191,15 +1007,12 @@ class SiteSearchEngineServiceClient {
|
|
1191
1007
|
options = options || {};
|
1192
1008
|
options.otherArgs = options.otherArgs || {};
|
1193
1009
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1194
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1195
|
-
|
1196
|
-
|
1197
|
-
});
|
1010
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1011
|
+
'parent': request.parent ?? '',
|
1012
|
+
});
|
1198
1013
|
const defaultCallSettings = this._defaults['listTargetSites'];
|
1199
1014
|
const callSettings = defaultCallSettings.merge(options);
|
1200
|
-
this.initialize().catch(err => {
|
1201
|
-
throw err;
|
1202
|
-
});
|
1015
|
+
this.initialize().catch(err => { throw err; });
|
1203
1016
|
this._log.info('listTargetSites stream %j', request);
|
1204
1017
|
return this.descriptors.page.listTargetSites.createStream(this.innerApiCalls.listTargetSites, request, callSettings);
|
1205
1018
|
}
|
@@ -1246,15 +1059,12 @@ class SiteSearchEngineServiceClient {
|
|
1246
1059
|
options = options || {};
|
1247
1060
|
options.otherArgs = options.otherArgs || {};
|
1248
1061
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1249
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1250
|
-
|
1251
|
-
|
1252
|
-
});
|
1062
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1063
|
+
'parent': request.parent ?? '',
|
1064
|
+
});
|
1253
1065
|
const defaultCallSettings = this._defaults['listTargetSites'];
|
1254
1066
|
const callSettings = defaultCallSettings.merge(options);
|
1255
|
-
this.initialize().catch(err => {
|
1256
|
-
throw err;
|
1257
|
-
});
|
1067
|
+
this.initialize().catch(err => { throw err; });
|
1258
1068
|
this._log.info('listTargetSites iterate %j', request);
|
1259
1069
|
return this.descriptors.page.listTargetSites.asyncIterate(this.innerApiCalls['listTargetSites'], request, callSettings);
|
1260
1070
|
}
|
@@ -1271,13 +1081,10 @@ class SiteSearchEngineServiceClient {
|
|
1271
1081
|
options = options || {};
|
1272
1082
|
options.otherArgs = options.otherArgs || {};
|
1273
1083
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1274
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1275
|
-
|
1276
|
-
site_search_engine: request.siteSearchEngine ?? '',
|
1277
|
-
});
|
1278
|
-
this.initialize().catch(err => {
|
1279
|
-
throw err;
|
1084
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1085
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
1280
1086
|
});
|
1087
|
+
this.initialize().catch(err => { throw err; });
|
1281
1088
|
const wrappedCallback = callback
|
1282
1089
|
? (error, values, nextPageRequest, rawResponse) => {
|
1283
1090
|
this._log.info('fetchDomainVerificationStatus values %j', values);
|
@@ -1329,15 +1136,12 @@ class SiteSearchEngineServiceClient {
|
|
1329
1136
|
options = options || {};
|
1330
1137
|
options.otherArgs = options.otherArgs || {};
|
1331
1138
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1332
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1333
|
-
|
1334
|
-
|
1335
|
-
});
|
1139
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1140
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
1141
|
+
});
|
1336
1142
|
const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
|
1337
1143
|
const callSettings = defaultCallSettings.merge(options);
|
1338
|
-
this.initialize().catch(err => {
|
1339
|
-
throw err;
|
1340
|
-
});
|
1144
|
+
this.initialize().catch(err => { throw err; });
|
1341
1145
|
this._log.info('fetchDomainVerificationStatus stream %j', request);
|
1342
1146
|
return this.descriptors.page.fetchDomainVerificationStatus.createStream(this.innerApiCalls.fetchDomainVerificationStatus, request, callSettings);
|
1343
1147
|
}
|
@@ -1381,103 +1185,100 @@ class SiteSearchEngineServiceClient {
|
|
1381
1185
|
options = options || {};
|
1382
1186
|
options.otherArgs = options.otherArgs || {};
|
1383
1187
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1384
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1385
|
-
|
1386
|
-
|
1387
|
-
});
|
1188
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1189
|
+
'site_search_engine': request.siteSearchEngine ?? '',
|
1190
|
+
});
|
1388
1191
|
const defaultCallSettings = this._defaults['fetchDomainVerificationStatus'];
|
1389
1192
|
const callSettings = defaultCallSettings.merge(options);
|
1390
|
-
this.initialize().catch(err => {
|
1391
|
-
throw err;
|
1392
|
-
});
|
1193
|
+
this.initialize().catch(err => { throw err; });
|
1393
1194
|
this._log.info('fetchDomainVerificationStatus iterate %j', request);
|
1394
1195
|
return this.descriptors.page.fetchDomainVerificationStatus.asyncIterate(this.innerApiCalls['fetchDomainVerificationStatus'], request, callSettings);
|
1395
1196
|
}
|
1396
1197
|
/**
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1198
|
+
* Gets information about a location.
|
1199
|
+
*
|
1200
|
+
* @param {Object} request
|
1201
|
+
* The request object that will be sent.
|
1202
|
+
* @param {string} request.name
|
1203
|
+
* Resource name for the location.
|
1204
|
+
* @param {object} [options]
|
1205
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
1206
|
+
* @returns {Promise} - The promise which resolves to an array.
|
1207
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
1208
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
1209
|
+
* for more details and examples.
|
1210
|
+
* @example
|
1211
|
+
* ```
|
1212
|
+
* const [response] = await client.getLocation(request);
|
1213
|
+
* ```
|
1214
|
+
*/
|
1414
1215
|
getLocation(request, options, callback) {
|
1415
1216
|
return this.locationsClient.getLocation(request, options, callback);
|
1416
1217
|
}
|
1417
1218
|
/**
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1219
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
1220
|
+
*
|
1221
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
1222
|
+
* @param {Object} request
|
1223
|
+
* The request object that will be sent.
|
1224
|
+
* @param {string} request.name
|
1225
|
+
* The resource that owns the locations collection, if applicable.
|
1226
|
+
* @param {string} request.filter
|
1227
|
+
* The standard list filter.
|
1228
|
+
* @param {number} request.pageSize
|
1229
|
+
* The standard list page size.
|
1230
|
+
* @param {string} request.pageToken
|
1231
|
+
* The standard list page token.
|
1232
|
+
* @param {object} [options]
|
1233
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
1234
|
+
* @returns {Object}
|
1235
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
1236
|
+
* When you iterate the returned iterable, each element will be an object representing
|
1237
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
1238
|
+
* so you can stop the iteration when you don't need more results.
|
1239
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
1240
|
+
* for more details and examples.
|
1241
|
+
* @example
|
1242
|
+
* ```
|
1243
|
+
* const iterable = client.listLocationsAsync(request);
|
1244
|
+
* for await (const response of iterable) {
|
1245
|
+
* // process response
|
1246
|
+
* }
|
1247
|
+
* ```
|
1248
|
+
*/
|
1448
1249
|
listLocationsAsync(request, options) {
|
1449
1250
|
return this.locationsClient.listLocationsAsync(request, options);
|
1450
1251
|
}
|
1451
1252
|
/**
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1253
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
1254
|
+
* method to poll the operation result at intervals as recommended by the API
|
1255
|
+
* service.
|
1256
|
+
*
|
1257
|
+
* @param {Object} request - The request object that will be sent.
|
1258
|
+
* @param {string} request.name - The name of the operation resource.
|
1259
|
+
* @param {Object=} options
|
1260
|
+
* Optional parameters. You can override the default settings for this call,
|
1261
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
1262
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
1263
|
+
* for the details.
|
1264
|
+
* @param {function(?Error, ?Object)=} callback
|
1265
|
+
* The function which will be called with the result of the API call.
|
1266
|
+
*
|
1267
|
+
* The second parameter to the callback is an object representing
|
1268
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
1269
|
+
* @return {Promise} - The promise which resolves to an array.
|
1270
|
+
* The first element of the array is an object representing
|
1271
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
1272
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
1273
|
+
*
|
1274
|
+
* @example
|
1275
|
+
* ```
|
1276
|
+
* const client = longrunning.operationsClient();
|
1277
|
+
* const name = '';
|
1278
|
+
* const [response] = await client.getOperation({name});
|
1279
|
+
* // doThingsWith(response)
|
1280
|
+
* ```
|
1281
|
+
*/
|
1481
1282
|
getOperation(request, optionsOrCallback, callback) {
|
1482
1283
|
let options;
|
1483
1284
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -3866,8 +3667,8 @@ class SiteSearchEngineServiceClient {
|
|
3866
3667
|
this._log.info('ending gRPC channel');
|
3867
3668
|
this._terminated = true;
|
3868
3669
|
stub.close();
|
3869
|
-
this.locationsClient.close();
|
3870
|
-
this.operationsClient.close();
|
3670
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3671
|
+
void this.operationsClient.close();
|
3871
3672
|
});
|
3872
3673
|
}
|
3873
3674
|
return Promise.resolve();
|