@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
@@ -246,40 +246,40 @@ export declare class ControlServiceClient {
|
|
246
246
|
getControl(request: protos.google.cloud.discoveryengine.v1.IGetControlRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1.IControl, protos.google.cloud.discoveryengine.v1.IGetControlRequest | null | undefined, {} | null | undefined>): void;
|
247
247
|
getControl(request: protos.google.cloud.discoveryengine.v1.IGetControlRequest, callback: Callback<protos.google.cloud.discoveryengine.v1.IControl, protos.google.cloud.discoveryengine.v1.IGetControlRequest | null | undefined, {} | null | undefined>): void;
|
248
248
|
/**
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
249
|
+
* Lists all Controls by their parent
|
250
|
+
* {@link protos.google.cloud.discoveryengine.v1.DataStore|DataStore}.
|
251
|
+
*
|
252
|
+
* @param {Object} request
|
253
|
+
* The request object that will be sent.
|
254
|
+
* @param {string} request.parent
|
255
|
+
* Required. The data store resource name. Format:
|
256
|
+
* `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`
|
257
|
+
* or
|
258
|
+
* `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
|
259
|
+
* @param {number} [request.pageSize]
|
260
|
+
* Optional. Maximum number of results to return. If unspecified, defaults
|
261
|
+
* to 50. Max allowed value is 1000.
|
262
|
+
* @param {string} [request.pageToken]
|
263
|
+
* Optional. A page token, received from a previous `ListControls` call.
|
264
|
+
* Provide this to retrieve the subsequent page.
|
265
|
+
* @param {string} [request.filter]
|
266
|
+
* Optional. A filter to apply on the list results. Supported features:
|
267
|
+
*
|
268
|
+
* * List all the products under the parent branch if
|
269
|
+
* {@link protos.google.cloud.discoveryengine.v1.ListControlsRequest.filter|filter} is
|
270
|
+
* unset. Currently this field is unsupported.
|
271
|
+
* @param {object} [options]
|
272
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
273
|
+
* @returns {Promise} - The promise which resolves to an array.
|
274
|
+
* The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1.Control|Control}.
|
275
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
276
|
+
* times as needed and will merge results from all the pages into this array.
|
277
|
+
* Note that it can affect your quota.
|
278
|
+
* We recommend using `listControlsAsync()`
|
279
|
+
* method described below for async iteration which you can stop as needed.
|
280
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
281
|
+
* for more details and examples.
|
282
|
+
*/
|
283
283
|
listControls(request?: protos.google.cloud.discoveryengine.v1.IListControlsRequest, options?: CallOptions): Promise<[
|
284
284
|
protos.google.cloud.discoveryengine.v1.IControl[],
|
285
285
|
protos.google.cloud.discoveryengine.v1.IListControlsRequest | null,
|
@@ -357,55 +357,55 @@ export declare class ControlServiceClient {
|
|
357
357
|
*/
|
358
358
|
listControlsAsync(request?: protos.google.cloud.discoveryengine.v1.IListControlsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1.IControl>;
|
359
359
|
/**
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
360
|
+
* Gets information about a location.
|
361
|
+
*
|
362
|
+
* @param {Object} request
|
363
|
+
* The request object that will be sent.
|
364
|
+
* @param {string} request.name
|
365
|
+
* Resource name for the location.
|
366
|
+
* @param {object} [options]
|
367
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
368
|
+
* @returns {Promise} - The promise which resolves to an array.
|
369
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
370
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
371
|
+
* for more details and examples.
|
372
|
+
* @example
|
373
|
+
* ```
|
374
|
+
* const [response] = await client.getLocation(request);
|
375
|
+
* ```
|
376
|
+
*/
|
377
377
|
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
|
378
378
|
/**
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
379
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
380
|
+
*
|
381
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
382
|
+
* @param {Object} request
|
383
|
+
* The request object that will be sent.
|
384
|
+
* @param {string} request.name
|
385
|
+
* The resource that owns the locations collection, if applicable.
|
386
|
+
* @param {string} request.filter
|
387
|
+
* The standard list filter.
|
388
|
+
* @param {number} request.pageSize
|
389
|
+
* The standard list page size.
|
390
|
+
* @param {string} request.pageToken
|
391
|
+
* The standard list page token.
|
392
|
+
* @param {object} [options]
|
393
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
394
|
+
* @returns {Object}
|
395
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
396
|
+
* When you iterate the returned iterable, each element will be an object representing
|
397
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
398
|
+
* so you can stop the iteration when you don't need more results.
|
399
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
400
|
+
* for more details and examples.
|
401
|
+
* @example
|
402
|
+
* ```
|
403
|
+
* const iterable = client.listLocationsAsync(request);
|
404
|
+
* for await (const response of iterable) {
|
405
|
+
* // process response
|
406
|
+
* }
|
407
|
+
* ```
|
408
|
+
*/
|
409
409
|
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
410
410
|
/**
|
411
411
|
* Return a fully-qualified engine resource name string.
|
@@ -100,26 +100,17 @@ class ControlServiceClient {
|
|
100
100
|
constructor(opts, gaxInstance) {
|
101
101
|
// Ensure that options include all the required fields.
|
102
102
|
const staticMembers = this.constructor;
|
103
|
-
if (opts?.universe_domain &&
|
104
|
-
opts?.universeDomain &&
|
105
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
103
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
106
104
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
107
105
|
}
|
108
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
109
|
-
|
110
|
-
: undefined;
|
111
|
-
this._universeDomain =
|
112
|
-
opts?.universeDomain ??
|
113
|
-
opts?.universe_domain ??
|
114
|
-
universeDomainEnvVar ??
|
115
|
-
'googleapis.com';
|
106
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
107
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
116
108
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
117
109
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
118
110
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
119
111
|
const port = opts?.port || staticMembers.port;
|
120
112
|
const clientConfig = opts?.clientConfig ?? {};
|
121
|
-
const fallback = opts?.fallback ??
|
122
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
113
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
123
114
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
124
115
|
// Request numeric enum values if REST transport is used.
|
125
116
|
opts.numericEnums = true;
|
@@ -149,7 +140,10 @@ class ControlServiceClient {
|
|
149
140
|
}
|
150
141
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
151
142
|
// Determine the client header string.
|
152
|
-
const clientHeader = [
|
143
|
+
const clientHeader = [
|
144
|
+
`gax/${this._gaxModule.version}`,
|
145
|
+
`gapic/${version}`,
|
146
|
+
];
|
153
147
|
if (typeof process === 'object' && 'versions' in process) {
|
154
148
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
155
149
|
}
|
@@ -212,7 +206,7 @@ class ControlServiceClient {
|
|
212
206
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
213
207
|
// pages). Denote the keys used for pagination and results.
|
214
208
|
this.descriptors.page = {
|
215
|
-
listControls: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'controls')
|
209
|
+
listControls: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'controls')
|
216
210
|
};
|
217
211
|
// Put together the default options sent with requests.
|
218
212
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.ControlService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -241,19 +235,13 @@ class ControlServiceClient {
|
|
241
235
|
}
|
242
236
|
// Put together the "service stub" for
|
243
237
|
// google.cloud.discoveryengine.v1.ControlService.
|
244
|
-
this.controlServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
245
|
-
|
246
|
-
|
247
|
-
|
238
|
+
this.controlServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
239
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.ControlService') :
|
240
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
241
|
+
this._protos.google.cloud.discoveryengine.v1.ControlService, this._opts, this._providedCustomServicePath);
|
248
242
|
// Iterate over each of the methods that the service provides
|
249
243
|
// and create an API call method for each.
|
250
|
-
const controlServiceStubMethods = [
|
251
|
-
'createControl',
|
252
|
-
'deleteControl',
|
253
|
-
'updateControl',
|
254
|
-
'getControl',
|
255
|
-
'listControls',
|
256
|
-
];
|
244
|
+
const controlServiceStubMethods = ['createControl', 'deleteControl', 'updateControl', 'getControl', 'listControls'];
|
257
245
|
for (const methodName of controlServiceStubMethods) {
|
258
246
|
const callPromise = this.controlServiceStub.then(stub => (...args) => {
|
259
247
|
if (this._terminated) {
|
@@ -264,7 +252,8 @@ class ControlServiceClient {
|
|
264
252
|
}, (err) => () => {
|
265
253
|
throw err;
|
266
254
|
});
|
267
|
-
const descriptor = this.descriptors.page[methodName] ||
|
255
|
+
const descriptor = this.descriptors.page[methodName] ||
|
256
|
+
undefined;
|
268
257
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
269
258
|
this.innerApiCalls[methodName] = apiCall;
|
270
259
|
}
|
@@ -276,8 +265,7 @@ class ControlServiceClient {
|
|
276
265
|
* @returns {string} The DNS address for this service.
|
277
266
|
*/
|
278
267
|
static get servicePath() {
|
279
|
-
if (typeof process === 'object' &&
|
280
|
-
typeof process.emitWarning === 'function') {
|
268
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
281
269
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
282
270
|
}
|
283
271
|
return 'discoveryengine.googleapis.com';
|
@@ -288,8 +276,7 @@ class ControlServiceClient {
|
|
288
276
|
* @returns {string} The DNS address for this service.
|
289
277
|
*/
|
290
278
|
static get apiEndpoint() {
|
291
|
-
if (typeof process === 'object' &&
|
292
|
-
typeof process.emitWarning === 'function') {
|
279
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
293
280
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
294
281
|
}
|
295
282
|
return 'discoveryengine.googleapis.com';
|
@@ -317,7 +304,9 @@ class ControlServiceClient {
|
|
317
304
|
* @returns {string[]} List of default scopes.
|
318
305
|
*/
|
319
306
|
static get scopes() {
|
320
|
-
return [
|
307
|
+
return [
|
308
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
309
|
+
];
|
321
310
|
}
|
322
311
|
/**
|
323
312
|
* Return the project ID used by this class.
|
@@ -343,13 +332,10 @@ class ControlServiceClient {
|
|
343
332
|
options = options || {};
|
344
333
|
options.otherArgs = options.otherArgs || {};
|
345
334
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
346
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
347
|
-
|
348
|
-
parent: request.parent ?? '',
|
349
|
-
});
|
350
|
-
this.initialize().catch(err => {
|
351
|
-
throw err;
|
335
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
336
|
+
'parent': request.parent ?? '',
|
352
337
|
});
|
338
|
+
this.initialize().catch(err => { throw err; });
|
353
339
|
this._log.info('createControl request %j', request);
|
354
340
|
const wrappedCallback = callback
|
355
341
|
? (error, response, options, rawResponse) => {
|
@@ -357,8 +343,7 @@ class ControlServiceClient {
|
|
357
343
|
callback(error, response, options, rawResponse); // We verified callback above.
|
358
344
|
}
|
359
345
|
: undefined;
|
360
|
-
return this.innerApiCalls
|
361
|
-
.createControl(request, options, wrappedCallback)
|
346
|
+
return this.innerApiCalls.createControl(request, options, wrappedCallback)
|
362
347
|
?.then(([response, options, rawResponse]) => {
|
363
348
|
this._log.info('createControl response %j', response);
|
364
349
|
return [response, options, rawResponse];
|
@@ -377,13 +362,10 @@ class ControlServiceClient {
|
|
377
362
|
options = options || {};
|
378
363
|
options.otherArgs = options.otherArgs || {};
|
379
364
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
380
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
381
|
-
|
382
|
-
name: request.name ?? '',
|
383
|
-
});
|
384
|
-
this.initialize().catch(err => {
|
385
|
-
throw err;
|
365
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
366
|
+
'name': request.name ?? '',
|
386
367
|
});
|
368
|
+
this.initialize().catch(err => { throw err; });
|
387
369
|
this._log.info('deleteControl request %j', request);
|
388
370
|
const wrappedCallback = callback
|
389
371
|
? (error, response, options, rawResponse) => {
|
@@ -391,8 +373,7 @@ class ControlServiceClient {
|
|
391
373
|
callback(error, response, options, rawResponse); // We verified callback above.
|
392
374
|
}
|
393
375
|
: undefined;
|
394
|
-
return this.innerApiCalls
|
395
|
-
.deleteControl(request, options, wrappedCallback)
|
376
|
+
return this.innerApiCalls.deleteControl(request, options, wrappedCallback)
|
396
377
|
?.then(([response, options, rawResponse]) => {
|
397
378
|
this._log.info('deleteControl response %j', response);
|
398
379
|
return [response, options, rawResponse];
|
@@ -411,13 +392,10 @@ class ControlServiceClient {
|
|
411
392
|
options = options || {};
|
412
393
|
options.otherArgs = options.otherArgs || {};
|
413
394
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
414
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
415
|
-
|
416
|
-
'control.name': request.control.name ?? '',
|
417
|
-
});
|
418
|
-
this.initialize().catch(err => {
|
419
|
-
throw err;
|
395
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
396
|
+
'control.name': request.control.name ?? '',
|
420
397
|
});
|
398
|
+
this.initialize().catch(err => { throw err; });
|
421
399
|
this._log.info('updateControl request %j', request);
|
422
400
|
const wrappedCallback = callback
|
423
401
|
? (error, response, options, rawResponse) => {
|
@@ -425,8 +403,7 @@ class ControlServiceClient {
|
|
425
403
|
callback(error, response, options, rawResponse); // We verified callback above.
|
426
404
|
}
|
427
405
|
: undefined;
|
428
|
-
return this.innerApiCalls
|
429
|
-
.updateControl(request, options, wrappedCallback)
|
406
|
+
return this.innerApiCalls.updateControl(request, options, wrappedCallback)
|
430
407
|
?.then(([response, options, rawResponse]) => {
|
431
408
|
this._log.info('updateControl response %j', response);
|
432
409
|
return [response, options, rawResponse];
|
@@ -445,13 +422,10 @@ class ControlServiceClient {
|
|
445
422
|
options = options || {};
|
446
423
|
options.otherArgs = options.otherArgs || {};
|
447
424
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
448
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
449
|
-
|
450
|
-
name: request.name ?? '',
|
451
|
-
});
|
452
|
-
this.initialize().catch(err => {
|
453
|
-
throw err;
|
425
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
426
|
+
'name': request.name ?? '',
|
454
427
|
});
|
428
|
+
this.initialize().catch(err => { throw err; });
|
455
429
|
this._log.info('getControl request %j', request);
|
456
430
|
const wrappedCallback = callback
|
457
431
|
? (error, response, options, rawResponse) => {
|
@@ -459,8 +433,7 @@ class ControlServiceClient {
|
|
459
433
|
callback(error, response, options, rawResponse); // We verified callback above.
|
460
434
|
}
|
461
435
|
: undefined;
|
462
|
-
return this.innerApiCalls
|
463
|
-
.getControl(request, options, wrappedCallback)
|
436
|
+
return this.innerApiCalls.getControl(request, options, wrappedCallback)
|
464
437
|
?.then(([response, options, rawResponse]) => {
|
465
438
|
this._log.info('getControl response %j', response);
|
466
439
|
return [response, options, rawResponse];
|
@@ -479,13 +452,10 @@ class ControlServiceClient {
|
|
479
452
|
options = options || {};
|
480
453
|
options.otherArgs = options.otherArgs || {};
|
481
454
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
482
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
483
|
-
|
484
|
-
parent: request.parent ?? '',
|
485
|
-
});
|
486
|
-
this.initialize().catch(err => {
|
487
|
-
throw err;
|
455
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
456
|
+
'parent': request.parent ?? '',
|
488
457
|
});
|
458
|
+
this.initialize().catch(err => { throw err; });
|
489
459
|
const wrappedCallback = callback
|
490
460
|
? (error, values, nextPageRequest, rawResponse) => {
|
491
461
|
this._log.info('listControls values %j', values);
|
@@ -537,15 +507,12 @@ class ControlServiceClient {
|
|
537
507
|
options = options || {};
|
538
508
|
options.otherArgs = options.otherArgs || {};
|
539
509
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
540
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
541
|
-
|
542
|
-
|
543
|
-
});
|
510
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
511
|
+
'parent': request.parent ?? '',
|
512
|
+
});
|
544
513
|
const defaultCallSettings = this._defaults['listControls'];
|
545
514
|
const callSettings = defaultCallSettings.merge(options);
|
546
|
-
this.initialize().catch(err => {
|
547
|
-
throw err;
|
548
|
-
});
|
515
|
+
this.initialize().catch(err => { throw err; });
|
549
516
|
this._log.info('listControls stream %j', request);
|
550
517
|
return this.descriptors.page.listControls.createStream(this.innerApiCalls.listControls, request, callSettings);
|
551
518
|
}
|
@@ -589,70 +556,67 @@ class ControlServiceClient {
|
|
589
556
|
options = options || {};
|
590
557
|
options.otherArgs = options.otherArgs || {};
|
591
558
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
592
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
593
|
-
|
594
|
-
|
595
|
-
});
|
559
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
560
|
+
'parent': request.parent ?? '',
|
561
|
+
});
|
596
562
|
const defaultCallSettings = this._defaults['listControls'];
|
597
563
|
const callSettings = defaultCallSettings.merge(options);
|
598
|
-
this.initialize().catch(err => {
|
599
|
-
throw err;
|
600
|
-
});
|
564
|
+
this.initialize().catch(err => { throw err; });
|
601
565
|
this._log.info('listControls iterate %j', request);
|
602
566
|
return this.descriptors.page.listControls.asyncIterate(this.innerApiCalls['listControls'], request, callSettings);
|
603
567
|
}
|
604
568
|
/**
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
569
|
+
* Gets information about a location.
|
570
|
+
*
|
571
|
+
* @param {Object} request
|
572
|
+
* The request object that will be sent.
|
573
|
+
* @param {string} request.name
|
574
|
+
* Resource name for the location.
|
575
|
+
* @param {object} [options]
|
576
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
577
|
+
* @returns {Promise} - The promise which resolves to an array.
|
578
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
579
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
580
|
+
* for more details and examples.
|
581
|
+
* @example
|
582
|
+
* ```
|
583
|
+
* const [response] = await client.getLocation(request);
|
584
|
+
* ```
|
585
|
+
*/
|
622
586
|
getLocation(request, options, callback) {
|
623
587
|
return this.locationsClient.getLocation(request, options, callback);
|
624
588
|
}
|
625
589
|
/**
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
590
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
591
|
+
*
|
592
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
593
|
+
* @param {Object} request
|
594
|
+
* The request object that will be sent.
|
595
|
+
* @param {string} request.name
|
596
|
+
* The resource that owns the locations collection, if applicable.
|
597
|
+
* @param {string} request.filter
|
598
|
+
* The standard list filter.
|
599
|
+
* @param {number} request.pageSize
|
600
|
+
* The standard list page size.
|
601
|
+
* @param {string} request.pageToken
|
602
|
+
* The standard list page token.
|
603
|
+
* @param {object} [options]
|
604
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
605
|
+
* @returns {Object}
|
606
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
607
|
+
* When you iterate the returned iterable, each element will be an object representing
|
608
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
609
|
+
* so you can stop the iteration when you don't need more results.
|
610
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
611
|
+
* for more details and examples.
|
612
|
+
* @example
|
613
|
+
* ```
|
614
|
+
* const iterable = client.listLocationsAsync(request);
|
615
|
+
* for await (const response of iterable) {
|
616
|
+
* // process response
|
617
|
+
* }
|
618
|
+
* ```
|
619
|
+
*/
|
656
620
|
listLocationsAsync(request, options) {
|
657
621
|
return this.locationsClient.listLocationsAsync(request, options);
|
658
622
|
}
|
@@ -2927,7 +2891,7 @@ class ControlServiceClient {
|
|
2927
2891
|
this._log.info('ending gRPC channel');
|
2928
2892
|
this._terminated = true;
|
2929
2893
|
stub.close();
|
2930
|
-
this.locationsClient.close();
|
2894
|
+
this.locationsClient.close().catch(err => { throw err; });
|
2931
2895
|
});
|
2932
2896
|
}
|
2933
2897
|
return Promise.resolve();
|