UNPKG

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