UNPKG

39 kBTypeScriptView Raw
1/// <reference types="node" />
2import type * as gax from 'google-gax';
3import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
4import { Transform } from 'stream';
5import * as protos from '../../protos/protos';
6/**
7 * Google Cloud Datastore Admin API
8 *
9 * The Datastore Admin API provides several admin services for Cloud Datastore.
10 *
11 * Concepts: Project, namespace, kind, and entity as defined in the Google Cloud
12 * Datastore API.
13 *
14 * Operation: An Operation represents work being performed in the background.
15 *
16 * EntityFilter: Allows specifying a subset of entities in a project. This is
17 * specified as a combination of kinds and namespaces (either or both of which
18 * may be all).
19 *
20 * Export/Import Service:
21 *
22 * - The Export/Import service provides the ability to copy all or a subset of
23 * entities to/from Google Cloud Storage.
24 * - Exported data may be imported into Cloud Datastore for any Google Cloud
25 * Platform project. It is not restricted to the export source project. It is
26 * possible to export from one project and then import into another.
27 * - Exported data can also be loaded into Google BigQuery for analysis.
28 * - Exports and imports are performed asynchronously. An Operation resource is
29 * created for each export/import. The state (including any errors encountered)
30 * of the export/import may be queried via the Operation resource.
31 *
32 * Index Service:
33 *
34 * - The index service manages Cloud Datastore composite indexes.
35 * - Index creation and deletion are performed asynchronously.
36 * An Operation resource is created for each such asynchronous operation.
37 * The state of the operation (including any errors encountered)
38 * may be queried via the Operation resource.
39 *
40 * Operation Service:
41 *
42 * - The Operations collection provides a record of actions performed for the
43 * specified project (including any operations in progress). Operations are not
44 * created directly but through calls on other collections or resources.
45 * - An operation that is not yet done may be cancelled. The request to cancel
46 * is asynchronous and the operation may continue to run for some time after the
47 * request to cancel is made.
48 * - An operation that is done may be deleted so that it is no longer listed as
49 * part of the Operation collection.
50 * - ListOperations returns all pending operations, but not completed
51 * operations.
52 * - Operations are created by service DatastoreAdmin, but are accessed via
53 * service google.longrunning.Operations.
54 * @class
55 * @memberof v1
56 */
57export declare class DatastoreAdminClient {
58 private _terminated;
59 private _opts;
60 private _providedCustomServicePath;
61 private _gaxModule;
62 private _gaxGrpc;
63 private _protos;
64 private _defaults;
65 auth: gax.GoogleAuth;
66 descriptors: Descriptors;
67 warn: (code: string, message: string, warnType?: string) => void;
68 innerApiCalls: {
69 [name: string]: Function;
70 };
71 operationsClient: gax.OperationsClient;
72 datastoreAdminStub?: Promise<{
73 [name: string]: Function;
74 }>;
75 /**
76 * Construct an instance of DatastoreAdminClient.
77 *
78 * @param {object} [options] - The configuration object.
79 * The options accepted by the constructor are described in detail
80 * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
81 * The common options are:
82 * @param {object} [options.credentials] - Credentials object.
83 * @param {string} [options.credentials.client_email]
84 * @param {string} [options.credentials.private_key]
85 * @param {string} [options.email] - Account email address. Required when
86 * using a .pem or .p12 keyFilename.
87 * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
88 * .p12 key downloaded from the Google Developers Console. If you provide
89 * a path to a JSON file, the projectId option below is not necessary.
90 * NOTE: .pem and .p12 require you to specify options.email as well.
91 * @param {number} [options.port] - The port on which to connect to
92 * the remote host.
93 * @param {string} [options.projectId] - The project ID from the Google
94 * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
95 * the environment variable GCLOUD_PROJECT for your project ID. If your
96 * app is running in an environment which supports
97 * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
98 * your project ID will be detected automatically.
99 * @param {string} [options.apiEndpoint] - The domain name of the
100 * API remote host.
101 * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
102 * Follows the structure of {@link gapicConfig}.
103 * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
104 * For more information, please check the
105 * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
106 * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
107 * need to avoid loading the default gRPC version and want to use the fallback
108 * HTTP implementation. Load only fallback version and pass it to the constructor:
109 * ```
110 * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
111 * const client = new DatastoreAdminClient({fallback: true}, gax);
112 * ```
113 */
114 constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
115 /**
116 * Initialize the client.
117 * Performs asynchronous operations (such as authentication) and prepares the client.
118 * This function will be called automatically when any class method is called for the
119 * first time, but if you need to initialize it before calling an actual method,
120 * feel free to call initialize() directly.
121 *
122 * You can await on this method if you want to make sure the client is initialized.
123 *
124 * @returns {Promise} A promise that resolves to an authenticated service stub.
125 */
126 initialize(): Promise<{
127 [name: string]: Function;
128 }>;
129 /**
130 * The DNS address for this API service.
131 * @returns {string} The DNS address for this service.
132 */
133 static get servicePath(): string;
134 /**
135 * The DNS address for this API service - same as servicePath(),
136 * exists for compatibility reasons.
137 * @returns {string} The DNS address for this service.
138 */
139 static get apiEndpoint(): string;
140 /**
141 * The port for this API service.
142 * @returns {number} The default port for this service.
143 */
144 static get port(): number;
145 /**
146 * The scopes needed to make gRPC calls for every method defined
147 * in this service.
148 * @returns {string[]} List of default scopes.
149 */
150 static get scopes(): string[];
151 getProjectId(): Promise<string>;
152 getProjectId(callback: Callback<string, undefined, undefined>): void;
153 /**
154 * Gets an index.
155 *
156 * @param {Object} request
157 * The request object that will be sent.
158 * @param {string} request.projectId
159 * Project ID against which to make the request.
160 * @param {string} request.indexId
161 * The resource ID of the index to get.
162 * @param {object} [options]
163 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
164 * @returns {Promise} - The promise which resolves to an array.
165 * The first element of the array is an object representing {@link protos.google.datastore.admin.v1.Index|Index}.
166 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
167 * for more details and examples.
168 * @example <caption>include:samples/generated/v1/datastore_admin.get_index.js</caption>
169 * region_tag:datastore_v1_generated_DatastoreAdmin_GetIndex_async
170 */
171 getIndex(request?: protos.google.datastore.admin.v1.IGetIndexRequest, options?: CallOptions): Promise<[
172 protos.google.datastore.admin.v1.IIndex,
173 protos.google.datastore.admin.v1.IGetIndexRequest | undefined,
174 {} | undefined
175 ]>;
176 getIndex(request: protos.google.datastore.admin.v1.IGetIndexRequest, options: CallOptions, callback: Callback<protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IGetIndexRequest | null | undefined, {} | null | undefined>): void;
177 getIndex(request: protos.google.datastore.admin.v1.IGetIndexRequest, callback: Callback<protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IGetIndexRequest | null | undefined, {} | null | undefined>): void;
178 /**
179 * Exports a copy of all or a subset of entities from Google Cloud Datastore
180 * to another storage system, such as Google Cloud Storage. Recent updates to
181 * entities may not be reflected in the export. The export occurs in the
182 * background and its progress can be monitored and managed via the
183 * Operation resource that is created. The output of an export may only be
184 * used once the associated operation is done. If an export operation is
185 * cancelled before completion it may leave partial data behind in Google
186 * Cloud Storage.
187 *
188 * @param {Object} request
189 * The request object that will be sent.
190 * @param {string} request.projectId
191 * Required. Project ID against which to make the request.
192 * @param {number[]} request.labels
193 * Client-assigned labels.
194 * @param {google.datastore.admin.v1.EntityFilter} request.entityFilter
195 * Description of what data from the project is included in the export.
196 * @param {string} request.outputUrlPrefix
197 * Required. Location for the export metadata and data files.
198 *
199 * The full resource URL of the external storage location. Currently, only
200 * Google Cloud Storage is supported. So output_url_prefix should be of the
201 * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the
202 * name of the Cloud Storage bucket and `NAMESPACE_PATH` is an optional Cloud
203 * Storage namespace path (this is not a Cloud Datastore namespace). For more
204 * information about Cloud Storage namespace paths, see
205 * [Object name
206 * considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
207 *
208 * The resulting files will be nested deeper than the specified URL prefix.
209 * The final output URL will be provided in the
210 * {@link protos.google.datastore.admin.v1.ExportEntitiesResponse.output_url|google.datastore.admin.v1.ExportEntitiesResponse.output_url}
211 * field. That value should be used for subsequent ImportEntities operations.
212 *
213 * By nesting the data files deeper, the same Cloud Storage bucket can be used
214 * in multiple ExportEntities operations without conflict.
215 * @param {object} [options]
216 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
217 * @returns {Promise} - The promise which resolves to an array.
218 * The first element of the array is an object representing
219 * a long running operation. Its `promise()` method returns a promise
220 * you can `await` for.
221 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
222 * for more details and examples.
223 * @example <caption>include:samples/generated/v1/datastore_admin.export_entities.js</caption>
224 * region_tag:datastore_v1_generated_DatastoreAdmin_ExportEntities_async
225 */
226 exportEntities(request?: protos.google.datastore.admin.v1.IExportEntitiesRequest, options?: CallOptions): Promise<[
227 LROperation<protos.google.datastore.admin.v1.IExportEntitiesResponse, protos.google.datastore.admin.v1.IExportEntitiesMetadata>,
228 protos.google.longrunning.IOperation | undefined,
229 {} | undefined
230 ]>;
231 exportEntities(request: protos.google.datastore.admin.v1.IExportEntitiesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.datastore.admin.v1.IExportEntitiesResponse, protos.google.datastore.admin.v1.IExportEntitiesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
232 exportEntities(request: protos.google.datastore.admin.v1.IExportEntitiesRequest, callback: Callback<LROperation<protos.google.datastore.admin.v1.IExportEntitiesResponse, protos.google.datastore.admin.v1.IExportEntitiesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
233 /**
234 * Check the status of the long running operation returned by `exportEntities()`.
235 * @param {String} name
236 * The operation name that will be passed.
237 * @returns {Promise} - The promise which resolves to an object.
238 * The decoded operation object has result and metadata field to get information from.
239 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
240 * for more details and examples.
241 * @example <caption>include:samples/generated/v1/datastore_admin.export_entities.js</caption>
242 * region_tag:datastore_v1_generated_DatastoreAdmin_ExportEntities_async
243 */
244 checkExportEntitiesProgress(name: string): Promise<LROperation<protos.google.datastore.admin.v1.ExportEntitiesResponse, protos.google.datastore.admin.v1.ExportEntitiesMetadata>>;
245 /**
246 * Imports entities into Google Cloud Datastore. Existing entities with the
247 * same key are overwritten. The import occurs in the background and its
248 * progress can be monitored and managed via the Operation resource that is
249 * created. If an ImportEntities operation is cancelled, it is possible
250 * that a subset of the data has already been imported to Cloud Datastore.
251 *
252 * @param {Object} request
253 * The request object that will be sent.
254 * @param {string} request.projectId
255 * Required. Project ID against which to make the request.
256 * @param {number[]} request.labels
257 * Client-assigned labels.
258 * @param {string} request.inputUrl
259 * Required. The full resource URL of the external storage location.
260 * Currently, only Google Cloud Storage is supported. So input_url should be
261 * of the form:
262 * `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where
263 * `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is
264 * an optional Cloud Storage namespace path (this is not a Cloud Datastore
265 * namespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file written
266 * by the ExportEntities operation. For more information about Cloud Storage
267 * namespace paths, see
268 * [Object name
269 * considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
270 *
271 * For more information, see
272 * {@link protos.google.datastore.admin.v1.ExportEntitiesResponse.output_url|google.datastore.admin.v1.ExportEntitiesResponse.output_url}.
273 * @param {google.datastore.admin.v1.EntityFilter} request.entityFilter
274 * Optionally specify which kinds/namespaces are to be imported. If provided,
275 * the list must be a subset of the EntityFilter used in creating the export,
276 * otherwise a FAILED_PRECONDITION error will be returned. If no filter is
277 * specified then all entities from the export are imported.
278 * @param {object} [options]
279 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
280 * @returns {Promise} - The promise which resolves to an array.
281 * The first element of the array is an object representing
282 * a long running operation. Its `promise()` method returns a promise
283 * you can `await` for.
284 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
285 * for more details and examples.
286 * @example <caption>include:samples/generated/v1/datastore_admin.import_entities.js</caption>
287 * region_tag:datastore_v1_generated_DatastoreAdmin_ImportEntities_async
288 */
289 importEntities(request?: protos.google.datastore.admin.v1.IImportEntitiesRequest, options?: CallOptions): Promise<[
290 LROperation<protos.google.protobuf.IEmpty, protos.google.datastore.admin.v1.IImportEntitiesMetadata>,
291 protos.google.longrunning.IOperation | undefined,
292 {} | undefined
293 ]>;
294 importEntities(request: protos.google.datastore.admin.v1.IImportEntitiesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.datastore.admin.v1.IImportEntitiesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
295 importEntities(request: protos.google.datastore.admin.v1.IImportEntitiesRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.datastore.admin.v1.IImportEntitiesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
296 /**
297 * Check the status of the long running operation returned by `importEntities()`.
298 * @param {String} name
299 * The operation name that will be passed.
300 * @returns {Promise} - The promise which resolves to an object.
301 * The decoded operation object has result and metadata field to get information from.
302 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
303 * for more details and examples.
304 * @example <caption>include:samples/generated/v1/datastore_admin.import_entities.js</caption>
305 * region_tag:datastore_v1_generated_DatastoreAdmin_ImportEntities_async
306 */
307 checkImportEntitiesProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.datastore.admin.v1.ImportEntitiesMetadata>>;
308 /**
309 * Creates the specified index.
310 * A newly created index's initial state is `CREATING`. On completion of the
311 * returned {@link protos.google.longrunning.Operation|google.longrunning.Operation}, the
312 * state will be `READY`. If the index already exists, the call will return an
313 * `ALREADY_EXISTS` status.
314 *
315 * During index creation, the process could result in an error, in which
316 * case the index will move to the `ERROR` state. The process can be recovered
317 * by fixing the data that caused the error, removing the index with
318 * {@link protos.google.datastore.admin.v1.DatastoreAdmin.DeleteIndex|delete}, then
319 * re-creating the index with [create]
320 * [google.datastore.admin.v1.DatastoreAdmin.CreateIndex].
321 *
322 * Indexes with a single property cannot be created.
323 *
324 * @param {Object} request
325 * The request object that will be sent.
326 * @param {string} request.projectId
327 * Project ID against which to make the request.
328 * @param {google.datastore.admin.v1.Index} request.index
329 * The index to create. The name and state fields are output only and will be
330 * ignored. Single property indexes cannot be created or deleted.
331 * @param {object} [options]
332 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
333 * @returns {Promise} - The promise which resolves to an array.
334 * The first element of the array is an object representing
335 * a long running operation. Its `promise()` method returns a promise
336 * you can `await` for.
337 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
338 * for more details and examples.
339 * @example <caption>include:samples/generated/v1/datastore_admin.create_index.js</caption>
340 * region_tag:datastore_v1_generated_DatastoreAdmin_CreateIndex_async
341 */
342 createIndex(request?: protos.google.datastore.admin.v1.ICreateIndexRequest, options?: CallOptions): Promise<[
343 LROperation<protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IIndexOperationMetadata>,
344 protos.google.longrunning.IOperation | undefined,
345 {} | undefined
346 ]>;
347 createIndex(request: protos.google.datastore.admin.v1.ICreateIndexRequest, options: CallOptions, callback: Callback<LROperation<protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IIndexOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
348 createIndex(request: protos.google.datastore.admin.v1.ICreateIndexRequest, callback: Callback<LROperation<protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IIndexOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
349 /**
350 * Check the status of the long running operation returned by `createIndex()`.
351 * @param {String} name
352 * The operation name that will be passed.
353 * @returns {Promise} - The promise which resolves to an object.
354 * The decoded operation object has result and metadata field to get information from.
355 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
356 * for more details and examples.
357 * @example <caption>include:samples/generated/v1/datastore_admin.create_index.js</caption>
358 * region_tag:datastore_v1_generated_DatastoreAdmin_CreateIndex_async
359 */
360 checkCreateIndexProgress(name: string): Promise<LROperation<protos.google.datastore.admin.v1.Index, protos.google.datastore.admin.v1.IndexOperationMetadata>>;
361 /**
362 * Deletes an existing index.
363 * An index can only be deleted if it is in a `READY` or `ERROR` state. On
364 * successful execution of the request, the index will be in a `DELETING`
365 * {@link protos.google.datastore.admin.v1.Index.State|state}. And on completion of the
366 * returned {@link protos.google.longrunning.Operation|google.longrunning.Operation}, the
367 * index will be removed.
368 *
369 * During index deletion, the process could result in an error, in which
370 * case the index will move to the `ERROR` state. The process can be recovered
371 * by fixing the data that caused the error, followed by calling
372 * {@link protos.google.datastore.admin.v1.DatastoreAdmin.DeleteIndex|delete} again.
373 *
374 * @param {Object} request
375 * The request object that will be sent.
376 * @param {string} request.projectId
377 * Project ID against which to make the request.
378 * @param {string} request.indexId
379 * The resource ID of the index to delete.
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
384 * a long running operation. Its `promise()` method returns a promise
385 * you can `await` for.
386 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
387 * for more details and examples.
388 * @example <caption>include:samples/generated/v1/datastore_admin.delete_index.js</caption>
389 * region_tag:datastore_v1_generated_DatastoreAdmin_DeleteIndex_async
390 */
391 deleteIndex(request?: protos.google.datastore.admin.v1.IDeleteIndexRequest, options?: CallOptions): Promise<[
392 LROperation<protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IIndexOperationMetadata>,
393 protos.google.longrunning.IOperation | undefined,
394 {} | undefined
395 ]>;
396 deleteIndex(request: protos.google.datastore.admin.v1.IDeleteIndexRequest, options: CallOptions, callback: Callback<LROperation<protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IIndexOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
397 deleteIndex(request: protos.google.datastore.admin.v1.IDeleteIndexRequest, callback: Callback<LROperation<protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IIndexOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
398 /**
399 * Check the status of the long running operation returned by `deleteIndex()`.
400 * @param {String} name
401 * The operation name that will be passed.
402 * @returns {Promise} - The promise which resolves to an object.
403 * The decoded operation object has result and metadata field to get information from.
404 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
405 * for more details and examples.
406 * @example <caption>include:samples/generated/v1/datastore_admin.delete_index.js</caption>
407 * region_tag:datastore_v1_generated_DatastoreAdmin_DeleteIndex_async
408 */
409 checkDeleteIndexProgress(name: string): Promise<LROperation<protos.google.datastore.admin.v1.Index, protos.google.datastore.admin.v1.IndexOperationMetadata>>;
410 /**
411 * Lists the indexes that match the specified filters. Datastore uses an
412 * eventually consistent query to fetch the list of indexes and may
413 * occasionally return stale results.
414 *
415 * @param {Object} request
416 * The request object that will be sent.
417 * @param {string} request.projectId
418 * Project ID against which to make the request.
419 * @param {string} request.filter
420 * @param {number} request.pageSize
421 * The maximum number of items to return. If zero, then all results will be
422 * returned.
423 * @param {string} request.pageToken
424 * The next_page_token value returned from a previous List request, if any.
425 * @param {object} [options]
426 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
427 * @returns {Promise} - The promise which resolves to an array.
428 * The first element of the array is Array of {@link protos.google.datastore.admin.v1.Index|Index}.
429 * The client library will perform auto-pagination by default: it will call the API as many
430 * times as needed and will merge results from all the pages into this array.
431 * Note that it can affect your quota.
432 * We recommend using `listIndexesAsync()`
433 * method described below for async iteration which you can stop as needed.
434 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
435 * for more details and examples.
436 */
437 listIndexes(request?: protos.google.datastore.admin.v1.IListIndexesRequest, options?: CallOptions): Promise<[
438 protos.google.datastore.admin.v1.IIndex[],
439 protos.google.datastore.admin.v1.IListIndexesRequest | null,
440 protos.google.datastore.admin.v1.IListIndexesResponse
441 ]>;
442 listIndexes(request: protos.google.datastore.admin.v1.IListIndexesRequest, options: CallOptions, callback: PaginationCallback<protos.google.datastore.admin.v1.IListIndexesRequest, protos.google.datastore.admin.v1.IListIndexesResponse | null | undefined, protos.google.datastore.admin.v1.IIndex>): void;
443 listIndexes(request: protos.google.datastore.admin.v1.IListIndexesRequest, callback: PaginationCallback<protos.google.datastore.admin.v1.IListIndexesRequest, protos.google.datastore.admin.v1.IListIndexesResponse | null | undefined, protos.google.datastore.admin.v1.IIndex>): void;
444 /**
445 * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
446 * @param {Object} request
447 * The request object that will be sent.
448 * @param {string} request.projectId
449 * Project ID against which to make the request.
450 * @param {string} request.filter
451 * @param {number} request.pageSize
452 * The maximum number of items to return. If zero, then all results will be
453 * returned.
454 * @param {string} request.pageToken
455 * The next_page_token value returned from a previous List request, if any.
456 * @param {object} [options]
457 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
458 * @returns {Stream}
459 * An object stream which emits an object representing {@link protos.google.datastore.admin.v1.Index|Index} on 'data' event.
460 * The client library will perform auto-pagination by default: it will call the API as many
461 * times as needed. Note that it can affect your quota.
462 * We recommend using `listIndexesAsync()`
463 * method described below for async iteration which you can stop as needed.
464 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
465 * for more details and examples.
466 */
467 listIndexesStream(request?: protos.google.datastore.admin.v1.IListIndexesRequest, options?: CallOptions): Transform;
468 /**
469 * Equivalent to `listIndexes`, but returns an iterable object.
470 *
471 * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
472 * @param {Object} request
473 * The request object that will be sent.
474 * @param {string} request.projectId
475 * Project ID against which to make the request.
476 * @param {string} request.filter
477 * @param {number} request.pageSize
478 * The maximum number of items to return. If zero, then all results will be
479 * returned.
480 * @param {string} request.pageToken
481 * The next_page_token value returned from a previous List request, if any.
482 * @param {object} [options]
483 * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
484 * @returns {Object}
485 * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
486 * When you iterate the returned iterable, each element will be an object representing
487 * {@link protos.google.datastore.admin.v1.Index|Index}. The API will be called under the hood as needed, once per the page,
488 * so you can stop the iteration when you don't need more results.
489 * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
490 * for more details and examples.
491 * @example <caption>include:samples/generated/v1/datastore_admin.list_indexes.js</caption>
492 * region_tag:datastore_v1_generated_DatastoreAdmin_ListIndexes_async
493 */
494 listIndexesAsync(request?: protos.google.datastore.admin.v1.IListIndexesRequest, options?: CallOptions): AsyncIterable<protos.google.datastore.admin.v1.IIndex>;
495 /**
496 * Gets the latest state of a long-running operation. Clients can use this
497 * method to poll the operation result at intervals as recommended by the API
498 * service.
499 *
500 * @param {Object} request - The request object that will be sent.
501 * @param {string} request.name - The name of the operation resource.
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, ?Object)=} callback
508 * The function which will be called with the result of the API call.
509 *
510 * The second parameter to the callback is an object representing
511 * {@link google.longrunning.Operation | google.longrunning.Operation}.
512 * @return {Promise} - The promise which resolves to an array.
513 * The first element of the array is an object representing
514 * {@link google.longrunning.Operation | google.longrunning.Operation}.
515 * The promise has a method named "cancel" which cancels the ongoing API call.
516 *
517 * @example
518 * ```
519 * const client = longrunning.operationsClient();
520 * const name = '';
521 * const [response] = await client.getOperation({name});
522 * // doThingsWith(response)
523 * ```
524 */
525 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]>;
526 /**
527 * Lists operations that match the specified filter in the request. If the
528 * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
529 *
530 * For-await-of syntax is used with the iterable to recursively get response element on-demand.
531 *
532 * @param {Object} request - The request object that will be sent.
533 * @param {string} request.name - The name of the operation collection.
534 * @param {string} request.filter - The standard list filter.
535 * @param {number=} request.pageSize -
536 * The maximum number of resources contained in the underlying API
537 * response. If page streaming is performed per-resource, this
538 * parameter does not affect the return value. If page streaming is
539 * performed per-page, this determines the maximum number of
540 * resources in a page.
541 * @param {Object=} options
542 * Optional parameters. You can override the default settings for this call,
543 * e.g, timeout, retries, paginations, etc. See {@link
544 * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
545 * details.
546 * @returns {Object}
547 * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
548 *
549 * @example
550 * ```
551 * const client = longrunning.operationsClient();
552 * for await (const response of client.listOperationsAsync(request));
553 * // doThingsWith(response)
554 * ```
555 */
556 listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
557 /**
558 * Starts asynchronous cancellation on a long-running operation. The server
559 * makes a best effort to cancel the operation, but success is not
560 * guaranteed. If the server doesn't support this method, it returns
561 * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
562 * {@link Operations.GetOperation} or
563 * other methods to check whether the cancellation succeeded or whether the
564 * operation completed despite cancellation. On successful cancellation,
565 * the operation is not deleted; instead, it becomes an operation with
566 * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
567 * 1, corresponding to `Code.CANCELLED`.
568 *
569 * @param {Object} request - The request object that will be sent.
570 * @param {string} request.name - The name of the operation resource to be cancelled.
571 * @param {Object=} options
572 * Optional parameters. You can override the default settings for this call,
573 * e.g, timeout, retries, paginations, etc. See {@link
574 * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
575 * details.
576 * @param {function(?Error)=} callback
577 * The function which will be called with the result of the API call.
578 * @return {Promise} - The promise which resolves when API call finishes.
579 * The promise has a method named "cancel" which cancels the ongoing API
580 * call.
581 *
582 * @example
583 * ```
584 * const client = longrunning.operationsClient();
585 * await client.cancelOperation({name: ''});
586 * ```
587 */
588 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>;
589 /**
590 * Deletes a long-running operation. This method indicates that the client is
591 * no longer interested in the operation result. It does not cancel the
592 * operation. If the server doesn't support this method, it returns
593 * `google.rpc.Code.UNIMPLEMENTED`.
594 *
595 * @param {Object} request - The request object that will be sent.
596 * @param {string} request.name - The name of the operation resource to be deleted.
597 * @param {Object=} options
598 * Optional parameters. You can override the default settings for this call,
599 * e.g, timeout, retries, paginations, etc. See {@link
600 * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
601 * for the details.
602 * @param {function(?Error)=} callback
603 * The function which will be called with the result of the API call.
604 * @return {Promise} - The promise which resolves when API call finishes.
605 * The promise has a method named "cancel" which cancels the ongoing API
606 * call.
607 *
608 * @example
609 * ```
610 * const client = longrunning.operationsClient();
611 * await client.deleteOperation({name: ''});
612 * ```
613 */
614 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>;
615 /**
616 * Terminate the gRPC channel and close the client.
617 *
618 * The client will no longer be usable and all future behavior is undefined.
619 * @returns {Promise} A promise that resolves when the client is closed.
620 */
621 close(): Promise<void>;
622}