@google-cloud/storage-control 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,671 @@
1
+ /// <reference types="node" />
2
+ import * as gax from 'google-gax';
3
+ import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
4
+ import { Transform } from 'stream';
5
+ import * as protos from '../../protos/protos';
6
+ /**
7
+ * StorageControl service includes selected control plane operations.
8
+ * @class
9
+ * @memberof v2
10
+ */
11
+ export declare class StorageControlClient {
12
+ private _terminated;
13
+ private _opts;
14
+ private _providedCustomServicePath;
15
+ private _gaxModule;
16
+ private _gaxGrpc;
17
+ private _protos;
18
+ private _defaults;
19
+ private _universeDomain;
20
+ private _servicePath;
21
+ auth: gax.GoogleAuth;
22
+ descriptors: Descriptors;
23
+ warn: (code: string, message: string, warnType?: string) => void;
24
+ innerApiCalls: {
25
+ [name: string]: Function;
26
+ };
27
+ pathTemplates: {
28
+ [name: string]: gax.PathTemplate;
29
+ };
30
+ operationsClient: gax.OperationsClient;
31
+ storageControlStub?: Promise<{
32
+ [name: string]: Function;
33
+ }>;
34
+ /**
35
+ * Construct an instance of StorageControlClient.
36
+ *
37
+ * @param {object} [options] - The configuration object.
38
+ * The options accepted by the constructor are described in detail
39
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
40
+ * The common options are:
41
+ * @param {object} [options.credentials] - Credentials object.
42
+ * @param {string} [options.credentials.client_email]
43
+ * @param {string} [options.credentials.private_key]
44
+ * @param {string} [options.email] - Account email address. Required when
45
+ * using a .pem or .p12 keyFilename.
46
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
47
+ * .p12 key downloaded from the Google Developers Console. If you provide
48
+ * a path to a JSON file, the projectId option below is not necessary.
49
+ * NOTE: .pem and .p12 require you to specify options.email as well.
50
+ * @param {number} [options.port] - The port on which to connect to
51
+ * the remote host.
52
+ * @param {string} [options.projectId] - The project ID from the Google
53
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
54
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
55
+ * app is running in an environment which supports
56
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
57
+ * your project ID will be detected automatically.
58
+ * @param {string} [options.apiEndpoint] - The domain name of the
59
+ * API remote host.
60
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
61
+ * Follows the structure of {@link gapicConfig}.
62
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
63
+ * For more information, please check the
64
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
65
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
66
+ * need to avoid loading the default gRPC version and want to use the fallback
67
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
68
+ * ```
69
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
70
+ * const client = new StorageControlClient({fallback: true}, gax);
71
+ * ```
72
+ */
73
+ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
74
+ /**
75
+ * Initialize the client.
76
+ * Performs asynchronous operations (such as authentication) and prepares the client.
77
+ * This function will be called automatically when any class method is called for the
78
+ * first time, but if you need to initialize it before calling an actual method,
79
+ * feel free to call initialize() directly.
80
+ *
81
+ * You can await on this method if you want to make sure the client is initialized.
82
+ *
83
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
84
+ */
85
+ initialize(): Promise<{
86
+ [name: string]: Function;
87
+ }>;
88
+ /**
89
+ * The DNS address for this API service.
90
+ * @deprecated Use the apiEndpoint method of the client instance.
91
+ * @returns {string} The DNS address for this service.
92
+ */
93
+ static get servicePath(): string;
94
+ /**
95
+ * The DNS address for this API service - same as servicePath.
96
+ * @deprecated Use the apiEndpoint method of the client instance.
97
+ * @returns {string} The DNS address for this service.
98
+ */
99
+ static get apiEndpoint(): string;
100
+ /**
101
+ * The DNS address for this API service.
102
+ * @returns {string} The DNS address for this service.
103
+ */
104
+ get apiEndpoint(): string;
105
+ get universeDomain(): string;
106
+ /**
107
+ * The port for this API service.
108
+ * @returns {number} The default port for this service.
109
+ */
110
+ static get port(): number;
111
+ /**
112
+ * The scopes needed to make gRPC calls for every method defined
113
+ * in this service.
114
+ * @returns {string[]} List of default scopes.
115
+ */
116
+ static get scopes(): string[];
117
+ getProjectId(): Promise<string>;
118
+ getProjectId(callback: Callback<string, undefined, undefined>): void;
119
+ /**
120
+ * Creates a new folder.
121
+ *
122
+ * @param {Object} request
123
+ * The request object that will be sent.
124
+ * @param {string} request.parent
125
+ * Required. Name of the bucket in which the folder will reside.
126
+ * @param {google.storage.control.v2.Folder} request.folder
127
+ * Required. Properties of the new folder being created.
128
+ * The bucket and name of the folder are specified in the parent and folder_id
129
+ * fields, respectively. Populating those fields in `folder` will result in an
130
+ * error.
131
+ * @param {string} request.folderId
132
+ * Required. The absolute path of the folder, using a single `/` as delimiter.
133
+ * @param {boolean} [request.recursive]
134
+ * Optional. If true, parent folder doesn't have to be present and all missing
135
+ * ancestor folders will be created atomically.
136
+ * @param {string} [request.requestId]
137
+ * Optional. A unique identifier for this request. UUID is the recommended
138
+ * format, but other formats are still accepted. This request is only
139
+ * idempotent if a `request_id` is provided.
140
+ * @param {object} [options]
141
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
142
+ * @returns {Promise} - The promise which resolves to an array.
143
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.Folder|Folder}.
144
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
145
+ * for more details and examples.
146
+ * @example <caption>include:samples/generated/v2/storage_control.create_folder.js</caption>
147
+ * region_tag:storage_v2_generated_StorageControl_CreateFolder_async
148
+ */
149
+ createFolder(request?: protos.google.storage.control.v2.ICreateFolderRequest, options?: CallOptions): Promise<[
150
+ protos.google.storage.control.v2.IFolder,
151
+ protos.google.storage.control.v2.ICreateFolderRequest | undefined,
152
+ {} | undefined
153
+ ]>;
154
+ createFolder(request: protos.google.storage.control.v2.ICreateFolderRequest, options: CallOptions, callback: Callback<protos.google.storage.control.v2.IFolder, protos.google.storage.control.v2.ICreateFolderRequest | null | undefined, {} | null | undefined>): void;
155
+ createFolder(request: protos.google.storage.control.v2.ICreateFolderRequest, callback: Callback<protos.google.storage.control.v2.IFolder, protos.google.storage.control.v2.ICreateFolderRequest | null | undefined, {} | null | undefined>): void;
156
+ /**
157
+ * Permanently deletes an empty folder.
158
+ *
159
+ * @param {Object} request
160
+ * The request object that will be sent.
161
+ * @param {string} request.name
162
+ * Required. Name of the folder.
163
+ * Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
164
+ * @param {number} request.ifMetagenerationMatch
165
+ * Makes the operation only succeed conditional on whether the folder's
166
+ * current metageneration matches the given value.
167
+ * @param {number} request.ifMetagenerationNotMatch
168
+ * Makes the operation only succeed conditional on whether the folder's
169
+ * current metageneration does not match the given value.
170
+ * @param {string} [request.requestId]
171
+ * Optional. A unique identifier for this request. UUID is the recommended
172
+ * format, but other formats are still accepted. This request is only
173
+ * idempotent if a `request_id` is provided.
174
+ * @param {object} [options]
175
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
176
+ * @returns {Promise} - The promise which resolves to an array.
177
+ * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
178
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
179
+ * for more details and examples.
180
+ * @example <caption>include:samples/generated/v2/storage_control.delete_folder.js</caption>
181
+ * region_tag:storage_v2_generated_StorageControl_DeleteFolder_async
182
+ */
183
+ deleteFolder(request?: protos.google.storage.control.v2.IDeleteFolderRequest, options?: CallOptions): Promise<[
184
+ protos.google.protobuf.IEmpty,
185
+ protos.google.storage.control.v2.IDeleteFolderRequest | undefined,
186
+ {} | undefined
187
+ ]>;
188
+ deleteFolder(request: protos.google.storage.control.v2.IDeleteFolderRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.storage.control.v2.IDeleteFolderRequest | null | undefined, {} | null | undefined>): void;
189
+ deleteFolder(request: protos.google.storage.control.v2.IDeleteFolderRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.storage.control.v2.IDeleteFolderRequest | null | undefined, {} | null | undefined>): void;
190
+ /**
191
+ * Returns metadata for the specified folder.
192
+ *
193
+ * @param {Object} request
194
+ * The request object that will be sent.
195
+ * @param {string} request.name
196
+ * Required. Name of the folder.
197
+ * Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
198
+ * @param {number} request.ifMetagenerationMatch
199
+ * Makes the operation only succeed conditional on whether the folder's
200
+ * current metageneration matches the given value.
201
+ * @param {number} request.ifMetagenerationNotMatch
202
+ * Makes the operation only succeed conditional on whether the folder's
203
+ * current metageneration does not match the given value.
204
+ * @param {string} [request.requestId]
205
+ * Optional. A unique identifier for this request. UUID is the recommended
206
+ * format, but other formats are still accepted.
207
+ * @param {object} [options]
208
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
209
+ * @returns {Promise} - The promise which resolves to an array.
210
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.Folder|Folder}.
211
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
212
+ * for more details and examples.
213
+ * @example <caption>include:samples/generated/v2/storage_control.get_folder.js</caption>
214
+ * region_tag:storage_v2_generated_StorageControl_GetFolder_async
215
+ */
216
+ getFolder(request?: protos.google.storage.control.v2.IGetFolderRequest, options?: CallOptions): Promise<[
217
+ protos.google.storage.control.v2.IFolder,
218
+ protos.google.storage.control.v2.IGetFolderRequest | undefined,
219
+ {} | undefined
220
+ ]>;
221
+ getFolder(request: protos.google.storage.control.v2.IGetFolderRequest, options: CallOptions, callback: Callback<protos.google.storage.control.v2.IFolder, protos.google.storage.control.v2.IGetFolderRequest | null | undefined, {} | null | undefined>): void;
222
+ getFolder(request: protos.google.storage.control.v2.IGetFolderRequest, callback: Callback<protos.google.storage.control.v2.IFolder, protos.google.storage.control.v2.IGetFolderRequest | null | undefined, {} | null | undefined>): void;
223
+ /**
224
+ * Returns the storage layout configuration for a given bucket.
225
+ *
226
+ * @param {Object} request
227
+ * The request object that will be sent.
228
+ * @param {string} request.name
229
+ * Required. The name of the StorageLayout resource.
230
+ * Format: `projects/{project}/buckets/{bucket}/storageLayout`
231
+ * @param {string} request.prefix
232
+ * An optional prefix used for permission check. It is useful when the caller
233
+ * only has limited permissions under a specific prefix.
234
+ * @param {string} [request.requestId]
235
+ * Optional. A unique identifier for this request. UUID is the recommended
236
+ * format, but other formats are still accepted.
237
+ * @param {object} [options]
238
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
239
+ * @returns {Promise} - The promise which resolves to an array.
240
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.StorageLayout|StorageLayout}.
241
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
242
+ * for more details and examples.
243
+ * @example <caption>include:samples/generated/v2/storage_control.get_storage_layout.js</caption>
244
+ * region_tag:storage_v2_generated_StorageControl_GetStorageLayout_async
245
+ */
246
+ getStorageLayout(request?: protos.google.storage.control.v2.IGetStorageLayoutRequest, options?: CallOptions): Promise<[
247
+ protos.google.storage.control.v2.IStorageLayout,
248
+ protos.google.storage.control.v2.IGetStorageLayoutRequest | undefined,
249
+ {} | undefined
250
+ ]>;
251
+ getStorageLayout(request: protos.google.storage.control.v2.IGetStorageLayoutRequest, options: CallOptions, callback: Callback<protos.google.storage.control.v2.IStorageLayout, protos.google.storage.control.v2.IGetStorageLayoutRequest | null | undefined, {} | null | undefined>): void;
252
+ getStorageLayout(request: protos.google.storage.control.v2.IGetStorageLayoutRequest, callback: Callback<protos.google.storage.control.v2.IStorageLayout, protos.google.storage.control.v2.IGetStorageLayoutRequest | null | undefined, {} | null | undefined>): void;
253
+ /**
254
+ * Renames a source folder to a destination folder. During a rename, the
255
+ * source and destination folders are locked until the long running operation
256
+ * completes.
257
+ *
258
+ * @param {Object} request
259
+ * The request object that will be sent.
260
+ * @param {string} request.name
261
+ * Required. Name of the source folder being renamed.
262
+ * Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
263
+ * @param {string} request.destinationFolderId
264
+ * Required. The destination folder ID, e.g. `foo/bar/`.
265
+ * @param {number} request.ifMetagenerationMatch
266
+ * Makes the operation only succeed conditional on whether the source
267
+ * folder's current metageneration matches the given value.
268
+ * @param {number} request.ifMetagenerationNotMatch
269
+ * Makes the operation only succeed conditional on whether the source
270
+ * folder's current metageneration does not match the given value.
271
+ * @param {string} [request.requestId]
272
+ * Optional. A unique identifier for this request. UUID is the recommended
273
+ * format, but other formats are still accepted. This request is only
274
+ * idempotent if a `request_id` is provided.
275
+ * @param {object} [options]
276
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
277
+ * @returns {Promise} - The promise which resolves to an array.
278
+ * The first element of the array is an object representing
279
+ * a long running operation. Its `promise()` method returns a promise
280
+ * you can `await` for.
281
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
282
+ * for more details and examples.
283
+ * @example <caption>include:samples/generated/v2/storage_control.rename_folder.js</caption>
284
+ * region_tag:storage_v2_generated_StorageControl_RenameFolder_async
285
+ */
286
+ renameFolder(request?: protos.google.storage.control.v2.IRenameFolderRequest, options?: CallOptions): Promise<[
287
+ LROperation<protos.google.storage.control.v2.IFolder, protos.google.storage.control.v2.IRenameFolderMetadata>,
288
+ protos.google.longrunning.IOperation | undefined,
289
+ {} | undefined
290
+ ]>;
291
+ renameFolder(request: protos.google.storage.control.v2.IRenameFolderRequest, options: CallOptions, callback: Callback<LROperation<protos.google.storage.control.v2.IFolder, protos.google.storage.control.v2.IRenameFolderMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
292
+ renameFolder(request: protos.google.storage.control.v2.IRenameFolderRequest, callback: Callback<LROperation<protos.google.storage.control.v2.IFolder, protos.google.storage.control.v2.IRenameFolderMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
293
+ /**
294
+ * Check the status of the long running operation returned by `renameFolder()`.
295
+ * @param {String} name
296
+ * The operation name that will be passed.
297
+ * @returns {Promise} - The promise which resolves to an object.
298
+ * The decoded operation object has result and metadata field to get information from.
299
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
300
+ * for more details and examples.
301
+ * @example <caption>include:samples/generated/v2/storage_control.rename_folder.js</caption>
302
+ * region_tag:storage_v2_generated_StorageControl_RenameFolder_async
303
+ */
304
+ checkRenameFolderProgress(name: string): Promise<LROperation<protos.google.storage.control.v2.Folder, protos.google.storage.control.v2.RenameFolderMetadata>>;
305
+ /**
306
+ * Retrieves a list of folders for a given bucket.
307
+ *
308
+ * @param {Object} request
309
+ * The request object that will be sent.
310
+ * @param {string} request.parent
311
+ * Required. Name of the bucket in which to look for folders.
312
+ * @param {number} [request.pageSize]
313
+ * Optional. Maximum number of folders to return in a single response. The
314
+ * service will use this parameter or 1,000 items, whichever is smaller.
315
+ * @param {string} [request.pageToken]
316
+ * Optional. A previously-returned page token representing part of the larger
317
+ * set of results to view.
318
+ * @param {string} [request.prefix]
319
+ * Optional. Filter results to folders whose names begin with this prefix.
320
+ * If set, the value must either be an empty string or end with a '/'.
321
+ * @param {string} [request.delimiter]
322
+ * Optional. If set, returns results in a directory-like mode. The results
323
+ * will only include folders that either exactly match the above prefix, or
324
+ * are one level below the prefix. The only supported value is '/'.
325
+ * @param {string} [request.lexicographicStart]
326
+ * Optional. Filter results to folders whose names are lexicographically equal
327
+ * to or after lexicographic_start. If lexicographic_end is also set, the
328
+ * folders listed have names between lexicographic_start (inclusive) and
329
+ * lexicographic_end (exclusive).
330
+ * @param {string} [request.lexicographicEnd]
331
+ * Optional. Filter results to folders whose names are lexicographically
332
+ * before lexicographic_end. If lexicographic_start is also set, the folders
333
+ * listed have names between lexicographic_start (inclusive) and
334
+ * lexicographic_end (exclusive).
335
+ * @param {string} [request.requestId]
336
+ * Optional. A unique identifier for this request. UUID is the recommended
337
+ * format, but other formats are still accepted.
338
+ * @param {object} [options]
339
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
340
+ * @returns {Promise} - The promise which resolves to an array.
341
+ * The first element of the array is Array of {@link protos.google.storage.control.v2.Folder|Folder}.
342
+ * The client library will perform auto-pagination by default: it will call the API as many
343
+ * times as needed and will merge results from all the pages into this array.
344
+ * Note that it can affect your quota.
345
+ * We recommend using `listFoldersAsync()`
346
+ * method described below for async iteration which you can stop as needed.
347
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
348
+ * for more details and examples.
349
+ */
350
+ listFolders(request?: protos.google.storage.control.v2.IListFoldersRequest, options?: CallOptions): Promise<[
351
+ protos.google.storage.control.v2.IFolder[],
352
+ protos.google.storage.control.v2.IListFoldersRequest | null,
353
+ protos.google.storage.control.v2.IListFoldersResponse
354
+ ]>;
355
+ listFolders(request: protos.google.storage.control.v2.IListFoldersRequest, options: CallOptions, callback: PaginationCallback<protos.google.storage.control.v2.IListFoldersRequest, protos.google.storage.control.v2.IListFoldersResponse | null | undefined, protos.google.storage.control.v2.IFolder>): void;
356
+ listFolders(request: protos.google.storage.control.v2.IListFoldersRequest, callback: PaginationCallback<protos.google.storage.control.v2.IListFoldersRequest, protos.google.storage.control.v2.IListFoldersResponse | null | undefined, protos.google.storage.control.v2.IFolder>): void;
357
+ /**
358
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
359
+ * @param {Object} request
360
+ * The request object that will be sent.
361
+ * @param {string} request.parent
362
+ * Required. Name of the bucket in which to look for folders.
363
+ * @param {number} [request.pageSize]
364
+ * Optional. Maximum number of folders to return in a single response. The
365
+ * service will use this parameter or 1,000 items, whichever is smaller.
366
+ * @param {string} [request.pageToken]
367
+ * Optional. A previously-returned page token representing part of the larger
368
+ * set of results to view.
369
+ * @param {string} [request.prefix]
370
+ * Optional. Filter results to folders whose names begin with this prefix.
371
+ * If set, the value must either be an empty string or end with a '/'.
372
+ * @param {string} [request.delimiter]
373
+ * Optional. If set, returns results in a directory-like mode. The results
374
+ * will only include folders that either exactly match the above prefix, or
375
+ * are one level below the prefix. The only supported value is '/'.
376
+ * @param {string} [request.lexicographicStart]
377
+ * Optional. Filter results to folders whose names are lexicographically equal
378
+ * to or after lexicographic_start. If lexicographic_end is also set, the
379
+ * folders listed have names between lexicographic_start (inclusive) and
380
+ * lexicographic_end (exclusive).
381
+ * @param {string} [request.lexicographicEnd]
382
+ * Optional. Filter results to folders whose names are lexicographically
383
+ * before lexicographic_end. If lexicographic_start is also set, the folders
384
+ * listed have names between lexicographic_start (inclusive) and
385
+ * lexicographic_end (exclusive).
386
+ * @param {string} [request.requestId]
387
+ * Optional. A unique identifier for this request. UUID is the recommended
388
+ * format, but other formats are still accepted.
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 {Stream}
392
+ * An object stream which emits an object representing {@link protos.google.storage.control.v2.Folder|Folder} on 'data' event.
393
+ * The client library will perform auto-pagination by default: it will call the API as many
394
+ * times as needed. Note that it can affect your quota.
395
+ * We recommend using `listFoldersAsync()`
396
+ * method described below for async iteration which you can stop as needed.
397
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
398
+ * for more details and examples.
399
+ */
400
+ listFoldersStream(request?: protos.google.storage.control.v2.IListFoldersRequest, options?: CallOptions): Transform;
401
+ /**
402
+ * Equivalent to `listFolders`, but returns an iterable object.
403
+ *
404
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
405
+ * @param {Object} request
406
+ * The request object that will be sent.
407
+ * @param {string} request.parent
408
+ * Required. Name of the bucket in which to look for folders.
409
+ * @param {number} [request.pageSize]
410
+ * Optional. Maximum number of folders to return in a single response. The
411
+ * service will use this parameter or 1,000 items, whichever is smaller.
412
+ * @param {string} [request.pageToken]
413
+ * Optional. A previously-returned page token representing part of the larger
414
+ * set of results to view.
415
+ * @param {string} [request.prefix]
416
+ * Optional. Filter results to folders whose names begin with this prefix.
417
+ * If set, the value must either be an empty string or end with a '/'.
418
+ * @param {string} [request.delimiter]
419
+ * Optional. If set, returns results in a directory-like mode. The results
420
+ * will only include folders that either exactly match the above prefix, or
421
+ * are one level below the prefix. The only supported value is '/'.
422
+ * @param {string} [request.lexicographicStart]
423
+ * Optional. Filter results to folders whose names are lexicographically equal
424
+ * to or after lexicographic_start. If lexicographic_end is also set, the
425
+ * folders listed have names between lexicographic_start (inclusive) and
426
+ * lexicographic_end (exclusive).
427
+ * @param {string} [request.lexicographicEnd]
428
+ * Optional. Filter results to folders whose names are lexicographically
429
+ * before lexicographic_end. If lexicographic_start is also set, the folders
430
+ * listed have names between lexicographic_start (inclusive) and
431
+ * lexicographic_end (exclusive).
432
+ * @param {string} [request.requestId]
433
+ * Optional. A unique identifier for this request. UUID is the recommended
434
+ * format, but other formats are still accepted.
435
+ * @param {object} [options]
436
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
437
+ * @returns {Object}
438
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
439
+ * When you iterate the returned iterable, each element will be an object representing
440
+ * {@link protos.google.storage.control.v2.Folder|Folder}. The API will be called under the hood as needed, once per the page,
441
+ * so you can stop the iteration when you don't need more results.
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
+ * @example <caption>include:samples/generated/v2/storage_control.list_folders.js</caption>
445
+ * region_tag:storage_v2_generated_StorageControl_ListFolders_async
446
+ */
447
+ listFoldersAsync(request?: protos.google.storage.control.v2.IListFoldersRequest, options?: CallOptions): AsyncIterable<protos.google.storage.control.v2.IFolder>;
448
+ /**
449
+ * Gets the latest state of a long-running operation. Clients can use this
450
+ * method to poll the operation result at intervals as recommended by the API
451
+ * service.
452
+ *
453
+ * @param {Object} request - The request object that will be sent.
454
+ * @param {string} request.name - The name of the operation resource.
455
+ * @param {Object=} options
456
+ * Optional parameters. You can override the default settings for this call,
457
+ * e.g, timeout, retries, paginations, etc. See {@link
458
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
459
+ * for the details.
460
+ * @param {function(?Error, ?Object)=} callback
461
+ * The function which will be called with the result of the API call.
462
+ *
463
+ * The second parameter to the callback is an object representing
464
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
465
+ * @return {Promise} - The promise which resolves to an array.
466
+ * The first element of the array is an object representing
467
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
468
+ * The promise has a method named "cancel" which cancels the ongoing API call.
469
+ *
470
+ * @example
471
+ * ```
472
+ * const client = longrunning.operationsClient();
473
+ * const name = '';
474
+ * const [response] = await client.getOperation({name});
475
+ * // doThingsWith(response)
476
+ * ```
477
+ */
478
+ 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]>;
479
+ /**
480
+ * Lists operations that match the specified filter in the request. If the
481
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
482
+ *
483
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
484
+ *
485
+ * @param {Object} request - The request object that will be sent.
486
+ * @param {string} request.name - The name of the operation collection.
487
+ * @param {string} request.filter - The standard list filter.
488
+ * @param {number=} request.pageSize -
489
+ * The maximum number of resources contained in the underlying API
490
+ * response. If page streaming is performed per-resource, this
491
+ * parameter does not affect the return value. If page streaming is
492
+ * performed per-page, this determines the maximum number of
493
+ * resources in a page.
494
+ * @param {Object=} options
495
+ * Optional parameters. You can override the default settings for this call,
496
+ * e.g, timeout, retries, paginations, etc. See {@link
497
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
498
+ * details.
499
+ * @returns {Object}
500
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
501
+ *
502
+ * @example
503
+ * ```
504
+ * const client = longrunning.operationsClient();
505
+ * for await (const response of client.listOperationsAsync(request));
506
+ * // doThingsWith(response)
507
+ * ```
508
+ */
509
+ listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
510
+ /**
511
+ * Starts asynchronous cancellation on a long-running operation. The server
512
+ * makes a best effort to cancel the operation, but success is not
513
+ * guaranteed. If the server doesn't support this method, it returns
514
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
515
+ * {@link Operations.GetOperation} or
516
+ * other methods to check whether the cancellation succeeded or whether the
517
+ * operation completed despite cancellation. On successful cancellation,
518
+ * the operation is not deleted; instead, it becomes an operation with
519
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
520
+ * 1, corresponding to `Code.CANCELLED`.
521
+ *
522
+ * @param {Object} request - The request object that will be sent.
523
+ * @param {string} request.name - The name of the operation resource to be cancelled.
524
+ * @param {Object=} options
525
+ * Optional parameters. You can override the default settings for this call,
526
+ * e.g, timeout, retries, paginations, etc. See {@link
527
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
528
+ * details.
529
+ * @param {function(?Error)=} callback
530
+ * The function which will be called with the result of the API call.
531
+ * @return {Promise} - The promise which resolves when API call finishes.
532
+ * The promise has a method named "cancel" which cancels the ongoing API
533
+ * call.
534
+ *
535
+ * @example
536
+ * ```
537
+ * const client = longrunning.operationsClient();
538
+ * await client.cancelOperation({name: ''});
539
+ * ```
540
+ */
541
+ 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>;
542
+ /**
543
+ * Deletes a long-running operation. This method indicates that the client is
544
+ * no longer interested in the operation result. It does not cancel the
545
+ * operation. If the server doesn't support this method, it returns
546
+ * `google.rpc.Code.UNIMPLEMENTED`.
547
+ *
548
+ * @param {Object} request - The request object that will be sent.
549
+ * @param {string} request.name - The name of the operation resource to be deleted.
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}
554
+ * for the details.
555
+ * @param {function(?Error)=} callback
556
+ * The function which will be called with the result of the API call.
557
+ * @return {Promise} - The promise which resolves when API call finishes.
558
+ * The promise has a method named "cancel" which cancels the ongoing API
559
+ * call.
560
+ *
561
+ * @example
562
+ * ```
563
+ * const client = longrunning.operationsClient();
564
+ * await client.deleteOperation({name: ''});
565
+ * ```
566
+ */
567
+ 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>;
568
+ /**
569
+ * Return a fully-qualified bucket resource name string.
570
+ *
571
+ * @param {string} project
572
+ * @param {string} bucket
573
+ * @returns {string} Resource name string.
574
+ */
575
+ bucketPath(project: string, bucket: string): string;
576
+ /**
577
+ * Parse the project from Bucket resource.
578
+ *
579
+ * @param {string} bucketName
580
+ * A fully-qualified path representing Bucket resource.
581
+ * @returns {string} A string representing the project.
582
+ */
583
+ matchProjectFromBucketName(bucketName: string): string | number;
584
+ /**
585
+ * Parse the bucket from Bucket resource.
586
+ *
587
+ * @param {string} bucketName
588
+ * A fully-qualified path representing Bucket resource.
589
+ * @returns {string} A string representing the bucket.
590
+ */
591
+ matchBucketFromBucketName(bucketName: string): string | number;
592
+ /**
593
+ * Return a fully-qualified folder resource name string.
594
+ *
595
+ * @param {string} project
596
+ * @param {string} bucket
597
+ * @param {string} folder
598
+ * @returns {string} Resource name string.
599
+ */
600
+ folderPath(project: string, bucket: string, folder: string): string;
601
+ /**
602
+ * Parse the project from Folder resource.
603
+ *
604
+ * @param {string} folderName
605
+ * A fully-qualified path representing Folder resource.
606
+ * @returns {string} A string representing the project.
607
+ */
608
+ matchProjectFromFolderName(folderName: string): string | number;
609
+ /**
610
+ * Parse the bucket from Folder resource.
611
+ *
612
+ * @param {string} folderName
613
+ * A fully-qualified path representing Folder resource.
614
+ * @returns {string} A string representing the bucket.
615
+ */
616
+ matchBucketFromFolderName(folderName: string): string | number;
617
+ /**
618
+ * Parse the folder from Folder resource.
619
+ *
620
+ * @param {string} folderName
621
+ * A fully-qualified path representing Folder resource.
622
+ * @returns {string} A string representing the folder.
623
+ */
624
+ matchFolderFromFolderName(folderName: string): string | number;
625
+ /**
626
+ * Return a fully-qualified project resource name string.
627
+ *
628
+ * @param {string} project
629
+ * @returns {string} Resource name string.
630
+ */
631
+ projectPath(project: string): string;
632
+ /**
633
+ * Parse the project from Project resource.
634
+ *
635
+ * @param {string} projectName
636
+ * A fully-qualified path representing Project resource.
637
+ * @returns {string} A string representing the project.
638
+ */
639
+ matchProjectFromProjectName(projectName: string): string | number;
640
+ /**
641
+ * Return a fully-qualified storageLayout resource name string.
642
+ *
643
+ * @param {string} project
644
+ * @param {string} bucket
645
+ * @returns {string} Resource name string.
646
+ */
647
+ storageLayoutPath(project: string, bucket: string): string;
648
+ /**
649
+ * Parse the project from StorageLayout resource.
650
+ *
651
+ * @param {string} storageLayoutName
652
+ * A fully-qualified path representing StorageLayout resource.
653
+ * @returns {string} A string representing the project.
654
+ */
655
+ matchProjectFromStorageLayoutName(storageLayoutName: string): string | number;
656
+ /**
657
+ * Parse the bucket from StorageLayout resource.
658
+ *
659
+ * @param {string} storageLayoutName
660
+ * A fully-qualified path representing StorageLayout resource.
661
+ * @returns {string} A string representing the bucket.
662
+ */
663
+ matchBucketFromStorageLayoutName(storageLayoutName: string): string | number;
664
+ /**
665
+ * Terminate the gRPC channel and close the client.
666
+ *
667
+ * The client will no longer be usable and all future behavior is undefined.
668
+ * @returns {Promise} A promise that resolves when the client is closed.
669
+ */
670
+ close(): Promise<void>;
671
+ }