1 | import * as gax from './gax';
|
2 | import { GrpcClient } from './grpc';
|
3 | import { GrpcClient as FallbackGrpcClient } from './fallback';
|
4 | import { GoogleAuth, OAuth2Client } from 'google-auth-library';
|
5 | import { ProjectIdCallback } from 'google-auth-library/build/src/auth/googleauth';
|
6 | import * as protos from '../protos/iam_service';
|
7 | import { Descriptors, ClientOptions, Callback } from './clientInterface';
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare class IamClient {
|
13 | private _terminated;
|
14 | private _opts;
|
15 | private _defaults;
|
16 | private _protos;
|
17 | private _gaxGrpc;
|
18 | auth?: GoogleAuth | OAuth2Client;
|
19 | descriptors: Descriptors;
|
20 | innerApiCalls: {
|
21 | [name: string]: Function;
|
22 | };
|
23 | iamPolicyStub?: Promise<{
|
24 | [name: string]: Function;
|
25 | }>;
|
26 | gaxGrpc: GrpcClient | FallbackGrpcClient;
|
27 | constructor(gaxGrpc: GrpcClient | FallbackGrpcClient, options: ClientOptions);
|
28 | /**
|
29 | * Initialize the client.
|
30 | * Performs asynchronous operations (such as authentication) and prepares the client.
|
31 | * This function will be called automatically when any class method is called for the
|
32 | * first time, but if you need to initialize it before calling an actual method,
|
33 | * feel free to call initialize() directly.
|
34 | *
|
35 | * You can await on this method if you want to make sure the client is initialized.
|
36 | *
|
37 | * @returns {Promise} A promise that resolves to an authenticated service stub.
|
38 | */
|
39 | initialize(): Promise<{
|
40 | [name: string]: Function;
|
41 | }>;
|
42 | |
43 |
|
44 |
|
45 | static get servicePath(): string;
|
46 | |
47 |
|
48 |
|
49 |
|
50 | static get apiEndpoint(): string;
|
51 | |
52 |
|
53 |
|
54 | static get port(): number;
|
55 | |
56 |
|
57 |
|
58 |
|
59 | static get scopes(): string[];
|
60 | |
61 |
|
62 |
|
63 |
|
64 |
|
65 | getProjectId(): Promise<string>;
|
66 | getProjectId(callback: ProjectIdCallback): void;
|
67 | getIamPolicy(request: protos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions): Promise<protos.google.iam.v1.Policy>;
|
68 | getIamPolicy(request: protos.google.iam.v1.GetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.Policy, protos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
|
69 | getIamPolicy(request: protos.google.iam.v1.GetIamPolicyRequest, callback: Callback<protos.google.iam.v1.Policy, protos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
|
70 | setIamPolicy(request: protos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions): Promise<protos.google.iam.v1.Policy>;
|
71 | setIamPolicy(request: protos.google.iam.v1.SetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.Policy, protos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
|
72 | setIamPolicy(request: protos.google.iam.v1.SetIamPolicyRequest, callback: Callback<protos.google.iam.v1.Policy, protos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
|
73 | testIamPermissions(request: protos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions): Promise<protos.google.iam.v1.TestIamPermissionsResponse>;
|
74 | testIamPermissions(request: protos.google.iam.v1.TestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.TestIamPermissionsResponse, protos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
|
75 | testIamPermissions(request: protos.google.iam.v1.TestIamPermissionsRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.TestIamPermissionsResponse, protos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
|
76 | |
77 |
|
78 |
|
79 |
|
80 |
|
81 | close(): Promise<void>;
|
82 | }
|
83 | export interface IamClient {
|
84 | getIamPolicy(request: protos.google.iam.v1.GetIamPolicyRequest): void;
|
85 | getIamPolicy(request: protos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<protos.google.iam.v1.Policy, protos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<protos.google.iam.v1.Policy, protos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<protos.google.iam.v1.Policy>;
|
86 | setIamPolicy(request: protos.google.iam.v1.SetIamPolicyRequest): void;
|
87 | setIamPolicy(request: protos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<protos.google.iam.v1.Policy, protos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<protos.google.iam.v1.Policy, protos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<protos.google.iam.v1.Policy>;
|
88 | testIamPermissions(request: protos.google.iam.v1.TestIamPermissionsRequest): void;
|
89 | testIamPermissions(request: protos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<protos.google.iam.v1.TestIamPermissionsResponse, protos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<protos.google.iam.v1.TestIamPermissionsResponse, protos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<protos.google.iam.v1.TestIamPermissionsResponse>;
|
90 | }
|