1 | /// <reference types="node" />
|
2 | import * as gax from 'google-gax';
|
3 | import { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, IamClient, IamProtos } from 'google-gax';
|
4 | import { Transform } from 'stream';
|
5 | import * as protos from '../../protos/protos';
|
6 | /**
|
7 | * Service for doing schema-related operations.
|
8 | * @class
|
9 | * @memberof v1
|
10 | */
|
11 | export declare class SchemaServiceClient {
|
12 | private _terminated;
|
13 | private _opts;
|
14 | private _providedCustomServicePath;
|
15 | private _gaxModule;
|
16 | private _gaxGrpc;
|
17 | private _protos;
|
18 | private _defaults;
|
19 | auth: gax.GoogleAuth;
|
20 | descriptors: Descriptors;
|
21 | warn: (code: string, message: string, warnType?: string) => void;
|
22 | innerApiCalls: {
|
23 | [name: string]: Function;
|
24 | };
|
25 | iamClient: IamClient;
|
26 | pathTemplates: {
|
27 | [name: string]: gax.PathTemplate;
|
28 | };
|
29 | schemaServiceStub?: Promise<{
|
30 | [name: string]: Function;
|
31 | }>;
|
32 | /**
|
33 | * Construct an instance of SchemaServiceClient.
|
34 | *
|
35 | * @param {object} [options] - The configuration object.
|
36 | * The options accepted by the constructor are described in detail
|
37 | * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
|
38 | * The common options are:
|
39 | * @param {object} [options.credentials] - Credentials object.
|
40 | * @param {string} [options.credentials.client_email]
|
41 | * @param {string} [options.credentials.private_key]
|
42 | * @param {string} [options.email] - Account email address. Required when
|
43 | * using a .pem or .p12 keyFilename.
|
44 | * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
|
45 | * .p12 key downloaded from the Google Developers Console. If you provide
|
46 | * a path to a JSON file, the projectId option below is not necessary.
|
47 | * NOTE: .pem and .p12 require you to specify options.email as well.
|
48 | * @param {number} [options.port] - The port on which to connect to
|
49 | * the remote host.
|
50 | * @param {string} [options.projectId] - The project ID from the Google
|
51 | * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
|
52 | * the environment variable GCLOUD_PROJECT for your project ID. If your
|
53 | * app is running in an environment which supports
|
54 | * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
|
55 | * your project ID will be detected automatically.
|
56 | * @param {string} [options.apiEndpoint] - The domain name of the
|
57 | * API remote host.
|
58 | * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
59 | * Follows the structure of {@link gapicConfig}.
|
60 | * @param {boolean} [options.fallback] - Use HTTP fallback mode.
|
61 | * In fallback mode, a special browser-compatible transport implementation is used
|
62 | * instead of gRPC transport. In browser context (if the `window` object is defined)
|
63 | * the fallback mode is enabled automatically; set `options.fallback` to `false`
|
64 | * if you need to override this behavior.
|
65 | */
|
66 | constructor(opts?: ClientOptions);
|
67 | /**
|
68 | * Initialize the client.
|
69 | * Performs asynchronous operations (such as authentication) and prepares the client.
|
70 | * This function will be called automatically when any class method is called for the
|
71 | * first time, but if you need to initialize it before calling an actual method,
|
72 | * feel free to call initialize() directly.
|
73 | *
|
74 | * You can await on this method if you want to make sure the client is initialized.
|
75 | *
|
76 | * @returns {Promise} A promise that resolves to an authenticated service stub.
|
77 | */
|
78 | initialize(): Promise<{
|
79 | [name: string]: Function;
|
80 | }>;
|
81 | /**
|
82 | * The DNS address for this API service.
|
83 | * @returns {string} The DNS address for this service.
|
84 | */
|
85 | static get servicePath(): string;
|
86 | /**
|
87 | * The DNS address for this API service - same as servicePath(),
|
88 | * exists for compatibility reasons.
|
89 | * @returns {string} The DNS address for this service.
|
90 | */
|
91 | static get apiEndpoint(): string;
|
92 | /**
|
93 | * The port for this API service.
|
94 | * @returns {number} The default port for this service.
|
95 | */
|
96 | static get port(): number;
|
97 | /**
|
98 | * The scopes needed to make gRPC calls for every method defined
|
99 | * in this service.
|
100 | * @returns {string[]} List of default scopes.
|
101 | */
|
102 | static get scopes(): string[];
|
103 | getProjectId(): Promise<string>;
|
104 | getProjectId(callback: Callback<string, undefined, undefined>): void;
|
105 | /**
|
106 | * Creates a schema.
|
107 | *
|
108 | * @param {Object} request
|
109 | * The request object that will be sent.
|
110 | * @param {string} request.parent
|
111 | * Required. The name of the project in which to create the schema.
|
112 | * Format is `projects/{project-id}`.
|
113 | * @param {google.pubsub.v1.Schema} request.schema
|
114 | * Required. The schema object to create.
|
115 | *
|
116 | * This schema's `name` parameter is ignored. The schema object returned
|
117 | * by CreateSchema will have a `name` made using the given `parent` and
|
118 | * `schema_id`.
|
119 | * @param {string} request.schemaId
|
120 | * The ID to use for the schema, which will become the final component of
|
121 | * the schema's resource name.
|
122 | *
|
123 | * See https://cloud.google.com/pubsub/docs/admin#resource_names for resource
|
124 | * name constraints.
|
125 | * @param {object} [options]
|
126 | * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
127 | * @returns {Promise} - The promise which resolves to an array.
|
128 | * The first element of the array is an object representing [Schema]{@link google.pubsub.v1.Schema}.
|
129 | * Please see the
|
130 | * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
131 | * for more details and examples.
|
132 | * @example <caption>include:samples/generated/v1/schema_service.create_schema.js</caption>
|
133 | * region_tag:pubsub_v1_generated_SchemaService_CreateSchema_async
|
134 | */
|
135 | createSchema(request?: protos.google.pubsub.v1.ICreateSchemaRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICreateSchemaRequest | undefined, {} | undefined]>;
|
136 | 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;
|
137 | createSchema(request: protos.google.pubsub.v1.ICreateSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICreateSchemaRequest | null | undefined, {} | null | undefined>): void;
|
138 | /**
|
139 | * Gets a schema.
|
140 | *
|
141 | * @param {Object} request
|
142 | * The request object that will be sent.
|
143 | * @param {string} request.name
|
144 | * Required. The name of the schema to get.
|
145 | * Format is `projects/{project}/schemas/{schema}`.
|
146 | * @param {google.pubsub.v1.SchemaView} request.view
|
147 | * The set of fields to return in the response. If not set, returns a Schema
|
148 | * with `name` and `type`, but not `definition`. Set to `FULL` to retrieve all
|
149 | * fields.
|
150 | * @param {object} [options]
|
151 | * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
152 | * @returns {Promise} - The promise which resolves to an array.
|
153 | * The first element of the array is an object representing [Schema]{@link google.pubsub.v1.Schema}.
|
154 | * Please see the
|
155 | * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
156 | * for more details and examples.
|
157 | * @example <caption>include:samples/generated/v1/schema_service.get_schema.js</caption>
|
158 | * region_tag:pubsub_v1_generated_SchemaService_GetSchema_async
|
159 | */
|
160 | getSchema(request?: protos.google.pubsub.v1.IGetSchemaRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IGetSchemaRequest | undefined, {} | undefined]>;
|
161 | 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;
|
162 | getSchema(request: protos.google.pubsub.v1.IGetSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IGetSchemaRequest | null | undefined, {} | null | undefined>): void;
|
163 | /**
|
164 | * Deletes a schema.
|
165 | *
|
166 | * @param {Object} request
|
167 | * The request object that will be sent.
|
168 | * @param {string} request.name
|
169 | * Required. Name of the schema to delete.
|
170 | * Format is `projects/{project}/schemas/{schema}`.
|
171 | * @param {object} [options]
|
172 | * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
173 | * @returns {Promise} - The promise which resolves to an array.
|
174 | * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
|
175 | * Please see the
|
176 | * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
177 | * for more details and examples.
|
178 | * @example <caption>include:samples/generated/v1/schema_service.delete_schema.js</caption>
|
179 | * region_tag:pubsub_v1_generated_SchemaService_DeleteSchema_async
|
180 | */
|
181 | deleteSchema(request?: protos.google.pubsub.v1.IDeleteSchemaRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSchemaRequest | undefined, {} | undefined]>;
|
182 | 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;
|
183 | deleteSchema(request: protos.google.pubsub.v1.IDeleteSchemaRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSchemaRequest | null | undefined, {} | null | undefined>): void;
|
184 | /**
|
185 | * Validates a schema.
|
186 | *
|
187 | * @param {Object} request
|
188 | * The request object that will be sent.
|
189 | * @param {string} request.parent
|
190 | * Required. The name of the project in which to validate schemas.
|
191 | * Format is `projects/{project-id}`.
|
192 | * @param {google.pubsub.v1.Schema} request.schema
|
193 | * Required. The schema object to validate.
|
194 | * @param {object} [options]
|
195 | * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
196 | * @returns {Promise} - The promise which resolves to an array.
|
197 | * The first element of the array is an object representing [ValidateSchemaResponse]{@link google.pubsub.v1.ValidateSchemaResponse}.
|
198 | * Please see the
|
199 | * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
200 | * for more details and examples.
|
201 | * @example <caption>include:samples/generated/v1/schema_service.validate_schema.js</caption>
|
202 | * region_tag:pubsub_v1_generated_SchemaService_ValidateSchema_async
|
203 | */
|
204 | validateSchema(request?: protos.google.pubsub.v1.IValidateSchemaRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.IValidateSchemaResponse, protos.google.pubsub.v1.IValidateSchemaRequest | undefined, {} | undefined]>;
|
205 | 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;
|
206 | validateSchema(request: protos.google.pubsub.v1.IValidateSchemaRequest, callback: Callback<protos.google.pubsub.v1.IValidateSchemaResponse, protos.google.pubsub.v1.IValidateSchemaRequest | null | undefined, {} | null | undefined>): void;
|
207 | /**
|
208 | * Validates a message against a schema.
|
209 | *
|
210 | * @param {Object} request
|
211 | * The request object that will be sent.
|
212 | * @param {string} request.parent
|
213 | * Required. The name of the project in which to validate schemas.
|
214 | * Format is `projects/{project-id}`.
|
215 | * @param {string} request.name
|
216 | * Name of the schema against which to validate.
|
217 | *
|
218 | * Format is `projects/{project}/schemas/{schema}`.
|
219 | * @param {google.pubsub.v1.Schema} request.schema
|
220 | * Ad-hoc schema against which to validate
|
221 | * @param {Buffer} request.message
|
222 | * Message to validate against the provided `schema_spec`.
|
223 | * @param {google.pubsub.v1.Encoding} request.encoding
|
224 | * The encoding expected for messages
|
225 | * @param {object} [options]
|
226 | * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
227 | * @returns {Promise} - The promise which resolves to an array.
|
228 | * The first element of the array is an object representing [ValidateMessageResponse]{@link google.pubsub.v1.ValidateMessageResponse}.
|
229 | * Please see the
|
230 | * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
231 | * for more details and examples.
|
232 | * @example <caption>include:samples/generated/v1/schema_service.validate_message.js</caption>
|
233 | * region_tag:pubsub_v1_generated_SchemaService_ValidateMessage_async
|
234 | */
|
235 | validateMessage(request?: protos.google.pubsub.v1.IValidateMessageRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.IValidateMessageResponse, protos.google.pubsub.v1.IValidateMessageRequest | undefined, {} | undefined]>;
|
236 | 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;
|
237 | validateMessage(request: protos.google.pubsub.v1.IValidateMessageRequest, callback: Callback<protos.google.pubsub.v1.IValidateMessageResponse, protos.google.pubsub.v1.IValidateMessageRequest | null | undefined, {} | null | undefined>): void;
|
238 | /**
|
239 | * Lists schemas in a project.
|
240 | *
|
241 | * @param {Object} request
|
242 | * The request object that will be sent.
|
243 | * @param {string} request.parent
|
244 | * Required. The name of the project in which to list schemas.
|
245 | * Format is `projects/{project-id}`.
|
246 | * @param {google.pubsub.v1.SchemaView} request.view
|
247 | * The set of Schema fields to return in the response. If not set, returns
|
248 | * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
249 | * retrieve all fields.
|
250 | * @param {number} request.pageSize
|
251 | * Maximum number of schemas to return.
|
252 | * @param {string} request.pageToken
|
253 | * The value returned by the last `ListSchemasResponse`; indicates that
|
254 | * this is a continuation of a prior `ListSchemas` call, and that the
|
255 | * system should return the next page of data.
|
256 | * @param {object} [options]
|
257 | * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
258 | * @returns {Promise} - The promise which resolves to an array.
|
259 | * The first element of the array is Array of [Schema]{@link google.pubsub.v1.Schema}.
|
260 | * The client library will perform auto-pagination by default: it will call the API as many
|
261 | * times as needed and will merge results from all the pages into this array.
|
262 | * Note that it can affect your quota.
|
263 | * We recommend using `listSchemasAsync()`
|
264 | * method described below for async iteration which you can stop as needed.
|
265 | * Please see the
|
266 | * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
267 | * for more details and examples.
|
268 | */
|
269 | listSchemas(request?: protos.google.pubsub.v1.IListSchemasRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISchema[], protos.google.pubsub.v1.IListSchemasRequest | null, protos.google.pubsub.v1.IListSchemasResponse]>;
|
270 | 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;
|
271 | 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;
|
272 | /**
|
273 | * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
274 | * @param {Object} request
|
275 | * The request object that will be sent.
|
276 | * @param {string} request.parent
|
277 | * Required. The name of the project in which to list schemas.
|
278 | * Format is `projects/{project-id}`.
|
279 | * @param {google.pubsub.v1.SchemaView} request.view
|
280 | * The set of Schema fields to return in the response. If not set, returns
|
281 | * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
282 | * retrieve all fields.
|
283 | * @param {number} request.pageSize
|
284 | * Maximum number of schemas to return.
|
285 | * @param {string} request.pageToken
|
286 | * The value returned by the last `ListSchemasResponse`; indicates that
|
287 | * this is a continuation of a prior `ListSchemas` call, and that the
|
288 | * system should return the next page of data.
|
289 | * @param {object} [options]
|
290 | * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
291 | * @returns {Stream}
|
292 | * An object stream which emits an object representing [Schema]{@link google.pubsub.v1.Schema} on 'data' event.
|
293 | * The client library will perform auto-pagination by default: it will call the API as many
|
294 | * times as needed. Note that it can affect your quota.
|
295 | * We recommend using `listSchemasAsync()`
|
296 | * method described below for async iteration which you can stop as needed.
|
297 | * Please see the
|
298 | * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
299 | * for more details and examples.
|
300 | */
|
301 | listSchemasStream(request?: protos.google.pubsub.v1.IListSchemasRequest, options?: CallOptions): Transform;
|
302 | /**
|
303 | * Equivalent to `listSchemas`, but returns an iterable object.
|
304 | *
|
305 | * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
306 | * @param {Object} request
|
307 | * The request object that will be sent.
|
308 | * @param {string} request.parent
|
309 | * Required. The name of the project in which to list schemas.
|
310 | * Format is `projects/{project-id}`.
|
311 | * @param {google.pubsub.v1.SchemaView} request.view
|
312 | * The set of Schema fields to return in the response. If not set, returns
|
313 | * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
314 | * retrieve all fields.
|
315 | * @param {number} request.pageSize
|
316 | * Maximum number of schemas to return.
|
317 | * @param {string} request.pageToken
|
318 | * The value returned by the last `ListSchemasResponse`; indicates that
|
319 | * this is a continuation of a prior `ListSchemas` call, and that the
|
320 | * system should return the next page of data.
|
321 | * @param {object} [options]
|
322 | * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
323 | * @returns {Object}
|
324 | * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
|
325 | * When you iterate the returned iterable, each element will be an object representing
|
326 | * [Schema]{@link google.pubsub.v1.Schema}. The API will be called under the hood as needed, once per the page,
|
327 | * so you can stop the iteration when you don't need more results.
|
328 | * Please see the
|
329 | * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
330 | * for more details and examples.
|
331 | * @example <caption>include:samples/generated/v1/schema_service.list_schemas.js</caption>
|
332 | * region_tag:pubsub_v1_generated_SchemaService_ListSchemas_async
|
333 | */
|
334 | listSchemasAsync(request?: protos.google.pubsub.v1.IListSchemasRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ISchema>;
|
335 | /**
|
336 | * Gets the access control policy for a resource. Returns an empty policy
|
337 | * if the resource exists and does not have a policy set.
|
338 | *
|
339 | * @param {Object} request
|
340 | * The request object that will be sent.
|
341 | * @param {string} request.resource
|
342 | * REQUIRED: The resource for which the policy is being requested.
|
343 | * See the operation documentation for the appropriate value for this field.
|
344 | * @param {Object} [request.options]
|
345 | * OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
346 | * `GetIamPolicy`. This field is only used by Cloud IAM.
|
347 | *
|
348 | * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions}
|
349 | * @param {Object} [options]
|
350 | * Optional parameters. You can override the default settings for this call, e.g, timeout,
|
351 | * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
|
352 | * @param {function(?Error, ?Object)} [callback]
|
353 | * The function which will be called with the result of the API call.
|
354 | *
|
355 | * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}.
|
356 | * @returns {Promise} - The promise which resolves to an array.
|
357 | * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}.
|
358 | * The promise has a method named "cancel" which cancels the ongoing API call.
|
359 | */
|
360 | 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>;
|
361 | /**
|
362 | * Returns permissions that a caller has on the specified resource. If the
|
363 | * resource does not exist, this will return an empty set of
|
364 | * permissions, not a NOT_FOUND error.
|
365 | *
|
366 | * Note: This operation is designed to be used for building
|
367 | * permission-aware UIs and command-line tools, not for authorization
|
368 | * checking. This operation may "fail open" without warning.
|
369 | *
|
370 | * @param {Object} request
|
371 | * The request object that will be sent.
|
372 | * @param {string} request.resource
|
373 | * REQUIRED: The resource for which the policy detail is being requested.
|
374 | * See the operation documentation for the appropriate value for this field.
|
375 | * @param {string[]} request.permissions
|
376 | * The set of permissions to check for the `resource`. Permissions with
|
377 | * wildcards (such as '*' or 'storage.*') are not allowed. For more
|
378 | * information see
|
379 | * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
380 | * @param {Object} [options]
|
381 | * Optional parameters. You can override the default settings for this call, e.g, timeout,
|
382 | * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
|
383 | * @param {function(?Error, ?Object)} [callback]
|
384 | * The function which will be called with the result of the API call.
|
385 | *
|
386 | * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}.
|
387 | * @returns {Promise} - The promise which resolves to an array.
|
388 | * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}.
|
389 | * The promise has a method named "cancel" which cancels the ongoing API call.
|
390 | */
|
391 | 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>;
|
392 | /**
|
393 | * Returns permissions that a caller has on the specified resource. If the
|
394 | * resource does not exist, this will return an empty set of
|
395 | * permissions, not a NOT_FOUND error.
|
396 | *
|
397 | * Note: This operation is designed to be used for building
|
398 | * permission-aware UIs and command-line tools, not for authorization
|
399 | * checking. This operation may "fail open" without warning.
|
400 | *
|
401 | * @param {Object} request
|
402 | * The request object that will be sent.
|
403 | * @param {string} request.resource
|
404 | * REQUIRED: The resource for which the policy detail is being requested.
|
405 | * See the operation documentation for the appropriate value for this field.
|
406 | * @param {string[]} request.permissions
|
407 | * The set of permissions to check for the `resource`. Permissions with
|
408 | * wildcards (such as '*' or 'storage.*') are not allowed. For more
|
409 | * information see
|
410 | * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
411 | * @param {Object} [options]
|
412 | * Optional parameters. You can override the default settings for this call, e.g, timeout,
|
413 | * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
|
414 | * @param {function(?Error, ?Object)} [callback]
|
415 | * The function which will be called with the result of the API call.
|
416 | *
|
417 | * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}.
|
418 | * @returns {Promise} - The promise which resolves to an array.
|
419 | * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}.
|
420 | * The promise has a method named "cancel" which cancels the ongoing API call.
|
421 | *
|
422 | */
|
423 | 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>;
|
424 | /**
|
425 | * Return a fully-qualified project resource name string.
|
426 | *
|
427 | * @param {string} project
|
428 | * @returns {string} Resource name string.
|
429 | */
|
430 | projectPath(project: string): string;
|
431 | /**
|
432 | * Parse the project from Project resource.
|
433 | *
|
434 | * @param {string} projectName
|
435 | * A fully-qualified path representing Project resource.
|
436 | * @returns {string} A string representing the project.
|
437 | */
|
438 | matchProjectFromProjectName(projectName: string): string | number;
|
439 | /**
|
440 | * Return a fully-qualified projectTopic resource name string.
|
441 | *
|
442 | * @param {string} project
|
443 | * @param {string} topic
|
444 | * @returns {string} Resource name string.
|
445 | */
|
446 | projectTopicPath(project: string, topic: string): string;
|
447 | /**
|
448 | * Parse the project from ProjectTopic resource.
|
449 | *
|
450 | * @param {string} projectTopicName
|
451 | * A fully-qualified path representing project_topic resource.
|
452 | * @returns {string} A string representing the project.
|
453 | */
|
454 | matchProjectFromProjectTopicName(projectTopicName: string): string | number;
|
455 | /**
|
456 | * Parse the topic from ProjectTopic resource.
|
457 | *
|
458 | * @param {string} projectTopicName
|
459 | * A fully-qualified path representing project_topic resource.
|
460 | * @returns {string} A string representing the topic.
|
461 | */
|
462 | matchTopicFromProjectTopicName(projectTopicName: string): string | number;
|
463 | /**
|
464 | * Return a fully-qualified schema resource name string.
|
465 | *
|
466 | * @param {string} project
|
467 | * @param {string} schema
|
468 | * @returns {string} Resource name string.
|
469 | */
|
470 | schemaPath(project: string, schema: string): string;
|
471 | /**
|
472 | * Parse the project from Schema resource.
|
473 | *
|
474 | * @param {string} schemaName
|
475 | * A fully-qualified path representing Schema resource.
|
476 | * @returns {string} A string representing the project.
|
477 | */
|
478 | matchProjectFromSchemaName(schemaName: string): string | number;
|
479 | /**
|
480 | * Parse the schema from Schema resource.
|
481 | *
|
482 | * @param {string} schemaName
|
483 | * A fully-qualified path representing Schema resource.
|
484 | * @returns {string} A string representing the schema.
|
485 | */
|
486 | matchSchemaFromSchemaName(schemaName: string): string | number;
|
487 | /**
|
488 | * Return a fully-qualified snapshot resource name string.
|
489 | *
|
490 | * @param {string} project
|
491 | * @param {string} snapshot
|
492 | * @returns {string} Resource name string.
|
493 | */
|
494 | snapshotPath(project: string, snapshot: string): string;
|
495 | /**
|
496 | * Parse the project from Snapshot resource.
|
497 | *
|
498 | * @param {string} snapshotName
|
499 | * A fully-qualified path representing Snapshot resource.
|
500 | * @returns {string} A string representing the project.
|
501 | */
|
502 | matchProjectFromSnapshotName(snapshotName: string): string | number;
|
503 | /**
|
504 | * Parse the snapshot from Snapshot resource.
|
505 | *
|
506 | * @param {string} snapshotName
|
507 | * A fully-qualified path representing Snapshot resource.
|
508 | * @returns {string} A string representing the snapshot.
|
509 | */
|
510 | matchSnapshotFromSnapshotName(snapshotName: string): string | number;
|
511 | /**
|
512 | * Return a fully-qualified subscription resource name string.
|
513 | *
|
514 | * @param {string} project
|
515 | * @param {string} subscription
|
516 | * @returns {string} Resource name string.
|
517 | */
|
518 | subscriptionPath(project: string, subscription: string): string;
|
519 | /**
|
520 | * Parse the project from Subscription resource.
|
521 | *
|
522 | * @param {string} subscriptionName
|
523 | * A fully-qualified path representing Subscription resource.
|
524 | * @returns {string} A string representing the project.
|
525 | */
|
526 | matchProjectFromSubscriptionName(subscriptionName: string): string | number;
|
527 | /**
|
528 | * Parse the subscription from Subscription resource.
|
529 | *
|
530 | * @param {string} subscriptionName
|
531 | * A fully-qualified path representing Subscription resource.
|
532 | * @returns {string} A string representing the subscription.
|
533 | */
|
534 | matchSubscriptionFromSubscriptionName(subscriptionName: string): string | number;
|
535 | /**
|
536 | * Terminate the gRPC channel and close the client.
|
537 | *
|
538 | * The client will no longer be usable and all future behavior is undefined.
|
539 | * @returns {Promise} A promise that resolves when the client is closed.
|
540 | */
|
541 | close(): Promise<void>;
|
542 | }
|