@maxim_mazurok/gapi.client.cloudbilling-v1beta 0.0.20220914
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 +449 -0
- package/package.json +20 -0
- package/readme.md +84 -0
- package/tests.ts +360 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Cloud Billing API v1beta 0.0 */
|
|
2
|
+
// Project: https://cloud.google.com/billing/
|
|
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://cloudbilling.googleapis.com/$discovery/rest?version=v1beta
|
|
12
|
+
// Revision: 20220914
|
|
13
|
+
|
|
14
|
+
/// <reference types="gapi.client" />
|
|
15
|
+
|
|
16
|
+
declare namespace gapi.client {
|
|
17
|
+
/** Load Cloud Billing API v1beta */
|
|
18
|
+
function load(urlOrObject: "https://cloudbilling.googleapis.com/$discovery/rest?version=v1beta"): Promise<void>;
|
|
19
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
20
|
+
function load(name: "cloudbilling", version: "v1beta"): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: "cloudbilling", version: "v1beta", callback: () => any): void;
|
|
23
|
+
|
|
24
|
+
namespace cloudbilling {
|
|
25
|
+
interface CloudStorageWorkload {
|
|
26
|
+
/** Data retrieval usage. A retrieval cost applies when data or metadata is read, copied, or rewritten . For example: units such as "GiBy/s" or "By/s". */
|
|
27
|
+
dataRetrieval?: Usage;
|
|
28
|
+
/** Data storage usage. The amount of data stored in buckets. For example: units such as "GiBy/s" or "TBy/mo". */
|
|
29
|
+
dataStored?: Usage;
|
|
30
|
+
/** Specify dual regions. */
|
|
31
|
+
dualRegion?: DualRegional;
|
|
32
|
+
/** Specify multi regions. */
|
|
33
|
+
multiRegion?: MultiRegional;
|
|
34
|
+
/**
|
|
35
|
+
* Class A operation usage in Cloud Storage, such as listing the objects in buckets. See the [operations pricing](https://cloud.google.com/storage/pricing#operations-pricing) tables
|
|
36
|
+
* for a list of which operations fall into each class. For example: units such as "1/s".
|
|
37
|
+
*/
|
|
38
|
+
operationA?: Usage;
|
|
39
|
+
/**
|
|
40
|
+
* Class B operation usage in Cloud Storage, such as `getIamPolicy`. See the [operations pricing](https://cloud.google.com/storage/pricing#operations-pricing) tables for a list of
|
|
41
|
+
* which operations fall into each class. For example: units such as "1/s".
|
|
42
|
+
*/
|
|
43
|
+
operationB?: Usage;
|
|
44
|
+
/** Specify a single region. */
|
|
45
|
+
region?: Regional;
|
|
46
|
+
/** The [storage class](https://cloud.google.com/storage/docs/storage-classes#classes) of the data and operation. For example: "standard" or "nearline". */
|
|
47
|
+
storageClass?: string;
|
|
48
|
+
}
|
|
49
|
+
interface Commitment {
|
|
50
|
+
/** Required. A name for this commitment. All commitments in a CostScenario must have unique names. Each name must be a maximum of 32 characters. */
|
|
51
|
+
name?: string;
|
|
52
|
+
/** A resource-based committed use discount (CUD). */
|
|
53
|
+
vmResourceBasedCud?: VmResourceBasedCud;
|
|
54
|
+
}
|
|
55
|
+
interface CommitmentCostEstimate {
|
|
56
|
+
/** Total estimated costs for the commitment. */
|
|
57
|
+
commitmentTotalCostEstimate?: CostEstimate;
|
|
58
|
+
/** The name of the commitment, as specified in the `CostScenario`. */
|
|
59
|
+
name?: string;
|
|
60
|
+
/** Estimated costs for each SKU in the commitment. */
|
|
61
|
+
skuCostEstimates?: SkuCostEstimate[];
|
|
62
|
+
}
|
|
63
|
+
interface ComputeVmWorkload {
|
|
64
|
+
/** Defines whether each instance has confidential compute enabled. */
|
|
65
|
+
enableConfidentialCompute?: boolean;
|
|
66
|
+
/** Guest accelerators attached to each machine. */
|
|
67
|
+
guestAccelerator?: GuestAccelerator;
|
|
68
|
+
/** VM usage. This is specified as a unitless quantity which indicates the number of instances running. */
|
|
69
|
+
instancesRunning?: Usage;
|
|
70
|
+
/** Premium image licenses used by each instance. */
|
|
71
|
+
licenses?: string[];
|
|
72
|
+
/** The machine type. */
|
|
73
|
+
machineType?: MachineType;
|
|
74
|
+
/** Persistent disks attached to each instance. Must include a boot disk. */
|
|
75
|
+
persistentDisks?: PersistentDisk[];
|
|
76
|
+
/** Defines whether each instance is preemptible. */
|
|
77
|
+
preemptible?: boolean;
|
|
78
|
+
/** The [region](https://cloud.google.com/compute/docs/regions-zones) where the VMs run. For example: "us-central1". */
|
|
79
|
+
region?: string;
|
|
80
|
+
}
|
|
81
|
+
interface CostEstimate {
|
|
82
|
+
/** The estimated credits applied. */
|
|
83
|
+
creditEstimates?: CreditEstimate[];
|
|
84
|
+
/** The estimated net cost after applying credits. */
|
|
85
|
+
netCostEstimate?: Money;
|
|
86
|
+
/** The estimated cost prior to applying credits. */
|
|
87
|
+
preCreditCostEstimate?: Money;
|
|
88
|
+
}
|
|
89
|
+
interface CostEstimationResult {
|
|
90
|
+
/** Required. The ISO 4217 currency code for the cost estimate. */
|
|
91
|
+
currencyCode?: string;
|
|
92
|
+
/** Required. Estimated costs for each idealized month of a `CostScenario`. */
|
|
93
|
+
segmentCostEstimates?: SegmentCostEstimate[];
|
|
94
|
+
/** Required. Information about SKUs used in the estimate. */
|
|
95
|
+
skus?: Sku[];
|
|
96
|
+
}
|
|
97
|
+
interface CostScenario {
|
|
98
|
+
/**
|
|
99
|
+
* New commitments to estimate the costs for. The cost of the commitments will be included in the estimate result and discounts the commitment entitles will be included in the workload
|
|
100
|
+
* cost estimates. A maximum of 100 workloads can be provided.
|
|
101
|
+
*/
|
|
102
|
+
commitments?: Commitment[];
|
|
103
|
+
/** Configuration for the scenario. */
|
|
104
|
+
scenarioConfig?: ScenarioConfig;
|
|
105
|
+
/** The Google Cloud usage whose costs are estimated. A maximum of 100 workloads can be provided. */
|
|
106
|
+
workloads?: Workload[];
|
|
107
|
+
}
|
|
108
|
+
interface CreditEstimate {
|
|
109
|
+
/** The estimated credit amount. */
|
|
110
|
+
creditAmount?: Money;
|
|
111
|
+
/** The credit description. */
|
|
112
|
+
creditDescription?: string;
|
|
113
|
+
/** The credit type. */
|
|
114
|
+
creditType?: string;
|
|
115
|
+
}
|
|
116
|
+
interface CustomMachineType {
|
|
117
|
+
/**
|
|
118
|
+
* Required. The machine series. Only certain [machine series](https://cloud.google.com/compute/docs/general-purpose-machines#custom_machine_types) support custom configurations. For
|
|
119
|
+
* example: "n1".
|
|
120
|
+
*/
|
|
121
|
+
machineSeries?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Required. Memory size of the VM in GB (2^30 bytes). Must be an increment of 0.25 (256 MB). Each [machine
|
|
124
|
+
* series](https://cloud.google.com/compute/docs/machine-types#machine_type_comparison) has limitations on allowed values for the ratio of memory-to-vCPU count.
|
|
125
|
+
*/
|
|
126
|
+
memorySizeGb?: number;
|
|
127
|
+
/** Required. The number of vCPUs. The allowed values depend on the [machine series](https://cloud.google.com/compute/docs/machine-types#machine_type_comparison). */
|
|
128
|
+
virtualCpuCount?: string;
|
|
129
|
+
}
|
|
130
|
+
interface DualRegional {
|
|
131
|
+
/** The [location name](https://cloud.google.com/storage/docs/locations#available-locations) where the data is stored. For example: "asia1" for dual region. */
|
|
132
|
+
name?: string;
|
|
133
|
+
}
|
|
134
|
+
interface EstimateCostScenarioForBillingAccountRequest {
|
|
135
|
+
/** The scenario to estimate costs for. */
|
|
136
|
+
costScenario?: CostScenario;
|
|
137
|
+
}
|
|
138
|
+
interface EstimateCostScenarioForBillingAccountResponse {
|
|
139
|
+
/** The result of the cost estimation. */
|
|
140
|
+
costEstimationResult?: CostEstimationResult;
|
|
141
|
+
}
|
|
142
|
+
interface EstimateCostScenarioWithListPriceRequest {
|
|
143
|
+
/** The scenario to estimate costs for. */
|
|
144
|
+
costScenario?: CostScenario;
|
|
145
|
+
}
|
|
146
|
+
interface EstimateCostScenarioWithListPriceResponse {
|
|
147
|
+
/** The result of the cost estimation. */
|
|
148
|
+
costEstimationResult?: CostEstimationResult;
|
|
149
|
+
}
|
|
150
|
+
interface EstimationTimePoint {
|
|
151
|
+
/** The point in time, relative to the start of the time frame covered by the cost estimate. */
|
|
152
|
+
estimationTimeFrameOffset?: string;
|
|
153
|
+
}
|
|
154
|
+
interface GuestAccelerator {
|
|
155
|
+
/** The number of the guest accelerator cards exposed to each instance. */
|
|
156
|
+
acceleratorCount?: string;
|
|
157
|
+
/** The type of the guest accelerator cards. For example: "nvidia-tesla-t4". */
|
|
158
|
+
acceleratorType?: string;
|
|
159
|
+
}
|
|
160
|
+
interface MachineType {
|
|
161
|
+
customMachineType?: CustomMachineType;
|
|
162
|
+
predefinedMachineType?: PredefinedMachineType;
|
|
163
|
+
}
|
|
164
|
+
interface Money {
|
|
165
|
+
/** The three-letter currency code defined in ISO 4217. */
|
|
166
|
+
currencyCode?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units`
|
|
169
|
+
* is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and
|
|
170
|
+
* `nanos`=-750,000,000.
|
|
171
|
+
*/
|
|
172
|
+
nanos?: number;
|
|
173
|
+
/** The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. */
|
|
174
|
+
units?: string;
|
|
175
|
+
}
|
|
176
|
+
interface MultiRegional {
|
|
177
|
+
/** The [location name](https://cloud.google.com/storage/docs/locations#available-locations) where the data is stored. For example: "us" for multi-region. */
|
|
178
|
+
name?: string;
|
|
179
|
+
}
|
|
180
|
+
interface PersistentDisk {
|
|
181
|
+
/** Specifies the size of disk. Must be at least 10 GB. */
|
|
182
|
+
diskSize?: Usage;
|
|
183
|
+
/** The [disk type](https://cloud.google.com/compute/docs/disks#disk-types). For example: "pd-standard". */
|
|
184
|
+
diskType?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Indicates how many IOPS to provision for the disk for extreme persistent disks. This sets the number of I/O operations per second that the disk can handle. Values must be between
|
|
187
|
+
* 10,000 and 120,000.
|
|
188
|
+
*/
|
|
189
|
+
provisionedIops?: Usage;
|
|
190
|
+
/** The geographic scope of the disk. Defaults to `SCOPE_ZONAL` if not specified. */
|
|
191
|
+
scope?: string;
|
|
192
|
+
}
|
|
193
|
+
interface PredefinedMachineType {
|
|
194
|
+
/** The [machine type](https://cloud.google.com/compute/docs/machine-types). For example: "n1-standard1". */
|
|
195
|
+
machineType?: string;
|
|
196
|
+
}
|
|
197
|
+
interface Price {
|
|
198
|
+
/** The timestamp within the estimation time frame when the price was set. */
|
|
199
|
+
effectiveTime?: EstimationTimePoint;
|
|
200
|
+
/** The type of price. Possible values: "RATE" */
|
|
201
|
+
priceType?: string;
|
|
202
|
+
/** A set of tiered rates. */
|
|
203
|
+
rate?: Rate;
|
|
204
|
+
}
|
|
205
|
+
interface Rate {
|
|
206
|
+
/** The service tiers. */
|
|
207
|
+
tiers?: RateTier[];
|
|
208
|
+
/** The SKU's pricing unit. For example, if the tier price is $1 per 1000000 Bytes, then this field will show 'By'. The `start_amount` field in each tier will be in this unit. */
|
|
209
|
+
unit?: string;
|
|
210
|
+
/** The SKU's count for the pricing unit. For example, if the tier price is $1 per 1000000 Bytes, then this column will show 1000000. */
|
|
211
|
+
unitCount?: number;
|
|
212
|
+
}
|
|
213
|
+
interface RateTier {
|
|
214
|
+
/** The price for this tier. */
|
|
215
|
+
price?: Money;
|
|
216
|
+
/** The magnitude of usage in which the tier interval begins. Example: "From 100 GiBi the price is $1 per byte" implies `start_amount` = 100 */
|
|
217
|
+
startAmount?: number;
|
|
218
|
+
}
|
|
219
|
+
interface Regional {
|
|
220
|
+
/** The [location name](https://cloud.google.com/storage/docs/locations#available-locations). For example: "us-central1" for region. */
|
|
221
|
+
name?: string;
|
|
222
|
+
}
|
|
223
|
+
interface ScenarioConfig {
|
|
224
|
+
/**
|
|
225
|
+
* Time frame for the estimate. Workloads must specify usage for this duration. Duration must be at least 1 hour (3,600 seconds) and at most 10 years (315,360,000 seconds). The
|
|
226
|
+
* calculations for years and months are based on a 730-hour (2,628,000-second) month.
|
|
227
|
+
*/
|
|
228
|
+
estimateDuration?: string;
|
|
229
|
+
}
|
|
230
|
+
interface SegmentCostEstimate {
|
|
231
|
+
/** Estimated costs for each commitment. */
|
|
232
|
+
commitmentCostEstimates?: CommitmentCostEstimate[];
|
|
233
|
+
/** Timestamp for the start of the segment. */
|
|
234
|
+
segmentStartTime?: EstimationTimePoint;
|
|
235
|
+
/** Total estimated costs for the time segment. */
|
|
236
|
+
segmentTotalCostEstimate?: CostEstimate;
|
|
237
|
+
/** Estimated costs for each workload. */
|
|
238
|
+
workloadCostEstimates?: WorkloadCostEstimate[];
|
|
239
|
+
}
|
|
240
|
+
interface Sku {
|
|
241
|
+
/** The display name for the SKU. Example: A2 Instance Core running in Americas */
|
|
242
|
+
displayName?: string;
|
|
243
|
+
/**
|
|
244
|
+
* A timeline of prices for a SKU in chronological order. Note: The API currently only supports using a constant price for the entire estimation time frame so this list will contain a
|
|
245
|
+
* single value.
|
|
246
|
+
*/
|
|
247
|
+
prices?: Price[];
|
|
248
|
+
/** The resource name for the SKU. Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE" */
|
|
249
|
+
sku?: string;
|
|
250
|
+
}
|
|
251
|
+
interface SkuCostEstimate {
|
|
252
|
+
/** The estimated cost for the usage on this SKU. */
|
|
253
|
+
costEstimate?: CostEstimate;
|
|
254
|
+
/** The resource name for the SKU. Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE" More information about the SKU can be found in the `skus` field of the `CostEstimationResult`. */
|
|
255
|
+
sku?: string;
|
|
256
|
+
/** The amount of usage on this SKU. */
|
|
257
|
+
usageAmount?: number;
|
|
258
|
+
/** The unit for the usage on this SKU. */
|
|
259
|
+
usageUnit?: string;
|
|
260
|
+
}
|
|
261
|
+
interface Usage {
|
|
262
|
+
/** A timeline of usage rates over the estimate interval. */
|
|
263
|
+
usageRateTimeline?: UsageRateTimeline;
|
|
264
|
+
}
|
|
265
|
+
interface UsageRateTimeline {
|
|
266
|
+
/**
|
|
267
|
+
* The unit for the usage rate in each timeline entry. The supported units are a subset of [The Unified Code for Units of Measure](https://ucum.org/ucum.html) standard: * **Time units
|
|
268
|
+
* (TIME-UNIT)** * `s` second * `min` minute * `h` hour * `d` day * `wk` week * `mo` month * `yr` year * `ms` millisecond * `us` microsecond * `ns` nanosecond * **Basic storage units
|
|
269
|
+
* (BASIC-STORAGE-UNIT)** * `bit` bit * `By` byte * **Count units (COUNT-UNIT)** * `count` count * **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T`
|
|
270
|
+
* tera (10^12) * `P` peta (10^15) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these
|
|
271
|
+
* connectors: * `/` division or ratio (as an infix operator). For example: `kBy/{email}` or `MiBy/10ms`. * `.` multiplication or composition (as an infix operator). For example:
|
|
272
|
+
* `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: ``` Expression = Component { "." Component } { "/" Component } ; Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] |
|
|
273
|
+
* Annotation | "1" ; UNIT = TIME-UNIT | STORAGE-UNIT | DATA-UNIT | COUNT-UNIT Annotation = "{" NAME "}" ; ``` Examples: * Request per second: `1/s` or `{requests}/s` * GibiBytes:
|
|
274
|
+
* `GiBy` * GibiBytes * seconds: `GiBy.s`
|
|
275
|
+
*/
|
|
276
|
+
unit?: string;
|
|
277
|
+
/**
|
|
278
|
+
* The timeline entries. Each entry has a start time and usage rate. The start time specifies the effective time of the usage rate. The entries must be sorted by start time in an
|
|
279
|
+
* increasing order.
|
|
280
|
+
*/
|
|
281
|
+
usageRateTimelineEntries?: UsageRateTimelineEntry[];
|
|
282
|
+
}
|
|
283
|
+
interface UsageRateTimelineEntry {
|
|
284
|
+
/**
|
|
285
|
+
* The effective time for this entry. The usage rate is in effect starting at this time until the effective time of the subsequent entry in the timeline. The last entry defines the
|
|
286
|
+
* usage rate until the end of the `Usage` time frame. Must correspond to an integer number of hours.
|
|
287
|
+
*/
|
|
288
|
+
effectiveTime?: EstimationTimePoint;
|
|
289
|
+
/** The usage rate. */
|
|
290
|
+
usageRate?: number;
|
|
291
|
+
}
|
|
292
|
+
interface VmResourceBasedCud {
|
|
293
|
+
/** Guest accelerator, known as GPU. */
|
|
294
|
+
guestAccelerator?: GuestAccelerator;
|
|
295
|
+
/**
|
|
296
|
+
* The machine series for CUD. For example: "n1" for general purpose N1 machine type commitments. "n2" for general purpose N2 machine type commitments. "e2" for general purpose E2
|
|
297
|
+
* machine type commitments. "n2d" for general purpose N2D machine type commitments. "t2d" for general purpose T2D machine type commitments. "c2"/"c2d" for compute-optimized
|
|
298
|
+
* commitments. "m1"/"m2" for the memory-optimized commitments. "a2' for the accelerator-optimized commitments.
|
|
299
|
+
*/
|
|
300
|
+
machineSeries?: string;
|
|
301
|
+
/** Memory size of the VM in GB (2^30 bytes). Must be an increment of 0.25 (256 MB). */
|
|
302
|
+
memorySizeGb?: number;
|
|
303
|
+
/** Commitment usage plan. */
|
|
304
|
+
plan?: string;
|
|
305
|
+
/** The region where the VM runs. For example: "us-central1" */
|
|
306
|
+
region?: string;
|
|
307
|
+
/** The number of vCPUs. The number of vCPUs must be an integer of 0 or more and can be even or odd. */
|
|
308
|
+
virtualCpuCount?: string;
|
|
309
|
+
}
|
|
310
|
+
interface Workload {
|
|
311
|
+
/** Usage on Google Cloud Storage. */
|
|
312
|
+
cloudStorageWorkload?: CloudStorageWorkload;
|
|
313
|
+
/** Usage of a Google Compute Engine Virtual Machine. */
|
|
314
|
+
computeVmWorkload?: ComputeVmWorkload;
|
|
315
|
+
/** Required. A name for this workload. All workloads in a `CostScenario` must have a unique `name`. Each `name` must be a maximum of 32 characters. */
|
|
316
|
+
name?: string;
|
|
317
|
+
}
|
|
318
|
+
interface WorkloadCostEstimate {
|
|
319
|
+
/** The name of the workload, as specified in the `CostScenario`. */
|
|
320
|
+
name?: string;
|
|
321
|
+
/** Estimated costs for each SKU in the workload. */
|
|
322
|
+
skuCostEstimates?: SkuCostEstimate[];
|
|
323
|
+
/** Total estimated costs for the workload. */
|
|
324
|
+
workloadTotalCostEstimate?: CostEstimate;
|
|
325
|
+
}
|
|
326
|
+
interface BillingAccountsResource {
|
|
327
|
+
/** Use custom pricing in the estimate, using a `CostScenario` with a defined `billingAccount`. */
|
|
328
|
+
estimateCostScenario(request: {
|
|
329
|
+
/** V1 error format. */
|
|
330
|
+
"$.xgafv"?: string;
|
|
331
|
+
/** OAuth access token. */
|
|
332
|
+
access_token?: string;
|
|
333
|
+
/** Data format for response. */
|
|
334
|
+
alt?: string;
|
|
335
|
+
/**
|
|
336
|
+
* Resource name of the billing account for the cost estimate. The resource name has the form `billingAccounts/{billing_acount_id}`. For example,
|
|
337
|
+
* `billingAccounts/012345-567890-ABCDEF` is the resource name for billing account `012345-567890-ABCDEF`. Must be specified.
|
|
338
|
+
*/
|
|
339
|
+
billingAccount: string;
|
|
340
|
+
/** JSONP */
|
|
341
|
+
callback?: string;
|
|
342
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
343
|
+
fields?: string;
|
|
344
|
+
/** 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. */
|
|
345
|
+
key?: string;
|
|
346
|
+
/** OAuth 2.0 token for the current user. */
|
|
347
|
+
oauth_token?: string;
|
|
348
|
+
/** Returns response with indentations and line breaks. */
|
|
349
|
+
prettyPrint?: boolean;
|
|
350
|
+
/** 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. */
|
|
351
|
+
quotaUser?: string;
|
|
352
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
353
|
+
upload_protocol?: string;
|
|
354
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
355
|
+
uploadType?: string;
|
|
356
|
+
/** Request body */
|
|
357
|
+
resource: EstimateCostScenarioForBillingAccountRequest;
|
|
358
|
+
}): Request<EstimateCostScenarioForBillingAccountResponse>;
|
|
359
|
+
estimateCostScenario(request: {
|
|
360
|
+
/** V1 error format. */
|
|
361
|
+
"$.xgafv"?: string;
|
|
362
|
+
/** OAuth access token. */
|
|
363
|
+
access_token?: string;
|
|
364
|
+
/** Data format for response. */
|
|
365
|
+
alt?: string;
|
|
366
|
+
/**
|
|
367
|
+
* Resource name of the billing account for the cost estimate. The resource name has the form `billingAccounts/{billing_acount_id}`. For example,
|
|
368
|
+
* `billingAccounts/012345-567890-ABCDEF` is the resource name for billing account `012345-567890-ABCDEF`. Must be specified.
|
|
369
|
+
*/
|
|
370
|
+
billingAccount: string;
|
|
371
|
+
/** JSONP */
|
|
372
|
+
callback?: string;
|
|
373
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
374
|
+
fields?: string;
|
|
375
|
+
/** 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. */
|
|
376
|
+
key?: string;
|
|
377
|
+
/** OAuth 2.0 token for the current user. */
|
|
378
|
+
oauth_token?: string;
|
|
379
|
+
/** Returns response with indentations and line breaks. */
|
|
380
|
+
prettyPrint?: boolean;
|
|
381
|
+
/** 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. */
|
|
382
|
+
quotaUser?: string;
|
|
383
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
384
|
+
upload_protocol?: string;
|
|
385
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
386
|
+
uploadType?: string;
|
|
387
|
+
},
|
|
388
|
+
body: EstimateCostScenarioForBillingAccountRequest): Request<EstimateCostScenarioForBillingAccountResponse>;
|
|
389
|
+
}
|
|
390
|
+
interface V1betaResource {
|
|
391
|
+
/** Estimate list prices using a `CostScenario` without a defined `billingAccount`. */
|
|
392
|
+
estimateCostScenario(request: {
|
|
393
|
+
/** V1 error format. */
|
|
394
|
+
"$.xgafv"?: string;
|
|
395
|
+
/** OAuth access token. */
|
|
396
|
+
access_token?: string;
|
|
397
|
+
/** Data format for response. */
|
|
398
|
+
alt?: string;
|
|
399
|
+
/** JSONP */
|
|
400
|
+
callback?: string;
|
|
401
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
402
|
+
fields?: string;
|
|
403
|
+
/** 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. */
|
|
404
|
+
key?: string;
|
|
405
|
+
/** OAuth 2.0 token for the current user. */
|
|
406
|
+
oauth_token?: string;
|
|
407
|
+
/** Returns response with indentations and line breaks. */
|
|
408
|
+
prettyPrint?: boolean;
|
|
409
|
+
/** 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. */
|
|
410
|
+
quotaUser?: string;
|
|
411
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
412
|
+
upload_protocol?: string;
|
|
413
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
414
|
+
uploadType?: string;
|
|
415
|
+
/** Request body */
|
|
416
|
+
resource: EstimateCostScenarioWithListPriceRequest;
|
|
417
|
+
}): Request<EstimateCostScenarioWithListPriceResponse>;
|
|
418
|
+
estimateCostScenario(request: {
|
|
419
|
+
/** V1 error format. */
|
|
420
|
+
"$.xgafv"?: string;
|
|
421
|
+
/** OAuth access token. */
|
|
422
|
+
access_token?: string;
|
|
423
|
+
/** Data format for response. */
|
|
424
|
+
alt?: string;
|
|
425
|
+
/** JSONP */
|
|
426
|
+
callback?: string;
|
|
427
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
428
|
+
fields?: string;
|
|
429
|
+
/** 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. */
|
|
430
|
+
key?: string;
|
|
431
|
+
/** OAuth 2.0 token for the current user. */
|
|
432
|
+
oauth_token?: string;
|
|
433
|
+
/** Returns response with indentations and line breaks. */
|
|
434
|
+
prettyPrint?: boolean;
|
|
435
|
+
/** 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. */
|
|
436
|
+
quotaUser?: string;
|
|
437
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
438
|
+
upload_protocol?: string;
|
|
439
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
440
|
+
uploadType?: string;
|
|
441
|
+
},
|
|
442
|
+
body: EstimateCostScenarioWithListPriceRequest): Request<EstimateCostScenarioWithListPriceResponse>;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
const billingAccounts: BillingAccountsResource;
|
|
446
|
+
|
|
447
|
+
const v1beta: V1betaResource;
|
|
448
|
+
}
|
|
449
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.cloudbilling-v1beta",
|
|
3
|
+
"version": "0.0.20220914",
|
|
4
|
+
"description": "TypeScript typings for Cloud Billing API v1beta",
|
|
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,84 @@
|
|
|
1
|
+
# TypeScript typings for Cloud Billing API v1beta
|
|
2
|
+
|
|
3
|
+
Allows developers to manage billing for their Google Cloud Platform projects programmatically.
|
|
4
|
+
For detailed description please check [documentation](https://cloud.google.com/billing/).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Cloud Billing API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.cloudbilling-v1beta --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://cloudbilling.googleapis.com/$discovery/rest?version=v1beta', () => {
|
|
29
|
+
// now we can use:
|
|
30
|
+
// gapi.client.cloudbilling
|
|
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('cloudbilling', 'v1beta', () => {
|
|
37
|
+
// now we can use:
|
|
38
|
+
// gapi.client.cloudbilling
|
|
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
|
+
// View and manage your Google Cloud Platform billing accounts
|
|
49
|
+
'https://www.googleapis.com/auth/cloud-billing',
|
|
50
|
+
|
|
51
|
+
// View your Google Cloud Platform billing accounts
|
|
52
|
+
'https://www.googleapis.com/auth/cloud-billing.readonly',
|
|
53
|
+
|
|
54
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
55
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
56
|
+
],
|
|
57
|
+
immediate = true;
|
|
58
|
+
// ...
|
|
59
|
+
|
|
60
|
+
gapi.auth.authorize(
|
|
61
|
+
{ client_id: client_id, scope: scope, immediate: immediate },
|
|
62
|
+
authResult => {
|
|
63
|
+
if (authResult && !authResult.error) {
|
|
64
|
+
/* handle successful authorization */
|
|
65
|
+
} else {
|
|
66
|
+
/* handle authorization error */
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
After that you can use Cloud Billing API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
Use custom pricing in the estimate, using a `CostScenario` with a defined `billingAccount`.
|
|
77
|
+
*/
|
|
78
|
+
await gapi.client.cloudbilling.billingAccounts.estimateCostScenario({ billingAccount: "billingAccount", });
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
Estimate list prices using a `CostScenario` without a defined `billingAccount`.
|
|
82
|
+
*/
|
|
83
|
+
await gapi.client.cloudbilling.estimateCostScenario({ });
|
|
84
|
+
```
|
package/tests.ts
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.cloudbilling-v1beta 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: 20220914
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://cloudbilling.googleapis.com/$discovery/rest?version=v1beta');
|
|
12
|
+
/** now we can use gapi.client.cloudbilling */
|
|
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
|
+
/** View and manage your Google Cloud Platform billing accounts */
|
|
19
|
+
'https://www.googleapis.com/auth/cloud-billing',
|
|
20
|
+
/** View your Google Cloud Platform billing accounts */
|
|
21
|
+
'https://www.googleapis.com/auth/cloud-billing.readonly',
|
|
22
|
+
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
23
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
24
|
+
];
|
|
25
|
+
const immediate = false;
|
|
26
|
+
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
27
|
+
if (authResult && !authResult.error) {
|
|
28
|
+
/** handle successful authorization */
|
|
29
|
+
run();
|
|
30
|
+
} else {
|
|
31
|
+
/** handle authorization error */
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
async function run() {
|
|
36
|
+
/** Use custom pricing in the estimate, using a `CostScenario` with a defined `billingAccount`. */
|
|
37
|
+
await gapi.client.cloudbilling.billingAccounts.estimateCostScenario({
|
|
38
|
+
billingAccount: "Test string",
|
|
39
|
+
}, {
|
|
40
|
+
costScenario: {
|
|
41
|
+
commitments: [
|
|
42
|
+
{
|
|
43
|
+
name: "Test string",
|
|
44
|
+
vmResourceBasedCud: {
|
|
45
|
+
guestAccelerator: {
|
|
46
|
+
acceleratorCount: "Test string",
|
|
47
|
+
acceleratorType: "Test string",
|
|
48
|
+
},
|
|
49
|
+
machineSeries: "Test string",
|
|
50
|
+
memorySizeGb: 42,
|
|
51
|
+
plan: "Test string",
|
|
52
|
+
region: "Test string",
|
|
53
|
+
virtualCpuCount: "Test string",
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
scenarioConfig: {
|
|
58
|
+
estimateDuration: "Test string",
|
|
59
|
+
},
|
|
60
|
+
workloads: [
|
|
61
|
+
{
|
|
62
|
+
cloudStorageWorkload: {
|
|
63
|
+
dataRetrieval: {
|
|
64
|
+
usageRateTimeline: {
|
|
65
|
+
unit: "Test string",
|
|
66
|
+
usageRateTimelineEntries: [
|
|
67
|
+
{
|
|
68
|
+
effectiveTime: {
|
|
69
|
+
estimationTimeFrameOffset: "Test string",
|
|
70
|
+
},
|
|
71
|
+
usageRate: 42,
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
dataStored: {
|
|
77
|
+
usageRateTimeline: {
|
|
78
|
+
unit: "Test string",
|
|
79
|
+
usageRateTimelineEntries: [
|
|
80
|
+
{
|
|
81
|
+
effectiveTime: {
|
|
82
|
+
estimationTimeFrameOffset: "Test string",
|
|
83
|
+
},
|
|
84
|
+
usageRate: 42,
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
dualRegion: {
|
|
90
|
+
name: "Test string",
|
|
91
|
+
},
|
|
92
|
+
multiRegion: {
|
|
93
|
+
name: "Test string",
|
|
94
|
+
},
|
|
95
|
+
operationA: {
|
|
96
|
+
usageRateTimeline: {
|
|
97
|
+
unit: "Test string",
|
|
98
|
+
usageRateTimelineEntries: [
|
|
99
|
+
{
|
|
100
|
+
effectiveTime: {
|
|
101
|
+
estimationTimeFrameOffset: "Test string",
|
|
102
|
+
},
|
|
103
|
+
usageRate: 42,
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
operationB: {
|
|
109
|
+
usageRateTimeline: {
|
|
110
|
+
unit: "Test string",
|
|
111
|
+
usageRateTimelineEntries: [
|
|
112
|
+
{
|
|
113
|
+
effectiveTime: {
|
|
114
|
+
estimationTimeFrameOffset: "Test string",
|
|
115
|
+
},
|
|
116
|
+
usageRate: 42,
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
region: {
|
|
122
|
+
name: "Test string",
|
|
123
|
+
},
|
|
124
|
+
storageClass: "Test string",
|
|
125
|
+
},
|
|
126
|
+
computeVmWorkload: {
|
|
127
|
+
enableConfidentialCompute: true,
|
|
128
|
+
guestAccelerator: {
|
|
129
|
+
acceleratorCount: "Test string",
|
|
130
|
+
acceleratorType: "Test string",
|
|
131
|
+
},
|
|
132
|
+
instancesRunning: {
|
|
133
|
+
usageRateTimeline: {
|
|
134
|
+
unit: "Test string",
|
|
135
|
+
usageRateTimelineEntries: [
|
|
136
|
+
{
|
|
137
|
+
effectiveTime: {
|
|
138
|
+
estimationTimeFrameOffset: "Test string",
|
|
139
|
+
},
|
|
140
|
+
usageRate: 42,
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
licenses: [
|
|
146
|
+
"Test string"
|
|
147
|
+
],
|
|
148
|
+
machineType: {
|
|
149
|
+
customMachineType: {
|
|
150
|
+
machineSeries: "Test string",
|
|
151
|
+
memorySizeGb: 42,
|
|
152
|
+
virtualCpuCount: "Test string",
|
|
153
|
+
},
|
|
154
|
+
predefinedMachineType: {
|
|
155
|
+
machineType: "Test string",
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
persistentDisks: [
|
|
159
|
+
{
|
|
160
|
+
diskSize: {
|
|
161
|
+
usageRateTimeline: {
|
|
162
|
+
unit: "Test string",
|
|
163
|
+
usageRateTimelineEntries: [
|
|
164
|
+
{
|
|
165
|
+
effectiveTime: {
|
|
166
|
+
estimationTimeFrameOffset: "Test string",
|
|
167
|
+
},
|
|
168
|
+
usageRate: 42,
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
diskType: "Test string",
|
|
174
|
+
provisionedIops: {
|
|
175
|
+
usageRateTimeline: {
|
|
176
|
+
unit: "Test string",
|
|
177
|
+
usageRateTimelineEntries: [
|
|
178
|
+
{
|
|
179
|
+
effectiveTime: {
|
|
180
|
+
estimationTimeFrameOffset: "Test string",
|
|
181
|
+
},
|
|
182
|
+
usageRate: 42,
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
scope: "Test string",
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
preemptible: true,
|
|
191
|
+
region: "Test string",
|
|
192
|
+
},
|
|
193
|
+
name: "Test string",
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
/** Estimate list prices using a `CostScenario` without a defined `billingAccount`. */
|
|
199
|
+
await gapi.client.cloudbilling.v1beta.estimateCostScenario({
|
|
200
|
+
}, {
|
|
201
|
+
costScenario: {
|
|
202
|
+
commitments: [
|
|
203
|
+
{
|
|
204
|
+
name: "Test string",
|
|
205
|
+
vmResourceBasedCud: {
|
|
206
|
+
guestAccelerator: {
|
|
207
|
+
acceleratorCount: "Test string",
|
|
208
|
+
acceleratorType: "Test string",
|
|
209
|
+
},
|
|
210
|
+
machineSeries: "Test string",
|
|
211
|
+
memorySizeGb: 42,
|
|
212
|
+
plan: "Test string",
|
|
213
|
+
region: "Test string",
|
|
214
|
+
virtualCpuCount: "Test string",
|
|
215
|
+
},
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
scenarioConfig: {
|
|
219
|
+
estimateDuration: "Test string",
|
|
220
|
+
},
|
|
221
|
+
workloads: [
|
|
222
|
+
{
|
|
223
|
+
cloudStorageWorkload: {
|
|
224
|
+
dataRetrieval: {
|
|
225
|
+
usageRateTimeline: {
|
|
226
|
+
unit: "Test string",
|
|
227
|
+
usageRateTimelineEntries: [
|
|
228
|
+
{
|
|
229
|
+
effectiveTime: {
|
|
230
|
+
estimationTimeFrameOffset: "Test string",
|
|
231
|
+
},
|
|
232
|
+
usageRate: 42,
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
dataStored: {
|
|
238
|
+
usageRateTimeline: {
|
|
239
|
+
unit: "Test string",
|
|
240
|
+
usageRateTimelineEntries: [
|
|
241
|
+
{
|
|
242
|
+
effectiveTime: {
|
|
243
|
+
estimationTimeFrameOffset: "Test string",
|
|
244
|
+
},
|
|
245
|
+
usageRate: 42,
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
dualRegion: {
|
|
251
|
+
name: "Test string",
|
|
252
|
+
},
|
|
253
|
+
multiRegion: {
|
|
254
|
+
name: "Test string",
|
|
255
|
+
},
|
|
256
|
+
operationA: {
|
|
257
|
+
usageRateTimeline: {
|
|
258
|
+
unit: "Test string",
|
|
259
|
+
usageRateTimelineEntries: [
|
|
260
|
+
{
|
|
261
|
+
effectiveTime: {
|
|
262
|
+
estimationTimeFrameOffset: "Test string",
|
|
263
|
+
},
|
|
264
|
+
usageRate: 42,
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
operationB: {
|
|
270
|
+
usageRateTimeline: {
|
|
271
|
+
unit: "Test string",
|
|
272
|
+
usageRateTimelineEntries: [
|
|
273
|
+
{
|
|
274
|
+
effectiveTime: {
|
|
275
|
+
estimationTimeFrameOffset: "Test string",
|
|
276
|
+
},
|
|
277
|
+
usageRate: 42,
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
region: {
|
|
283
|
+
name: "Test string",
|
|
284
|
+
},
|
|
285
|
+
storageClass: "Test string",
|
|
286
|
+
},
|
|
287
|
+
computeVmWorkload: {
|
|
288
|
+
enableConfidentialCompute: true,
|
|
289
|
+
guestAccelerator: {
|
|
290
|
+
acceleratorCount: "Test string",
|
|
291
|
+
acceleratorType: "Test string",
|
|
292
|
+
},
|
|
293
|
+
instancesRunning: {
|
|
294
|
+
usageRateTimeline: {
|
|
295
|
+
unit: "Test string",
|
|
296
|
+
usageRateTimelineEntries: [
|
|
297
|
+
{
|
|
298
|
+
effectiveTime: {
|
|
299
|
+
estimationTimeFrameOffset: "Test string",
|
|
300
|
+
},
|
|
301
|
+
usageRate: 42,
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
licenses: [
|
|
307
|
+
"Test string"
|
|
308
|
+
],
|
|
309
|
+
machineType: {
|
|
310
|
+
customMachineType: {
|
|
311
|
+
machineSeries: "Test string",
|
|
312
|
+
memorySizeGb: 42,
|
|
313
|
+
virtualCpuCount: "Test string",
|
|
314
|
+
},
|
|
315
|
+
predefinedMachineType: {
|
|
316
|
+
machineType: "Test string",
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
persistentDisks: [
|
|
320
|
+
{
|
|
321
|
+
diskSize: {
|
|
322
|
+
usageRateTimeline: {
|
|
323
|
+
unit: "Test string",
|
|
324
|
+
usageRateTimelineEntries: [
|
|
325
|
+
{
|
|
326
|
+
effectiveTime: {
|
|
327
|
+
estimationTimeFrameOffset: "Test string",
|
|
328
|
+
},
|
|
329
|
+
usageRate: 42,
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
diskType: "Test string",
|
|
335
|
+
provisionedIops: {
|
|
336
|
+
usageRateTimeline: {
|
|
337
|
+
unit: "Test string",
|
|
338
|
+
usageRateTimelineEntries: [
|
|
339
|
+
{
|
|
340
|
+
effectiveTime: {
|
|
341
|
+
estimationTimeFrameOffset: "Test string",
|
|
342
|
+
},
|
|
343
|
+
usageRate: 42,
|
|
344
|
+
}
|
|
345
|
+
],
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
scope: "Test string",
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
preemptible: true,
|
|
352
|
+
region: "Test string",
|
|
353
|
+
},
|
|
354
|
+
name: "Test string",
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
},
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
});
|
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
|
+
}
|