1 | import * as gax from './gax';
|
2 | import { GrpcClient } from './grpc';
|
3 | import { GrpcClient as FallbackGrpcClient } from './fallback';
|
4 | import { GoogleAuth } from 'google-auth-library';
|
5 | import * as protos from '../protos/locations';
|
6 | import { Descriptors, ClientOptions, Callback, PaginationCallback } from './clientInterface';
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export declare class LocationsClient {
|
12 | private _terminated;
|
13 | private _opts;
|
14 | private _providedCustomServicePath;
|
15 | private _gaxGrpc;
|
16 | private _protos;
|
17 | private _defaults;
|
18 | auth: GoogleAuth;
|
19 | descriptors: Descriptors;
|
20 | warn: (code: string, message: string, warnType?: string) => void;
|
21 | innerApiCalls: {
|
22 | [name: string]: Function;
|
23 | };
|
24 | locationsStub?: Promise<{
|
25 | [name: string]: Function;
|
26 | }>;
|
27 | gaxGrpc: GrpcClient | FallbackGrpcClient;
|
28 | PageDescriptor: any;
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | constructor(gaxGrpc: GrpcClient | FallbackGrpcClient, opts: ClientOptions);
|
64 | /**
|
65 | * Initialize the client.
|
66 | * Performs asynchronous operations (such as authentication) and prepares the client.
|
67 | * This function will be called automatically when any class method is called for the
|
68 | * first time, but if you need to initialize it before calling an actual method,
|
69 | * feel free to call initialize() directly.
|
70 | *
|
71 | * You can await on this method if you want to make sure the client is initialized.
|
72 | *
|
73 | * @returns {Promise} A promise that resolves to an authenticated service stub.
|
74 | */
|
75 | initialize(): Promise<{
|
76 | [name: string]: Function;
|
77 | }>;
|
78 | |
79 |
|
80 |
|
81 |
|
82 | static get servicePath(): string;
|
83 | |
84 |
|
85 |
|
86 |
|
87 |
|
88 | static get apiEndpoint(): string;
|
89 | |
90 |
|
91 |
|
92 |
|
93 | static get port(): number;
|
94 | |
95 |
|
96 |
|
97 |
|
98 |
|
99 | static get scopes(): string[];
|
100 | |
101 |
|
102 |
|
103 |
|
104 | getProjectId(): Promise<string>;
|
105 | getProjectId(callback: Callback<string, undefined, undefined>): void;
|
106 | getLocation(request?: protos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions): Promise<protos.google.cloud.location.ILocation>;
|
107 | getLocation(request: protos.google.cloud.location.IGetLocationRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.location.ILocation, protos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): void;
|
108 | getLocation(request: protos.google.cloud.location.IGetLocationRequest, callback: Callback<protos.google.cloud.location.ILocation, protos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): void;
|
109 | listLocations(request?: protos.google.cloud.location.IListLocationsRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.location.ILocation[], protos.google.cloud.location.IListLocationsRequest | null, protos.google.cloud.location.IListLocationsResponse]>;
|
110 | listLocations(request: protos.google.cloud.location.IListLocationsRequest, options: gax.CallOptions, callback: PaginationCallback<protos.google.cloud.location.IListLocationsRequest, protos.google.cloud.location.IListLocationsResponse | null | undefined, protos.google.cloud.location.ILocation>): void;
|
111 | listLocations(request: protos.google.cloud.location.IListLocationsRequest, callback: PaginationCallback<protos.google.cloud.location.IListLocationsRequest, protos.google.cloud.location.IListLocationsResponse | null | undefined, protos.google.cloud.location.ILocation>): void;
|
112 | |
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 | close(): Promise<void>;
|
119 | }
|
120 | export interface LocationsClient {
|
121 | getLocation(request: protos.google.cloud.location.IGetLocationRequest): void;
|
122 | getLocation(request: protos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<protos.google.cloud.location.ILocation, protos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<protos.google.cloud.location.ILocation, protos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<protos.google.cloud.location.ILocation>;
|
123 | listLocationsAsync(request: protos.google.cloud.location.IListLocationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.location.ILocation>;
|
124 | }
|