@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.
- package/README.md +111 -0
- package/build/protos/google/pubsub/v1/pubsub.proto +2588 -0
- package/build/protos/google/pubsub/v1/schema.proto +409 -0
- package/build/protos/protos.d.ts +18963 -0
- package/build/protos/protos.js +1 -0
- package/build/protos/protos.json +1 -0
- package/build/src/index.d.ts +17 -0
- package/build/src/index.js +32 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/gapic_metadata.json +424 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +27 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1/publisher_client.d.ts +835 -0
- package/build/src/v1/publisher_client.js +1260 -0
- package/build/src/v1/publisher_client.js.map +1 -0
- package/build/src/v1/publisher_client_config.json +97 -0
- package/build/src/v1/publisher_proto_list.json +4 -0
- package/build/src/v1/schema_service_client.d.ts +745 -0
- package/build/src/v1/schema_service_client.js +1176 -0
- package/build/src/v1/schema_service_client.js.map +1 -0
- package/build/src/v1/schema_service_client_config.json +79 -0
- package/build/src/v1/schema_service_proto_list.json +4 -0
- package/build/src/v1/subscriber_client.d.ts +1159 -0
- package/build/src/v1/subscriber_client.js +1491 -0
- package/build/src/v1/subscriber_client.js.map +1 -0
- package/build/src/v1/subscriber_client_config.json +136 -0
- package/build/src/v1/subscriber_proto_list.json +4 -0
- package/package.json +66 -0
|
@@ -0,0 +1,745 @@
|
|
|
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
|
+
* Service for doing schema-related operations.
|
|
7
|
+
* @class
|
|
8
|
+
* @memberof v1
|
|
9
|
+
*/
|
|
10
|
+
export declare class SchemaServiceClient {
|
|
11
|
+
private _terminated;
|
|
12
|
+
private _opts;
|
|
13
|
+
private _providedCustomServicePath;
|
|
14
|
+
private _gaxModule;
|
|
15
|
+
private _gaxGrpc;
|
|
16
|
+
private _protos;
|
|
17
|
+
private _defaults;
|
|
18
|
+
private _universeDomain;
|
|
19
|
+
private _servicePath;
|
|
20
|
+
private _log;
|
|
21
|
+
auth: gax.GoogleAuth;
|
|
22
|
+
descriptors: Descriptors;
|
|
23
|
+
warn: (code: string, message: string, warnType?: string) => void;
|
|
24
|
+
innerApiCalls: {
|
|
25
|
+
[name: string]: Function;
|
|
26
|
+
};
|
|
27
|
+
iamClient: IamClient;
|
|
28
|
+
pathTemplates: {
|
|
29
|
+
[name: string]: gax.PathTemplate;
|
|
30
|
+
};
|
|
31
|
+
schemaServiceStub?: Promise<{
|
|
32
|
+
[name: string]: Function;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Construct an instance of SchemaServiceClient.
|
|
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://cloud.google.com/docs/authentication/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 SchemaServiceClient({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 schema.
|
|
121
|
+
*
|
|
122
|
+
* @param {Object} request
|
|
123
|
+
* The request object that will be sent.
|
|
124
|
+
* @param {string} request.parent
|
|
125
|
+
* Required. The name of the project in which to create the schema.
|
|
126
|
+
* Format is `projects/{project-id}`.
|
|
127
|
+
* @param {google.pubsub.v1.Schema} request.schema
|
|
128
|
+
* Required. The schema object to create.
|
|
129
|
+
*
|
|
130
|
+
* This schema's `name` parameter is ignored. The schema object returned
|
|
131
|
+
* by CreateSchema will have a `name` made using the given `parent` and
|
|
132
|
+
* `schema_id`.
|
|
133
|
+
* @param {string} request.schemaId
|
|
134
|
+
* The ID to use for the schema, which will become the final component of
|
|
135
|
+
* the schema's resource name.
|
|
136
|
+
*
|
|
137
|
+
* See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for
|
|
138
|
+
* resource name constraints.
|
|
139
|
+
* @param {object} [options]
|
|
140
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
141
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
142
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Schema|Schema}.
|
|
143
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
144
|
+
* for more details and examples.
|
|
145
|
+
* @example <caption>include:samples/generated/v1/schema_service.create_schema.js</caption>
|
|
146
|
+
* region_tag:pubsub_v1_generated_SchemaService_CreateSchema_async
|
|
147
|
+
*/
|
|
148
|
+
createSchema(request?: protos.google.pubsub.v1.ICreateSchemaRequest, options?: CallOptions): Promise<[
|
|
149
|
+
protos.google.pubsub.v1.ISchema,
|
|
150
|
+
protos.google.pubsub.v1.ICreateSchemaRequest | undefined,
|
|
151
|
+
{} | undefined
|
|
152
|
+
]>;
|
|
153
|
+
createSchema(request: protos.google.pubsub.v1.ICreateSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICreateSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
154
|
+
createSchema(request: protos.google.pubsub.v1.ICreateSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICreateSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
155
|
+
/**
|
|
156
|
+
* Gets a schema.
|
|
157
|
+
*
|
|
158
|
+
* @param {Object} request
|
|
159
|
+
* The request object that will be sent.
|
|
160
|
+
* @param {string} request.name
|
|
161
|
+
* Required. The name of the schema to get.
|
|
162
|
+
* Format is `projects/{project}/schemas/{schema}`.
|
|
163
|
+
* @param {google.pubsub.v1.SchemaView} request.view
|
|
164
|
+
* The set of fields to return in the response. If not set, returns a Schema
|
|
165
|
+
* with all fields filled out. Set to `BASIC` to omit the `definition`.
|
|
166
|
+
* @param {object} [options]
|
|
167
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
168
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
169
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Schema|Schema}.
|
|
170
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
171
|
+
* for more details and examples.
|
|
172
|
+
* @example <caption>include:samples/generated/v1/schema_service.get_schema.js</caption>
|
|
173
|
+
* region_tag:pubsub_v1_generated_SchemaService_GetSchema_async
|
|
174
|
+
*/
|
|
175
|
+
getSchema(request?: protos.google.pubsub.v1.IGetSchemaRequest, options?: CallOptions): Promise<[
|
|
176
|
+
protos.google.pubsub.v1.ISchema,
|
|
177
|
+
protos.google.pubsub.v1.IGetSchemaRequest | undefined,
|
|
178
|
+
{} | undefined
|
|
179
|
+
]>;
|
|
180
|
+
getSchema(request: protos.google.pubsub.v1.IGetSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IGetSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
181
|
+
getSchema(request: protos.google.pubsub.v1.IGetSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IGetSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
182
|
+
/**
|
|
183
|
+
* Commits a new schema revision to an existing schema.
|
|
184
|
+
*
|
|
185
|
+
* @param {Object} request
|
|
186
|
+
* The request object that will be sent.
|
|
187
|
+
* @param {string} request.name
|
|
188
|
+
* Required. The name of the schema we are revising.
|
|
189
|
+
* Format is `projects/{project}/schemas/{schema}`.
|
|
190
|
+
* @param {google.pubsub.v1.Schema} request.schema
|
|
191
|
+
* Required. The schema revision to commit.
|
|
192
|
+
* @param {object} [options]
|
|
193
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
194
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
195
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Schema|Schema}.
|
|
196
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
197
|
+
* for more details and examples.
|
|
198
|
+
* @example <caption>include:samples/generated/v1/schema_service.commit_schema.js</caption>
|
|
199
|
+
* region_tag:pubsub_v1_generated_SchemaService_CommitSchema_async
|
|
200
|
+
*/
|
|
201
|
+
commitSchema(request?: protos.google.pubsub.v1.ICommitSchemaRequest, options?: CallOptions): Promise<[
|
|
202
|
+
protos.google.pubsub.v1.ISchema,
|
|
203
|
+
protos.google.pubsub.v1.ICommitSchemaRequest | undefined,
|
|
204
|
+
{} | undefined
|
|
205
|
+
]>;
|
|
206
|
+
commitSchema(request: protos.google.pubsub.v1.ICommitSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICommitSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
207
|
+
commitSchema(request: protos.google.pubsub.v1.ICommitSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICommitSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
208
|
+
/**
|
|
209
|
+
* Creates a new schema revision that is a copy of the provided revision_id.
|
|
210
|
+
*
|
|
211
|
+
* @param {Object} request
|
|
212
|
+
* The request object that will be sent.
|
|
213
|
+
* @param {string} request.name
|
|
214
|
+
* Required. The schema being rolled back with revision id.
|
|
215
|
+
* @param {string} request.revisionId
|
|
216
|
+
* Required. The revision ID to roll back to.
|
|
217
|
+
* It must be a revision of the same schema.
|
|
218
|
+
*
|
|
219
|
+
* Example: c7cfa2a8
|
|
220
|
+
* @param {object} [options]
|
|
221
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
222
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
223
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Schema|Schema}.
|
|
224
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
225
|
+
* for more details and examples.
|
|
226
|
+
* @example <caption>include:samples/generated/v1/schema_service.rollback_schema.js</caption>
|
|
227
|
+
* region_tag:pubsub_v1_generated_SchemaService_RollbackSchema_async
|
|
228
|
+
*/
|
|
229
|
+
rollbackSchema(request?: protos.google.pubsub.v1.IRollbackSchemaRequest, options?: CallOptions): Promise<[
|
|
230
|
+
protos.google.pubsub.v1.ISchema,
|
|
231
|
+
protos.google.pubsub.v1.IRollbackSchemaRequest | undefined,
|
|
232
|
+
{} | undefined
|
|
233
|
+
]>;
|
|
234
|
+
rollbackSchema(request: protos.google.pubsub.v1.IRollbackSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IRollbackSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
235
|
+
rollbackSchema(request: protos.google.pubsub.v1.IRollbackSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IRollbackSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
236
|
+
/**
|
|
237
|
+
* Deletes a specific schema revision.
|
|
238
|
+
*
|
|
239
|
+
* @param {Object} request
|
|
240
|
+
* The request object that will be sent.
|
|
241
|
+
* @param {string} request.name
|
|
242
|
+
* Required. The name of the schema revision to be deleted, with a revision ID
|
|
243
|
+
* explicitly included.
|
|
244
|
+
*
|
|
245
|
+
* Example: `projects/123/schemas/my-schema@c7cfa2a8`
|
|
246
|
+
* @param {string} [request.revisionId]
|
|
247
|
+
* Optional. This field is deprecated and should not be used for specifying
|
|
248
|
+
* the revision ID. The revision ID should be specified via the `name`
|
|
249
|
+
* parameter.
|
|
250
|
+
* @param {object} [options]
|
|
251
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
252
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
253
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Schema|Schema}.
|
|
254
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
255
|
+
* for more details and examples.
|
|
256
|
+
* @example <caption>include:samples/generated/v1/schema_service.delete_schema_revision.js</caption>
|
|
257
|
+
* region_tag:pubsub_v1_generated_SchemaService_DeleteSchemaRevision_async
|
|
258
|
+
*/
|
|
259
|
+
deleteSchemaRevision(request?: protos.google.pubsub.v1.IDeleteSchemaRevisionRequest, options?: CallOptions): Promise<[
|
|
260
|
+
protos.google.pubsub.v1.ISchema,
|
|
261
|
+
protos.google.pubsub.v1.IDeleteSchemaRevisionRequest | undefined,
|
|
262
|
+
{} | undefined
|
|
263
|
+
]>;
|
|
264
|
+
deleteSchemaRevision(request: protos.google.pubsub.v1.IDeleteSchemaRevisionRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IDeleteSchemaRevisionRequest | null | undefined, {} | null | undefined>): void;
|
|
265
|
+
deleteSchemaRevision(request: protos.google.pubsub.v1.IDeleteSchemaRevisionRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IDeleteSchemaRevisionRequest | null | undefined, {} | null | undefined>): void;
|
|
266
|
+
/**
|
|
267
|
+
* Deletes a schema.
|
|
268
|
+
*
|
|
269
|
+
* @param {Object} request
|
|
270
|
+
* The request object that will be sent.
|
|
271
|
+
* @param {string} request.name
|
|
272
|
+
* Required. Name of the schema to delete.
|
|
273
|
+
* Format is `projects/{project}/schemas/{schema}`.
|
|
274
|
+
* @param {object} [options]
|
|
275
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
276
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
277
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
278
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
279
|
+
* for more details and examples.
|
|
280
|
+
* @example <caption>include:samples/generated/v1/schema_service.delete_schema.js</caption>
|
|
281
|
+
* region_tag:pubsub_v1_generated_SchemaService_DeleteSchema_async
|
|
282
|
+
*/
|
|
283
|
+
deleteSchema(request?: protos.google.pubsub.v1.IDeleteSchemaRequest, options?: CallOptions): Promise<[
|
|
284
|
+
protos.google.protobuf.IEmpty,
|
|
285
|
+
protos.google.pubsub.v1.IDeleteSchemaRequest | undefined,
|
|
286
|
+
{} | undefined
|
|
287
|
+
]>;
|
|
288
|
+
deleteSchema(request: protos.google.pubsub.v1.IDeleteSchemaRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
289
|
+
deleteSchema(request: protos.google.pubsub.v1.IDeleteSchemaRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
290
|
+
/**
|
|
291
|
+
* Validates a schema.
|
|
292
|
+
*
|
|
293
|
+
* @param {Object} request
|
|
294
|
+
* The request object that will be sent.
|
|
295
|
+
* @param {string} request.parent
|
|
296
|
+
* Required. The name of the project in which to validate schemas.
|
|
297
|
+
* Format is `projects/{project-id}`.
|
|
298
|
+
* @param {google.pubsub.v1.Schema} request.schema
|
|
299
|
+
* Required. The schema object to validate.
|
|
300
|
+
* @param {object} [options]
|
|
301
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
302
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
303
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.ValidateSchemaResponse|ValidateSchemaResponse}.
|
|
304
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
305
|
+
* for more details and examples.
|
|
306
|
+
* @example <caption>include:samples/generated/v1/schema_service.validate_schema.js</caption>
|
|
307
|
+
* region_tag:pubsub_v1_generated_SchemaService_ValidateSchema_async
|
|
308
|
+
*/
|
|
309
|
+
validateSchema(request?: protos.google.pubsub.v1.IValidateSchemaRequest, options?: CallOptions): Promise<[
|
|
310
|
+
protos.google.pubsub.v1.IValidateSchemaResponse,
|
|
311
|
+
protos.google.pubsub.v1.IValidateSchemaRequest | undefined,
|
|
312
|
+
{} | undefined
|
|
313
|
+
]>;
|
|
314
|
+
validateSchema(request: protos.google.pubsub.v1.IValidateSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.IValidateSchemaResponse, protos.google.pubsub.v1.IValidateSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
315
|
+
validateSchema(request: protos.google.pubsub.v1.IValidateSchemaRequest, callback: Callback<protos.google.pubsub.v1.IValidateSchemaResponse, protos.google.pubsub.v1.IValidateSchemaRequest | null | undefined, {} | null | undefined>): void;
|
|
316
|
+
/**
|
|
317
|
+
* Validates a message against a schema.
|
|
318
|
+
*
|
|
319
|
+
* @param {Object} request
|
|
320
|
+
* The request object that will be sent.
|
|
321
|
+
* @param {string} request.parent
|
|
322
|
+
* Required. The name of the project in which to validate schemas.
|
|
323
|
+
* Format is `projects/{project-id}`.
|
|
324
|
+
* @param {string} request.name
|
|
325
|
+
* Name of the schema against which to validate.
|
|
326
|
+
*
|
|
327
|
+
* Format is `projects/{project}/schemas/{schema}`.
|
|
328
|
+
* @param {google.pubsub.v1.Schema} request.schema
|
|
329
|
+
* Ad-hoc schema against which to validate
|
|
330
|
+
* @param {Buffer} request.message
|
|
331
|
+
* Message to validate against the provided `schema_spec`.
|
|
332
|
+
* @param {google.pubsub.v1.Encoding} request.encoding
|
|
333
|
+
* The encoding expected for messages
|
|
334
|
+
* @param {object} [options]
|
|
335
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
336
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
337
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.ValidateMessageResponse|ValidateMessageResponse}.
|
|
338
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
339
|
+
* for more details and examples.
|
|
340
|
+
* @example <caption>include:samples/generated/v1/schema_service.validate_message.js</caption>
|
|
341
|
+
* region_tag:pubsub_v1_generated_SchemaService_ValidateMessage_async
|
|
342
|
+
*/
|
|
343
|
+
validateMessage(request?: protos.google.pubsub.v1.IValidateMessageRequest, options?: CallOptions): Promise<[
|
|
344
|
+
protos.google.pubsub.v1.IValidateMessageResponse,
|
|
345
|
+
protos.google.pubsub.v1.IValidateMessageRequest | undefined,
|
|
346
|
+
{} | undefined
|
|
347
|
+
]>;
|
|
348
|
+
validateMessage(request: protos.google.pubsub.v1.IValidateMessageRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.IValidateMessageResponse, protos.google.pubsub.v1.IValidateMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
349
|
+
validateMessage(request: protos.google.pubsub.v1.IValidateMessageRequest, callback: Callback<protos.google.pubsub.v1.IValidateMessageResponse, protos.google.pubsub.v1.IValidateMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
350
|
+
/**
|
|
351
|
+
* Lists schemas in a project.
|
|
352
|
+
*
|
|
353
|
+
* @param {Object} request
|
|
354
|
+
* The request object that will be sent.
|
|
355
|
+
* @param {string} request.parent
|
|
356
|
+
* Required. The name of the project in which to list schemas.
|
|
357
|
+
* Format is `projects/{project-id}`.
|
|
358
|
+
* @param {google.pubsub.v1.SchemaView} request.view
|
|
359
|
+
* The set of Schema fields to return in the response. If not set, returns
|
|
360
|
+
* Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
|
361
|
+
* retrieve all fields.
|
|
362
|
+
* @param {number} request.pageSize
|
|
363
|
+
* Maximum number of schemas to return.
|
|
364
|
+
* @param {string} request.pageToken
|
|
365
|
+
* The value returned by the last `ListSchemasResponse`; indicates that
|
|
366
|
+
* this is a continuation of a prior `ListSchemas` call, and that the
|
|
367
|
+
* system should return the next page of data.
|
|
368
|
+
* @param {object} [options]
|
|
369
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
370
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
371
|
+
* The first element of the array is Array of {@link protos.google.pubsub.v1.Schema|Schema}.
|
|
372
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
373
|
+
* times as needed and will merge results from all the pages into this array.
|
|
374
|
+
* Note that it can affect your quota.
|
|
375
|
+
* We recommend using `listSchemasAsync()`
|
|
376
|
+
* method described below for async iteration which you can stop as needed.
|
|
377
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
378
|
+
* for more details and examples.
|
|
379
|
+
*/
|
|
380
|
+
listSchemas(request?: protos.google.pubsub.v1.IListSchemasRequest, options?: CallOptions): Promise<[
|
|
381
|
+
protos.google.pubsub.v1.ISchema[],
|
|
382
|
+
protos.google.pubsub.v1.IListSchemasRequest | null,
|
|
383
|
+
protos.google.pubsub.v1.IListSchemasResponse
|
|
384
|
+
]>;
|
|
385
|
+
listSchemas(request: protos.google.pubsub.v1.IListSchemasRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListSchemasRequest, protos.google.pubsub.v1.IListSchemasResponse | null | undefined, protos.google.pubsub.v1.ISchema>): void;
|
|
386
|
+
listSchemas(request: protos.google.pubsub.v1.IListSchemasRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListSchemasRequest, protos.google.pubsub.v1.IListSchemasResponse | null | undefined, protos.google.pubsub.v1.ISchema>): void;
|
|
387
|
+
/**
|
|
388
|
+
* Equivalent to `listSchemas`, but returns a NodeJS Stream object.
|
|
389
|
+
* @param {Object} request
|
|
390
|
+
* The request object that will be sent.
|
|
391
|
+
* @param {string} request.parent
|
|
392
|
+
* Required. The name of the project in which to list schemas.
|
|
393
|
+
* Format is `projects/{project-id}`.
|
|
394
|
+
* @param {google.pubsub.v1.SchemaView} request.view
|
|
395
|
+
* The set of Schema fields to return in the response. If not set, returns
|
|
396
|
+
* Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
|
397
|
+
* retrieve all fields.
|
|
398
|
+
* @param {number} request.pageSize
|
|
399
|
+
* Maximum number of schemas to return.
|
|
400
|
+
* @param {string} request.pageToken
|
|
401
|
+
* The value returned by the last `ListSchemasResponse`; indicates that
|
|
402
|
+
* this is a continuation of a prior `ListSchemas` call, and that the
|
|
403
|
+
* system should return the next page of data.
|
|
404
|
+
* @param {object} [options]
|
|
405
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
406
|
+
* @returns {Stream}
|
|
407
|
+
* An object stream which emits an object representing {@link protos.google.pubsub.v1.Schema|Schema} on 'data' event.
|
|
408
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
409
|
+
* times as needed. Note that it can affect your quota.
|
|
410
|
+
* We recommend using `listSchemasAsync()`
|
|
411
|
+
* method described below for async iteration which you can stop as needed.
|
|
412
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
413
|
+
* for more details and examples.
|
|
414
|
+
*/
|
|
415
|
+
listSchemasStream(request?: protos.google.pubsub.v1.IListSchemasRequest, options?: CallOptions): Transform;
|
|
416
|
+
/**
|
|
417
|
+
* Equivalent to `listSchemas`, but returns an iterable object.
|
|
418
|
+
*
|
|
419
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
420
|
+
* @param {Object} request
|
|
421
|
+
* The request object that will be sent.
|
|
422
|
+
* @param {string} request.parent
|
|
423
|
+
* Required. The name of the project in which to list schemas.
|
|
424
|
+
* Format is `projects/{project-id}`.
|
|
425
|
+
* @param {google.pubsub.v1.SchemaView} request.view
|
|
426
|
+
* The set of Schema fields to return in the response. If not set, returns
|
|
427
|
+
* Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
|
428
|
+
* retrieve all fields.
|
|
429
|
+
* @param {number} request.pageSize
|
|
430
|
+
* Maximum number of schemas to return.
|
|
431
|
+
* @param {string} request.pageToken
|
|
432
|
+
* The value returned by the last `ListSchemasResponse`; indicates that
|
|
433
|
+
* this is a continuation of a prior `ListSchemas` call, and that the
|
|
434
|
+
* system should return the next page of data.
|
|
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.pubsub.v1.Schema|Schema}. 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/v1/schema_service.list_schemas.js</caption>
|
|
445
|
+
* region_tag:pubsub_v1_generated_SchemaService_ListSchemas_async
|
|
446
|
+
*/
|
|
447
|
+
listSchemasAsync(request?: protos.google.pubsub.v1.IListSchemasRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ISchema>;
|
|
448
|
+
/**
|
|
449
|
+
* Lists all schema revisions for the named schema.
|
|
450
|
+
*
|
|
451
|
+
* @param {Object} request
|
|
452
|
+
* The request object that will be sent.
|
|
453
|
+
* @param {string} request.name
|
|
454
|
+
* Required. The name of the schema to list revisions for.
|
|
455
|
+
* @param {google.pubsub.v1.SchemaView} request.view
|
|
456
|
+
* The set of Schema fields to return in the response. If not set, returns
|
|
457
|
+
* Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
|
458
|
+
* retrieve all fields.
|
|
459
|
+
* @param {number} request.pageSize
|
|
460
|
+
* The maximum number of revisions to return per page.
|
|
461
|
+
* @param {string} request.pageToken
|
|
462
|
+
* The page token, received from a previous ListSchemaRevisions call.
|
|
463
|
+
* Provide this to retrieve the subsequent page.
|
|
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 {Promise} - The promise which resolves to an array.
|
|
467
|
+
* The first element of the array is Array of {@link protos.google.pubsub.v1.Schema|Schema}.
|
|
468
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
469
|
+
* times as needed and will merge results from all the pages into this array.
|
|
470
|
+
* Note that it can affect your quota.
|
|
471
|
+
* We recommend using `listSchemaRevisionsAsync()`
|
|
472
|
+
* method described below for async iteration which you can stop as needed.
|
|
473
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
474
|
+
* for more details and examples.
|
|
475
|
+
*/
|
|
476
|
+
listSchemaRevisions(request?: protos.google.pubsub.v1.IListSchemaRevisionsRequest, options?: CallOptions): Promise<[
|
|
477
|
+
protos.google.pubsub.v1.ISchema[],
|
|
478
|
+
protos.google.pubsub.v1.IListSchemaRevisionsRequest | null,
|
|
479
|
+
protos.google.pubsub.v1.IListSchemaRevisionsResponse
|
|
480
|
+
]>;
|
|
481
|
+
listSchemaRevisions(request: protos.google.pubsub.v1.IListSchemaRevisionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListSchemaRevisionsRequest, protos.google.pubsub.v1.IListSchemaRevisionsResponse | null | undefined, protos.google.pubsub.v1.ISchema>): void;
|
|
482
|
+
listSchemaRevisions(request: protos.google.pubsub.v1.IListSchemaRevisionsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListSchemaRevisionsRequest, protos.google.pubsub.v1.IListSchemaRevisionsResponse | null | undefined, protos.google.pubsub.v1.ISchema>): void;
|
|
483
|
+
/**
|
|
484
|
+
* Equivalent to `listSchemaRevisions`, but returns a NodeJS Stream object.
|
|
485
|
+
* @param {Object} request
|
|
486
|
+
* The request object that will be sent.
|
|
487
|
+
* @param {string} request.name
|
|
488
|
+
* Required. The name of the schema to list revisions for.
|
|
489
|
+
* @param {google.pubsub.v1.SchemaView} request.view
|
|
490
|
+
* The set of Schema fields to return in the response. If not set, returns
|
|
491
|
+
* Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
|
492
|
+
* retrieve all fields.
|
|
493
|
+
* @param {number} request.pageSize
|
|
494
|
+
* The maximum number of revisions to return per page.
|
|
495
|
+
* @param {string} request.pageToken
|
|
496
|
+
* The page token, received from a previous ListSchemaRevisions call.
|
|
497
|
+
* Provide this to retrieve the subsequent page.
|
|
498
|
+
* @param {object} [options]
|
|
499
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
500
|
+
* @returns {Stream}
|
|
501
|
+
* An object stream which emits an object representing {@link protos.google.pubsub.v1.Schema|Schema} on 'data' event.
|
|
502
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
503
|
+
* times as needed. Note that it can affect your quota.
|
|
504
|
+
* We recommend using `listSchemaRevisionsAsync()`
|
|
505
|
+
* method described below for async iteration which you can stop as needed.
|
|
506
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
507
|
+
* for more details and examples.
|
|
508
|
+
*/
|
|
509
|
+
listSchemaRevisionsStream(request?: protos.google.pubsub.v1.IListSchemaRevisionsRequest, options?: CallOptions): Transform;
|
|
510
|
+
/**
|
|
511
|
+
* Equivalent to `listSchemaRevisions`, but returns an iterable object.
|
|
512
|
+
*
|
|
513
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
514
|
+
* @param {Object} request
|
|
515
|
+
* The request object that will be sent.
|
|
516
|
+
* @param {string} request.name
|
|
517
|
+
* Required. The name of the schema to list revisions for.
|
|
518
|
+
* @param {google.pubsub.v1.SchemaView} request.view
|
|
519
|
+
* The set of Schema fields to return in the response. If not set, returns
|
|
520
|
+
* Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
|
521
|
+
* retrieve all fields.
|
|
522
|
+
* @param {number} request.pageSize
|
|
523
|
+
* The maximum number of revisions to return per page.
|
|
524
|
+
* @param {string} request.pageToken
|
|
525
|
+
* The page token, received from a previous ListSchemaRevisions call.
|
|
526
|
+
* Provide this to retrieve the subsequent page.
|
|
527
|
+
* @param {object} [options]
|
|
528
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
529
|
+
* @returns {Object}
|
|
530
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
531
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
532
|
+
* {@link protos.google.pubsub.v1.Schema|Schema}. The API will be called under the hood as needed, once per the page,
|
|
533
|
+
* so you can stop the iteration when you don't need more results.
|
|
534
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
535
|
+
* for more details and examples.
|
|
536
|
+
* @example <caption>include:samples/generated/v1/schema_service.list_schema_revisions.js</caption>
|
|
537
|
+
* region_tag:pubsub_v1_generated_SchemaService_ListSchemaRevisions_async
|
|
538
|
+
*/
|
|
539
|
+
listSchemaRevisionsAsync(request?: protos.google.pubsub.v1.IListSchemaRevisionsRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ISchema>;
|
|
540
|
+
/**
|
|
541
|
+
* Gets the access control policy for a resource. Returns an empty policy
|
|
542
|
+
* if the resource exists and does not have a policy set.
|
|
543
|
+
*
|
|
544
|
+
* @param {Object} request
|
|
545
|
+
* The request object that will be sent.
|
|
546
|
+
* @param {string} request.resource
|
|
547
|
+
* REQUIRED: The resource for which the policy is being requested.
|
|
548
|
+
* See the operation documentation for the appropriate value for this field.
|
|
549
|
+
* @param {Object} [request.options]
|
|
550
|
+
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
|
551
|
+
* `GetIamPolicy`. This field is only used by Cloud IAM.
|
|
552
|
+
*
|
|
553
|
+
* This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}.
|
|
554
|
+
* @param {Object} [options]
|
|
555
|
+
* Optional parameters. You can override the default settings for this call, e.g, timeout,
|
|
556
|
+
* retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
|
|
557
|
+
* @param {function(?Error, ?Object)} [callback]
|
|
558
|
+
* The function which will be called with the result of the API call.
|
|
559
|
+
*
|
|
560
|
+
* The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}.
|
|
561
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
562
|
+
* The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}.
|
|
563
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
564
|
+
*/
|
|
565
|
+
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]>;
|
|
566
|
+
/**
|
|
567
|
+
* Returns permissions that a caller has on the specified resource. If the
|
|
568
|
+
* resource does not exist, this will return an empty set of
|
|
569
|
+
* permissions, not a NOT_FOUND error.
|
|
570
|
+
*
|
|
571
|
+
* Note: This operation is designed to be used for building
|
|
572
|
+
* permission-aware UIs and command-line tools, not for authorization
|
|
573
|
+
* checking. This operation may "fail open" without warning.
|
|
574
|
+
*
|
|
575
|
+
* @param {Object} request
|
|
576
|
+
* The request object that will be sent.
|
|
577
|
+
* @param {string} request.resource
|
|
578
|
+
* REQUIRED: The resource for which the policy detail is being requested.
|
|
579
|
+
* See the operation documentation for the appropriate value for this field.
|
|
580
|
+
* @param {string[]} request.permissions
|
|
581
|
+
* The set of permissions to check for the `resource`. Permissions with
|
|
582
|
+
* wildcards (such as '*' or 'storage.*') are not allowed. For more
|
|
583
|
+
* information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }.
|
|
584
|
+
* @param {Object} [options]
|
|
585
|
+
* Optional parameters. You can override the default settings for this call, e.g, timeout,
|
|
586
|
+
* retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
|
|
587
|
+
* @param {function(?Error, ?Object)} [callback]
|
|
588
|
+
* The function which will be called with the result of the API call.
|
|
589
|
+
*
|
|
590
|
+
* The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
|
|
591
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
592
|
+
* The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
|
|
593
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
594
|
+
*/
|
|
595
|
+
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]>;
|
|
596
|
+
/**
|
|
597
|
+
* Returns permissions that a caller has on the specified resource. If the
|
|
598
|
+
* resource does not exist, this will return an empty set of
|
|
599
|
+
* permissions, not a NOT_FOUND error.
|
|
600
|
+
*
|
|
601
|
+
* Note: This operation is designed to be used for building
|
|
602
|
+
* permission-aware UIs and command-line tools, not for authorization
|
|
603
|
+
* checking. This operation may "fail open" without warning.
|
|
604
|
+
*
|
|
605
|
+
* @param {Object} request
|
|
606
|
+
* The request object that will be sent.
|
|
607
|
+
* @param {string} request.resource
|
|
608
|
+
* REQUIRED: The resource for which the policy detail is being requested.
|
|
609
|
+
* See the operation documentation for the appropriate value for this field.
|
|
610
|
+
* @param {string[]} request.permissions
|
|
611
|
+
* The set of permissions to check for the `resource`. Permissions with
|
|
612
|
+
* wildcards (such as '*' or 'storage.*') are not allowed. For more
|
|
613
|
+
* information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }.
|
|
614
|
+
* @param {Object} [options]
|
|
615
|
+
* Optional parameters. You can override the default settings for this call, e.g, timeout,
|
|
616
|
+
* retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
|
|
617
|
+
* @param {function(?Error, ?Object)} [callback]
|
|
618
|
+
* The function which will be called with the result of the API call.
|
|
619
|
+
*
|
|
620
|
+
* The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
|
|
621
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
622
|
+
* The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
|
|
623
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
624
|
+
*
|
|
625
|
+
*/
|
|
626
|
+
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]>;
|
|
627
|
+
/**
|
|
628
|
+
* Return a fully-qualified project resource name string.
|
|
629
|
+
*
|
|
630
|
+
* @param {string} project
|
|
631
|
+
* @returns {string} Resource name string.
|
|
632
|
+
*/
|
|
633
|
+
projectPath(project: string): string;
|
|
634
|
+
/**
|
|
635
|
+
* Parse the project from Project resource.
|
|
636
|
+
*
|
|
637
|
+
* @param {string} projectName
|
|
638
|
+
* A fully-qualified path representing Project resource.
|
|
639
|
+
* @returns {string} A string representing the project.
|
|
640
|
+
*/
|
|
641
|
+
matchProjectFromProjectName(projectName: string): string | number;
|
|
642
|
+
/**
|
|
643
|
+
* Return a fully-qualified projectTopics resource name string.
|
|
644
|
+
*
|
|
645
|
+
* @param {string} project
|
|
646
|
+
* @param {string} topic
|
|
647
|
+
* @returns {string} Resource name string.
|
|
648
|
+
*/
|
|
649
|
+
projectTopicsPath(project: string, topic: string): string;
|
|
650
|
+
/**
|
|
651
|
+
* Parse the project from ProjectTopics resource.
|
|
652
|
+
*
|
|
653
|
+
* @param {string} projectTopicsName
|
|
654
|
+
* A fully-qualified path representing project_topics resource.
|
|
655
|
+
* @returns {string} A string representing the project.
|
|
656
|
+
*/
|
|
657
|
+
matchProjectFromProjectTopicsName(projectTopicsName: string): string | number;
|
|
658
|
+
/**
|
|
659
|
+
* Parse the topic from ProjectTopics resource.
|
|
660
|
+
*
|
|
661
|
+
* @param {string} projectTopicsName
|
|
662
|
+
* A fully-qualified path representing project_topics resource.
|
|
663
|
+
* @returns {string} A string representing the topic.
|
|
664
|
+
*/
|
|
665
|
+
matchTopicFromProjectTopicsName(projectTopicsName: string): string | number;
|
|
666
|
+
/**
|
|
667
|
+
* Return a fully-qualified schema resource name string.
|
|
668
|
+
*
|
|
669
|
+
* @param {string} project
|
|
670
|
+
* @param {string} schema
|
|
671
|
+
* @returns {string} Resource name string.
|
|
672
|
+
*/
|
|
673
|
+
schemaPath(project: string, schema: string): string;
|
|
674
|
+
/**
|
|
675
|
+
* Parse the project from Schema resource.
|
|
676
|
+
*
|
|
677
|
+
* @param {string} schemaName
|
|
678
|
+
* A fully-qualified path representing Schema resource.
|
|
679
|
+
* @returns {string} A string representing the project.
|
|
680
|
+
*/
|
|
681
|
+
matchProjectFromSchemaName(schemaName: string): string | number;
|
|
682
|
+
/**
|
|
683
|
+
* Parse the schema from Schema resource.
|
|
684
|
+
*
|
|
685
|
+
* @param {string} schemaName
|
|
686
|
+
* A fully-qualified path representing Schema resource.
|
|
687
|
+
* @returns {string} A string representing the schema.
|
|
688
|
+
*/
|
|
689
|
+
matchSchemaFromSchemaName(schemaName: string): string | number;
|
|
690
|
+
/**
|
|
691
|
+
* Return a fully-qualified snapshot resource name string.
|
|
692
|
+
*
|
|
693
|
+
* @param {string} project
|
|
694
|
+
* @param {string} snapshot
|
|
695
|
+
* @returns {string} Resource name string.
|
|
696
|
+
*/
|
|
697
|
+
snapshotPath(project: string, snapshot: string): string;
|
|
698
|
+
/**
|
|
699
|
+
* Parse the project from Snapshot resource.
|
|
700
|
+
*
|
|
701
|
+
* @param {string} snapshotName
|
|
702
|
+
* A fully-qualified path representing Snapshot resource.
|
|
703
|
+
* @returns {string} A string representing the project.
|
|
704
|
+
*/
|
|
705
|
+
matchProjectFromSnapshotName(snapshotName: string): string | number;
|
|
706
|
+
/**
|
|
707
|
+
* Parse the snapshot from Snapshot resource.
|
|
708
|
+
*
|
|
709
|
+
* @param {string} snapshotName
|
|
710
|
+
* A fully-qualified path representing Snapshot resource.
|
|
711
|
+
* @returns {string} A string representing the snapshot.
|
|
712
|
+
*/
|
|
713
|
+
matchSnapshotFromSnapshotName(snapshotName: string): string | number;
|
|
714
|
+
/**
|
|
715
|
+
* Return a fully-qualified subscription resource name string.
|
|
716
|
+
*
|
|
717
|
+
* @param {string} project
|
|
718
|
+
* @param {string} subscription
|
|
719
|
+
* @returns {string} Resource name string.
|
|
720
|
+
*/
|
|
721
|
+
subscriptionPath(project: string, subscription: string): string;
|
|
722
|
+
/**
|
|
723
|
+
* Parse the project from Subscription resource.
|
|
724
|
+
*
|
|
725
|
+
* @param {string} subscriptionName
|
|
726
|
+
* A fully-qualified path representing Subscription resource.
|
|
727
|
+
* @returns {string} A string representing the project.
|
|
728
|
+
*/
|
|
729
|
+
matchProjectFromSubscriptionName(subscriptionName: string): string | number;
|
|
730
|
+
/**
|
|
731
|
+
* Parse the subscription from Subscription resource.
|
|
732
|
+
*
|
|
733
|
+
* @param {string} subscriptionName
|
|
734
|
+
* A fully-qualified path representing Subscription resource.
|
|
735
|
+
* @returns {string} A string representing the subscription.
|
|
736
|
+
*/
|
|
737
|
+
matchSubscriptionFromSubscriptionName(subscriptionName: string): string | number;
|
|
738
|
+
/**
|
|
739
|
+
* Terminate the gRPC channel and close the client.
|
|
740
|
+
*
|
|
741
|
+
* The client will no longer be usable and all future behavior is undefined.
|
|
742
|
+
* @returns {Promise} A promise that resolves when the client is closed.
|
|
743
|
+
*/
|
|
744
|
+
close(): Promise<void>;
|
|
745
|
+
}
|