@google-cloud/pubsub-api 0.2.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,835 @@
1
+ import type * as gax from 'google-gax';
2
+ import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, IamClient, IamProtos } from 'google-gax';
3
+ import { Transform } from 'stream';
4
+ import * as protos from '../../protos/protos';
5
+ /**
6
+ * The service that an application uses to manipulate topics, and to send
7
+ * messages to a topic.
8
+ * @class
9
+ * @memberof v1
10
+ */
11
+ export declare class PublisherClient {
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
+ private _log;
22
+ auth: gax.GoogleAuth;
23
+ descriptors: Descriptors;
24
+ warn: (code: string, message: string, warnType?: string) => void;
25
+ innerApiCalls: {
26
+ [name: string]: Function;
27
+ };
28
+ iamClient: IamClient;
29
+ pathTemplates: {
30
+ [name: string]: gax.PathTemplate;
31
+ };
32
+ publisherStub?: Promise<{
33
+ [name: string]: Function;
34
+ }>;
35
+ /**
36
+ * Construct an instance of PublisherClient.
37
+ *
38
+ * @param {object} [options] - The configuration object.
39
+ * The options accepted by the constructor are described in detail
40
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
41
+ * The common options are:
42
+ * @param {object} [options.credentials] - Credentials object.
43
+ * @param {string} [options.credentials.client_email]
44
+ * @param {string} [options.credentials.private_key]
45
+ * @param {string} [options.email] - Account email address. Required when
46
+ * using a .pem or .p12 keyFilename.
47
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
48
+ * .p12 key downloaded from the Google Developers Console. If you provide
49
+ * a path to a JSON file, the projectId option below is not necessary.
50
+ * NOTE: .pem and .p12 require you to specify options.email as well.
51
+ * @param {number} [options.port] - The port on which to connect to
52
+ * the remote host.
53
+ * @param {string} [options.projectId] - The project ID from the Google
54
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
55
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
56
+ * app is running in an environment which supports
57
+ * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
58
+ * your project ID will be detected automatically.
59
+ * @param {string} [options.apiEndpoint] - The domain name of the
60
+ * API remote host.
61
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
+ * Follows the structure of {@link gapicConfig}.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
64
+ * For more information, please check the
65
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
66
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
67
+ * need to avoid loading the default gRPC version and want to use the fallback
68
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
69
+ * ```
70
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
71
+ * const client = new PublisherClient({fallback: true}, gax);
72
+ * ```
73
+ */
74
+ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
75
+ /**
76
+ * Initialize the client.
77
+ * Performs asynchronous operations (such as authentication) and prepares the client.
78
+ * This function will be called automatically when any class method is called for the
79
+ * first time, but if you need to initialize it before calling an actual method,
80
+ * feel free to call initialize() directly.
81
+ *
82
+ * You can await on this method if you want to make sure the client is initialized.
83
+ *
84
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
85
+ */
86
+ initialize(): Promise<{
87
+ [name: string]: Function;
88
+ }>;
89
+ /**
90
+ * The DNS address for this API service.
91
+ * @deprecated Use the apiEndpoint method of the client instance.
92
+ * @returns {string} The DNS address for this service.
93
+ */
94
+ static get servicePath(): string;
95
+ /**
96
+ * The DNS address for this API service - same as servicePath.
97
+ * @deprecated Use the apiEndpoint method of the client instance.
98
+ * @returns {string} The DNS address for this service.
99
+ */
100
+ static get apiEndpoint(): string;
101
+ /**
102
+ * The DNS address for this API service.
103
+ * @returns {string} The DNS address for this service.
104
+ */
105
+ get apiEndpoint(): string;
106
+ get universeDomain(): string;
107
+ /**
108
+ * The port for this API service.
109
+ * @returns {number} The default port for this service.
110
+ */
111
+ static get port(): number;
112
+ /**
113
+ * The scopes needed to make gRPC calls for every method defined
114
+ * in this service.
115
+ * @returns {string[]} List of default scopes.
116
+ */
117
+ static get scopes(): string[];
118
+ getProjectId(): Promise<string>;
119
+ getProjectId(callback: Callback<string, undefined, undefined>): void;
120
+ /**
121
+ * Creates the given topic with the given name. See the [resource name rules]
122
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
123
+ *
124
+ * @param {Object} request
125
+ * The request object that will be sent.
126
+ * @param {string} request.name
127
+ * Required. Identifier. The name of the topic. It must have the format
128
+ * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
129
+ * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
130
+ * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
131
+ * signs (`%`). It must be between 3 and 255 characters in length, and it
132
+ * must not start with `"goog"`.
133
+ * @param {number[]} [request.labels]
134
+ * Optional. See [Creating and managing labels]
135
+ * (https://cloud.google.com/pubsub/docs/labels).
136
+ * @param {google.pubsub.v1.MessageStoragePolicy} [request.messageStoragePolicy]
137
+ * Optional. Policy constraining the set of Google Cloud Platform regions
138
+ * where messages published to the topic may be stored. If not present, then
139
+ * no constraints are in effect.
140
+ * @param {string} [request.kmsKeyName]
141
+ * Optional. The resource name of the Cloud KMS CryptoKey to be used to
142
+ * protect access to messages published on this topic.
143
+ *
144
+ * The expected format is `projects/* /locations/* /keyRings/* /cryptoKeys/*`.
145
+ * @param {google.pubsub.v1.SchemaSettings} [request.schemaSettings]
146
+ * Optional. Settings for validating messages published against a schema.
147
+ * @param {boolean} [request.satisfiesPzs]
148
+ * Optional. Reserved for future use. This field is set only in responses from
149
+ * the server; it is ignored if it is set in any requests.
150
+ * @param {google.protobuf.Duration} [request.messageRetentionDuration]
151
+ * Optional. Indicates the minimum duration to retain a message after it is
152
+ * published to the topic. If this field is set, messages published to the
153
+ * topic in the last `message_retention_duration` are always available to
154
+ * subscribers. For instance, it allows any attached subscription to [seek to
155
+ * a
156
+ * timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
157
+ * that is up to `message_retention_duration` in the past. If this field is
158
+ * not set, message retention is controlled by settings on individual
159
+ * subscriptions. Cannot be more than 31 days or less than 10 minutes.
160
+ * @param {google.pubsub.v1.Topic.State} request.state
161
+ * Output only. An output-only field indicating the state of the topic.
162
+ * @param {google.pubsub.v1.IngestionDataSourceSettings} [request.ingestionDataSourceSettings]
163
+ * Optional. Settings for ingestion from a data source into this topic.
164
+ * @param {number[]} [request.messageTransforms]
165
+ * Optional. Transforms to be applied to messages published to the topic.
166
+ * Transforms are applied in the order specified.
167
+ * @param {number[]} request.tags
168
+ * Optional. Input only. Immutable. Tag keys/values directly bound to this
169
+ * resource. For example:
170
+ * "123/environment": "production",
171
+ * "123/costCenter": "marketing"
172
+ * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
173
+ * using tags with Pub/Sub resources.
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.pubsub.v1.Topic|Topic}.
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/v1/publisher.create_topic.js</caption>
181
+ * region_tag:pubsub_v1_generated_Publisher_CreateTopic_async
182
+ */
183
+ createTopic(request?: protos.google.pubsub.v1.ITopic, options?: CallOptions): Promise<[
184
+ protos.google.pubsub.v1.ITopic,
185
+ protos.google.pubsub.v1.ITopic | undefined,
186
+ {} | undefined
187
+ ]>;
188
+ createTopic(request: protos.google.pubsub.v1.ITopic, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.ITopic | null | undefined, {} | null | undefined>): void;
189
+ createTopic(request: protos.google.pubsub.v1.ITopic, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.ITopic | null | undefined, {} | null | undefined>): void;
190
+ /**
191
+ * Updates an existing topic by updating the fields specified in the update
192
+ * mask. Note that certain properties of a topic are not modifiable.
193
+ *
194
+ * @param {Object} request
195
+ * The request object that will be sent.
196
+ * @param {google.pubsub.v1.Topic} request.topic
197
+ * Required. The updated topic object.
198
+ * @param {google.protobuf.FieldMask} request.updateMask
199
+ * Required. Indicates which fields in the provided topic to update. Must be
200
+ * specified and non-empty. Note that if `update_mask` contains
201
+ * "message_storage_policy" but the `message_storage_policy` is not set in
202
+ * the `topic` provided above, then the updated value is determined by the
203
+ * policy configured at the project or organization level.
204
+ * @param {object} [options]
205
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
206
+ * @returns {Promise} - The promise which resolves to an array.
207
+ * The first element of the array is an object representing {@link protos.google.pubsub.v1.Topic|Topic}.
208
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
209
+ * for more details and examples.
210
+ * @example <caption>include:samples/generated/v1/publisher.update_topic.js</caption>
211
+ * region_tag:pubsub_v1_generated_Publisher_UpdateTopic_async
212
+ */
213
+ updateTopic(request?: protos.google.pubsub.v1.IUpdateTopicRequest, options?: CallOptions): Promise<[
214
+ protos.google.pubsub.v1.ITopic,
215
+ protos.google.pubsub.v1.IUpdateTopicRequest | undefined,
216
+ {} | undefined
217
+ ]>;
218
+ updateTopic(request: protos.google.pubsub.v1.IUpdateTopicRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IUpdateTopicRequest | null | undefined, {} | null | undefined>): void;
219
+ updateTopic(request: protos.google.pubsub.v1.IUpdateTopicRequest, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IUpdateTopicRequest | null | undefined, {} | null | undefined>): void;
220
+ /**
221
+ * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
222
+ * does not exist.
223
+ *
224
+ * @param {Object} request
225
+ * The request object that will be sent.
226
+ * @param {string} request.topic
227
+ * Required. The messages in the request will be published on this topic.
228
+ * Format is `projects/{project}/topics/{topic}`.
229
+ * @param {number[]} request.messages
230
+ * Required. The messages to publish.
231
+ * @param {object} [options]
232
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
233
+ * @returns {Promise} - The promise which resolves to an array.
234
+ * The first element of the array is an object representing {@link protos.google.pubsub.v1.PublishResponse|PublishResponse}.
235
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
236
+ * for more details and examples.
237
+ * @example <caption>include:samples/generated/v1/publisher.publish.js</caption>
238
+ * region_tag:pubsub_v1_generated_Publisher_Publish_async
239
+ */
240
+ publish(request?: protos.google.pubsub.v1.IPublishRequest, options?: CallOptions): Promise<[
241
+ protos.google.pubsub.v1.IPublishResponse,
242
+ protos.google.pubsub.v1.IPublishRequest | undefined,
243
+ {} | undefined
244
+ ]>;
245
+ publish(request: protos.google.pubsub.v1.IPublishRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.IPublishResponse, protos.google.pubsub.v1.IPublishRequest | null | undefined, {} | null | undefined>): void;
246
+ publish(request: protos.google.pubsub.v1.IPublishRequest, callback: Callback<protos.google.pubsub.v1.IPublishResponse, protos.google.pubsub.v1.IPublishRequest | null | undefined, {} | null | undefined>): void;
247
+ /**
248
+ * Gets the configuration of a topic.
249
+ *
250
+ * @param {Object} request
251
+ * The request object that will be sent.
252
+ * @param {string} request.topic
253
+ * Required. The name of the topic to get.
254
+ * Format is `projects/{project}/topics/{topic}`.
255
+ * @param {object} [options]
256
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
257
+ * @returns {Promise} - The promise which resolves to an array.
258
+ * The first element of the array is an object representing {@link protos.google.pubsub.v1.Topic|Topic}.
259
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
260
+ * for more details and examples.
261
+ * @example <caption>include:samples/generated/v1/publisher.get_topic.js</caption>
262
+ * region_tag:pubsub_v1_generated_Publisher_GetTopic_async
263
+ */
264
+ getTopic(request?: protos.google.pubsub.v1.IGetTopicRequest, options?: CallOptions): Promise<[
265
+ protos.google.pubsub.v1.ITopic,
266
+ protos.google.pubsub.v1.IGetTopicRequest | undefined,
267
+ {} | undefined
268
+ ]>;
269
+ getTopic(request: protos.google.pubsub.v1.IGetTopicRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IGetTopicRequest | null | undefined, {} | null | undefined>): void;
270
+ getTopic(request: protos.google.pubsub.v1.IGetTopicRequest, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IGetTopicRequest | null | undefined, {} | null | undefined>): void;
271
+ /**
272
+ * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
273
+ * does not exist. After a topic is deleted, a new topic may be created with
274
+ * the same name; this is an entirely new topic with none of the old
275
+ * configuration or subscriptions. Existing subscriptions to this topic are
276
+ * not deleted, but their `topic` field is set to `_deleted-topic_`.
277
+ *
278
+ * @param {Object} request
279
+ * The request object that will be sent.
280
+ * @param {string} request.topic
281
+ * Required. Name of the topic to delete.
282
+ * Format is `projects/{project}/topics/{topic}`.
283
+ * @param {object} [options]
284
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
285
+ * @returns {Promise} - The promise which resolves to an array.
286
+ * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
287
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
288
+ * for more details and examples.
289
+ * @example <caption>include:samples/generated/v1/publisher.delete_topic.js</caption>
290
+ * region_tag:pubsub_v1_generated_Publisher_DeleteTopic_async
291
+ */
292
+ deleteTopic(request?: protos.google.pubsub.v1.IDeleteTopicRequest, options?: CallOptions): Promise<[
293
+ protos.google.protobuf.IEmpty,
294
+ protos.google.pubsub.v1.IDeleteTopicRequest | undefined,
295
+ {} | undefined
296
+ ]>;
297
+ deleteTopic(request: protos.google.pubsub.v1.IDeleteTopicRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteTopicRequest | null | undefined, {} | null | undefined>): void;
298
+ deleteTopic(request: protos.google.pubsub.v1.IDeleteTopicRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteTopicRequest | null | undefined, {} | null | undefined>): void;
299
+ /**
300
+ * Detaches a subscription from this topic. All messages retained in the
301
+ * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
302
+ * will return FAILED_PRECONDITION. If the subscription is a push
303
+ * subscription, pushes to the endpoint will stop.
304
+ *
305
+ * @param {Object} request
306
+ * The request object that will be sent.
307
+ * @param {string} request.subscription
308
+ * Required. The subscription to detach.
309
+ * Format is `projects/{project}/subscriptions/{subscription}`.
310
+ * @param {object} [options]
311
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
312
+ * @returns {Promise} - The promise which resolves to an array.
313
+ * The first element of the array is an object representing {@link protos.google.pubsub.v1.DetachSubscriptionResponse|DetachSubscriptionResponse}.
314
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
315
+ * for more details and examples.
316
+ * @example <caption>include:samples/generated/v1/publisher.detach_subscription.js</caption>
317
+ * region_tag:pubsub_v1_generated_Publisher_DetachSubscription_async
318
+ */
319
+ detachSubscription(request?: protos.google.pubsub.v1.IDetachSubscriptionRequest, options?: CallOptions): Promise<[
320
+ protos.google.pubsub.v1.IDetachSubscriptionResponse,
321
+ protos.google.pubsub.v1.IDetachSubscriptionRequest | undefined,
322
+ {} | undefined
323
+ ]>;
324
+ detachSubscription(request: protos.google.pubsub.v1.IDetachSubscriptionRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.IDetachSubscriptionResponse, protos.google.pubsub.v1.IDetachSubscriptionRequest | null | undefined, {} | null | undefined>): void;
325
+ detachSubscription(request: protos.google.pubsub.v1.IDetachSubscriptionRequest, callback: Callback<protos.google.pubsub.v1.IDetachSubscriptionResponse, protos.google.pubsub.v1.IDetachSubscriptionRequest | null | undefined, {} | null | undefined>): void;
326
+ /**
327
+ * Lists matching topics.
328
+ *
329
+ * @param {Object} request
330
+ * The request object that will be sent.
331
+ * @param {string} request.project
332
+ * Required. The name of the project in which to list topics.
333
+ * Format is `projects/{project-id}`.
334
+ * @param {number} [request.pageSize]
335
+ * Optional. Maximum number of topics to return.
336
+ * @param {string} [request.pageToken]
337
+ * Optional. The value returned by the last `ListTopicsResponse`; indicates
338
+ * that this is a continuation of a prior `ListTopics` call, and that the
339
+ * system should return the next page of data.
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 Array of {@link protos.google.pubsub.v1.Topic|Topic}.
344
+ * The client library will perform auto-pagination by default: it will call the API as many
345
+ * times as needed and will merge results from all the pages into this array.
346
+ * Note that it can affect your quota.
347
+ * We recommend using `listTopicsAsync()`
348
+ * method described below for async iteration which you can stop as needed.
349
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
350
+ * for more details and examples.
351
+ */
352
+ listTopics(request?: protos.google.pubsub.v1.IListTopicsRequest, options?: CallOptions): Promise<[
353
+ protos.google.pubsub.v1.ITopic[],
354
+ protos.google.pubsub.v1.IListTopicsRequest | null,
355
+ protos.google.pubsub.v1.IListTopicsResponse
356
+ ]>;
357
+ listTopics(request: protos.google.pubsub.v1.IListTopicsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicsRequest, protos.google.pubsub.v1.IListTopicsResponse | null | undefined, protos.google.pubsub.v1.ITopic>): void;
358
+ listTopics(request: protos.google.pubsub.v1.IListTopicsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicsRequest, protos.google.pubsub.v1.IListTopicsResponse | null | undefined, protos.google.pubsub.v1.ITopic>): void;
359
+ /**
360
+ * Equivalent to `listTopics`, but returns a NodeJS Stream object.
361
+ * @param {Object} request
362
+ * The request object that will be sent.
363
+ * @param {string} request.project
364
+ * Required. The name of the project in which to list topics.
365
+ * Format is `projects/{project-id}`.
366
+ * @param {number} [request.pageSize]
367
+ * Optional. Maximum number of topics to return.
368
+ * @param {string} [request.pageToken]
369
+ * Optional. The value returned by the last `ListTopicsResponse`; indicates
370
+ * that this is a continuation of a prior `ListTopics` call, and that the
371
+ * system should return the next page of data.
372
+ * @param {object} [options]
373
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
374
+ * @returns {Stream}
375
+ * An object stream which emits an object representing {@link protos.google.pubsub.v1.Topic|Topic} on 'data' event.
376
+ * The client library will perform auto-pagination by default: it will call the API as many
377
+ * times as needed. Note that it can affect your quota.
378
+ * We recommend using `listTopicsAsync()`
379
+ * method described below for async iteration which you can stop as needed.
380
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
381
+ * for more details and examples.
382
+ */
383
+ listTopicsStream(request?: protos.google.pubsub.v1.IListTopicsRequest, options?: CallOptions): Transform;
384
+ /**
385
+ * Equivalent to `listTopics`, but returns an iterable object.
386
+ *
387
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
388
+ * @param {Object} request
389
+ * The request object that will be sent.
390
+ * @param {string} request.project
391
+ * Required. The name of the project in which to list topics.
392
+ * Format is `projects/{project-id}`.
393
+ * @param {number} [request.pageSize]
394
+ * Optional. Maximum number of topics to return.
395
+ * @param {string} [request.pageToken]
396
+ * Optional. The value returned by the last `ListTopicsResponse`; indicates
397
+ * that this is a continuation of a prior `ListTopics` call, and that the
398
+ * system should return the next page of data.
399
+ * @param {object} [options]
400
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
401
+ * @returns {Object}
402
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
403
+ * When you iterate the returned iterable, each element will be an object representing
404
+ * {@link protos.google.pubsub.v1.Topic|Topic}. The API will be called under the hood as needed, once per the page,
405
+ * so you can stop the iteration when you don't need more results.
406
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
407
+ * for more details and examples.
408
+ * @example <caption>include:samples/generated/v1/publisher.list_topics.js</caption>
409
+ * region_tag:pubsub_v1_generated_Publisher_ListTopics_async
410
+ */
411
+ listTopicsAsync(request?: protos.google.pubsub.v1.IListTopicsRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ITopic>;
412
+ /**
413
+ * Lists the names of the attached subscriptions on this topic.
414
+ *
415
+ * @param {Object} request
416
+ * The request object that will be sent.
417
+ * @param {string} request.topic
418
+ * Required. The name of the topic that subscriptions are attached to.
419
+ * Format is `projects/{project}/topics/{topic}`.
420
+ * @param {number} [request.pageSize]
421
+ * Optional. Maximum number of subscription names to return.
422
+ * @param {string} [request.pageToken]
423
+ * Optional. The value returned by the last `ListTopicSubscriptionsResponse`;
424
+ * indicates that this is a continuation of a prior `ListTopicSubscriptions`
425
+ * call, and that the system should return the next page of data.
426
+ * @param {object} [options]
427
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
428
+ * @returns {Promise} - The promise which resolves to an array.
429
+ * The first element of the array is Array of string.
430
+ * The client library will perform auto-pagination by default: it will call the API as many
431
+ * times as needed and will merge results from all the pages into this array.
432
+ * Note that it can affect your quota.
433
+ * We recommend using `listTopicSubscriptionsAsync()`
434
+ * method described below for async iteration which you can stop as needed.
435
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
436
+ * for more details and examples.
437
+ */
438
+ listTopicSubscriptions(request?: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, options?: CallOptions): Promise<[
439
+ string[],
440
+ protos.google.pubsub.v1.IListTopicSubscriptionsRequest | null,
441
+ protos.google.pubsub.v1.IListTopicSubscriptionsResponse
442
+ ]>;
443
+ listTopicSubscriptions(request: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSubscriptionsRequest, protos.google.pubsub.v1.IListTopicSubscriptionsResponse | null | undefined, string>): void;
444
+ listTopicSubscriptions(request: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSubscriptionsRequest, protos.google.pubsub.v1.IListTopicSubscriptionsResponse | null | undefined, string>): void;
445
+ /**
446
+ * Equivalent to `listTopicSubscriptions`, but returns a NodeJS Stream object.
447
+ * @param {Object} request
448
+ * The request object that will be sent.
449
+ * @param {string} request.topic
450
+ * Required. The name of the topic that subscriptions are attached to.
451
+ * Format is `projects/{project}/topics/{topic}`.
452
+ * @param {number} [request.pageSize]
453
+ * Optional. Maximum number of subscription names to return.
454
+ * @param {string} [request.pageToken]
455
+ * Optional. The value returned by the last `ListTopicSubscriptionsResponse`;
456
+ * indicates that this is a continuation of a prior `ListTopicSubscriptions`
457
+ * call, and that the system should return the next page of data.
458
+ * @param {object} [options]
459
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
460
+ * @returns {Stream}
461
+ * An object stream which emits an object representing string on 'data' event.
462
+ * The client library will perform auto-pagination by default: it will call the API as many
463
+ * times as needed. Note that it can affect your quota.
464
+ * We recommend using `listTopicSubscriptionsAsync()`
465
+ * method described below for async iteration which you can stop as needed.
466
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
467
+ * for more details and examples.
468
+ */
469
+ listTopicSubscriptionsStream(request?: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, options?: CallOptions): Transform;
470
+ /**
471
+ * Equivalent to `listTopicSubscriptions`, but returns an iterable object.
472
+ *
473
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
474
+ * @param {Object} request
475
+ * The request object that will be sent.
476
+ * @param {string} request.topic
477
+ * Required. The name of the topic that subscriptions are attached to.
478
+ * Format is `projects/{project}/topics/{topic}`.
479
+ * @param {number} [request.pageSize]
480
+ * Optional. Maximum number of subscription names to return.
481
+ * @param {string} [request.pageToken]
482
+ * Optional. The value returned by the last `ListTopicSubscriptionsResponse`;
483
+ * indicates that this is a continuation of a prior `ListTopicSubscriptions`
484
+ * call, and that the system should return the next page of data.
485
+ * @param {object} [options]
486
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
487
+ * @returns {Object}
488
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
489
+ * When you iterate the returned iterable, each element will be an object representing
490
+ * string. The API will be called under the hood as needed, once per the page,
491
+ * so you can stop the iteration when you don't need more results.
492
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
493
+ * for more details and examples.
494
+ * @example <caption>include:samples/generated/v1/publisher.list_topic_subscriptions.js</caption>
495
+ * region_tag:pubsub_v1_generated_Publisher_ListTopicSubscriptions_async
496
+ */
497
+ listTopicSubscriptionsAsync(request?: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, options?: CallOptions): AsyncIterable<string>;
498
+ /**
499
+ * Lists the names of the snapshots on this topic. Snapshots are used in
500
+ * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
501
+ * which allow you to manage message acknowledgments in bulk. That is, you can
502
+ * set the acknowledgment state of messages in an existing subscription to the
503
+ * state captured by a snapshot.
504
+ *
505
+ * @param {Object} request
506
+ * The request object that will be sent.
507
+ * @param {string} request.topic
508
+ * Required. The name of the topic that snapshots are attached to.
509
+ * Format is `projects/{project}/topics/{topic}`.
510
+ * @param {number} [request.pageSize]
511
+ * Optional. Maximum number of snapshot names to return.
512
+ * @param {string} [request.pageToken]
513
+ * Optional. The value returned by the last `ListTopicSnapshotsResponse`;
514
+ * indicates that this is a continuation of a prior `ListTopicSnapshots` call,
515
+ * and that the system should return the next page of data.
516
+ * @param {object} [options]
517
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
518
+ * @returns {Promise} - The promise which resolves to an array.
519
+ * The first element of the array is Array of string.
520
+ * The client library will perform auto-pagination by default: it will call the API as many
521
+ * times as needed and will merge results from all the pages into this array.
522
+ * Note that it can affect your quota.
523
+ * We recommend using `listTopicSnapshotsAsync()`
524
+ * method described below for async iteration which you can stop as needed.
525
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
526
+ * for more details and examples.
527
+ */
528
+ listTopicSnapshots(request?: protos.google.pubsub.v1.IListTopicSnapshotsRequest, options?: CallOptions): Promise<[
529
+ string[],
530
+ protos.google.pubsub.v1.IListTopicSnapshotsRequest | null,
531
+ protos.google.pubsub.v1.IListTopicSnapshotsResponse
532
+ ]>;
533
+ listTopicSnapshots(request: protos.google.pubsub.v1.IListTopicSnapshotsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSnapshotsRequest, protos.google.pubsub.v1.IListTopicSnapshotsResponse | null | undefined, string>): void;
534
+ listTopicSnapshots(request: protos.google.pubsub.v1.IListTopicSnapshotsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSnapshotsRequest, protos.google.pubsub.v1.IListTopicSnapshotsResponse | null | undefined, string>): void;
535
+ /**
536
+ * Equivalent to `listTopicSnapshots`, but returns a NodeJS Stream object.
537
+ * @param {Object} request
538
+ * The request object that will be sent.
539
+ * @param {string} request.topic
540
+ * Required. The name of the topic that snapshots are attached to.
541
+ * Format is `projects/{project}/topics/{topic}`.
542
+ * @param {number} [request.pageSize]
543
+ * Optional. Maximum number of snapshot names to return.
544
+ * @param {string} [request.pageToken]
545
+ * Optional. The value returned by the last `ListTopicSnapshotsResponse`;
546
+ * indicates that this is a continuation of a prior `ListTopicSnapshots` call,
547
+ * and that the system should return the next page of data.
548
+ * @param {object} [options]
549
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
550
+ * @returns {Stream}
551
+ * An object stream which emits an object representing string on 'data' event.
552
+ * The client library will perform auto-pagination by default: it will call the API as many
553
+ * times as needed. Note that it can affect your quota.
554
+ * We recommend using `listTopicSnapshotsAsync()`
555
+ * method described below for async iteration which you can stop as needed.
556
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
557
+ * for more details and examples.
558
+ */
559
+ listTopicSnapshotsStream(request?: protos.google.pubsub.v1.IListTopicSnapshotsRequest, options?: CallOptions): Transform;
560
+ /**
561
+ * Equivalent to `listTopicSnapshots`, but returns an iterable object.
562
+ *
563
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
564
+ * @param {Object} request
565
+ * The request object that will be sent.
566
+ * @param {string} request.topic
567
+ * Required. The name of the topic that snapshots are attached to.
568
+ * Format is `projects/{project}/topics/{topic}`.
569
+ * @param {number} [request.pageSize]
570
+ * Optional. Maximum number of snapshot names to return.
571
+ * @param {string} [request.pageToken]
572
+ * Optional. The value returned by the last `ListTopicSnapshotsResponse`;
573
+ * indicates that this is a continuation of a prior `ListTopicSnapshots` call,
574
+ * and that the system should return the next page of data.
575
+ * @param {object} [options]
576
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
577
+ * @returns {Object}
578
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
579
+ * When you iterate the returned iterable, each element will be an object representing
580
+ * string. The API will be called under the hood as needed, once per the page,
581
+ * so you can stop the iteration when you don't need more results.
582
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
583
+ * for more details and examples.
584
+ * @example <caption>include:samples/generated/v1/publisher.list_topic_snapshots.js</caption>
585
+ * region_tag:pubsub_v1_generated_Publisher_ListTopicSnapshots_async
586
+ */
587
+ listTopicSnapshotsAsync(request?: protos.google.pubsub.v1.IListTopicSnapshotsRequest, options?: CallOptions): AsyncIterable<string>;
588
+ /**
589
+ * Gets the access control policy for a resource. Returns an empty policy
590
+ * if the resource exists and does not have a policy set.
591
+ *
592
+ * @param {Object} request
593
+ * The request object that will be sent.
594
+ * @param {string} request.resource
595
+ * REQUIRED: The resource for which the policy is being requested.
596
+ * See the operation documentation for the appropriate value for this field.
597
+ * @param {Object} [request.options]
598
+ * OPTIONAL: A `GetPolicyOptions` object for specifying options to
599
+ * `GetIamPolicy`. This field is only used by Cloud IAM.
600
+ *
601
+ * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}.
602
+ * @param {Object} [options]
603
+ * Optional parameters. You can override the default settings for this call, e.g, timeout,
604
+ * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
605
+ * @param {function(?Error, ?Object)} [callback]
606
+ * The function which will be called with the result of the API call.
607
+ *
608
+ * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}.
609
+ * @returns {Promise} - The promise which resolves to an array.
610
+ * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}.
611
+ * The promise has a method named "cancel" which cancels the ongoing API call.
612
+ */
613
+ getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;
614
+ /**
615
+ * Returns permissions that a caller has on the specified resource. If the
616
+ * resource does not exist, this will return an empty set of
617
+ * permissions, not a NOT_FOUND error.
618
+ *
619
+ * Note: This operation is designed to be used for building
620
+ * permission-aware UIs and command-line tools, not for authorization
621
+ * checking. This operation may "fail open" without warning.
622
+ *
623
+ * @param {Object} request
624
+ * The request object that will be sent.
625
+ * @param {string} request.resource
626
+ * REQUIRED: The resource for which the policy detail is being requested.
627
+ * See the operation documentation for the appropriate value for this field.
628
+ * @param {string[]} request.permissions
629
+ * The set of permissions to check for the `resource`. Permissions with
630
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more
631
+ * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }.
632
+ * @param {Object} [options]
633
+ * Optional parameters. You can override the default settings for this call, e.g, timeout,
634
+ * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
635
+ * @param {function(?Error, ?Object)} [callback]
636
+ * The function which will be called with the result of the API call.
637
+ *
638
+ * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
639
+ * @returns {Promise} - The promise which resolves to an array.
640
+ * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
641
+ * The promise has a method named "cancel" which cancels the ongoing API call.
642
+ */
643
+ setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;
644
+ /**
645
+ * Returns permissions that a caller has on the specified resource. If the
646
+ * resource does not exist, this will return an empty set of
647
+ * permissions, not a NOT_FOUND error.
648
+ *
649
+ * Note: This operation is designed to be used for building
650
+ * permission-aware UIs and command-line tools, not for authorization
651
+ * checking. This operation may "fail open" without warning.
652
+ *
653
+ * @param {Object} request
654
+ * The request object that will be sent.
655
+ * @param {string} request.resource
656
+ * REQUIRED: The resource for which the policy detail is being requested.
657
+ * See the operation documentation for the appropriate value for this field.
658
+ * @param {string[]} request.permissions
659
+ * The set of permissions to check for the `resource`. Permissions with
660
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more
661
+ * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }.
662
+ * @param {Object} [options]
663
+ * Optional parameters. You can override the default settings for this call, e.g, timeout,
664
+ * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
665
+ * @param {function(?Error, ?Object)} [callback]
666
+ * The function which will be called with the result of the API call.
667
+ *
668
+ * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
669
+ * @returns {Promise} - The promise which resolves to an array.
670
+ * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
671
+ * The promise has a method named "cancel" which cancels the ongoing API call.
672
+ *
673
+ */
674
+ testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;
675
+ /**
676
+ * Return a fully-qualified cryptoKey resource name string.
677
+ *
678
+ * @param {string} project
679
+ * @param {string} location
680
+ * @param {string} key_ring
681
+ * @param {string} crypto_key
682
+ * @returns {string} Resource name string.
683
+ */
684
+ cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string;
685
+ /**
686
+ * Parse the project from CryptoKey resource.
687
+ *
688
+ * @param {string} cryptoKeyName
689
+ * A fully-qualified path representing CryptoKey resource.
690
+ * @returns {string} A string representing the project.
691
+ */
692
+ matchProjectFromCryptoKeyName(cryptoKeyName: string): string | number;
693
+ /**
694
+ * Parse the location from CryptoKey resource.
695
+ *
696
+ * @param {string} cryptoKeyName
697
+ * A fully-qualified path representing CryptoKey resource.
698
+ * @returns {string} A string representing the location.
699
+ */
700
+ matchLocationFromCryptoKeyName(cryptoKeyName: string): string | number;
701
+ /**
702
+ * Parse the key_ring from CryptoKey resource.
703
+ *
704
+ * @param {string} cryptoKeyName
705
+ * A fully-qualified path representing CryptoKey resource.
706
+ * @returns {string} A string representing the key_ring.
707
+ */
708
+ matchKeyRingFromCryptoKeyName(cryptoKeyName: string): string | number;
709
+ /**
710
+ * Parse the crypto_key from CryptoKey resource.
711
+ *
712
+ * @param {string} cryptoKeyName
713
+ * A fully-qualified path representing CryptoKey resource.
714
+ * @returns {string} A string representing the crypto_key.
715
+ */
716
+ matchCryptoKeyFromCryptoKeyName(cryptoKeyName: string): string | number;
717
+ /**
718
+ * Return a fully-qualified project resource name string.
719
+ *
720
+ * @param {string} project
721
+ * @returns {string} Resource name string.
722
+ */
723
+ projectPath(project: string): string;
724
+ /**
725
+ * Parse the project from Project resource.
726
+ *
727
+ * @param {string} projectName
728
+ * A fully-qualified path representing Project resource.
729
+ * @returns {string} A string representing the project.
730
+ */
731
+ matchProjectFromProjectName(projectName: string): string | number;
732
+ /**
733
+ * Return a fully-qualified projectTopics resource name string.
734
+ *
735
+ * @param {string} project
736
+ * @param {string} topic
737
+ * @returns {string} Resource name string.
738
+ */
739
+ projectTopicsPath(project: string, topic: string): string;
740
+ /**
741
+ * Parse the project from ProjectTopics resource.
742
+ *
743
+ * @param {string} projectTopicsName
744
+ * A fully-qualified path representing project_topics resource.
745
+ * @returns {string} A string representing the project.
746
+ */
747
+ matchProjectFromProjectTopicsName(projectTopicsName: string): string | number;
748
+ /**
749
+ * Parse the topic from ProjectTopics resource.
750
+ *
751
+ * @param {string} projectTopicsName
752
+ * A fully-qualified path representing project_topics resource.
753
+ * @returns {string} A string representing the topic.
754
+ */
755
+ matchTopicFromProjectTopicsName(projectTopicsName: string): string | number;
756
+ /**
757
+ * Return a fully-qualified schema resource name string.
758
+ *
759
+ * @param {string} project
760
+ * @param {string} schema
761
+ * @returns {string} Resource name string.
762
+ */
763
+ schemaPath(project: string, schema: string): string;
764
+ /**
765
+ * Parse the project from Schema resource.
766
+ *
767
+ * @param {string} schemaName
768
+ * A fully-qualified path representing Schema resource.
769
+ * @returns {string} A string representing the project.
770
+ */
771
+ matchProjectFromSchemaName(schemaName: string): string | number;
772
+ /**
773
+ * Parse the schema from Schema resource.
774
+ *
775
+ * @param {string} schemaName
776
+ * A fully-qualified path representing Schema resource.
777
+ * @returns {string} A string representing the schema.
778
+ */
779
+ matchSchemaFromSchemaName(schemaName: string): string | number;
780
+ /**
781
+ * Return a fully-qualified snapshot resource name string.
782
+ *
783
+ * @param {string} project
784
+ * @param {string} snapshot
785
+ * @returns {string} Resource name string.
786
+ */
787
+ snapshotPath(project: string, snapshot: string): string;
788
+ /**
789
+ * Parse the project from Snapshot resource.
790
+ *
791
+ * @param {string} snapshotName
792
+ * A fully-qualified path representing Snapshot resource.
793
+ * @returns {string} A string representing the project.
794
+ */
795
+ matchProjectFromSnapshotName(snapshotName: string): string | number;
796
+ /**
797
+ * Parse the snapshot from Snapshot resource.
798
+ *
799
+ * @param {string} snapshotName
800
+ * A fully-qualified path representing Snapshot resource.
801
+ * @returns {string} A string representing the snapshot.
802
+ */
803
+ matchSnapshotFromSnapshotName(snapshotName: string): string | number;
804
+ /**
805
+ * Return a fully-qualified subscription resource name string.
806
+ *
807
+ * @param {string} project
808
+ * @param {string} subscription
809
+ * @returns {string} Resource name string.
810
+ */
811
+ subscriptionPath(project: string, subscription: string): string;
812
+ /**
813
+ * Parse the project from Subscription resource.
814
+ *
815
+ * @param {string} subscriptionName
816
+ * A fully-qualified path representing Subscription resource.
817
+ * @returns {string} A string representing the project.
818
+ */
819
+ matchProjectFromSubscriptionName(subscriptionName: string): string | number;
820
+ /**
821
+ * Parse the subscription from Subscription resource.
822
+ *
823
+ * @param {string} subscriptionName
824
+ * A fully-qualified path representing Subscription resource.
825
+ * @returns {string} A string representing the subscription.
826
+ */
827
+ matchSubscriptionFromSubscriptionName(subscriptionName: string): string | number;
828
+ /**
829
+ * Terminate the gRPC channel and close the client.
830
+ *
831
+ * The client will no longer be usable and all future behavior is undefined.
832
+ * @returns {Promise} A promise that resolves when the client is closed.
833
+ */
834
+ close(): Promise<void>;
835
+ }