@maxim_mazurok/gapi.client.cloudbilling-v1beta 0.0.20231124 → 0.0.20231208

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/tests.ts DELETED
@@ -1,798 +0,0 @@
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: 20231124
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
- cloudCdnEgressWorkload: {
63
- cacheEgressDestination: "Test string",
64
- cacheEgressRate: {
65
- usageRateTimeline: {
66
- unit: "Test string",
67
- usageRateTimelineEntries: [
68
- {
69
- effectiveTime: {
70
- estimationTimeFrameOffset: "Test string",
71
- },
72
- usageRate: 42,
73
- }
74
- ],
75
- },
76
- },
77
- },
78
- cloudCdnWorkload: {
79
- cacheFillOriginService: "Test string",
80
- cacheFillRate: {
81
- usageRateTimeline: {
82
- unit: "Test string",
83
- usageRateTimelineEntries: [
84
- {
85
- effectiveTime: {
86
- estimationTimeFrameOffset: "Test string",
87
- },
88
- usageRate: 42,
89
- }
90
- ],
91
- },
92
- },
93
- cacheFillRegions: {
94
- destinationRegion: "Test string",
95
- sourceRegion: "Test string",
96
- },
97
- cacheLookUpRate: {
98
- usageRateTimeline: {
99
- unit: "Test string",
100
- usageRateTimelineEntries: [
101
- {
102
- effectiveTime: {
103
- estimationTimeFrameOffset: "Test string",
104
- },
105
- usageRate: 42,
106
- }
107
- ],
108
- },
109
- },
110
- },
111
- cloudInterconnectEgressWorkload: {
112
- egressRate: {
113
- usageRateTimeline: {
114
- unit: "Test string",
115
- usageRateTimelineEntries: [
116
- {
117
- effectiveTime: {
118
- estimationTimeFrameOffset: "Test string",
119
- },
120
- usageRate: 42,
121
- }
122
- ],
123
- },
124
- },
125
- interconnectConnectionLocation: "Test string",
126
- },
127
- cloudInterconnectWorkload: {
128
- interconnectAttachments: [
129
- {
130
- bandwidth: "Test string",
131
- vlanCount: {
132
- usageRateTimeline: {
133
- unit: "Test string",
134
- usageRateTimelineEntries: [
135
- {
136
- effectiveTime: {
137
- estimationTimeFrameOffset: "Test string",
138
- },
139
- usageRate: 42,
140
- }
141
- ],
142
- },
143
- },
144
- }
145
- ],
146
- interconnectType: "Test string",
147
- linkType: "Test string",
148
- provisionedLinkCount: {
149
- usageRateTimeline: {
150
- unit: "Test string",
151
- usageRateTimelineEntries: [
152
- {
153
- effectiveTime: {
154
- estimationTimeFrameOffset: "Test string",
155
- },
156
- usageRate: 42,
157
- }
158
- ],
159
- },
160
- },
161
- },
162
- cloudStorageEgressWorkload: {
163
- destinationContinent: "Test string",
164
- egressRate: {
165
- usageRateTimeline: {
166
- unit: "Test string",
167
- usageRateTimelineEntries: [
168
- {
169
- effectiveTime: {
170
- estimationTimeFrameOffset: "Test string",
171
- },
172
- usageRate: 42,
173
- }
174
- ],
175
- },
176
- },
177
- sourceContinent: "Test string",
178
- },
179
- cloudStorageWorkload: {
180
- dataRetrieval: {
181
- usageRateTimeline: {
182
- unit: "Test string",
183
- usageRateTimelineEntries: [
184
- {
185
- effectiveTime: {
186
- estimationTimeFrameOffset: "Test string",
187
- },
188
- usageRate: 42,
189
- }
190
- ],
191
- },
192
- },
193
- dataStored: {
194
- usageRateTimeline: {
195
- unit: "Test string",
196
- usageRateTimelineEntries: [
197
- {
198
- effectiveTime: {
199
- estimationTimeFrameOffset: "Test string",
200
- },
201
- usageRate: 42,
202
- }
203
- ],
204
- },
205
- },
206
- dualRegion: {
207
- name: "Test string",
208
- },
209
- multiRegion: {
210
- name: "Test string",
211
- },
212
- operationA: {
213
- usageRateTimeline: {
214
- unit: "Test string",
215
- usageRateTimelineEntries: [
216
- {
217
- effectiveTime: {
218
- estimationTimeFrameOffset: "Test string",
219
- },
220
- usageRate: 42,
221
- }
222
- ],
223
- },
224
- },
225
- operationB: {
226
- usageRateTimeline: {
227
- unit: "Test string",
228
- usageRateTimelineEntries: [
229
- {
230
- effectiveTime: {
231
- estimationTimeFrameOffset: "Test string",
232
- },
233
- usageRate: 42,
234
- }
235
- ],
236
- },
237
- },
238
- region: {
239
- name: "Test string",
240
- },
241
- storageClass: "Test string",
242
- },
243
- computeVmWorkload: {
244
- enableConfidentialCompute: true,
245
- guestAccelerator: {
246
- acceleratorCount: "Test string",
247
- acceleratorType: "Test string",
248
- },
249
- instancesRunning: {
250
- usageRateTimeline: {
251
- unit: "Test string",
252
- usageRateTimelineEntries: [
253
- {
254
- effectiveTime: {
255
- estimationTimeFrameOffset: "Test string",
256
- },
257
- usageRate: 42,
258
- }
259
- ],
260
- },
261
- },
262
- licenses: [
263
- "Test string"
264
- ],
265
- machineType: {
266
- customMachineType: {
267
- machineSeries: "Test string",
268
- memorySizeGb: 42,
269
- virtualCpuCount: "Test string",
270
- },
271
- predefinedMachineType: {
272
- machineType: "Test string",
273
- },
274
- },
275
- persistentDisks: [
276
- {
277
- diskSize: {
278
- usageRateTimeline: {
279
- unit: "Test string",
280
- usageRateTimelineEntries: [
281
- {
282
- effectiveTime: {
283
- estimationTimeFrameOffset: "Test string",
284
- },
285
- usageRate: 42,
286
- }
287
- ],
288
- },
289
- },
290
- diskType: "Test string",
291
- provisionedIops: {
292
- usageRateTimeline: {
293
- unit: "Test string",
294
- usageRateTimelineEntries: [
295
- {
296
- effectiveTime: {
297
- estimationTimeFrameOffset: "Test string",
298
- },
299
- usageRate: 42,
300
- }
301
- ],
302
- },
303
- },
304
- scope: "Test string",
305
- }
306
- ],
307
- preemptible: true,
308
- region: "Test string",
309
- },
310
- name: "Test string",
311
- premiumTierEgressWorkload: {
312
- destinationContinent: "Test string",
313
- egressRate: {
314
- usageRateTimeline: {
315
- unit: "Test string",
316
- usageRateTimelineEntries: [
317
- {
318
- effectiveTime: {
319
- estimationTimeFrameOffset: "Test string",
320
- },
321
- usageRate: 42,
322
- }
323
- ],
324
- },
325
- },
326
- sourceRegion: "Test string",
327
- },
328
- standardTierEgressWorkload: {
329
- egressRate: {
330
- usageRateTimeline: {
331
- unit: "Test string",
332
- usageRateTimelineEntries: [
333
- {
334
- effectiveTime: {
335
- estimationTimeFrameOffset: "Test string",
336
- },
337
- usageRate: 42,
338
- }
339
- ],
340
- },
341
- },
342
- sourceRegion: "Test string",
343
- },
344
- vmToVmEgressWorkload: {
345
- interRegionEgress: {
346
- destinationRegion: "Test string",
347
- egressRate: {
348
- usageRateTimeline: {
349
- unit: "Test string",
350
- usageRateTimelineEntries: [
351
- {
352
- effectiveTime: {
353
- estimationTimeFrameOffset: "Test string",
354
- },
355
- usageRate: 42,
356
- }
357
- ],
358
- },
359
- },
360
- sourceRegion: "Test string",
361
- },
362
- intraRegionEgress: {
363
- egressRate: {
364
- usageRateTimeline: {
365
- unit: "Test string",
366
- usageRateTimelineEntries: [
367
- {
368
- effectiveTime: {
369
- estimationTimeFrameOffset: "Test string",
370
- },
371
- usageRate: 42,
372
- }
373
- ],
374
- },
375
- },
376
- },
377
- },
378
- }
379
- ],
380
- },
381
- });
382
- /** Gets a Google Cloud service visible to a billing account. */
383
- await gapi.client.cloudbilling.billingAccounts.services.get({
384
- name: "Test string",
385
- });
386
- /** Lists services visible to a billing account. */
387
- await gapi.client.cloudbilling.billingAccounts.services.list({
388
- pageSize: 42,
389
- pageToken: "Test string",
390
- parent: "Test string",
391
- });
392
- /** Gets a SKU group visible to a billing account. */
393
- await gapi.client.cloudbilling.billingAccounts.skuGroups.get({
394
- name: "Test string",
395
- });
396
- /** Lists SKU groups visible to a billing account. */
397
- await gapi.client.cloudbilling.billingAccounts.skuGroups.list({
398
- pageSize: 42,
399
- pageToken: "Test string",
400
- parent: "Test string",
401
- });
402
- /** Gets a SKU that is part of a billing account SKU group. */
403
- await gapi.client.cloudbilling.billingAccounts.skuGroups.skus.get({
404
- name: "Test string",
405
- });
406
- /** Lists SKUs that is part of billing account SKU groups. */
407
- await gapi.client.cloudbilling.billingAccounts.skuGroups.skus.list({
408
- pageSize: 42,
409
- pageToken: "Test string",
410
- parent: "Test string",
411
- });
412
- /** Gets a SKU visible to a billing account. */
413
- await gapi.client.cloudbilling.billingAccounts.skus.get({
414
- name: "Test string",
415
- });
416
- /** Lists SKUs visible to a billing account. */
417
- await gapi.client.cloudbilling.billingAccounts.skus.list({
418
- filter: "Test string",
419
- pageSize: 42,
420
- pageToken: "Test string",
421
- parent: "Test string",
422
- });
423
- /** Gets the latest price for SKUs available to your Cloud Billing account. */
424
- await gapi.client.cloudbilling.billingAccounts.skus.price.get({
425
- currencyCode: "Test string",
426
- name: "Test string",
427
- });
428
- /** Gets a publicly listed SKU group. */
429
- await gapi.client.cloudbilling.skuGroups.get({
430
- name: "Test string",
431
- });
432
- /** Lists all publicly listed SKU groups. */
433
- await gapi.client.cloudbilling.skuGroups.list({
434
- pageSize: 42,
435
- pageToken: "Test string",
436
- });
437
- /** Gets a publicly listed SKU that is part of a publicly listed SKU group. */
438
- await gapi.client.cloudbilling.skuGroups.skus.get({
439
- name: "Test string",
440
- });
441
- /** Lists all publicly listed SKUs contained by a publicly listed SKU group. */
442
- await gapi.client.cloudbilling.skuGroups.skus.list({
443
- pageSize: 42,
444
- pageToken: "Test string",
445
- parent: "Test string",
446
- });
447
- /** Gets the latest price for the given SKU. */
448
- await gapi.client.cloudbilling.skus.price.get({
449
- currencyCode: "Test string",
450
- name: "Test string",
451
- });
452
- /** Estimate list prices using a `CostScenario` without a defined `billingAccount`. */
453
- await gapi.client.cloudbilling.v1beta.estimateCostScenario({
454
- }, {
455
- costScenario: {
456
- commitments: [
457
- {
458
- name: "Test string",
459
- vmResourceBasedCud: {
460
- guestAccelerator: {
461
- acceleratorCount: "Test string",
462
- acceleratorType: "Test string",
463
- },
464
- machineSeries: "Test string",
465
- memorySizeGb: 42,
466
- plan: "Test string",
467
- region: "Test string",
468
- virtualCpuCount: "Test string",
469
- },
470
- }
471
- ],
472
- scenarioConfig: {
473
- estimateDuration: "Test string",
474
- },
475
- workloads: [
476
- {
477
- cloudCdnEgressWorkload: {
478
- cacheEgressDestination: "Test string",
479
- cacheEgressRate: {
480
- usageRateTimeline: {
481
- unit: "Test string",
482
- usageRateTimelineEntries: [
483
- {
484
- effectiveTime: {
485
- estimationTimeFrameOffset: "Test string",
486
- },
487
- usageRate: 42,
488
- }
489
- ],
490
- },
491
- },
492
- },
493
- cloudCdnWorkload: {
494
- cacheFillOriginService: "Test string",
495
- cacheFillRate: {
496
- usageRateTimeline: {
497
- unit: "Test string",
498
- usageRateTimelineEntries: [
499
- {
500
- effectiveTime: {
501
- estimationTimeFrameOffset: "Test string",
502
- },
503
- usageRate: 42,
504
- }
505
- ],
506
- },
507
- },
508
- cacheFillRegions: {
509
- destinationRegion: "Test string",
510
- sourceRegion: "Test string",
511
- },
512
- cacheLookUpRate: {
513
- usageRateTimeline: {
514
- unit: "Test string",
515
- usageRateTimelineEntries: [
516
- {
517
- effectiveTime: {
518
- estimationTimeFrameOffset: "Test string",
519
- },
520
- usageRate: 42,
521
- }
522
- ],
523
- },
524
- },
525
- },
526
- cloudInterconnectEgressWorkload: {
527
- egressRate: {
528
- usageRateTimeline: {
529
- unit: "Test string",
530
- usageRateTimelineEntries: [
531
- {
532
- effectiveTime: {
533
- estimationTimeFrameOffset: "Test string",
534
- },
535
- usageRate: 42,
536
- }
537
- ],
538
- },
539
- },
540
- interconnectConnectionLocation: "Test string",
541
- },
542
- cloudInterconnectWorkload: {
543
- interconnectAttachments: [
544
- {
545
- bandwidth: "Test string",
546
- vlanCount: {
547
- usageRateTimeline: {
548
- unit: "Test string",
549
- usageRateTimelineEntries: [
550
- {
551
- effectiveTime: {
552
- estimationTimeFrameOffset: "Test string",
553
- },
554
- usageRate: 42,
555
- }
556
- ],
557
- },
558
- },
559
- }
560
- ],
561
- interconnectType: "Test string",
562
- linkType: "Test string",
563
- provisionedLinkCount: {
564
- usageRateTimeline: {
565
- unit: "Test string",
566
- usageRateTimelineEntries: [
567
- {
568
- effectiveTime: {
569
- estimationTimeFrameOffset: "Test string",
570
- },
571
- usageRate: 42,
572
- }
573
- ],
574
- },
575
- },
576
- },
577
- cloudStorageEgressWorkload: {
578
- destinationContinent: "Test string",
579
- egressRate: {
580
- usageRateTimeline: {
581
- unit: "Test string",
582
- usageRateTimelineEntries: [
583
- {
584
- effectiveTime: {
585
- estimationTimeFrameOffset: "Test string",
586
- },
587
- usageRate: 42,
588
- }
589
- ],
590
- },
591
- },
592
- sourceContinent: "Test string",
593
- },
594
- cloudStorageWorkload: {
595
- dataRetrieval: {
596
- usageRateTimeline: {
597
- unit: "Test string",
598
- usageRateTimelineEntries: [
599
- {
600
- effectiveTime: {
601
- estimationTimeFrameOffset: "Test string",
602
- },
603
- usageRate: 42,
604
- }
605
- ],
606
- },
607
- },
608
- dataStored: {
609
- usageRateTimeline: {
610
- unit: "Test string",
611
- usageRateTimelineEntries: [
612
- {
613
- effectiveTime: {
614
- estimationTimeFrameOffset: "Test string",
615
- },
616
- usageRate: 42,
617
- }
618
- ],
619
- },
620
- },
621
- dualRegion: {
622
- name: "Test string",
623
- },
624
- multiRegion: {
625
- name: "Test string",
626
- },
627
- operationA: {
628
- usageRateTimeline: {
629
- unit: "Test string",
630
- usageRateTimelineEntries: [
631
- {
632
- effectiveTime: {
633
- estimationTimeFrameOffset: "Test string",
634
- },
635
- usageRate: 42,
636
- }
637
- ],
638
- },
639
- },
640
- operationB: {
641
- usageRateTimeline: {
642
- unit: "Test string",
643
- usageRateTimelineEntries: [
644
- {
645
- effectiveTime: {
646
- estimationTimeFrameOffset: "Test string",
647
- },
648
- usageRate: 42,
649
- }
650
- ],
651
- },
652
- },
653
- region: {
654
- name: "Test string",
655
- },
656
- storageClass: "Test string",
657
- },
658
- computeVmWorkload: {
659
- enableConfidentialCompute: true,
660
- guestAccelerator: {
661
- acceleratorCount: "Test string",
662
- acceleratorType: "Test string",
663
- },
664
- instancesRunning: {
665
- usageRateTimeline: {
666
- unit: "Test string",
667
- usageRateTimelineEntries: [
668
- {
669
- effectiveTime: {
670
- estimationTimeFrameOffset: "Test string",
671
- },
672
- usageRate: 42,
673
- }
674
- ],
675
- },
676
- },
677
- licenses: [
678
- "Test string"
679
- ],
680
- machineType: {
681
- customMachineType: {
682
- machineSeries: "Test string",
683
- memorySizeGb: 42,
684
- virtualCpuCount: "Test string",
685
- },
686
- predefinedMachineType: {
687
- machineType: "Test string",
688
- },
689
- },
690
- persistentDisks: [
691
- {
692
- diskSize: {
693
- usageRateTimeline: {
694
- unit: "Test string",
695
- usageRateTimelineEntries: [
696
- {
697
- effectiveTime: {
698
- estimationTimeFrameOffset: "Test string",
699
- },
700
- usageRate: 42,
701
- }
702
- ],
703
- },
704
- },
705
- diskType: "Test string",
706
- provisionedIops: {
707
- usageRateTimeline: {
708
- unit: "Test string",
709
- usageRateTimelineEntries: [
710
- {
711
- effectiveTime: {
712
- estimationTimeFrameOffset: "Test string",
713
- },
714
- usageRate: 42,
715
- }
716
- ],
717
- },
718
- },
719
- scope: "Test string",
720
- }
721
- ],
722
- preemptible: true,
723
- region: "Test string",
724
- },
725
- name: "Test string",
726
- premiumTierEgressWorkload: {
727
- destinationContinent: "Test string",
728
- egressRate: {
729
- usageRateTimeline: {
730
- unit: "Test string",
731
- usageRateTimelineEntries: [
732
- {
733
- effectiveTime: {
734
- estimationTimeFrameOffset: "Test string",
735
- },
736
- usageRate: 42,
737
- }
738
- ],
739
- },
740
- },
741
- sourceRegion: "Test string",
742
- },
743
- standardTierEgressWorkload: {
744
- egressRate: {
745
- usageRateTimeline: {
746
- unit: "Test string",
747
- usageRateTimelineEntries: [
748
- {
749
- effectiveTime: {
750
- estimationTimeFrameOffset: "Test string",
751
- },
752
- usageRate: 42,
753
- }
754
- ],
755
- },
756
- },
757
- sourceRegion: "Test string",
758
- },
759
- vmToVmEgressWorkload: {
760
- interRegionEgress: {
761
- destinationRegion: "Test string",
762
- egressRate: {
763
- usageRateTimeline: {
764
- unit: "Test string",
765
- usageRateTimelineEntries: [
766
- {
767
- effectiveTime: {
768
- estimationTimeFrameOffset: "Test string",
769
- },
770
- usageRate: 42,
771
- }
772
- ],
773
- },
774
- },
775
- sourceRegion: "Test string",
776
- },
777
- intraRegionEgress: {
778
- egressRate: {
779
- usageRateTimeline: {
780
- unit: "Test string",
781
- usageRateTimelineEntries: [
782
- {
783
- effectiveTime: {
784
- estimationTimeFrameOffset: "Test string",
785
- },
786
- usageRate: 42,
787
- }
788
- ],
789
- },
790
- },
791
- },
792
- },
793
- }
794
- ],
795
- },
796
- });
797
- }
798
- });