@maxim_mazurok/gapi.client.tpu-v1 0.0.20220725
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/index.d.ts +873 -0
- package/package.json +20 -0
- package/readme.md +68 -0
- package/tests.ts +172 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,873 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Cloud TPU API v1 0.0 */
|
|
2
|
+
// Project: https://cloud.google.com/tpu/
|
|
3
|
+
// Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
|
|
4
|
+
// Nick Amoscato <https://github.com/namoscato>
|
|
5
|
+
// Declan Vong <https://github.com/declanvong>
|
|
6
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
|
+
// TypeScript Version: 2.8
|
|
8
|
+
|
|
9
|
+
// IMPORTANT
|
|
10
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
11
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
12
|
+
// Generated from: https://tpu.googleapis.com/$discovery/rest?version=v1
|
|
13
|
+
// Revision: 20220725
|
|
14
|
+
|
|
15
|
+
/// <reference types="gapi.client" />
|
|
16
|
+
|
|
17
|
+
declare namespace gapi.client {
|
|
18
|
+
/** Load Cloud TPU API v1 */
|
|
19
|
+
function load(urlOrObject: "https://tpu.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
|
|
20
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
21
|
+
function load(name: "tpu", version: "v1"): Promise<void>;
|
|
22
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
23
|
+
function load(name: "tpu", version: "v1", callback: () => any): void;
|
|
24
|
+
|
|
25
|
+
namespace tpu {
|
|
26
|
+
interface AcceleratorType {
|
|
27
|
+
/** The resource name. */
|
|
28
|
+
name?: string;
|
|
29
|
+
/** the accelerator type. */
|
|
30
|
+
type?: string;
|
|
31
|
+
}
|
|
32
|
+
// tslint:disable-next-line:no-empty-interface
|
|
33
|
+
interface Empty {
|
|
34
|
+
}
|
|
35
|
+
interface ListAcceleratorTypesResponse {
|
|
36
|
+
/** The listed nodes. */
|
|
37
|
+
acceleratorTypes?: AcceleratorType[];
|
|
38
|
+
/** The next page token or empty if none. */
|
|
39
|
+
nextPageToken?: string;
|
|
40
|
+
/** Locations that could not be reached. */
|
|
41
|
+
unreachable?: string[];
|
|
42
|
+
}
|
|
43
|
+
interface ListLocationsResponse {
|
|
44
|
+
/** A list of locations that matches the specified filter in the request. */
|
|
45
|
+
locations?: Location[];
|
|
46
|
+
/** The standard List next-page token. */
|
|
47
|
+
nextPageToken?: string;
|
|
48
|
+
}
|
|
49
|
+
interface ListNodesResponse {
|
|
50
|
+
/** The next page token or empty if none. */
|
|
51
|
+
nextPageToken?: string;
|
|
52
|
+
/** The listed nodes. */
|
|
53
|
+
nodes?: Node[];
|
|
54
|
+
/** Locations that could not be reached. */
|
|
55
|
+
unreachable?: string[];
|
|
56
|
+
}
|
|
57
|
+
interface ListOperationsResponse {
|
|
58
|
+
/** The standard List next-page token. */
|
|
59
|
+
nextPageToken?: string;
|
|
60
|
+
/** A list of operations that matches the specified filter in the request. */
|
|
61
|
+
operations?: Operation[];
|
|
62
|
+
}
|
|
63
|
+
interface ListTensorFlowVersionsResponse {
|
|
64
|
+
/** The next page token or empty if none. */
|
|
65
|
+
nextPageToken?: string;
|
|
66
|
+
/** The listed nodes. */
|
|
67
|
+
tensorflowVersions?: TensorFlowVersion[];
|
|
68
|
+
/** Locations that could not be reached. */
|
|
69
|
+
unreachable?: string[];
|
|
70
|
+
}
|
|
71
|
+
interface Location {
|
|
72
|
+
/** The friendly name for this location, typically a nearby city name. For example, "Tokyo". */
|
|
73
|
+
displayName?: string;
|
|
74
|
+
/** Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} */
|
|
75
|
+
labels?: { [P in string]: string };
|
|
76
|
+
/** The canonical id for this location. For example: `"us-east1"`. */
|
|
77
|
+
locationId?: string;
|
|
78
|
+
/** Service-specific metadata. For example the available capacity at the given location. */
|
|
79
|
+
metadata?: { [P in string]: any };
|
|
80
|
+
/** Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` */
|
|
81
|
+
name?: string;
|
|
82
|
+
}
|
|
83
|
+
interface NetworkEndpoint {
|
|
84
|
+
/** The IP address of this network endpoint. */
|
|
85
|
+
ipAddress?: string;
|
|
86
|
+
/** The port of this network endpoint. */
|
|
87
|
+
port?: number;
|
|
88
|
+
}
|
|
89
|
+
interface Node {
|
|
90
|
+
/** Required. The type of hardware accelerators associated with this node. */
|
|
91
|
+
acceleratorType?: string;
|
|
92
|
+
/** Output only. The API version that created this Node. */
|
|
93
|
+
apiVersion?: string;
|
|
94
|
+
/**
|
|
95
|
+
* The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a
|
|
96
|
+
* larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block
|
|
97
|
+
* conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
|
|
98
|
+
*/
|
|
99
|
+
cidrBlock?: string;
|
|
100
|
+
/** Output only. The time when the node was created. */
|
|
101
|
+
createTime?: string;
|
|
102
|
+
/** The user-supplied description of the TPU. Maximum of 512 characters. */
|
|
103
|
+
description?: string;
|
|
104
|
+
/** The health status of the TPU node. */
|
|
105
|
+
health?: string;
|
|
106
|
+
/** Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy. */
|
|
107
|
+
healthDescription?: string;
|
|
108
|
+
/** Output only. DEPRECATED! Use network_endpoints instead. The network address for the TPU Node as visible to Compute Engine instances. */
|
|
109
|
+
ipAddress?: string;
|
|
110
|
+
/** Resource labels to represent user-provided metadata. */
|
|
111
|
+
labels?: { [P in string]: string };
|
|
112
|
+
/** Output only. Immutable. The name of the TPU */
|
|
113
|
+
name?: string;
|
|
114
|
+
/**
|
|
115
|
+
* The name of a network they wish to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is
|
|
116
|
+
* provided, "default" will be used.
|
|
117
|
+
*/
|
|
118
|
+
network?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node reach out to the 0th entry in this map
|
|
121
|
+
* first.
|
|
122
|
+
*/
|
|
123
|
+
networkEndpoints?: NetworkEndpoint[];
|
|
124
|
+
/** Output only. DEPRECATED! Use network_endpoints instead. The network port for the TPU Node as visible to Compute Engine instances. */
|
|
125
|
+
port?: string;
|
|
126
|
+
/** The scheduling options for this node. */
|
|
127
|
+
schedulingConfig?: SchedulingConfig;
|
|
128
|
+
/**
|
|
129
|
+
* Output only. The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in
|
|
130
|
+
* the Node, this account must have permissions to that data.
|
|
131
|
+
*/
|
|
132
|
+
serviceAccount?: string;
|
|
133
|
+
/** Output only. The current state for the TPU Node. */
|
|
134
|
+
state?: string;
|
|
135
|
+
/** Output only. The Symptoms that have occurred to the TPU Node. */
|
|
136
|
+
symptoms?: Symptom[];
|
|
137
|
+
/** Required. The version of Tensorflow running in the Node. */
|
|
138
|
+
tensorflowVersion?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field
|
|
141
|
+
* should not be specified. If the network, that you want to peer the TPU Node to, is Shared VPC networks, the node must be created with this this field enabled.
|
|
142
|
+
*/
|
|
143
|
+
useServiceNetworking?: boolean;
|
|
144
|
+
}
|
|
145
|
+
interface Operation {
|
|
146
|
+
/** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
|
|
147
|
+
done?: boolean;
|
|
148
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
149
|
+
error?: Status;
|
|
150
|
+
/**
|
|
151
|
+
* Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such
|
|
152
|
+
* metadata. Any method that returns a long-running operation should document the metadata type, if any.
|
|
153
|
+
*/
|
|
154
|
+
metadata?: { [P in string]: any };
|
|
155
|
+
/**
|
|
156
|
+
* The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending
|
|
157
|
+
* with `operations/{unique_id}`.
|
|
158
|
+
*/
|
|
159
|
+
name?: string;
|
|
160
|
+
/**
|
|
161
|
+
* The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the
|
|
162
|
+
* original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the
|
|
163
|
+
* original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
|
|
164
|
+
*/
|
|
165
|
+
response?: { [P in string]: any };
|
|
166
|
+
}
|
|
167
|
+
interface OperationMetadata {
|
|
168
|
+
/** API version. */
|
|
169
|
+
apiVersion?: string;
|
|
170
|
+
/** Specifies if cancellation was requested for the operation. */
|
|
171
|
+
cancelRequested?: boolean;
|
|
172
|
+
/** The time the operation was created. */
|
|
173
|
+
createTime?: string;
|
|
174
|
+
/** The time the operation finished running. */
|
|
175
|
+
endTime?: string;
|
|
176
|
+
/** Human-readable status of the operation, if any. */
|
|
177
|
+
statusDetail?: string;
|
|
178
|
+
/** Target of the operation - for example projects/project-1/connectivityTests/test-1 */
|
|
179
|
+
target?: string;
|
|
180
|
+
/** Name of the verb executed by the operation. */
|
|
181
|
+
verb?: string;
|
|
182
|
+
}
|
|
183
|
+
interface ReimageNodeRequest {
|
|
184
|
+
/** The version for reimage to create. */
|
|
185
|
+
tensorflowVersion?: string;
|
|
186
|
+
}
|
|
187
|
+
interface SchedulingConfig {
|
|
188
|
+
/** Defines whether the node is preemptible. */
|
|
189
|
+
preemptible?: boolean;
|
|
190
|
+
/** Whether the node is created under a reservation. */
|
|
191
|
+
reserved?: boolean;
|
|
192
|
+
}
|
|
193
|
+
// tslint:disable-next-line:no-empty-interface
|
|
194
|
+
interface StartNodeRequest {
|
|
195
|
+
}
|
|
196
|
+
interface Status {
|
|
197
|
+
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
198
|
+
code?: number;
|
|
199
|
+
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
200
|
+
details?: Array<{ [P in string]: any }>;
|
|
201
|
+
/**
|
|
202
|
+
* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the
|
|
203
|
+
* client.
|
|
204
|
+
*/
|
|
205
|
+
message?: string;
|
|
206
|
+
}
|
|
207
|
+
// tslint:disable-next-line:no-empty-interface
|
|
208
|
+
interface StopNodeRequest {
|
|
209
|
+
}
|
|
210
|
+
interface Symptom {
|
|
211
|
+
/** Timestamp when the Symptom is created. */
|
|
212
|
+
createTime?: string;
|
|
213
|
+
/** Detailed information of the current Symptom. */
|
|
214
|
+
details?: string;
|
|
215
|
+
/** Type of the Symptom. */
|
|
216
|
+
symptomType?: string;
|
|
217
|
+
/** A string used to uniquely distinguish a worker within a TPU node. */
|
|
218
|
+
workerId?: string;
|
|
219
|
+
}
|
|
220
|
+
interface TensorFlowVersion {
|
|
221
|
+
/** The resource name. */
|
|
222
|
+
name?: string;
|
|
223
|
+
/** the tensorflow version. */
|
|
224
|
+
version?: string;
|
|
225
|
+
}
|
|
226
|
+
interface AcceleratorTypesResource {
|
|
227
|
+
/** Gets AcceleratorType. */
|
|
228
|
+
get(request?: {
|
|
229
|
+
/** V1 error format. */
|
|
230
|
+
"$.xgafv"?: string;
|
|
231
|
+
/** OAuth access token. */
|
|
232
|
+
access_token?: string;
|
|
233
|
+
/** Data format for response. */
|
|
234
|
+
alt?: string;
|
|
235
|
+
/** JSONP */
|
|
236
|
+
callback?: string;
|
|
237
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
238
|
+
fields?: string;
|
|
239
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
240
|
+
key?: string;
|
|
241
|
+
/** Required. The resource name. */
|
|
242
|
+
name: string;
|
|
243
|
+
/** OAuth 2.0 token for the current user. */
|
|
244
|
+
oauth_token?: string;
|
|
245
|
+
/** Returns response with indentations and line breaks. */
|
|
246
|
+
prettyPrint?: boolean;
|
|
247
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
248
|
+
quotaUser?: string;
|
|
249
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
250
|
+
upload_protocol?: string;
|
|
251
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
252
|
+
uploadType?: string;
|
|
253
|
+
}): Request<AcceleratorType>;
|
|
254
|
+
/** Lists accelerator types supported by this API. */
|
|
255
|
+
list(request?: {
|
|
256
|
+
/** V1 error format. */
|
|
257
|
+
"$.xgafv"?: string;
|
|
258
|
+
/** OAuth access token. */
|
|
259
|
+
access_token?: string;
|
|
260
|
+
/** Data format for response. */
|
|
261
|
+
alt?: string;
|
|
262
|
+
/** JSONP */
|
|
263
|
+
callback?: string;
|
|
264
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
265
|
+
fields?: string;
|
|
266
|
+
/** List filter. */
|
|
267
|
+
filter?: string;
|
|
268
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
269
|
+
key?: string;
|
|
270
|
+
/** OAuth 2.0 token for the current user. */
|
|
271
|
+
oauth_token?: string;
|
|
272
|
+
/** Sort results. */
|
|
273
|
+
orderBy?: string;
|
|
274
|
+
/** The maximum number of items to return. */
|
|
275
|
+
pageSize?: number;
|
|
276
|
+
/** The next_page_token value returned from a previous List request, if any. */
|
|
277
|
+
pageToken?: string;
|
|
278
|
+
/** Required. The parent resource name. */
|
|
279
|
+
parent: string;
|
|
280
|
+
/** Returns response with indentations and line breaks. */
|
|
281
|
+
prettyPrint?: boolean;
|
|
282
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
283
|
+
quotaUser?: string;
|
|
284
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
285
|
+
upload_protocol?: string;
|
|
286
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
287
|
+
uploadType?: string;
|
|
288
|
+
}): Request<ListAcceleratorTypesResponse>;
|
|
289
|
+
}
|
|
290
|
+
interface NodesResource {
|
|
291
|
+
/** Creates a node. */
|
|
292
|
+
create(request: {
|
|
293
|
+
/** V1 error format. */
|
|
294
|
+
"$.xgafv"?: string;
|
|
295
|
+
/** OAuth access token. */
|
|
296
|
+
access_token?: string;
|
|
297
|
+
/** Data format for response. */
|
|
298
|
+
alt?: string;
|
|
299
|
+
/** JSONP */
|
|
300
|
+
callback?: string;
|
|
301
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
302
|
+
fields?: string;
|
|
303
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
304
|
+
key?: string;
|
|
305
|
+
/** The unqualified resource name. */
|
|
306
|
+
nodeId?: string;
|
|
307
|
+
/** OAuth 2.0 token for the current user. */
|
|
308
|
+
oauth_token?: string;
|
|
309
|
+
/** Required. The parent resource name. */
|
|
310
|
+
parent: string;
|
|
311
|
+
/** Returns response with indentations and line breaks. */
|
|
312
|
+
prettyPrint?: boolean;
|
|
313
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
314
|
+
quotaUser?: string;
|
|
315
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
316
|
+
upload_protocol?: string;
|
|
317
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
318
|
+
uploadType?: string;
|
|
319
|
+
/** Request body */
|
|
320
|
+
resource: Node;
|
|
321
|
+
}): Request<Operation>;
|
|
322
|
+
create(request: {
|
|
323
|
+
/** V1 error format. */
|
|
324
|
+
"$.xgafv"?: string;
|
|
325
|
+
/** OAuth access token. */
|
|
326
|
+
access_token?: string;
|
|
327
|
+
/** Data format for response. */
|
|
328
|
+
alt?: string;
|
|
329
|
+
/** JSONP */
|
|
330
|
+
callback?: string;
|
|
331
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
332
|
+
fields?: string;
|
|
333
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
334
|
+
key?: string;
|
|
335
|
+
/** The unqualified resource name. */
|
|
336
|
+
nodeId?: string;
|
|
337
|
+
/** OAuth 2.0 token for the current user. */
|
|
338
|
+
oauth_token?: string;
|
|
339
|
+
/** Required. The parent resource name. */
|
|
340
|
+
parent: string;
|
|
341
|
+
/** Returns response with indentations and line breaks. */
|
|
342
|
+
prettyPrint?: boolean;
|
|
343
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
344
|
+
quotaUser?: string;
|
|
345
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
346
|
+
upload_protocol?: string;
|
|
347
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
348
|
+
uploadType?: string;
|
|
349
|
+
},
|
|
350
|
+
body: Node): Request<Operation>;
|
|
351
|
+
/** Deletes a node. */
|
|
352
|
+
delete(request?: {
|
|
353
|
+
/** V1 error format. */
|
|
354
|
+
"$.xgafv"?: string;
|
|
355
|
+
/** OAuth access token. */
|
|
356
|
+
access_token?: string;
|
|
357
|
+
/** Data format for response. */
|
|
358
|
+
alt?: string;
|
|
359
|
+
/** JSONP */
|
|
360
|
+
callback?: string;
|
|
361
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
362
|
+
fields?: string;
|
|
363
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
364
|
+
key?: string;
|
|
365
|
+
/** Required. The resource name. */
|
|
366
|
+
name: string;
|
|
367
|
+
/** OAuth 2.0 token for the current user. */
|
|
368
|
+
oauth_token?: string;
|
|
369
|
+
/** Returns response with indentations and line breaks. */
|
|
370
|
+
prettyPrint?: boolean;
|
|
371
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
372
|
+
quotaUser?: string;
|
|
373
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
374
|
+
upload_protocol?: string;
|
|
375
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
376
|
+
uploadType?: string;
|
|
377
|
+
}): Request<Operation>;
|
|
378
|
+
/** Gets the details of a node. */
|
|
379
|
+
get(request?: {
|
|
380
|
+
/** V1 error format. */
|
|
381
|
+
"$.xgafv"?: string;
|
|
382
|
+
/** OAuth access token. */
|
|
383
|
+
access_token?: string;
|
|
384
|
+
/** Data format for response. */
|
|
385
|
+
alt?: string;
|
|
386
|
+
/** JSONP */
|
|
387
|
+
callback?: string;
|
|
388
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
389
|
+
fields?: string;
|
|
390
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
391
|
+
key?: string;
|
|
392
|
+
/** Required. The resource name. */
|
|
393
|
+
name: string;
|
|
394
|
+
/** OAuth 2.0 token for the current user. */
|
|
395
|
+
oauth_token?: string;
|
|
396
|
+
/** Returns response with indentations and line breaks. */
|
|
397
|
+
prettyPrint?: boolean;
|
|
398
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
399
|
+
quotaUser?: string;
|
|
400
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
401
|
+
upload_protocol?: string;
|
|
402
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
403
|
+
uploadType?: string;
|
|
404
|
+
}): Request<Node>;
|
|
405
|
+
/** Lists nodes. */
|
|
406
|
+
list(request?: {
|
|
407
|
+
/** V1 error format. */
|
|
408
|
+
"$.xgafv"?: string;
|
|
409
|
+
/** OAuth access token. */
|
|
410
|
+
access_token?: string;
|
|
411
|
+
/** Data format for response. */
|
|
412
|
+
alt?: string;
|
|
413
|
+
/** JSONP */
|
|
414
|
+
callback?: string;
|
|
415
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
416
|
+
fields?: string;
|
|
417
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
418
|
+
key?: string;
|
|
419
|
+
/** OAuth 2.0 token for the current user. */
|
|
420
|
+
oauth_token?: string;
|
|
421
|
+
/** The maximum number of items to return. */
|
|
422
|
+
pageSize?: number;
|
|
423
|
+
/** The next_page_token value returned from a previous List request, if any. */
|
|
424
|
+
pageToken?: string;
|
|
425
|
+
/** Required. The parent resource name. */
|
|
426
|
+
parent: string;
|
|
427
|
+
/** Returns response with indentations and line breaks. */
|
|
428
|
+
prettyPrint?: boolean;
|
|
429
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
430
|
+
quotaUser?: string;
|
|
431
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
432
|
+
upload_protocol?: string;
|
|
433
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
434
|
+
uploadType?: string;
|
|
435
|
+
}): Request<ListNodesResponse>;
|
|
436
|
+
/** Reimages a node's OS. */
|
|
437
|
+
reimage(request: {
|
|
438
|
+
/** V1 error format. */
|
|
439
|
+
"$.xgafv"?: string;
|
|
440
|
+
/** OAuth access token. */
|
|
441
|
+
access_token?: string;
|
|
442
|
+
/** Data format for response. */
|
|
443
|
+
alt?: string;
|
|
444
|
+
/** JSONP */
|
|
445
|
+
callback?: string;
|
|
446
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
447
|
+
fields?: string;
|
|
448
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
449
|
+
key?: string;
|
|
450
|
+
/** The resource name. */
|
|
451
|
+
name: string;
|
|
452
|
+
/** OAuth 2.0 token for the current user. */
|
|
453
|
+
oauth_token?: string;
|
|
454
|
+
/** Returns response with indentations and line breaks. */
|
|
455
|
+
prettyPrint?: boolean;
|
|
456
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
457
|
+
quotaUser?: string;
|
|
458
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
459
|
+
upload_protocol?: string;
|
|
460
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
461
|
+
uploadType?: string;
|
|
462
|
+
/** Request body */
|
|
463
|
+
resource: ReimageNodeRequest;
|
|
464
|
+
}): Request<Operation>;
|
|
465
|
+
reimage(request: {
|
|
466
|
+
/** V1 error format. */
|
|
467
|
+
"$.xgafv"?: string;
|
|
468
|
+
/** OAuth access token. */
|
|
469
|
+
access_token?: string;
|
|
470
|
+
/** Data format for response. */
|
|
471
|
+
alt?: string;
|
|
472
|
+
/** JSONP */
|
|
473
|
+
callback?: string;
|
|
474
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
475
|
+
fields?: string;
|
|
476
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
477
|
+
key?: string;
|
|
478
|
+
/** The resource name. */
|
|
479
|
+
name: string;
|
|
480
|
+
/** OAuth 2.0 token for the current user. */
|
|
481
|
+
oauth_token?: string;
|
|
482
|
+
/** Returns response with indentations and line breaks. */
|
|
483
|
+
prettyPrint?: boolean;
|
|
484
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
485
|
+
quotaUser?: string;
|
|
486
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
487
|
+
upload_protocol?: string;
|
|
488
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
489
|
+
uploadType?: string;
|
|
490
|
+
},
|
|
491
|
+
body: ReimageNodeRequest): Request<Operation>;
|
|
492
|
+
/** Starts a node. */
|
|
493
|
+
start(request: {
|
|
494
|
+
/** V1 error format. */
|
|
495
|
+
"$.xgafv"?: string;
|
|
496
|
+
/** OAuth access token. */
|
|
497
|
+
access_token?: string;
|
|
498
|
+
/** Data format for response. */
|
|
499
|
+
alt?: string;
|
|
500
|
+
/** JSONP */
|
|
501
|
+
callback?: string;
|
|
502
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
503
|
+
fields?: string;
|
|
504
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
505
|
+
key?: string;
|
|
506
|
+
/** The resource name. */
|
|
507
|
+
name: string;
|
|
508
|
+
/** OAuth 2.0 token for the current user. */
|
|
509
|
+
oauth_token?: string;
|
|
510
|
+
/** Returns response with indentations and line breaks. */
|
|
511
|
+
prettyPrint?: boolean;
|
|
512
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
513
|
+
quotaUser?: string;
|
|
514
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
515
|
+
upload_protocol?: string;
|
|
516
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
517
|
+
uploadType?: string;
|
|
518
|
+
/** Request body */
|
|
519
|
+
resource: StartNodeRequest;
|
|
520
|
+
}): Request<Operation>;
|
|
521
|
+
start(request: {
|
|
522
|
+
/** V1 error format. */
|
|
523
|
+
"$.xgafv"?: string;
|
|
524
|
+
/** OAuth access token. */
|
|
525
|
+
access_token?: string;
|
|
526
|
+
/** Data format for response. */
|
|
527
|
+
alt?: string;
|
|
528
|
+
/** JSONP */
|
|
529
|
+
callback?: string;
|
|
530
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
531
|
+
fields?: string;
|
|
532
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
533
|
+
key?: string;
|
|
534
|
+
/** The resource name. */
|
|
535
|
+
name: string;
|
|
536
|
+
/** OAuth 2.0 token for the current user. */
|
|
537
|
+
oauth_token?: string;
|
|
538
|
+
/** Returns response with indentations and line breaks. */
|
|
539
|
+
prettyPrint?: boolean;
|
|
540
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
541
|
+
quotaUser?: string;
|
|
542
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
543
|
+
upload_protocol?: string;
|
|
544
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
545
|
+
uploadType?: string;
|
|
546
|
+
},
|
|
547
|
+
body: StartNodeRequest): Request<Operation>;
|
|
548
|
+
/** Stops a node, this operation is only available with single TPU nodes. */
|
|
549
|
+
stop(request: {
|
|
550
|
+
/** V1 error format. */
|
|
551
|
+
"$.xgafv"?: string;
|
|
552
|
+
/** OAuth access token. */
|
|
553
|
+
access_token?: string;
|
|
554
|
+
/** Data format for response. */
|
|
555
|
+
alt?: string;
|
|
556
|
+
/** JSONP */
|
|
557
|
+
callback?: string;
|
|
558
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
559
|
+
fields?: string;
|
|
560
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
561
|
+
key?: string;
|
|
562
|
+
/** The resource name. */
|
|
563
|
+
name: string;
|
|
564
|
+
/** OAuth 2.0 token for the current user. */
|
|
565
|
+
oauth_token?: string;
|
|
566
|
+
/** Returns response with indentations and line breaks. */
|
|
567
|
+
prettyPrint?: boolean;
|
|
568
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
569
|
+
quotaUser?: string;
|
|
570
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
571
|
+
upload_protocol?: string;
|
|
572
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
573
|
+
uploadType?: string;
|
|
574
|
+
/** Request body */
|
|
575
|
+
resource: StopNodeRequest;
|
|
576
|
+
}): Request<Operation>;
|
|
577
|
+
stop(request: {
|
|
578
|
+
/** V1 error format. */
|
|
579
|
+
"$.xgafv"?: string;
|
|
580
|
+
/** OAuth access token. */
|
|
581
|
+
access_token?: string;
|
|
582
|
+
/** Data format for response. */
|
|
583
|
+
alt?: string;
|
|
584
|
+
/** JSONP */
|
|
585
|
+
callback?: string;
|
|
586
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
587
|
+
fields?: string;
|
|
588
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
589
|
+
key?: string;
|
|
590
|
+
/** The resource name. */
|
|
591
|
+
name: string;
|
|
592
|
+
/** OAuth 2.0 token for the current user. */
|
|
593
|
+
oauth_token?: string;
|
|
594
|
+
/** Returns response with indentations and line breaks. */
|
|
595
|
+
prettyPrint?: boolean;
|
|
596
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
597
|
+
quotaUser?: string;
|
|
598
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
599
|
+
upload_protocol?: string;
|
|
600
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
601
|
+
uploadType?: string;
|
|
602
|
+
},
|
|
603
|
+
body: StopNodeRequest): Request<Operation>;
|
|
604
|
+
}
|
|
605
|
+
interface OperationsResource {
|
|
606
|
+
/**
|
|
607
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support
|
|
608
|
+
* this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the
|
|
609
|
+
* operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a
|
|
610
|
+
* google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
|
|
611
|
+
*/
|
|
612
|
+
cancel(request?: {
|
|
613
|
+
/** V1 error format. */
|
|
614
|
+
"$.xgafv"?: string;
|
|
615
|
+
/** OAuth access token. */
|
|
616
|
+
access_token?: string;
|
|
617
|
+
/** Data format for response. */
|
|
618
|
+
alt?: string;
|
|
619
|
+
/** JSONP */
|
|
620
|
+
callback?: string;
|
|
621
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
622
|
+
fields?: string;
|
|
623
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
624
|
+
key?: string;
|
|
625
|
+
/** The name of the operation resource to be cancelled. */
|
|
626
|
+
name: string;
|
|
627
|
+
/** OAuth 2.0 token for the current user. */
|
|
628
|
+
oauth_token?: string;
|
|
629
|
+
/** Returns response with indentations and line breaks. */
|
|
630
|
+
prettyPrint?: boolean;
|
|
631
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
632
|
+
quotaUser?: string;
|
|
633
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
634
|
+
upload_protocol?: string;
|
|
635
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
636
|
+
uploadType?: string;
|
|
637
|
+
}): Request<{}>;
|
|
638
|
+
/**
|
|
639
|
+
* Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't
|
|
640
|
+
* support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
641
|
+
*/
|
|
642
|
+
delete(request?: {
|
|
643
|
+
/** V1 error format. */
|
|
644
|
+
"$.xgafv"?: string;
|
|
645
|
+
/** OAuth access token. */
|
|
646
|
+
access_token?: string;
|
|
647
|
+
/** Data format for response. */
|
|
648
|
+
alt?: string;
|
|
649
|
+
/** JSONP */
|
|
650
|
+
callback?: string;
|
|
651
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
652
|
+
fields?: string;
|
|
653
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
654
|
+
key?: string;
|
|
655
|
+
/** The name of the operation resource to be deleted. */
|
|
656
|
+
name: string;
|
|
657
|
+
/** OAuth 2.0 token for the current user. */
|
|
658
|
+
oauth_token?: string;
|
|
659
|
+
/** Returns response with indentations and line breaks. */
|
|
660
|
+
prettyPrint?: boolean;
|
|
661
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
662
|
+
quotaUser?: string;
|
|
663
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
664
|
+
upload_protocol?: string;
|
|
665
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
666
|
+
uploadType?: string;
|
|
667
|
+
}): Request<{}>;
|
|
668
|
+
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
669
|
+
get(request?: {
|
|
670
|
+
/** V1 error format. */
|
|
671
|
+
"$.xgafv"?: string;
|
|
672
|
+
/** OAuth access token. */
|
|
673
|
+
access_token?: string;
|
|
674
|
+
/** Data format for response. */
|
|
675
|
+
alt?: string;
|
|
676
|
+
/** JSONP */
|
|
677
|
+
callback?: string;
|
|
678
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
679
|
+
fields?: string;
|
|
680
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
681
|
+
key?: string;
|
|
682
|
+
/** The name of the operation resource. */
|
|
683
|
+
name: string;
|
|
684
|
+
/** OAuth 2.0 token for the current user. */
|
|
685
|
+
oauth_token?: string;
|
|
686
|
+
/** Returns response with indentations and line breaks. */
|
|
687
|
+
prettyPrint?: boolean;
|
|
688
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
689
|
+
quotaUser?: string;
|
|
690
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
691
|
+
upload_protocol?: string;
|
|
692
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
693
|
+
uploadType?: string;
|
|
694
|
+
}): Request<Operation>;
|
|
695
|
+
/**
|
|
696
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services
|
|
697
|
+
* to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as
|
|
698
|
+
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
699
|
+
* ensure the name binding is the parent resource, without the operations collection id.
|
|
700
|
+
*/
|
|
701
|
+
list(request?: {
|
|
702
|
+
/** V1 error format. */
|
|
703
|
+
"$.xgafv"?: string;
|
|
704
|
+
/** OAuth access token. */
|
|
705
|
+
access_token?: string;
|
|
706
|
+
/** Data format for response. */
|
|
707
|
+
alt?: string;
|
|
708
|
+
/** JSONP */
|
|
709
|
+
callback?: string;
|
|
710
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
711
|
+
fields?: string;
|
|
712
|
+
/** The standard list filter. */
|
|
713
|
+
filter?: string;
|
|
714
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
715
|
+
key?: string;
|
|
716
|
+
/** The name of the operation's parent resource. */
|
|
717
|
+
name: string;
|
|
718
|
+
/** OAuth 2.0 token for the current user. */
|
|
719
|
+
oauth_token?: string;
|
|
720
|
+
/** The standard list page size. */
|
|
721
|
+
pageSize?: number;
|
|
722
|
+
/** The standard list page token. */
|
|
723
|
+
pageToken?: string;
|
|
724
|
+
/** Returns response with indentations and line breaks. */
|
|
725
|
+
prettyPrint?: boolean;
|
|
726
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
727
|
+
quotaUser?: string;
|
|
728
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
729
|
+
upload_protocol?: string;
|
|
730
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
731
|
+
uploadType?: string;
|
|
732
|
+
}): Request<ListOperationsResponse>;
|
|
733
|
+
}
|
|
734
|
+
interface TensorflowVersionsResource {
|
|
735
|
+
/** Gets TensorFlow Version. */
|
|
736
|
+
get(request?: {
|
|
737
|
+
/** V1 error format. */
|
|
738
|
+
"$.xgafv"?: string;
|
|
739
|
+
/** OAuth access token. */
|
|
740
|
+
access_token?: string;
|
|
741
|
+
/** Data format for response. */
|
|
742
|
+
alt?: string;
|
|
743
|
+
/** JSONP */
|
|
744
|
+
callback?: string;
|
|
745
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
746
|
+
fields?: string;
|
|
747
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
748
|
+
key?: string;
|
|
749
|
+
/** Required. The resource name. */
|
|
750
|
+
name: string;
|
|
751
|
+
/** OAuth 2.0 token for the current user. */
|
|
752
|
+
oauth_token?: string;
|
|
753
|
+
/** Returns response with indentations and line breaks. */
|
|
754
|
+
prettyPrint?: boolean;
|
|
755
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
756
|
+
quotaUser?: string;
|
|
757
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
758
|
+
upload_protocol?: string;
|
|
759
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
760
|
+
uploadType?: string;
|
|
761
|
+
}): Request<TensorFlowVersion>;
|
|
762
|
+
/** List TensorFlow versions supported by this API. */
|
|
763
|
+
list(request?: {
|
|
764
|
+
/** V1 error format. */
|
|
765
|
+
"$.xgafv"?: string;
|
|
766
|
+
/** OAuth access token. */
|
|
767
|
+
access_token?: string;
|
|
768
|
+
/** Data format for response. */
|
|
769
|
+
alt?: string;
|
|
770
|
+
/** JSONP */
|
|
771
|
+
callback?: string;
|
|
772
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
773
|
+
fields?: string;
|
|
774
|
+
/** List filter. */
|
|
775
|
+
filter?: string;
|
|
776
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
777
|
+
key?: string;
|
|
778
|
+
/** OAuth 2.0 token for the current user. */
|
|
779
|
+
oauth_token?: string;
|
|
780
|
+
/** Sort results. */
|
|
781
|
+
orderBy?: string;
|
|
782
|
+
/** The maximum number of items to return. */
|
|
783
|
+
pageSize?: number;
|
|
784
|
+
/** The next_page_token value returned from a previous List request, if any. */
|
|
785
|
+
pageToken?: string;
|
|
786
|
+
/** Required. The parent resource name. */
|
|
787
|
+
parent: string;
|
|
788
|
+
/** Returns response with indentations and line breaks. */
|
|
789
|
+
prettyPrint?: boolean;
|
|
790
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
791
|
+
quotaUser?: string;
|
|
792
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
793
|
+
upload_protocol?: string;
|
|
794
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
795
|
+
uploadType?: string;
|
|
796
|
+
}): Request<ListTensorFlowVersionsResponse>;
|
|
797
|
+
}
|
|
798
|
+
interface LocationsResource {
|
|
799
|
+
/** Gets information about a location. */
|
|
800
|
+
get(request?: {
|
|
801
|
+
/** V1 error format. */
|
|
802
|
+
"$.xgafv"?: string;
|
|
803
|
+
/** OAuth access token. */
|
|
804
|
+
access_token?: string;
|
|
805
|
+
/** Data format for response. */
|
|
806
|
+
alt?: string;
|
|
807
|
+
/** JSONP */
|
|
808
|
+
callback?: string;
|
|
809
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
810
|
+
fields?: string;
|
|
811
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
812
|
+
key?: string;
|
|
813
|
+
/** Resource name for the location. */
|
|
814
|
+
name: string;
|
|
815
|
+
/** OAuth 2.0 token for the current user. */
|
|
816
|
+
oauth_token?: string;
|
|
817
|
+
/** Returns response with indentations and line breaks. */
|
|
818
|
+
prettyPrint?: boolean;
|
|
819
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
820
|
+
quotaUser?: string;
|
|
821
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
822
|
+
upload_protocol?: string;
|
|
823
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
824
|
+
uploadType?: string;
|
|
825
|
+
}): Request<Location>;
|
|
826
|
+
/** Lists information about the supported locations for this service. */
|
|
827
|
+
list(request?: {
|
|
828
|
+
/** V1 error format. */
|
|
829
|
+
"$.xgafv"?: string;
|
|
830
|
+
/** OAuth access token. */
|
|
831
|
+
access_token?: string;
|
|
832
|
+
/** Data format for response. */
|
|
833
|
+
alt?: string;
|
|
834
|
+
/** JSONP */
|
|
835
|
+
callback?: string;
|
|
836
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
837
|
+
fields?: string;
|
|
838
|
+
/**
|
|
839
|
+
* A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in
|
|
840
|
+
* [AIP-160](https://google.aip.dev/160).
|
|
841
|
+
*/
|
|
842
|
+
filter?: string;
|
|
843
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
844
|
+
key?: string;
|
|
845
|
+
/** The resource that owns the locations collection, if applicable. */
|
|
846
|
+
name: string;
|
|
847
|
+
/** OAuth 2.0 token for the current user. */
|
|
848
|
+
oauth_token?: string;
|
|
849
|
+
/** The maximum number of results to return. If not set, the service selects a default. */
|
|
850
|
+
pageSize?: number;
|
|
851
|
+
/** A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */
|
|
852
|
+
pageToken?: string;
|
|
853
|
+
/** Returns response with indentations and line breaks. */
|
|
854
|
+
prettyPrint?: boolean;
|
|
855
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
856
|
+
quotaUser?: string;
|
|
857
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
858
|
+
upload_protocol?: string;
|
|
859
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
860
|
+
uploadType?: string;
|
|
861
|
+
}): Request<ListLocationsResponse>;
|
|
862
|
+
acceleratorTypes: AcceleratorTypesResource;
|
|
863
|
+
nodes: NodesResource;
|
|
864
|
+
operations: OperationsResource;
|
|
865
|
+
tensorflowVersions: TensorflowVersionsResource;
|
|
866
|
+
}
|
|
867
|
+
interface ProjectsResource {
|
|
868
|
+
locations: LocationsResource;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
const projects: ProjectsResource;
|
|
872
|
+
}
|
|
873
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.tpu-v1",
|
|
3
|
+
"version": "0.0.20220725",
|
|
4
|
+
"description": "TypeScript typings for Cloud TPU API v1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"email": "maxim@mazurok.com",
|
|
8
|
+
"name": "Maxim Mazurok",
|
|
9
|
+
"url": "https://maxim.mazurok.com"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
14
|
+
},
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/gapi.client": "*",
|
|
18
|
+
"@types/gapi.client.discovery": "*"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# TypeScript typings for Cloud TPU API v1
|
|
2
|
+
|
|
3
|
+
TPU API provides customers with access to Google TPU technology.
|
|
4
|
+
For detailed description please check [documentation](https://cloud.google.com/tpu/).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Cloud TPU API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.tpu-v1 --save-dev
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
You need to initialize Google API client in your code:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
gapi.load('client', () => {
|
|
20
|
+
// now we can use gapi.client
|
|
21
|
+
// ...
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then load api client wrapper:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
gapi.client.load('https://tpu.googleapis.com/$discovery/rest?version=v1', () => {
|
|
29
|
+
// now we can use:
|
|
30
|
+
// gapi.client.tpu
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
|
|
36
|
+
gapi.client.load('tpu', 'v1', () => {
|
|
37
|
+
// now we can use:
|
|
38
|
+
// gapi.client.tpu
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Don't forget to authenticate your client before sending any request to resources:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
// declare client_id registered in Google Developers Console
|
|
46
|
+
var client_id = '',
|
|
47
|
+
scope = [
|
|
48
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
49
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
50
|
+
],
|
|
51
|
+
immediate = true;
|
|
52
|
+
// ...
|
|
53
|
+
|
|
54
|
+
gapi.auth.authorize(
|
|
55
|
+
{ client_id: client_id, scope: scope, immediate: immediate },
|
|
56
|
+
authResult => {
|
|
57
|
+
if (authResult && !authResult.error) {
|
|
58
|
+
/* handle successful authorization */
|
|
59
|
+
} else {
|
|
60
|
+
/* handle authorization error */
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
After that you can use Cloud TPU API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
```
|
package/tests.ts
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.tpu-v1 definition tests */
|
|
2
|
+
// IMPORTANT
|
|
3
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
+
|
|
6
|
+
// Revision: 20220725
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://tpu.googleapis.com/$discovery/rest?version=v1');
|
|
12
|
+
/** now we can use gapi.client.tpu */
|
|
13
|
+
|
|
14
|
+
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
+
/** declare client_id registered in Google Developers Console */
|
|
16
|
+
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
+
const scope = [
|
|
18
|
+
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
19
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
20
|
+
];
|
|
21
|
+
const immediate = false;
|
|
22
|
+
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
23
|
+
if (authResult && !authResult.error) {
|
|
24
|
+
/** handle successful authorization */
|
|
25
|
+
run();
|
|
26
|
+
} else {
|
|
27
|
+
/** handle authorization error */
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
async function run() {
|
|
32
|
+
/** Gets information about a location. */
|
|
33
|
+
await gapi.client.tpu.projects.locations.get({
|
|
34
|
+
name: "Test string",
|
|
35
|
+
});
|
|
36
|
+
/** Lists information about the supported locations for this service. */
|
|
37
|
+
await gapi.client.tpu.projects.locations.list({
|
|
38
|
+
filter: "Test string",
|
|
39
|
+
name: "Test string",
|
|
40
|
+
pageSize: 42,
|
|
41
|
+
pageToken: "Test string",
|
|
42
|
+
});
|
|
43
|
+
/** Gets AcceleratorType. */
|
|
44
|
+
await gapi.client.tpu.projects.locations.acceleratorTypes.get({
|
|
45
|
+
name: "Test string",
|
|
46
|
+
});
|
|
47
|
+
/** Lists accelerator types supported by this API. */
|
|
48
|
+
await gapi.client.tpu.projects.locations.acceleratorTypes.list({
|
|
49
|
+
filter: "Test string",
|
|
50
|
+
orderBy: "Test string",
|
|
51
|
+
pageSize: 42,
|
|
52
|
+
pageToken: "Test string",
|
|
53
|
+
parent: "Test string",
|
|
54
|
+
});
|
|
55
|
+
/** Creates a node. */
|
|
56
|
+
await gapi.client.tpu.projects.locations.nodes.create({
|
|
57
|
+
nodeId: "Test string",
|
|
58
|
+
parent: "Test string",
|
|
59
|
+
}, {
|
|
60
|
+
acceleratorType: "Test string",
|
|
61
|
+
apiVersion: "Test string",
|
|
62
|
+
cidrBlock: "Test string",
|
|
63
|
+
createTime: "Test string",
|
|
64
|
+
description: "Test string",
|
|
65
|
+
health: "Test string",
|
|
66
|
+
healthDescription: "Test string",
|
|
67
|
+
ipAddress: "Test string",
|
|
68
|
+
labels: {
|
|
69
|
+
A: "Test string"
|
|
70
|
+
},
|
|
71
|
+
name: "Test string",
|
|
72
|
+
network: "Test string",
|
|
73
|
+
networkEndpoints: [
|
|
74
|
+
{
|
|
75
|
+
ipAddress: "Test string",
|
|
76
|
+
port: 42,
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
port: "Test string",
|
|
80
|
+
schedulingConfig: {
|
|
81
|
+
preemptible: true,
|
|
82
|
+
reserved: true,
|
|
83
|
+
},
|
|
84
|
+
serviceAccount: "Test string",
|
|
85
|
+
state: "Test string",
|
|
86
|
+
symptoms: [
|
|
87
|
+
{
|
|
88
|
+
createTime: "Test string",
|
|
89
|
+
details: "Test string",
|
|
90
|
+
symptomType: "Test string",
|
|
91
|
+
workerId: "Test string",
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
tensorflowVersion: "Test string",
|
|
95
|
+
useServiceNetworking: true,
|
|
96
|
+
});
|
|
97
|
+
/** Deletes a node. */
|
|
98
|
+
await gapi.client.tpu.projects.locations.nodes.delete({
|
|
99
|
+
name: "Test string",
|
|
100
|
+
});
|
|
101
|
+
/** Gets the details of a node. */
|
|
102
|
+
await gapi.client.tpu.projects.locations.nodes.get({
|
|
103
|
+
name: "Test string",
|
|
104
|
+
});
|
|
105
|
+
/** Lists nodes. */
|
|
106
|
+
await gapi.client.tpu.projects.locations.nodes.list({
|
|
107
|
+
pageSize: 42,
|
|
108
|
+
pageToken: "Test string",
|
|
109
|
+
parent: "Test string",
|
|
110
|
+
});
|
|
111
|
+
/** Reimages a node's OS. */
|
|
112
|
+
await gapi.client.tpu.projects.locations.nodes.reimage({
|
|
113
|
+
name: "Test string",
|
|
114
|
+
}, {
|
|
115
|
+
tensorflowVersion: "Test string",
|
|
116
|
+
});
|
|
117
|
+
/** Starts a node. */
|
|
118
|
+
await gapi.client.tpu.projects.locations.nodes.start({
|
|
119
|
+
name: "Test string",
|
|
120
|
+
}, {
|
|
121
|
+
});
|
|
122
|
+
/** Stops a node, this operation is only available with single TPU nodes. */
|
|
123
|
+
await gapi.client.tpu.projects.locations.nodes.stop({
|
|
124
|
+
name: "Test string",
|
|
125
|
+
}, {
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
|
|
129
|
+
* method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
|
|
130
|
+
* completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
|
|
131
|
+
* 1, corresponding to `Code.CANCELLED`.
|
|
132
|
+
*/
|
|
133
|
+
await gapi.client.tpu.projects.locations.operations.cancel({
|
|
134
|
+
name: "Test string",
|
|
135
|
+
});
|
|
136
|
+
/**
|
|
137
|
+
* Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support
|
|
138
|
+
* this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
139
|
+
*/
|
|
140
|
+
await gapi.client.tpu.projects.locations.operations.delete({
|
|
141
|
+
name: "Test string",
|
|
142
|
+
});
|
|
143
|
+
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
144
|
+
await gapi.client.tpu.projects.locations.operations.get({
|
|
145
|
+
name: "Test string",
|
|
146
|
+
});
|
|
147
|
+
/**
|
|
148
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
|
|
149
|
+
* override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as
|
|
150
|
+
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
151
|
+
* ensure the name binding is the parent resource, without the operations collection id.
|
|
152
|
+
*/
|
|
153
|
+
await gapi.client.tpu.projects.locations.operations.list({
|
|
154
|
+
filter: "Test string",
|
|
155
|
+
name: "Test string",
|
|
156
|
+
pageSize: 42,
|
|
157
|
+
pageToken: "Test string",
|
|
158
|
+
});
|
|
159
|
+
/** Gets TensorFlow Version. */
|
|
160
|
+
await gapi.client.tpu.projects.locations.tensorflowVersions.get({
|
|
161
|
+
name: "Test string",
|
|
162
|
+
});
|
|
163
|
+
/** List TensorFlow versions supported by this API. */
|
|
164
|
+
await gapi.client.tpu.projects.locations.tensorflowVersions.list({
|
|
165
|
+
filter: "Test string",
|
|
166
|
+
orderBy: "Test string",
|
|
167
|
+
pageSize: 42,
|
|
168
|
+
pageToken: "Test string",
|
|
169
|
+
parent: "Test string",
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"lib": ["es6", "dom"],
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"noImplicitThis": true,
|
|
7
|
+
"strictNullChecks": true,
|
|
8
|
+
"baseUrl": "../",
|
|
9
|
+
"typeRoots": [
|
|
10
|
+
"../"
|
|
11
|
+
],
|
|
12
|
+
"types": [],
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"strictFunctionTypes": true
|
|
16
|
+
},
|
|
17
|
+
"files": ["index.d.ts", "tests.ts"]
|
|
18
|
+
}
|