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