@maxim_mazurok/gapi.client.workloadmanager-v1 0.0.20221213
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 +664 -0
- package/package.json +20 -0
- package/readme.md +68 -0
- package/tests.ts +194 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Workload Manager API v1 0.0 */
|
|
2
|
+
// Project: https://cloud.google.com/workload-manager/docs
|
|
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
|
+
|
|
8
|
+
// IMPORTANT
|
|
9
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
|
+
// Generated from: https://workloadmanager.googleapis.com/$discovery/rest?version=v1
|
|
12
|
+
// Revision: 20221213
|
|
13
|
+
|
|
14
|
+
/// <reference types="gapi.client" />
|
|
15
|
+
|
|
16
|
+
declare namespace gapi.client {
|
|
17
|
+
/** Load Workload Manager API v1 */
|
|
18
|
+
function load(urlOrObject: "https://workloadmanager.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
|
|
19
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
20
|
+
function load(name: "workloadmanager", version: "v1"): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: "workloadmanager", version: "v1", callback: () => any): void;
|
|
23
|
+
|
|
24
|
+
namespace workloadmanager {
|
|
25
|
+
// tslint:disable-next-line:no-empty-interface
|
|
26
|
+
interface CancelOperationRequest {
|
|
27
|
+
}
|
|
28
|
+
// tslint:disable-next-line:no-empty-interface
|
|
29
|
+
interface Empty {
|
|
30
|
+
}
|
|
31
|
+
interface Evaluation {
|
|
32
|
+
/** Output only. [Output only] Create time stamp */
|
|
33
|
+
createTime?: string;
|
|
34
|
+
/** Description of the Evaluation */
|
|
35
|
+
description?: string;
|
|
36
|
+
/** Labels as key value pairs */
|
|
37
|
+
labels?: { [P in string]: string };
|
|
38
|
+
/** name of resource names have the form 'projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}' */
|
|
39
|
+
name?: string;
|
|
40
|
+
/** annotations as key value pairs */
|
|
41
|
+
resourceFilter?: ResourceFilter;
|
|
42
|
+
/** Output only. [Output only] The updated rule ids if exist. */
|
|
43
|
+
resourceStatus?: ResourceStatus;
|
|
44
|
+
/** the name of the rule */
|
|
45
|
+
ruleNames?: string[];
|
|
46
|
+
/** Output only. [Output only] The updated rule ids if exist. */
|
|
47
|
+
ruleVersions?: string[];
|
|
48
|
+
/** Output only. [Output only] Update time stamp */
|
|
49
|
+
updateTime?: string;
|
|
50
|
+
}
|
|
51
|
+
interface GceInstanceFilter {
|
|
52
|
+
/** Service account of compute engine */
|
|
53
|
+
serviceAccounts?: string[];
|
|
54
|
+
}
|
|
55
|
+
interface Insight {
|
|
56
|
+
/** The insights data for sap system discovery. This is a copy of SAP System proto and should get updated whenever that one changes. */
|
|
57
|
+
sapDiscovery?: SapDiscovery;
|
|
58
|
+
/** The insights data for the sap workload validation. */
|
|
59
|
+
sapValidation?: SapValidation;
|
|
60
|
+
/** Output only. [Output only] Create time stamp */
|
|
61
|
+
sentTime?: string;
|
|
62
|
+
}
|
|
63
|
+
interface ListEvaluationsResponse {
|
|
64
|
+
/** The list of Evaluation */
|
|
65
|
+
evaluations?: Evaluation[];
|
|
66
|
+
/** A token identifying a page of results the server should return. */
|
|
67
|
+
nextPageToken?: string;
|
|
68
|
+
/** Locations that could not be reached. */
|
|
69
|
+
unreachable?: string[];
|
|
70
|
+
}
|
|
71
|
+
interface ListLocationsResponse {
|
|
72
|
+
/** A list of locations that matches the specified filter in the request. */
|
|
73
|
+
locations?: Location[];
|
|
74
|
+
/** The standard List next-page token. */
|
|
75
|
+
nextPageToken?: string;
|
|
76
|
+
}
|
|
77
|
+
interface ListOperationsResponse {
|
|
78
|
+
/** The standard List next-page token. */
|
|
79
|
+
nextPageToken?: string;
|
|
80
|
+
/** A list of operations that matches the specified filter in the request. */
|
|
81
|
+
operations?: Operation[];
|
|
82
|
+
}
|
|
83
|
+
interface Location {
|
|
84
|
+
/** The friendly name for this location, typically a nearby city name. For example, "Tokyo". */
|
|
85
|
+
displayName?: string;
|
|
86
|
+
/** Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} */
|
|
87
|
+
labels?: { [P in string]: string };
|
|
88
|
+
/** The canonical id for this location. For example: `"us-east1"`. */
|
|
89
|
+
locationId?: string;
|
|
90
|
+
/** Service-specific metadata. For example the available capacity at the given location. */
|
|
91
|
+
metadata?: { [P in string]: any };
|
|
92
|
+
/** Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` */
|
|
93
|
+
name?: string;
|
|
94
|
+
}
|
|
95
|
+
interface Operation {
|
|
96
|
+
/** 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. */
|
|
97
|
+
done?: boolean;
|
|
98
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
99
|
+
error?: Status;
|
|
100
|
+
/**
|
|
101
|
+
* 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
|
|
102
|
+
* metadata. Any method that returns a long-running operation should document the metadata type, if any.
|
|
103
|
+
*/
|
|
104
|
+
metadata?: { [P in string]: any };
|
|
105
|
+
/**
|
|
106
|
+
* 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
|
|
107
|
+
* with `operations/{unique_id}`.
|
|
108
|
+
*/
|
|
109
|
+
name?: string;
|
|
110
|
+
/**
|
|
111
|
+
* 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
|
|
112
|
+
* 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
|
|
113
|
+
* original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
|
|
114
|
+
*/
|
|
115
|
+
response?: { [P in string]: any };
|
|
116
|
+
}
|
|
117
|
+
interface OperationMetadata {
|
|
118
|
+
/** Output only. API version used to start the operation. */
|
|
119
|
+
apiVersion?: string;
|
|
120
|
+
/** Output only. The time the operation was created. */
|
|
121
|
+
createTime?: string;
|
|
122
|
+
/** Output only. The time the operation finished running. */
|
|
123
|
+
endTime?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a
|
|
126
|
+
* google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
|
|
127
|
+
*/
|
|
128
|
+
requestedCancellation?: boolean;
|
|
129
|
+
/** Output only. Human-readable status of the operation, if any. */
|
|
130
|
+
statusMessage?: string;
|
|
131
|
+
/** Output only. Server-defined resource path for the target of the operation. */
|
|
132
|
+
target?: string;
|
|
133
|
+
/** Output only. Name of the verb executed by the operation. */
|
|
134
|
+
verb?: string;
|
|
135
|
+
}
|
|
136
|
+
interface ResourceFilter {
|
|
137
|
+
/** Filter compute engine resource */
|
|
138
|
+
gceInstanceFilter?: GceInstanceFilter;
|
|
139
|
+
/** The label used for filter resource */
|
|
140
|
+
inclusionLabels?: { [P in string]: string };
|
|
141
|
+
/** The id pattern for filter resource */
|
|
142
|
+
resourceIdPatterns?: string[];
|
|
143
|
+
/** The scopes of evaluation resource */
|
|
144
|
+
scopes?: string[];
|
|
145
|
+
}
|
|
146
|
+
interface ResourceStatus {
|
|
147
|
+
/** the new version of rule id if exists */
|
|
148
|
+
rulesNewerVersions?: string[];
|
|
149
|
+
/** State of the resource */
|
|
150
|
+
state?: string;
|
|
151
|
+
}
|
|
152
|
+
interface SapDiscovery {
|
|
153
|
+
/** An SAP system may run without an application layer. */
|
|
154
|
+
applicationLayer?: SapDiscoveryComponent;
|
|
155
|
+
/** An SAP System must have a database. */
|
|
156
|
+
databaseLayer?: SapDiscoveryComponent;
|
|
157
|
+
/** The metadata for SAP system discovery data. */
|
|
158
|
+
metadata?: SapDiscoveryMetadata;
|
|
159
|
+
/** A combination of database SID, database instance URI and tenant DB name to make a unique identifier per-system. */
|
|
160
|
+
systemId?: string;
|
|
161
|
+
/** Unix timestamp this system has been updated last. */
|
|
162
|
+
updateTime?: string;
|
|
163
|
+
}
|
|
164
|
+
interface SapDiscoveryComponent {
|
|
165
|
+
/** The component is a SAP application. */
|
|
166
|
+
applicationType?: string;
|
|
167
|
+
/** The component is a SAP database. */
|
|
168
|
+
databaseType?: string;
|
|
169
|
+
/** Pantheon Project in which the resources reside. */
|
|
170
|
+
hostProject?: string;
|
|
171
|
+
/** The resources in a component. */
|
|
172
|
+
resources?: SapDiscoveryResource[];
|
|
173
|
+
/** The sap identifier, used by the SAP software and helps differentiate systems for customers. */
|
|
174
|
+
sid?: string;
|
|
175
|
+
}
|
|
176
|
+
interface SapDiscoveryMetadata {
|
|
177
|
+
/** Customer region string for customer's use. Does not represent GCP region. */
|
|
178
|
+
customerRegion?: string;
|
|
179
|
+
/** Customer defined, something like "E-commerce pre prod" */
|
|
180
|
+
definedSystem?: string;
|
|
181
|
+
/** Should be "prod", "QA", "dev", "staging", etc. */
|
|
182
|
+
environmentType?: string;
|
|
183
|
+
/** This sap product name */
|
|
184
|
+
sapProduct?: string;
|
|
185
|
+
}
|
|
186
|
+
interface SapDiscoveryResource {
|
|
187
|
+
/** A list of resource URIs related to this resource. */
|
|
188
|
+
relatedResources?: string[];
|
|
189
|
+
/** ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc. */
|
|
190
|
+
resourceKind?: string;
|
|
191
|
+
/** The type of this resource. */
|
|
192
|
+
resourceType?: string;
|
|
193
|
+
/** URI of the resource, includes project, location, and name. */
|
|
194
|
+
resourceUri?: string;
|
|
195
|
+
/** Unix timestamp of when this resource last had its discovery data updated. */
|
|
196
|
+
updateTime?: string;
|
|
197
|
+
}
|
|
198
|
+
interface SapValidation {
|
|
199
|
+
/** A list of SAP validation metrics data. */
|
|
200
|
+
validationDetails?: SapValidationValidationDetail[];
|
|
201
|
+
}
|
|
202
|
+
interface SapValidationValidationDetail {
|
|
203
|
+
/** The pairs of metrics data: field name & field value. */
|
|
204
|
+
details?: { [P in string]: string };
|
|
205
|
+
/** The SAP system that the validation data is from. */
|
|
206
|
+
sapValidationType?: string;
|
|
207
|
+
}
|
|
208
|
+
interface Status {
|
|
209
|
+
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
210
|
+
code?: number;
|
|
211
|
+
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
212
|
+
details?: Array<{ [P in string]: any }>;
|
|
213
|
+
/**
|
|
214
|
+
* 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
|
|
215
|
+
* client.
|
|
216
|
+
*/
|
|
217
|
+
message?: string;
|
|
218
|
+
}
|
|
219
|
+
interface WriteInsightRequest {
|
|
220
|
+
/** Required. The metrics data details. */
|
|
221
|
+
insight?: Insight;
|
|
222
|
+
/**
|
|
223
|
+
* Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has
|
|
224
|
+
* already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he
|
|
225
|
+
* request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore
|
|
226
|
+
* the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported
|
|
227
|
+
* (00000000-0000-0000-0000-000000000000).
|
|
228
|
+
*/
|
|
229
|
+
requestId?: string;
|
|
230
|
+
}
|
|
231
|
+
// tslint:disable-next-line:no-empty-interface
|
|
232
|
+
interface WriteInsightResponse {
|
|
233
|
+
}
|
|
234
|
+
interface EvaluationsResource {
|
|
235
|
+
/** Creates a new Evaluation in a given project and location. */
|
|
236
|
+
create(request: {
|
|
237
|
+
/** V1 error format. */
|
|
238
|
+
"$.xgafv"?: string;
|
|
239
|
+
/** OAuth access token. */
|
|
240
|
+
access_token?: string;
|
|
241
|
+
/** Data format for response. */
|
|
242
|
+
alt?: string;
|
|
243
|
+
/** JSONP */
|
|
244
|
+
callback?: string;
|
|
245
|
+
/** Required. Id of the requesting object If auto-generating Id server-side, remove this field and evaluation_id from the method_signature of Create RPC */
|
|
246
|
+
evaluationId?: string;
|
|
247
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
248
|
+
fields?: string;
|
|
249
|
+
/** 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. */
|
|
250
|
+
key?: string;
|
|
251
|
+
/** OAuth 2.0 token for the current user. */
|
|
252
|
+
oauth_token?: string;
|
|
253
|
+
/** Required. The resource name of the evaluation location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. */
|
|
254
|
+
parent: string;
|
|
255
|
+
/** Returns response with indentations and line breaks. */
|
|
256
|
+
prettyPrint?: boolean;
|
|
257
|
+
/** 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. */
|
|
258
|
+
quotaUser?: string;
|
|
259
|
+
/**
|
|
260
|
+
* Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has
|
|
261
|
+
* already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t
|
|
262
|
+
* he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will
|
|
263
|
+
* ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not
|
|
264
|
+
* supported (00000000-0000-0000-0000-000000000000).
|
|
265
|
+
*/
|
|
266
|
+
requestId?: string;
|
|
267
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
268
|
+
upload_protocol?: string;
|
|
269
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
270
|
+
uploadType?: string;
|
|
271
|
+
/** Request body */
|
|
272
|
+
resource: Evaluation;
|
|
273
|
+
}): Request<Operation>;
|
|
274
|
+
create(request: {
|
|
275
|
+
/** V1 error format. */
|
|
276
|
+
"$.xgafv"?: string;
|
|
277
|
+
/** OAuth access token. */
|
|
278
|
+
access_token?: string;
|
|
279
|
+
/** Data format for response. */
|
|
280
|
+
alt?: string;
|
|
281
|
+
/** JSONP */
|
|
282
|
+
callback?: string;
|
|
283
|
+
/** Required. Id of the requesting object If auto-generating Id server-side, remove this field and evaluation_id from the method_signature of Create RPC */
|
|
284
|
+
evaluationId?: string;
|
|
285
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
286
|
+
fields?: string;
|
|
287
|
+
/** 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. */
|
|
288
|
+
key?: string;
|
|
289
|
+
/** OAuth 2.0 token for the current user. */
|
|
290
|
+
oauth_token?: string;
|
|
291
|
+
/** Required. The resource name of the evaluation location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. */
|
|
292
|
+
parent: string;
|
|
293
|
+
/** Returns response with indentations and line breaks. */
|
|
294
|
+
prettyPrint?: boolean;
|
|
295
|
+
/** 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. */
|
|
296
|
+
quotaUser?: string;
|
|
297
|
+
/**
|
|
298
|
+
* Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has
|
|
299
|
+
* already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t
|
|
300
|
+
* he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will
|
|
301
|
+
* ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not
|
|
302
|
+
* supported (00000000-0000-0000-0000-000000000000).
|
|
303
|
+
*/
|
|
304
|
+
requestId?: string;
|
|
305
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
306
|
+
upload_protocol?: string;
|
|
307
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
308
|
+
uploadType?: string;
|
|
309
|
+
},
|
|
310
|
+
body: Evaluation): Request<Operation>;
|
|
311
|
+
/** Gets details of a single Evaluation. */
|
|
312
|
+
get(request?: {
|
|
313
|
+
/** V1 error format. */
|
|
314
|
+
"$.xgafv"?: string;
|
|
315
|
+
/** OAuth access token. */
|
|
316
|
+
access_token?: string;
|
|
317
|
+
/** Data format for response. */
|
|
318
|
+
alt?: string;
|
|
319
|
+
/** JSONP */
|
|
320
|
+
callback?: string;
|
|
321
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
322
|
+
fields?: string;
|
|
323
|
+
/** 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. */
|
|
324
|
+
key?: string;
|
|
325
|
+
/** Required. Name of the resource */
|
|
326
|
+
name: string;
|
|
327
|
+
/** OAuth 2.0 token for the current user. */
|
|
328
|
+
oauth_token?: string;
|
|
329
|
+
/** Returns response with indentations and line breaks. */
|
|
330
|
+
prettyPrint?: boolean;
|
|
331
|
+
/** 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. */
|
|
332
|
+
quotaUser?: string;
|
|
333
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
334
|
+
upload_protocol?: string;
|
|
335
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
336
|
+
uploadType?: string;
|
|
337
|
+
}): Request<Evaluation>;
|
|
338
|
+
/** Lists Evaluations in a given project and location. */
|
|
339
|
+
list(request?: {
|
|
340
|
+
/** V1 error format. */
|
|
341
|
+
"$.xgafv"?: string;
|
|
342
|
+
/** OAuth access token. */
|
|
343
|
+
access_token?: string;
|
|
344
|
+
/** Data format for response. */
|
|
345
|
+
alt?: string;
|
|
346
|
+
/** JSONP */
|
|
347
|
+
callback?: string;
|
|
348
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
349
|
+
fields?: string;
|
|
350
|
+
/** Filtering results */
|
|
351
|
+
filter?: string;
|
|
352
|
+
/** 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. */
|
|
353
|
+
key?: string;
|
|
354
|
+
/** OAuth 2.0 token for the current user. */
|
|
355
|
+
oauth_token?: string;
|
|
356
|
+
/** Hint for how to order the results */
|
|
357
|
+
orderBy?: string;
|
|
358
|
+
/** Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. */
|
|
359
|
+
pageSize?: number;
|
|
360
|
+
/** A token identifying a page of results the server should return. */
|
|
361
|
+
pageToken?: string;
|
|
362
|
+
/** Required. Parent value for ListEvaluationsRequest */
|
|
363
|
+
parent: string;
|
|
364
|
+
/** Returns response with indentations and line breaks. */
|
|
365
|
+
prettyPrint?: boolean;
|
|
366
|
+
/** 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. */
|
|
367
|
+
quotaUser?: string;
|
|
368
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
369
|
+
upload_protocol?: string;
|
|
370
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
371
|
+
uploadType?: string;
|
|
372
|
+
}): Request<ListEvaluationsResponse>;
|
|
373
|
+
}
|
|
374
|
+
interface InsightsResource {
|
|
375
|
+
/** Write the data insights to workload manager data warehouse. */
|
|
376
|
+
writeInsight(request: {
|
|
377
|
+
/** V1 error format. */
|
|
378
|
+
"$.xgafv"?: string;
|
|
379
|
+
/** OAuth access token. */
|
|
380
|
+
access_token?: string;
|
|
381
|
+
/** Data format for response. */
|
|
382
|
+
alt?: string;
|
|
383
|
+
/** JSONP */
|
|
384
|
+
callback?: string;
|
|
385
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
386
|
+
fields?: string;
|
|
387
|
+
/** 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. */
|
|
388
|
+
key?: string;
|
|
389
|
+
/** Required. The GCP location. The format is: projects/{project}/locations/{location}. */
|
|
390
|
+
location: string;
|
|
391
|
+
/** OAuth 2.0 token for the current user. */
|
|
392
|
+
oauth_token?: string;
|
|
393
|
+
/** Returns response with indentations and line breaks. */
|
|
394
|
+
prettyPrint?: boolean;
|
|
395
|
+
/** 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. */
|
|
396
|
+
quotaUser?: string;
|
|
397
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
398
|
+
upload_protocol?: string;
|
|
399
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
400
|
+
uploadType?: string;
|
|
401
|
+
/** Request body */
|
|
402
|
+
resource: WriteInsightRequest;
|
|
403
|
+
}): Request<{}>;
|
|
404
|
+
writeInsight(request: {
|
|
405
|
+
/** V1 error format. */
|
|
406
|
+
"$.xgafv"?: string;
|
|
407
|
+
/** OAuth access token. */
|
|
408
|
+
access_token?: string;
|
|
409
|
+
/** Data format for response. */
|
|
410
|
+
alt?: string;
|
|
411
|
+
/** JSONP */
|
|
412
|
+
callback?: string;
|
|
413
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
414
|
+
fields?: string;
|
|
415
|
+
/** 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. */
|
|
416
|
+
key?: string;
|
|
417
|
+
/** Required. The GCP location. The format is: projects/{project}/locations/{location}. */
|
|
418
|
+
location: string;
|
|
419
|
+
/** OAuth 2.0 token for the current user. */
|
|
420
|
+
oauth_token?: string;
|
|
421
|
+
/** Returns response with indentations and line breaks. */
|
|
422
|
+
prettyPrint?: boolean;
|
|
423
|
+
/** 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. */
|
|
424
|
+
quotaUser?: string;
|
|
425
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
426
|
+
upload_protocol?: string;
|
|
427
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
428
|
+
uploadType?: string;
|
|
429
|
+
},
|
|
430
|
+
body: WriteInsightRequest): Request<{}>;
|
|
431
|
+
}
|
|
432
|
+
interface OperationsResource {
|
|
433
|
+
/**
|
|
434
|
+
* 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
|
|
435
|
+
* 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
|
|
436
|
+
* operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a
|
|
437
|
+
* google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
|
|
438
|
+
*/
|
|
439
|
+
cancel(request: {
|
|
440
|
+
/** V1 error format. */
|
|
441
|
+
"$.xgafv"?: string;
|
|
442
|
+
/** OAuth access token. */
|
|
443
|
+
access_token?: string;
|
|
444
|
+
/** Data format for response. */
|
|
445
|
+
alt?: string;
|
|
446
|
+
/** JSONP */
|
|
447
|
+
callback?: string;
|
|
448
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
449
|
+
fields?: string;
|
|
450
|
+
/** 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. */
|
|
451
|
+
key?: string;
|
|
452
|
+
/** The name of the operation resource to be cancelled. */
|
|
453
|
+
name: string;
|
|
454
|
+
/** OAuth 2.0 token for the current user. */
|
|
455
|
+
oauth_token?: string;
|
|
456
|
+
/** Returns response with indentations and line breaks. */
|
|
457
|
+
prettyPrint?: boolean;
|
|
458
|
+
/** 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. */
|
|
459
|
+
quotaUser?: string;
|
|
460
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
461
|
+
upload_protocol?: string;
|
|
462
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
463
|
+
uploadType?: string;
|
|
464
|
+
/** Request body */
|
|
465
|
+
resource: CancelOperationRequest;
|
|
466
|
+
}): Request<{}>;
|
|
467
|
+
cancel(request: {
|
|
468
|
+
/** V1 error format. */
|
|
469
|
+
"$.xgafv"?: string;
|
|
470
|
+
/** OAuth access token. */
|
|
471
|
+
access_token?: string;
|
|
472
|
+
/** Data format for response. */
|
|
473
|
+
alt?: string;
|
|
474
|
+
/** JSONP */
|
|
475
|
+
callback?: string;
|
|
476
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
477
|
+
fields?: string;
|
|
478
|
+
/** 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. */
|
|
479
|
+
key?: string;
|
|
480
|
+
/** The name of the operation resource to be cancelled. */
|
|
481
|
+
name: string;
|
|
482
|
+
/** OAuth 2.0 token for the current user. */
|
|
483
|
+
oauth_token?: string;
|
|
484
|
+
/** Returns response with indentations and line breaks. */
|
|
485
|
+
prettyPrint?: boolean;
|
|
486
|
+
/** 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. */
|
|
487
|
+
quotaUser?: string;
|
|
488
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
489
|
+
upload_protocol?: string;
|
|
490
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
491
|
+
uploadType?: string;
|
|
492
|
+
},
|
|
493
|
+
body: CancelOperationRequest): Request<{}>;
|
|
494
|
+
/**
|
|
495
|
+
* 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
|
|
496
|
+
* support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
497
|
+
*/
|
|
498
|
+
delete(request?: {
|
|
499
|
+
/** V1 error format. */
|
|
500
|
+
"$.xgafv"?: string;
|
|
501
|
+
/** OAuth access token. */
|
|
502
|
+
access_token?: string;
|
|
503
|
+
/** Data format for response. */
|
|
504
|
+
alt?: string;
|
|
505
|
+
/** JSONP */
|
|
506
|
+
callback?: string;
|
|
507
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
508
|
+
fields?: string;
|
|
509
|
+
/** 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. */
|
|
510
|
+
key?: string;
|
|
511
|
+
/** The name of the operation resource to be deleted. */
|
|
512
|
+
name: string;
|
|
513
|
+
/** OAuth 2.0 token for the current user. */
|
|
514
|
+
oauth_token?: string;
|
|
515
|
+
/** Returns response with indentations and line breaks. */
|
|
516
|
+
prettyPrint?: boolean;
|
|
517
|
+
/** 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. */
|
|
518
|
+
quotaUser?: string;
|
|
519
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
520
|
+
upload_protocol?: string;
|
|
521
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
522
|
+
uploadType?: string;
|
|
523
|
+
}): Request<{}>;
|
|
524
|
+
/** 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. */
|
|
525
|
+
get(request?: {
|
|
526
|
+
/** V1 error format. */
|
|
527
|
+
"$.xgafv"?: string;
|
|
528
|
+
/** OAuth access token. */
|
|
529
|
+
access_token?: string;
|
|
530
|
+
/** Data format for response. */
|
|
531
|
+
alt?: string;
|
|
532
|
+
/** JSONP */
|
|
533
|
+
callback?: string;
|
|
534
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
535
|
+
fields?: string;
|
|
536
|
+
/** 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. */
|
|
537
|
+
key?: string;
|
|
538
|
+
/** The name of the operation resource. */
|
|
539
|
+
name: string;
|
|
540
|
+
/** OAuth 2.0 token for the current user. */
|
|
541
|
+
oauth_token?: string;
|
|
542
|
+
/** Returns response with indentations and line breaks. */
|
|
543
|
+
prettyPrint?: boolean;
|
|
544
|
+
/** 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. */
|
|
545
|
+
quotaUser?: string;
|
|
546
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
547
|
+
upload_protocol?: string;
|
|
548
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
549
|
+
uploadType?: string;
|
|
550
|
+
}): Request<Operation>;
|
|
551
|
+
/**
|
|
552
|
+
* 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
|
|
553
|
+
* 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
|
|
554
|
+
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
555
|
+
* ensure the name binding is the parent resource, without the operations collection id.
|
|
556
|
+
*/
|
|
557
|
+
list(request?: {
|
|
558
|
+
/** V1 error format. */
|
|
559
|
+
"$.xgafv"?: string;
|
|
560
|
+
/** OAuth access token. */
|
|
561
|
+
access_token?: string;
|
|
562
|
+
/** Data format for response. */
|
|
563
|
+
alt?: string;
|
|
564
|
+
/** JSONP */
|
|
565
|
+
callback?: string;
|
|
566
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
567
|
+
fields?: string;
|
|
568
|
+
/** The standard list filter. */
|
|
569
|
+
filter?: string;
|
|
570
|
+
/** 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. */
|
|
571
|
+
key?: string;
|
|
572
|
+
/** The name of the operation's parent resource. */
|
|
573
|
+
name: string;
|
|
574
|
+
/** OAuth 2.0 token for the current user. */
|
|
575
|
+
oauth_token?: string;
|
|
576
|
+
/** The standard list page size. */
|
|
577
|
+
pageSize?: number;
|
|
578
|
+
/** The standard list page token. */
|
|
579
|
+
pageToken?: string;
|
|
580
|
+
/** Returns response with indentations and line breaks. */
|
|
581
|
+
prettyPrint?: boolean;
|
|
582
|
+
/** 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. */
|
|
583
|
+
quotaUser?: string;
|
|
584
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
585
|
+
upload_protocol?: string;
|
|
586
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
587
|
+
uploadType?: string;
|
|
588
|
+
}): Request<ListOperationsResponse>;
|
|
589
|
+
}
|
|
590
|
+
interface LocationsResource {
|
|
591
|
+
/** Gets information about a location. */
|
|
592
|
+
get(request?: {
|
|
593
|
+
/** V1 error format. */
|
|
594
|
+
"$.xgafv"?: string;
|
|
595
|
+
/** OAuth access token. */
|
|
596
|
+
access_token?: string;
|
|
597
|
+
/** Data format for response. */
|
|
598
|
+
alt?: string;
|
|
599
|
+
/** JSONP */
|
|
600
|
+
callback?: string;
|
|
601
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
602
|
+
fields?: string;
|
|
603
|
+
/** 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. */
|
|
604
|
+
key?: string;
|
|
605
|
+
/** Resource name for the location. */
|
|
606
|
+
name: string;
|
|
607
|
+
/** OAuth 2.0 token for the current user. */
|
|
608
|
+
oauth_token?: string;
|
|
609
|
+
/** Returns response with indentations and line breaks. */
|
|
610
|
+
prettyPrint?: boolean;
|
|
611
|
+
/** 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. */
|
|
612
|
+
quotaUser?: string;
|
|
613
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
614
|
+
upload_protocol?: string;
|
|
615
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
616
|
+
uploadType?: string;
|
|
617
|
+
}): Request<Location>;
|
|
618
|
+
/** Lists information about the supported locations for this service. */
|
|
619
|
+
list(request?: {
|
|
620
|
+
/** V1 error format. */
|
|
621
|
+
"$.xgafv"?: string;
|
|
622
|
+
/** OAuth access token. */
|
|
623
|
+
access_token?: string;
|
|
624
|
+
/** Data format for response. */
|
|
625
|
+
alt?: string;
|
|
626
|
+
/** JSONP */
|
|
627
|
+
callback?: string;
|
|
628
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
629
|
+
fields?: string;
|
|
630
|
+
/**
|
|
631
|
+
* 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
|
|
632
|
+
* [AIP-160](https://google.aip.dev/160).
|
|
633
|
+
*/
|
|
634
|
+
filter?: string;
|
|
635
|
+
/** 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. */
|
|
636
|
+
key?: string;
|
|
637
|
+
/** The resource that owns the locations collection, if applicable. */
|
|
638
|
+
name: string;
|
|
639
|
+
/** OAuth 2.0 token for the current user. */
|
|
640
|
+
oauth_token?: string;
|
|
641
|
+
/** The maximum number of results to return. If not set, the service selects a default. */
|
|
642
|
+
pageSize?: number;
|
|
643
|
+
/** A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */
|
|
644
|
+
pageToken?: string;
|
|
645
|
+
/** Returns response with indentations and line breaks. */
|
|
646
|
+
prettyPrint?: boolean;
|
|
647
|
+
/** 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. */
|
|
648
|
+
quotaUser?: string;
|
|
649
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
650
|
+
upload_protocol?: string;
|
|
651
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
652
|
+
uploadType?: string;
|
|
653
|
+
}): Request<ListLocationsResponse>;
|
|
654
|
+
evaluations: EvaluationsResource;
|
|
655
|
+
insights: InsightsResource;
|
|
656
|
+
operations: OperationsResource;
|
|
657
|
+
}
|
|
658
|
+
interface ProjectsResource {
|
|
659
|
+
locations: LocationsResource;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
const projects: ProjectsResource;
|
|
663
|
+
}
|
|
664
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.workloadmanager-v1",
|
|
3
|
+
"version": "0.0.20221213",
|
|
4
|
+
"description": "TypeScript typings for Workload Manager 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 Workload Manager API v1
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
For detailed description please check [documentation](https://cloud.google.com/workload-manager/docs).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Workload Manager API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.workloadmanager-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://workloadmanager.googleapis.com/$discovery/rest?version=v1', () => {
|
|
29
|
+
// now we can use:
|
|
30
|
+
// gapi.client.workloadmanager
|
|
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('workloadmanager', 'v1', () => {
|
|
37
|
+
// now we can use:
|
|
38
|
+
// gapi.client.workloadmanager
|
|
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 Workload Manager API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
```
|
package/tests.ts
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.workloadmanager-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: 20221213
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://workloadmanager.googleapis.com/$discovery/rest?version=v1');
|
|
12
|
+
/** now we can use gapi.client.workloadmanager */
|
|
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.workloadmanager.projects.locations.get({
|
|
34
|
+
name: "Test string",
|
|
35
|
+
});
|
|
36
|
+
/** Lists information about the supported locations for this service. */
|
|
37
|
+
await gapi.client.workloadmanager.projects.locations.list({
|
|
38
|
+
filter: "Test string",
|
|
39
|
+
name: "Test string",
|
|
40
|
+
pageSize: 42,
|
|
41
|
+
pageToken: "Test string",
|
|
42
|
+
});
|
|
43
|
+
/** Creates a new Evaluation in a given project and location. */
|
|
44
|
+
await gapi.client.workloadmanager.projects.locations.evaluations.create({
|
|
45
|
+
evaluationId: "Test string",
|
|
46
|
+
parent: "Test string",
|
|
47
|
+
requestId: "Test string",
|
|
48
|
+
}, {
|
|
49
|
+
createTime: "Test string",
|
|
50
|
+
description: "Test string",
|
|
51
|
+
labels: {
|
|
52
|
+
A: "Test string"
|
|
53
|
+
},
|
|
54
|
+
name: "Test string",
|
|
55
|
+
resourceFilter: {
|
|
56
|
+
gceInstanceFilter: {
|
|
57
|
+
serviceAccounts: [
|
|
58
|
+
"Test string"
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
inclusionLabels: {
|
|
62
|
+
A: "Test string"
|
|
63
|
+
},
|
|
64
|
+
resourceIdPatterns: [
|
|
65
|
+
"Test string"
|
|
66
|
+
],
|
|
67
|
+
scopes: [
|
|
68
|
+
"Test string"
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
resourceStatus: {
|
|
72
|
+
rulesNewerVersions: [
|
|
73
|
+
"Test string"
|
|
74
|
+
],
|
|
75
|
+
state: "Test string",
|
|
76
|
+
},
|
|
77
|
+
ruleNames: [
|
|
78
|
+
"Test string"
|
|
79
|
+
],
|
|
80
|
+
ruleVersions: [
|
|
81
|
+
"Test string"
|
|
82
|
+
],
|
|
83
|
+
updateTime: "Test string",
|
|
84
|
+
});
|
|
85
|
+
/** Gets details of a single Evaluation. */
|
|
86
|
+
await gapi.client.workloadmanager.projects.locations.evaluations.get({
|
|
87
|
+
name: "Test string",
|
|
88
|
+
});
|
|
89
|
+
/** Lists Evaluations in a given project and location. */
|
|
90
|
+
await gapi.client.workloadmanager.projects.locations.evaluations.list({
|
|
91
|
+
filter: "Test string",
|
|
92
|
+
orderBy: "Test string",
|
|
93
|
+
pageSize: 42,
|
|
94
|
+
pageToken: "Test string",
|
|
95
|
+
parent: "Test string",
|
|
96
|
+
});
|
|
97
|
+
/** Write the data insights to workload manager data warehouse. */
|
|
98
|
+
await gapi.client.workloadmanager.projects.locations.insights.writeInsight({
|
|
99
|
+
location: "Test string",
|
|
100
|
+
}, {
|
|
101
|
+
insight: {
|
|
102
|
+
sapDiscovery: {
|
|
103
|
+
applicationLayer: {
|
|
104
|
+
applicationType: "Test string",
|
|
105
|
+
databaseType: "Test string",
|
|
106
|
+
hostProject: "Test string",
|
|
107
|
+
resources: [
|
|
108
|
+
{
|
|
109
|
+
relatedResources: [
|
|
110
|
+
"Test string"
|
|
111
|
+
],
|
|
112
|
+
resourceKind: "Test string",
|
|
113
|
+
resourceType: "Test string",
|
|
114
|
+
resourceUri: "Test string",
|
|
115
|
+
updateTime: "Test string",
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
sid: "Test string",
|
|
119
|
+
},
|
|
120
|
+
databaseLayer: {
|
|
121
|
+
applicationType: "Test string",
|
|
122
|
+
databaseType: "Test string",
|
|
123
|
+
hostProject: "Test string",
|
|
124
|
+
resources: [
|
|
125
|
+
{
|
|
126
|
+
relatedResources: [
|
|
127
|
+
"Test string"
|
|
128
|
+
],
|
|
129
|
+
resourceKind: "Test string",
|
|
130
|
+
resourceType: "Test string",
|
|
131
|
+
resourceUri: "Test string",
|
|
132
|
+
updateTime: "Test string",
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
sid: "Test string",
|
|
136
|
+
},
|
|
137
|
+
metadata: {
|
|
138
|
+
customerRegion: "Test string",
|
|
139
|
+
definedSystem: "Test string",
|
|
140
|
+
environmentType: "Test string",
|
|
141
|
+
sapProduct: "Test string",
|
|
142
|
+
},
|
|
143
|
+
systemId: "Test string",
|
|
144
|
+
updateTime: "Test string",
|
|
145
|
+
},
|
|
146
|
+
sapValidation: {
|
|
147
|
+
validationDetails: [
|
|
148
|
+
{
|
|
149
|
+
details: {
|
|
150
|
+
A: "Test string"
|
|
151
|
+
},
|
|
152
|
+
sapValidationType: "Test string",
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
sentTime: "Test string",
|
|
157
|
+
},
|
|
158
|
+
requestId: "Test string",
|
|
159
|
+
});
|
|
160
|
+
/**
|
|
161
|
+
* 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
|
|
162
|
+
* 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
|
|
163
|
+
* 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
|
|
164
|
+
* 1, corresponding to `Code.CANCELLED`.
|
|
165
|
+
*/
|
|
166
|
+
await gapi.client.workloadmanager.projects.locations.operations.cancel({
|
|
167
|
+
name: "Test string",
|
|
168
|
+
}, {
|
|
169
|
+
});
|
|
170
|
+
/**
|
|
171
|
+
* 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
|
|
172
|
+
* this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
173
|
+
*/
|
|
174
|
+
await gapi.client.workloadmanager.projects.locations.operations.delete({
|
|
175
|
+
name: "Test string",
|
|
176
|
+
});
|
|
177
|
+
/** 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. */
|
|
178
|
+
await gapi.client.workloadmanager.projects.locations.operations.get({
|
|
179
|
+
name: "Test string",
|
|
180
|
+
});
|
|
181
|
+
/**
|
|
182
|
+
* 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
|
|
183
|
+
* 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
|
|
184
|
+
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
185
|
+
* ensure the name binding is the parent resource, without the operations collection id.
|
|
186
|
+
*/
|
|
187
|
+
await gapi.client.workloadmanager.projects.locations.operations.list({
|
|
188
|
+
filter: "Test string",
|
|
189
|
+
name: "Test string",
|
|
190
|
+
pageSize: 42,
|
|
191
|
+
pageToken: "Test string",
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
});
|
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
|
+
}
|