UNPKG

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