@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
@@ -24,10 +24,13 @@
|
|
24
24
|
"../../protos/google/cloud/discoveryengine/v1/purge_config.proto",
|
25
25
|
"../../protos/google/cloud/discoveryengine/v1/rank_service.proto",
|
26
26
|
"../../protos/google/cloud/discoveryengine/v1/recommendation_service.proto",
|
27
|
+
"../../protos/google/cloud/discoveryengine/v1/safety.proto",
|
27
28
|
"../../protos/google/cloud/discoveryengine/v1/schema.proto",
|
28
29
|
"../../protos/google/cloud/discoveryengine/v1/schema_service.proto",
|
29
30
|
"../../protos/google/cloud/discoveryengine/v1/search_service.proto",
|
30
31
|
"../../protos/google/cloud/discoveryengine/v1/search_tuning_service.proto",
|
32
|
+
"../../protos/google/cloud/discoveryengine/v1/serving_config.proto",
|
33
|
+
"../../protos/google/cloud/discoveryengine/v1/serving_config_service.proto",
|
31
34
|
"../../protos/google/cloud/discoveryengine/v1/session.proto",
|
32
35
|
"../../protos/google/cloud/discoveryengine/v1/site_search_engine.proto",
|
33
36
|
"../../protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto",
|
@@ -134,7 +134,7 @@ export declare class AclConfigServiceClient {
|
|
134
134
|
*/
|
135
135
|
updateAclConfig(request?: protos.google.cloud.discoveryengine.v1alpha.IUpdateAclConfigRequest, options?: CallOptions): Promise<[
|
136
136
|
protos.google.cloud.discoveryengine.v1alpha.IAclConfig,
|
137
|
-
|
137
|
+
protos.google.cloud.discoveryengine.v1alpha.IUpdateAclConfigRequest | undefined,
|
138
138
|
{} | undefined
|
139
139
|
]>;
|
140
140
|
updateAclConfig(request: protos.google.cloud.discoveryengine.v1alpha.IUpdateAclConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IAclConfig, protos.google.cloud.discoveryengine.v1alpha.IUpdateAclConfigRequest | null | undefined, {} | null | undefined>): void;
|
@@ -163,61 +163,61 @@ export declare class AclConfigServiceClient {
|
|
163
163
|
*/
|
164
164
|
getAclConfig(request?: protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest, options?: CallOptions): Promise<[
|
165
165
|
protos.google.cloud.discoveryengine.v1alpha.IAclConfig,
|
166
|
-
|
166
|
+
protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest | undefined,
|
167
167
|
{} | undefined
|
168
168
|
]>;
|
169
169
|
getAclConfig(request: protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IAclConfig, protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest | null | undefined, {} | null | undefined>): void;
|
170
170
|
getAclConfig(request: protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IAclConfig, protos.google.cloud.discoveryengine.v1alpha.IGetAclConfigRequest | null | undefined, {} | null | undefined>): void;
|
171
171
|
/**
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
172
|
+
* Gets information about a location.
|
173
|
+
*
|
174
|
+
* @param {Object} request
|
175
|
+
* The request object that will be sent.
|
176
|
+
* @param {string} request.name
|
177
|
+
* Resource name for the location.
|
178
|
+
* @param {object} [options]
|
179
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
180
|
+
* @returns {Promise} - The promise which resolves to an array.
|
181
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
182
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
183
|
+
* for more details and examples.
|
184
|
+
* @example
|
185
|
+
* ```
|
186
|
+
* const [response] = await client.getLocation(request);
|
187
|
+
* ```
|
188
|
+
*/
|
189
189
|
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>;
|
190
190
|
/**
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
191
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
192
|
+
*
|
193
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
194
|
+
* @param {Object} request
|
195
|
+
* The request object that will be sent.
|
196
|
+
* @param {string} request.name
|
197
|
+
* The resource that owns the locations collection, if applicable.
|
198
|
+
* @param {string} request.filter
|
199
|
+
* The standard list filter.
|
200
|
+
* @param {number} request.pageSize
|
201
|
+
* The standard list page size.
|
202
|
+
* @param {string} request.pageToken
|
203
|
+
* The standard list page token.
|
204
|
+
* @param {object} [options]
|
205
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
206
|
+
* @returns {Object}
|
207
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
208
|
+
* When you iterate the returned iterable, each element will be an object representing
|
209
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
210
|
+
* so you can stop the iteration when you don't need more results.
|
211
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
212
|
+
* for more details and examples.
|
213
|
+
* @example
|
214
|
+
* ```
|
215
|
+
* const iterable = client.listLocationsAsync(request);
|
216
|
+
* for await (const response of iterable) {
|
217
|
+
* // process response
|
218
|
+
* }
|
219
|
+
* ```
|
220
|
+
*/
|
221
221
|
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
222
222
|
/**
|
223
223
|
* Return a fully-qualified aclConfig resource name string.
|
@@ -97,26 +97,17 @@ class AclConfigServiceClient {
|
|
97
97
|
constructor(opts, gaxInstance) {
|
98
98
|
// Ensure that options include all the required fields.
|
99
99
|
const staticMembers = this.constructor;
|
100
|
-
if (opts?.universe_domain &&
|
101
|
-
opts?.universeDomain &&
|
102
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
100
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
103
101
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
104
102
|
}
|
105
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
106
|
-
|
107
|
-
: undefined;
|
108
|
-
this._universeDomain =
|
109
|
-
opts?.universeDomain ??
|
110
|
-
opts?.universe_domain ??
|
111
|
-
universeDomainEnvVar ??
|
112
|
-
'googleapis.com';
|
103
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
104
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
113
105
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
114
106
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
115
107
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
116
108
|
const port = opts?.port || staticMembers.port;
|
117
109
|
const clientConfig = opts?.clientConfig ?? {};
|
118
|
-
const fallback = opts?.fallback ??
|
119
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
110
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
120
111
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
121
112
|
// Request numeric enum values if REST transport is used.
|
122
113
|
opts.numericEnums = true;
|
@@ -146,7 +137,10 @@ class AclConfigServiceClient {
|
|
146
137
|
}
|
147
138
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
148
139
|
// Determine the client header string.
|
149
|
-
const clientHeader = [
|
140
|
+
const clientHeader = [
|
141
|
+
`gax/${this._gaxModule.version}`,
|
142
|
+
`gapic/${version}`,
|
143
|
+
];
|
150
144
|
if (typeof process === 'object' && 'versions' in process) {
|
151
145
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
152
146
|
}
|
@@ -233,11 +227,10 @@ class AclConfigServiceClient {
|
|
233
227
|
}
|
234
228
|
// Put together the "service stub" for
|
235
229
|
// google.cloud.discoveryengine.v1alpha.AclConfigService.
|
236
|
-
this.aclConfigServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
.AclConfigService, this._opts, this._providedCustomServicePath);
|
230
|
+
this.aclConfigServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
231
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.AclConfigService') :
|
232
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
233
|
+
this._protos.google.cloud.discoveryengine.v1alpha.AclConfigService, this._opts, this._providedCustomServicePath);
|
241
234
|
// Iterate over each of the methods that the service provides
|
242
235
|
// and create an API call method for each.
|
243
236
|
const aclConfigServiceStubMethods = ['updateAclConfig', 'getAclConfig'];
|
@@ -263,8 +256,7 @@ class AclConfigServiceClient {
|
|
263
256
|
* @returns {string} The DNS address for this service.
|
264
257
|
*/
|
265
258
|
static get servicePath() {
|
266
|
-
if (typeof process === 'object' &&
|
267
|
-
typeof process.emitWarning === 'function') {
|
259
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
268
260
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
269
261
|
}
|
270
262
|
return 'discoveryengine.googleapis.com';
|
@@ -275,8 +267,7 @@ class AclConfigServiceClient {
|
|
275
267
|
* @returns {string} The DNS address for this service.
|
276
268
|
*/
|
277
269
|
static get apiEndpoint() {
|
278
|
-
if (typeof process === 'object' &&
|
279
|
-
typeof process.emitWarning === 'function') {
|
270
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
280
271
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
281
272
|
}
|
282
273
|
return 'discoveryengine.googleapis.com';
|
@@ -304,7 +295,9 @@ class AclConfigServiceClient {
|
|
304
295
|
* @returns {string[]} List of default scopes.
|
305
296
|
*/
|
306
297
|
static get scopes() {
|
307
|
-
return [
|
298
|
+
return [
|
299
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
300
|
+
];
|
308
301
|
}
|
309
302
|
/**
|
310
303
|
* Return the project ID used by this class.
|
@@ -330,13 +323,10 @@ class AclConfigServiceClient {
|
|
330
323
|
options = options || {};
|
331
324
|
options.otherArgs = options.otherArgs || {};
|
332
325
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
333
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
334
|
-
|
335
|
-
'acl_config.name': request.aclConfig.name ?? '',
|
336
|
-
});
|
337
|
-
this.initialize().catch(err => {
|
338
|
-
throw err;
|
326
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
327
|
+
'acl_config.name': request.aclConfig.name ?? '',
|
339
328
|
});
|
329
|
+
this.initialize().catch(err => { throw err; });
|
340
330
|
this._log.info('updateAclConfig request %j', request);
|
341
331
|
const wrappedCallback = callback
|
342
332
|
? (error, response, options, rawResponse) => {
|
@@ -344,8 +334,7 @@ class AclConfigServiceClient {
|
|
344
334
|
callback(error, response, options, rawResponse); // We verified callback above.
|
345
335
|
}
|
346
336
|
: undefined;
|
347
|
-
return this.innerApiCalls
|
348
|
-
.updateAclConfig(request, options, wrappedCallback)
|
337
|
+
return this.innerApiCalls.updateAclConfig(request, options, wrappedCallback)
|
349
338
|
?.then(([response, options, rawResponse]) => {
|
350
339
|
this._log.info('updateAclConfig response %j', response);
|
351
340
|
return [response, options, rawResponse];
|
@@ -364,13 +353,10 @@ class AclConfigServiceClient {
|
|
364
353
|
options = options || {};
|
365
354
|
options.otherArgs = options.otherArgs || {};
|
366
355
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
367
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
368
|
-
|
369
|
-
name: request.name ?? '',
|
370
|
-
});
|
371
|
-
this.initialize().catch(err => {
|
372
|
-
throw err;
|
356
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
357
|
+
'name': request.name ?? '',
|
373
358
|
});
|
359
|
+
this.initialize().catch(err => { throw err; });
|
374
360
|
this._log.info('getAclConfig request %j', request);
|
375
361
|
const wrappedCallback = callback
|
376
362
|
? (error, response, options, rawResponse) => {
|
@@ -378,65 +364,64 @@ class AclConfigServiceClient {
|
|
378
364
|
callback(error, response, options, rawResponse); // We verified callback above.
|
379
365
|
}
|
380
366
|
: undefined;
|
381
|
-
return this.innerApiCalls
|
382
|
-
.getAclConfig(request, options, wrappedCallback)
|
367
|
+
return this.innerApiCalls.getAclConfig(request, options, wrappedCallback)
|
383
368
|
?.then(([response, options, rawResponse]) => {
|
384
369
|
this._log.info('getAclConfig response %j', response);
|
385
370
|
return [response, options, rawResponse];
|
386
371
|
});
|
387
372
|
}
|
388
373
|
/**
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
374
|
+
* Gets information about a location.
|
375
|
+
*
|
376
|
+
* @param {Object} request
|
377
|
+
* The request object that will be sent.
|
378
|
+
* @param {string} request.name
|
379
|
+
* Resource name for the location.
|
380
|
+
* @param {object} [options]
|
381
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
382
|
+
* @returns {Promise} - The promise which resolves to an array.
|
383
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
384
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
385
|
+
* for more details and examples.
|
386
|
+
* @example
|
387
|
+
* ```
|
388
|
+
* const [response] = await client.getLocation(request);
|
389
|
+
* ```
|
390
|
+
*/
|
406
391
|
getLocation(request, options, callback) {
|
407
392
|
return this.locationsClient.getLocation(request, options, callback);
|
408
393
|
}
|
409
394
|
/**
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
395
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
396
|
+
*
|
397
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
398
|
+
* @param {Object} request
|
399
|
+
* The request object that will be sent.
|
400
|
+
* @param {string} request.name
|
401
|
+
* The resource that owns the locations collection, if applicable.
|
402
|
+
* @param {string} request.filter
|
403
|
+
* The standard list filter.
|
404
|
+
* @param {number} request.pageSize
|
405
|
+
* The standard list page size.
|
406
|
+
* @param {string} request.pageToken
|
407
|
+
* The standard list page token.
|
408
|
+
* @param {object} [options]
|
409
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
410
|
+
* @returns {Object}
|
411
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
412
|
+
* When you iterate the returned iterable, each element will be an object representing
|
413
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
414
|
+
* so you can stop the iteration when you don't need more results.
|
415
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
416
|
+
* for more details and examples.
|
417
|
+
* @example
|
418
|
+
* ```
|
419
|
+
* const iterable = client.listLocationsAsync(request);
|
420
|
+
* for await (const response of iterable) {
|
421
|
+
* // process response
|
422
|
+
* }
|
423
|
+
* ```
|
424
|
+
*/
|
440
425
|
listLocationsAsync(request, options) {
|
441
426
|
return this.locationsClient.listLocationsAsync(request, options);
|
442
427
|
}
|
@@ -464,8 +449,7 @@ class AclConfigServiceClient {
|
|
464
449
|
* @returns {string} A string representing the project.
|
465
450
|
*/
|
466
451
|
matchProjectFromAclConfigName(aclConfigName) {
|
467
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
468
|
-
.project;
|
452
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
469
453
|
}
|
470
454
|
/**
|
471
455
|
* Parse the location from AclConfig resource.
|
@@ -475,8 +459,7 @@ class AclConfigServiceClient {
|
|
475
459
|
* @returns {string} A string representing the location.
|
476
460
|
*/
|
477
461
|
matchLocationFromAclConfigName(aclConfigName) {
|
478
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
479
|
-
.location;
|
462
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
480
463
|
}
|
481
464
|
/**
|
482
465
|
* Return a fully-qualified engine resource name string.
|
@@ -558,8 +541,7 @@ class AclConfigServiceClient {
|
|
558
541
|
* @returns {string} A string representing the project.
|
559
542
|
*/
|
560
543
|
matchProjectFromEvaluationName(evaluationName) {
|
561
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
562
|
-
.project;
|
544
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
563
545
|
}
|
564
546
|
/**
|
565
547
|
* Parse the location from Evaluation resource.
|
@@ -569,8 +551,7 @@ class AclConfigServiceClient {
|
|
569
551
|
* @returns {string} A string representing the location.
|
570
552
|
*/
|
571
553
|
matchLocationFromEvaluationName(evaluationName) {
|
572
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
573
|
-
.location;
|
554
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
574
555
|
}
|
575
556
|
/**
|
576
557
|
* Parse the evaluation from Evaluation resource.
|
@@ -580,8 +561,7 @@ class AclConfigServiceClient {
|
|
580
561
|
* @returns {string} A string representing the evaluation.
|
581
562
|
*/
|
582
563
|
matchEvaluationFromEvaluationName(evaluationName) {
|
583
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
584
|
-
.evaluation;
|
564
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
585
565
|
}
|
586
566
|
/**
|
587
567
|
* Return a fully-qualified project resource name string.
|
@@ -2648,8 +2628,7 @@ class AclConfigServiceClient {
|
|
2648
2628
|
* @returns {string} A string representing the project.
|
2649
2629
|
*/
|
2650
2630
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
2651
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2652
|
-
.project;
|
2631
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
2653
2632
|
}
|
2654
2633
|
/**
|
2655
2634
|
* Parse the location from SampleQuery resource.
|
@@ -2659,8 +2638,7 @@ class AclConfigServiceClient {
|
|
2659
2638
|
* @returns {string} A string representing the location.
|
2660
2639
|
*/
|
2661
2640
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
2662
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2663
|
-
.location;
|
2641
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
2664
2642
|
}
|
2665
2643
|
/**
|
2666
2644
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -2670,8 +2648,7 @@ class AclConfigServiceClient {
|
|
2670
2648
|
* @returns {string} A string representing the sample_query_set.
|
2671
2649
|
*/
|
2672
2650
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
2673
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2674
|
-
.sample_query_set;
|
2651
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
2675
2652
|
}
|
2676
2653
|
/**
|
2677
2654
|
* Parse the sample_query from SampleQuery resource.
|
@@ -2681,8 +2658,7 @@ class AclConfigServiceClient {
|
|
2681
2658
|
* @returns {string} A string representing the sample_query.
|
2682
2659
|
*/
|
2683
2660
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
2684
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2685
|
-
.sample_query;
|
2661
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
2686
2662
|
}
|
2687
2663
|
/**
|
2688
2664
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -2741,7 +2717,7 @@ class AclConfigServiceClient {
|
|
2741
2717
|
this._log.info('ending gRPC channel');
|
2742
2718
|
this._terminated = true;
|
2743
2719
|
stub.close();
|
2744
|
-
this.locationsClient.close();
|
2720
|
+
this.locationsClient.close().catch(err => { throw err; });
|
2745
2721
|
});
|
2746
2722
|
}
|
2747
2723
|
return Promise.resolve();
|