UNPKG

31.9 kBTypeScriptView Raw
1import type * as gax from 'google-gax';
2import type { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
3import * as protos from '../../protos/protos';
4/**
5 * Each RPC normalizes the partition IDs of the keys in its input entities,
6 * and always returns entities with keys with normalized partition IDs.
7 * This applies to all keys and entities, including those in values, except keys
8 * with both an empty path and an empty or unset partition ID. Normalization of
9 * input keys sets the project ID (if not already set) to the project ID from
10 * the request.
11 *
12 * @class
13 * @memberof v1
14 */
15export declare class DatastoreClient {
16 private _terminated;
17 private _opts;
18 private _providedCustomServicePath;
19 private _gaxModule;
20 private _gaxGrpc;
21 private _protos;
22 private _defaults;
23 auth: gax.GoogleAuth;
24 descriptors: Descriptors;
25 warn: (code: string, message: string, warnType?: string) => void;
26 innerApiCalls: {
27 [name: string]: Function;
28 };
29 operationsClient: gax.OperationsClient;
30 datastoreStub?: Promise<{
31 [name: string]: Function;
32 }>;
33 /**
34 * Construct an instance of DatastoreClient.
35 *
36 * @param {object} [options] - The configuration object.
37 * The options accepted by the constructor are described in detail
38 * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
39 * The common options are:
40 * @param {object} [options.credentials] - Credentials object.
41 * @param {string} [options.credentials.client_email]
42 * @param {string} [options.credentials.private_key]
43 * @param {string} [options.email] - Account email address. Required when
44 * using a .pem or .p12 keyFilename.
45 * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
46 * .p12 key downloaded from the Google Developers Console. If you provide
47 * a path to a JSON file, the projectId option below is not necessary.
48 * NOTE: .pem and .p12 require you to specify options.email as well.
49 * @param {number} [options.port] - The port on which to connect to
50 * the remote host.
51 * @param {string} [options.projectId] - The project ID from the Google
52 * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
53 * the environment variable GCLOUD_PROJECT for your project ID. If your
54 * app is running in an environment which supports
55 * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
56 * your project ID will be detected automatically.
57 * @param {string} [options.apiEndpoint] - The domain name of the
58 * API remote host.
59 * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
60 * Follows the structure of {@link gapicConfig}.
61 * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
62 * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
63 * For more information, please check the
64 * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
65 * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
66 * need to avoid loading the default gRPC version and want to use the fallback
67 * HTTP implementation. Load only fallback version and pass it to the constructor:
68 * ```
69 * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
70 * const client = new DatastoreClient({fallback: 'rest'}, gax);
71 * ```
72 */
73 constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
74 /**
75 * Initialize the client.
76 * Performs asynchronous operations (such as authentication) and prepares the client.
77 * This function will be called automatically when any class method is called for the
78 * first time, but if you need to initialize it before calling an actual method,
79 * feel free to call initialize() directly.
80 *
81 * You can await on this method if you want to make sure the client is initialized.
82 *
83 * @returns {Promise} A promise that resolves to an authenticated service stub.
84 */
85 initialize(): Promise<{
86 [name: string]: Function;
87 }>;
88 /**
89 * The DNS address for this API service.
90 * @returns {string} The DNS address for this service.
91 */
92 static get servicePath(): string;
93 /**
94 * The DNS address for this API service - same as servicePath(),
95 * exists for compatibility reasons.
96 * @returns {string} The DNS address for this service.
97 */
98 static get apiEndpoint(): string;
99 /**
100 * The port for this API service.
101 * @returns {number} The default port for this service.
102 */
103 static get port(): number;
104 /**
105 * The scopes needed to make gRPC calls for every method defined
106 * in this service.
107 * @returns {string[]} List of default scopes.
108 */
109 static get scopes(): string[];
110 getProjectId(): Promise<string>;
111 getProjectId(callback: Callback<string, undefined, undefined>): void;
112 /**
113 * Looks up entities by key.
114 *
115 * @param {Object} request
116 * The request object that will be sent.
117 * @param {string} request.projectId
118 * Required. The ID of the project against which to make the request.
119 * @param {string} request.databaseId
120 * The ID of the database against which to make the request.
121 *
122 * '(default)' is not allowed; please use empty string '' to refer the default
123 * database.
124 * @param {google.datastore.v1.ReadOptions} request.readOptions
125 * The options for this lookup request.
126 * @param {number[]} request.keys
127 * Required. Keys of entities to look up.
128 * @param {object} [options]
129 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
130 * @returns {Promise} - The promise which resolves to an array.
131 * The first element of the array is an object representing {@link google.datastore.v1.LookupResponse | LookupResponse}.
132 * Please see the
133 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
134 * for more details and examples.
135 * @example <caption>include:samples/generated/v1/datastore.lookup.js</caption>
136 * region_tag:datastore_v1_generated_Datastore_Lookup_async
137 */
138 lookup(request?: protos.google.datastore.v1.ILookupRequest, options?: CallOptions): Promise<[
139 protos.google.datastore.v1.ILookupResponse,
140 protos.google.datastore.v1.ILookupRequest | undefined,
141 {} | undefined
142 ]>;
143 lookup(request: protos.google.datastore.v1.ILookupRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, {} | null | undefined>): void;
144 lookup(request: protos.google.datastore.v1.ILookupRequest, callback: Callback<protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, {} | null | undefined>): void;
145 /**
146 * Queries for entities.
147 *
148 * @param {Object} request
149 * The request object that will be sent.
150 * @param {string} request.projectId
151 * Required. The ID of the project against which to make the request.
152 * @param {string} request.databaseId
153 * The ID of the database against which to make the request.
154 *
155 * '(default)' is not allowed; please use empty string '' to refer the default
156 * database.
157 * @param {google.datastore.v1.PartitionId} request.partitionId
158 * Entities are partitioned into subsets, identified by a partition ID.
159 * Queries are scoped to a single partition.
160 * This partition ID is normalized with the standard default context
161 * partition ID.
162 * @param {google.datastore.v1.ReadOptions} request.readOptions
163 * The options for this query.
164 * @param {google.datastore.v1.Query} request.query
165 * The query to run.
166 * @param {google.datastore.v1.GqlQuery} request.gqlQuery
167 * The GQL query to run. This query must be a non-aggregation query.
168 * @param {object} [options]
169 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
170 * @returns {Promise} - The promise which resolves to an array.
171 * The first element of the array is an object representing {@link google.datastore.v1.RunQueryResponse | RunQueryResponse}.
172 * Please see the
173 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
174 * for more details and examples.
175 * @example <caption>include:samples/generated/v1/datastore.run_query.js</caption>
176 * region_tag:datastore_v1_generated_Datastore_RunQuery_async
177 */
178 runQuery(request?: protos.google.datastore.v1.IRunQueryRequest, options?: CallOptions): Promise<[
179 protos.google.datastore.v1.IRunQueryResponse,
180 protos.google.datastore.v1.IRunQueryRequest | undefined,
181 {} | undefined
182 ]>;
183 runQuery(request: protos.google.datastore.v1.IRunQueryRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, {} | null | undefined>): void;
184 runQuery(request: protos.google.datastore.v1.IRunQueryRequest, callback: Callback<protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, {} | null | undefined>): void;
185 /**
186 * Runs an aggregation query.
187 *
188 * @param {Object} request
189 * The request object that will be sent.
190 * @param {string} request.projectId
191 * Required. The ID of the project against which to make the request.
192 * @param {string} request.databaseId
193 * The ID of the database against which to make the request.
194 *
195 * '(default)' is not allowed; please use empty string '' to refer the default
196 * database.
197 * @param {google.datastore.v1.PartitionId} request.partitionId
198 * Entities are partitioned into subsets, identified by a partition ID.
199 * Queries are scoped to a single partition.
200 * This partition ID is normalized with the standard default context
201 * partition ID.
202 * @param {google.datastore.v1.ReadOptions} request.readOptions
203 * The options for this query.
204 * @param {google.datastore.v1.AggregationQuery} request.aggregationQuery
205 * The query to run.
206 * @param {google.datastore.v1.GqlQuery} request.gqlQuery
207 * The GQL query to run. This query must be an aggregation query.
208 * @param {object} [options]
209 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
210 * @returns {Promise} - The promise which resolves to an array.
211 * The first element of the array is an object representing {@link google.datastore.v1.RunAggregationQueryResponse | RunAggregationQueryResponse}.
212 * Please see the
213 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
214 * for more details and examples.
215 * @example <caption>include:samples/generated/v1/datastore.run_aggregation_query.js</caption>
216 * region_tag:datastore_v1_generated_Datastore_RunAggregationQuery_async
217 */
218 runAggregationQuery(request?: protos.google.datastore.v1.IRunAggregationQueryRequest, options?: CallOptions): Promise<[
219 protos.google.datastore.v1.IRunAggregationQueryResponse,
220 protos.google.datastore.v1.IRunAggregationQueryRequest | undefined,
221 {} | undefined
222 ]>;
223 runAggregationQuery(request: protos.google.datastore.v1.IRunAggregationQueryRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IRunAggregationQueryResponse, protos.google.datastore.v1.IRunAggregationQueryRequest | null | undefined, {} | null | undefined>): void;
224 runAggregationQuery(request: protos.google.datastore.v1.IRunAggregationQueryRequest, callback: Callback<protos.google.datastore.v1.IRunAggregationQueryResponse, protos.google.datastore.v1.IRunAggregationQueryRequest | null | undefined, {} | null | undefined>): void;
225 /**
226 * Begins a new transaction.
227 *
228 * @param {Object} request
229 * The request object that will be sent.
230 * @param {string} request.projectId
231 * Required. The ID of the project against which to make the request.
232 * @param {string} request.databaseId
233 * The ID of the database against which to make the request.
234 *
235 * '(default)' is not allowed; please use empty string '' to refer the default
236 * database.
237 * @param {google.datastore.v1.TransactionOptions} request.transactionOptions
238 * Options for a new transaction.
239 * @param {object} [options]
240 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
241 * @returns {Promise} - The promise which resolves to an array.
242 * The first element of the array is an object representing {@link google.datastore.v1.BeginTransactionResponse | BeginTransactionResponse}.
243 * Please see the
244 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
245 * for more details and examples.
246 * @example <caption>include:samples/generated/v1/datastore.begin_transaction.js</caption>
247 * region_tag:datastore_v1_generated_Datastore_BeginTransaction_async
248 */
249 beginTransaction(request?: protos.google.datastore.v1.IBeginTransactionRequest, options?: CallOptions): Promise<[
250 protos.google.datastore.v1.IBeginTransactionResponse,
251 protos.google.datastore.v1.IBeginTransactionRequest | undefined,
252 {} | undefined
253 ]>;
254 beginTransaction(request: protos.google.datastore.v1.IBeginTransactionRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
255 beginTransaction(request: protos.google.datastore.v1.IBeginTransactionRequest, callback: Callback<protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
256 /**
257 * Commits a transaction, optionally creating, deleting or modifying some
258 * entities.
259 *
260 * @param {Object} request
261 * The request object that will be sent.
262 * @param {string} request.projectId
263 * Required. The ID of the project against which to make the request.
264 * @param {string} request.databaseId
265 * The ID of the database against which to make the request.
266 *
267 * '(default)' is not allowed; please use empty string '' to refer the default
268 * database.
269 * @param {google.datastore.v1.CommitRequest.Mode} request.mode
270 * The type of commit to perform. Defaults to `TRANSACTIONAL`.
271 * @param {Buffer} request.transaction
272 * The identifier of the transaction associated with the commit. A
273 * transaction identifier is returned by a call to
274 * {@link google.datastore.v1.Datastore.BeginTransaction|Datastore.BeginTransaction}.
275 * @param {google.datastore.v1.TransactionOptions} request.singleUseTransaction
276 * Options for beginning a new transaction for this request.
277 * The transaction is committed when the request completes. If specified,
278 * {@link google.datastore.v1.TransactionOptions|TransactionOptions.mode} must be
279 * {@link google.datastore.v1.TransactionOptions.ReadWrite|TransactionOptions.ReadWrite}.
280 * @param {number[]} request.mutations
281 * The mutations to perform.
282 *
283 * When mode is `TRANSACTIONAL`, mutations affecting a single entity are
284 * applied in order. The following sequences of mutations affecting a single
285 * entity are not permitted in a single `Commit` request:
286 *
287 * - `insert` followed by `insert`
288 * - `update` followed by `insert`
289 * - `upsert` followed by `insert`
290 * - `delete` followed by `update`
291 *
292 * When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
293 * entity.
294 * @param {object} [options]
295 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
296 * @returns {Promise} - The promise which resolves to an array.
297 * The first element of the array is an object representing {@link google.datastore.v1.CommitResponse | CommitResponse}.
298 * Please see the
299 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
300 * for more details and examples.
301 * @example <caption>include:samples/generated/v1/datastore.commit.js</caption>
302 * region_tag:datastore_v1_generated_Datastore_Commit_async
303 */
304 commit(request?: protos.google.datastore.v1.ICommitRequest, options?: CallOptions): Promise<[
305 protos.google.datastore.v1.ICommitResponse,
306 protos.google.datastore.v1.ICommitRequest | undefined,
307 {} | undefined
308 ]>;
309 commit(request: protos.google.datastore.v1.ICommitRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, {} | null | undefined>): void;
310 commit(request: protos.google.datastore.v1.ICommitRequest, callback: Callback<protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, {} | null | undefined>): void;
311 /**
312 * Rolls back a transaction.
313 *
314 * @param {Object} request
315 * The request object that will be sent.
316 * @param {string} request.projectId
317 * Required. The ID of the project against which to make the request.
318 * @param {string} request.databaseId
319 * The ID of the database against which to make the request.
320 *
321 * '(default)' is not allowed; please use empty string '' to refer the default
322 * database.
323 * @param {Buffer} request.transaction
324 * Required. The transaction identifier, returned by a call to
325 * {@link google.datastore.v1.Datastore.BeginTransaction|Datastore.BeginTransaction}.
326 * @param {object} [options]
327 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
328 * @returns {Promise} - The promise which resolves to an array.
329 * The first element of the array is an object representing {@link google.datastore.v1.RollbackResponse | RollbackResponse}.
330 * Please see the
331 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
332 * for more details and examples.
333 * @example <caption>include:samples/generated/v1/datastore.rollback.js</caption>
334 * region_tag:datastore_v1_generated_Datastore_Rollback_async
335 */
336 rollback(request?: protos.google.datastore.v1.IRollbackRequest, options?: CallOptions): Promise<[
337 protos.google.datastore.v1.IRollbackResponse,
338 protos.google.datastore.v1.IRollbackRequest | undefined,
339 {} | undefined
340 ]>;
341 rollback(request: protos.google.datastore.v1.IRollbackRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
342 rollback(request: protos.google.datastore.v1.IRollbackRequest, callback: Callback<protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
343 /**
344 * Allocates IDs for the given keys, which is useful for referencing an entity
345 * before it is inserted.
346 *
347 * @param {Object} request
348 * The request object that will be sent.
349 * @param {string} request.projectId
350 * Required. The ID of the project against which to make the request.
351 * @param {string} request.databaseId
352 * The ID of the database against which to make the request.
353 *
354 * '(default)' is not allowed; please use empty string '' to refer the default
355 * database.
356 * @param {number[]} request.keys
357 * Required. A list of keys with incomplete key paths for which to allocate
358 * IDs. No key may be reserved/read-only.
359 * @param {object} [options]
360 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
361 * @returns {Promise} - The promise which resolves to an array.
362 * The first element of the array is an object representing {@link google.datastore.v1.AllocateIdsResponse | AllocateIdsResponse}.
363 * Please see the
364 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
365 * for more details and examples.
366 * @example <caption>include:samples/generated/v1/datastore.allocate_ids.js</caption>
367 * region_tag:datastore_v1_generated_Datastore_AllocateIds_async
368 */
369 allocateIds(request?: protos.google.datastore.v1.IAllocateIdsRequest, options?: CallOptions): Promise<[
370 protos.google.datastore.v1.IAllocateIdsResponse,
371 protos.google.datastore.v1.IAllocateIdsRequest | undefined,
372 {} | undefined
373 ]>;
374 allocateIds(request: protos.google.datastore.v1.IAllocateIdsRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, {} | null | undefined>): void;
375 allocateIds(request: protos.google.datastore.v1.IAllocateIdsRequest, callback: Callback<protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, {} | null | undefined>): void;
376 /**
377 * Prevents the supplied keys' IDs from being auto-allocated by Cloud
378 * Datastore.
379 *
380 * @param {Object} request
381 * The request object that will be sent.
382 * @param {string} request.projectId
383 * Required. The ID of the project against which to make the request.
384 * @param {string} request.databaseId
385 * The ID of the database against which to make the request.
386 *
387 * '(default)' is not allowed; please use empty string '' to refer the default
388 * database.
389 * @param {number[]} request.keys
390 * Required. A list of keys with complete key paths whose numeric IDs should
391 * not be auto-allocated.
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 {Promise} - The promise which resolves to an array.
395 * The first element of the array is an object representing {@link google.datastore.v1.ReserveIdsResponse | ReserveIdsResponse}.
396 * Please see the
397 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
398 * for more details and examples.
399 * @example <caption>include:samples/generated/v1/datastore.reserve_ids.js</caption>
400 * region_tag:datastore_v1_generated_Datastore_ReserveIds_async
401 */
402 reserveIds(request?: protos.google.datastore.v1.IReserveIdsRequest, options?: CallOptions): Promise<[
403 protos.google.datastore.v1.IReserveIdsResponse,
404 protos.google.datastore.v1.IReserveIdsRequest | undefined,
405 {} | undefined
406 ]>;
407 reserveIds(request: protos.google.datastore.v1.IReserveIdsRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, {} | null | undefined>): void;
408 reserveIds(request: protos.google.datastore.v1.IReserveIdsRequest, callback: Callback<protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, {} | null | undefined>): void;
409 /**
410 * Gets the latest state of a long-running operation. Clients can use this
411 * method to poll the operation result at intervals as recommended by the API
412 * service.
413 *
414 * @param {Object} request - The request object that will be sent.
415 * @param {string} request.name - The name of the operation resource.
416 * @param {Object=} options
417 * Optional parameters. You can override the default settings for this call,
418 * e.g, timeout, retries, paginations, etc. See {@link
419 * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
420 * for the details.
421 * @param {function(?Error, ?Object)=} callback
422 * The function which will be called with the result of the API call.
423 *
424 * The second parameter to the callback is an object representing
425 * {@link google.longrunning.Operation | google.longrunning.Operation}.
426 * @return {Promise} - The promise which resolves to an array.
427 * The first element of the array is an object representing
428 * {@link google.longrunning.Operation | google.longrunning.Operation}.
429 * The promise has a method named "cancel" which cancels the ongoing API call.
430 *
431 * @example
432 * ```
433 * const client = longrunning.operationsClient();
434 * const name = '';
435 * const [response] = await client.getOperation({name});
436 * // doThingsWith(response)
437 * ```
438 */
439 getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
440 /**
441 * Lists operations that match the specified filter in the request. If the
442 * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
443 *
444 * For-await-of syntax is used with the iterable to recursively get response element on-demand.
445 *
446 * @param {Object} request - The request object that will be sent.
447 * @param {string} request.name - The name of the operation collection.
448 * @param {string} request.filter - The standard list filter.
449 * @param {number=} request.pageSize -
450 * The maximum number of resources contained in the underlying API
451 * response. If page streaming is performed per-resource, this
452 * parameter does not affect the return value. If page streaming is
453 * performed per-page, this determines the maximum number of
454 * resources in a page.
455 * @param {Object=} options
456 * Optional parameters. You can override the default settings for this call,
457 * e.g, timeout, retries, paginations, etc. See {@link
458 * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
459 * details.
460 * @returns {Object}
461 * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
462 *
463 * @example
464 * ```
465 * const client = longrunning.operationsClient();
466 * for await (const response of client.listOperationsAsync(request));
467 * // doThingsWith(response)
468 * ```
469 */
470 listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
471 /**
472 * Starts asynchronous cancellation on a long-running operation. The server
473 * makes a best effort to cancel the operation, but success is not
474 * guaranteed. If the server doesn't support this method, it returns
475 * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
476 * {@link Operations.GetOperation} or
477 * other methods to check whether the cancellation succeeded or whether the
478 * operation completed despite cancellation. On successful cancellation,
479 * the operation is not deleted; instead, it becomes an operation with
480 * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
481 * 1, corresponding to `Code.CANCELLED`.
482 *
483 * @param {Object} request - The request object that will be sent.
484 * @param {string} request.name - The name of the operation resource to be cancelled.
485 * @param {Object=} options
486 * Optional parameters. You can override the default settings for this call,
487 * e.g, timeout, retries, paginations, etc. See {@link
488 * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
489 * details.
490 * @param {function(?Error)=} callback
491 * The function which will be called with the result of the API call.
492 * @return {Promise} - The promise which resolves when API call finishes.
493 * The promise has a method named "cancel" which cancels the ongoing API
494 * call.
495 *
496 * @example
497 * ```
498 * const client = longrunning.operationsClient();
499 * await client.cancelOperation({name: ''});
500 * ```
501 */
502 cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
503 /**
504 * Deletes a long-running operation. This method indicates that the client is
505 * no longer interested in the operation result. It does not cancel the
506 * operation. If the server doesn't support this method, it returns
507 * `google.rpc.Code.UNIMPLEMENTED`.
508 *
509 * @param {Object} request - The request object that will be sent.
510 * @param {string} request.name - The name of the operation resource to be deleted.
511 * @param {Object=} options
512 * Optional parameters. You can override the default settings for this call,
513 * e.g, timeout, retries, paginations, etc. See {@link
514 * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
515 * for the details.
516 * @param {function(?Error)=} callback
517 * The function which will be called with the result of the API call.
518 * @return {Promise} - The promise which resolves when API call finishes.
519 * The promise has a method named "cancel" which cancels the ongoing API
520 * call.
521 *
522 * @example
523 * ```
524 * const client = longrunning.operationsClient();
525 * await client.deleteOperation({name: ''});
526 * ```
527 */
528 deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
529 /**
530 * Terminate the gRPC channel and close the client.
531 *
532 * The client will no longer be usable and all future behavior is undefined.
533 * @returns {Promise} A promise that resolves when the client is closed.
534 */
535 close(): Promise<void>;
536}