-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
cloudbilling-gen.go
8399 lines (7489 loc) · 337 KB
/
cloudbilling-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2024 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package cloudbilling provides access to the Cloud Billing API.
//
// For product documentation, see: https://cloud.google.com/billing/docs/apis
//
// # Library status
//
// These client libraries are officially supported by Google. However, this
// library is considered complete and is in maintenance mode. This means
// that we will address critical bugs and security issues but will not add
// any new features.
//
// When possible, we recommend using our newer
// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
// that are still actively being worked and iterated on.
//
// # Creating a client
//
// Usage example:
//
// import "google.golang.org/api/cloudbilling/v1beta"
// ...
// ctx := context.Background()
// cloudbillingService, err := cloudbilling.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for
// authentication. For information on how to create and obtain Application
// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// # Other authentication options
//
// By default, all available scopes (see "Constants") are used to authenticate.
// To restrict scopes, use [google.golang.org/api/option.WithScopes]:
//
// cloudbillingService, err := cloudbilling.NewService(ctx, option.WithScopes(cloudbilling.CloudPlatformScope))
//
// To use an API key for authentication (note: some APIs do not support API
// keys), use [google.golang.org/api/option.WithAPIKey]:
//
// cloudbillingService, err := cloudbilling.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
// flow, use [google.golang.org/api/option.WithTokenSource]:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// cloudbillingService, err := cloudbilling.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See [google.golang.org/api/option.ClientOption] for details on options.
package cloudbilling // import "google.golang.org/api/cloudbilling/v1beta"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
var _ = internal.Version
const apiId = "cloudbilling:v1beta"
const apiName = "cloudbilling"
const apiVersion = "v1beta"
const basePath = "https://cloudbilling.googleapis.com/"
const basePathTemplate = "https://cloudbilling.UNIVERSE_DOMAIN/"
const mtlsBasePath = "https://cloudbilling.mtls.googleapis.com/"
const defaultUniverseDomain = "googleapis.com"
// OAuth2 scopes used by this API.
const (
// View and manage your Google Cloud Platform billing accounts
CloudBillingScope = "https://www.googleapis.com/auth/cloud-billing"
// View your Google Cloud Platform billing accounts
CloudBillingReadonlyScope = "https://www.googleapis.com/auth/cloud-billing.readonly"
// See, edit, configure, and delete your Google Cloud data and see the
// email address for your Google Account.
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := internaloption.WithDefaultScopes(
"https://www.googleapis.com/auth/cloud-billing",
"https://www.googleapis.com/auth/cloud-billing.readonly",
"https://www.googleapis.com/auth/cloud-platform",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
opts = append(opts, internaloption.WithDefaultUniverseDomain(defaultUniverseDomain))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.BillingAccounts = NewBillingAccountsService(s)
s.Projects = NewProjectsService(s)
s.SkuGroups = NewSkuGroupsService(s)
s.Skus = NewSkusService(s)
s.V1beta = NewV1betaService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
BillingAccounts *BillingAccountsService
Projects *ProjectsService
SkuGroups *SkuGroupsService
Skus *SkusService
V1beta *V1betaService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewBillingAccountsService(s *Service) *BillingAccountsService {
rs := &BillingAccountsService{s: s}
rs.Anomalies = NewBillingAccountsAnomaliesService(s)
rs.Services = NewBillingAccountsServicesService(s)
rs.SkuGroups = NewBillingAccountsSkuGroupsService(s)
rs.Skus = NewBillingAccountsSkusService(s)
return rs
}
type BillingAccountsService struct {
s *Service
Anomalies *BillingAccountsAnomaliesService
Services *BillingAccountsServicesService
SkuGroups *BillingAccountsSkuGroupsService
Skus *BillingAccountsSkusService
}
func NewBillingAccountsAnomaliesService(s *Service) *BillingAccountsAnomaliesService {
rs := &BillingAccountsAnomaliesService{s: s}
return rs
}
type BillingAccountsAnomaliesService struct {
s *Service
}
func NewBillingAccountsServicesService(s *Service) *BillingAccountsServicesService {
rs := &BillingAccountsServicesService{s: s}
return rs
}
type BillingAccountsServicesService struct {
s *Service
}
func NewBillingAccountsSkuGroupsService(s *Service) *BillingAccountsSkuGroupsService {
rs := &BillingAccountsSkuGroupsService{s: s}
rs.Skus = NewBillingAccountsSkuGroupsSkusService(s)
return rs
}
type BillingAccountsSkuGroupsService struct {
s *Service
Skus *BillingAccountsSkuGroupsSkusService
}
func NewBillingAccountsSkuGroupsSkusService(s *Service) *BillingAccountsSkuGroupsSkusService {
rs := &BillingAccountsSkuGroupsSkusService{s: s}
return rs
}
type BillingAccountsSkuGroupsSkusService struct {
s *Service
}
func NewBillingAccountsSkusService(s *Service) *BillingAccountsSkusService {
rs := &BillingAccountsSkusService{s: s}
rs.Price = NewBillingAccountsSkusPriceService(s)
rs.Prices = NewBillingAccountsSkusPricesService(s)
return rs
}
type BillingAccountsSkusService struct {
s *Service
Price *BillingAccountsSkusPriceService
Prices *BillingAccountsSkusPricesService
}
func NewBillingAccountsSkusPriceService(s *Service) *BillingAccountsSkusPriceService {
rs := &BillingAccountsSkusPriceService{s: s}
return rs
}
type BillingAccountsSkusPriceService struct {
s *Service
}
func NewBillingAccountsSkusPricesService(s *Service) *BillingAccountsSkusPricesService {
rs := &BillingAccountsSkusPricesService{s: s}
return rs
}
type BillingAccountsSkusPricesService struct {
s *Service
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Anomalies = NewProjectsAnomaliesService(s)
return rs
}
type ProjectsService struct {
s *Service
Anomalies *ProjectsAnomaliesService
}
func NewProjectsAnomaliesService(s *Service) *ProjectsAnomaliesService {
rs := &ProjectsAnomaliesService{s: s}
return rs
}
type ProjectsAnomaliesService struct {
s *Service
}
func NewSkuGroupsService(s *Service) *SkuGroupsService {
rs := &SkuGroupsService{s: s}
rs.Skus = NewSkuGroupsSkusService(s)
return rs
}
type SkuGroupsService struct {
s *Service
Skus *SkuGroupsSkusService
}
func NewSkuGroupsSkusService(s *Service) *SkuGroupsSkusService {
rs := &SkuGroupsSkusService{s: s}
return rs
}
type SkuGroupsSkusService struct {
s *Service
}
func NewSkusService(s *Service) *SkusService {
rs := &SkusService{s: s}
rs.Price = NewSkusPriceService(s)
rs.Prices = NewSkusPricesService(s)
return rs
}
type SkusService struct {
s *Service
Price *SkusPriceService
Prices *SkusPricesService
}
func NewSkusPriceService(s *Service) *SkusPriceService {
rs := &SkusPriceService{s: s}
return rs
}
type SkusPriceService struct {
s *Service
}
func NewSkusPricesService(s *Service) *SkusPricesService {
rs := &SkusPricesService{s: s}
return rs
}
type SkusPricesService struct {
s *Service
}
func NewV1betaService(s *Service) *V1betaService {
rs := &V1betaService{s: s}
return rs
}
type V1betaService struct {
s *Service
}
// CacheFillRegions: Specifies the regions for Cache Fill.
type CacheFillRegions struct {
// DestinationRegion: The destination region for cache fill.
//
// Possible values:
// "CACHE_FILL_DESTINATION_REGION_UNSPECIFIED" - Not specified
// "CACHE_FILL_DESTINATION_REGION_ASIA_PACIFIC" - Asia Pacific
// "CACHE_FILL_DESTINATION_REGION_EUROPE" - Europe
// "CACHE_FILL_DESTINATION_REGION_NORTH_AMERICA" - North America
// "CACHE_FILL_DESTINATION_REGION_OCEANIA" - Oceania
// "CACHE_FILL_DESTINATION_REGION_SOUTH_AMERICA" - South America
// "CACHE_FILL_DESTINATION_REGION_CHINA" - China
// "CACHE_FILL_DESTINATION_REGION_OTHERS" - Others
DestinationRegion string `json:"destinationRegion,omitempty"`
// SourceRegion: The source region for cache fill.
//
// Possible values:
// "CACHE_FILL_SOURCE_REGION_UNSPECIFIED" - Not specified
// "CACHE_FILL_REGION_ASIA_PACIFIC" - Asia Pacific
// "CACHE_FILL_SOURCE_REGION_EUROPE" - Europe
// "CACHE_FILL_SOURCE_REGION_NORTH_AMERICA" - North America
// "CACHE_FILL_SOURCE_REGION_OCEANIA" - Oceania
// "CACHE_FILL_SOURCE_REGION_SOUTH_AMERICA" - South America
SourceRegion string `json:"sourceRegion,omitempty"`
// ForceSendFields is a list of field names (e.g. "DestinationRegion")
// to unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DestinationRegion") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *CacheFillRegions) MarshalJSON() ([]byte, error) {
type NoMethod CacheFillRegions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CloudCdnEgressWorkload: Specifies usage for Cloud CDN Data Transfer.
type CloudCdnEgressWorkload struct {
// CacheEgressDestination: The destination for the cache data transfer.
//
// Possible values:
// "CACHE_EGRESS_DESTINATION_UNSPECIFIED" - Unspecified.
// "CACHE_EGRESS_DESTINATION_ASIA_PACIFIC" - Asia Pacific.
// "CACHE_EGRESS_DESTINATION_CHINA" - China.
// "CACHE_EGRESS_DESTINATION_EUROPE" - Europe.
// "CACHE_EGRESS_DESTINATION_NORTH_AMERICA" - North America.
// "CACHE_EGRESS_DESTINATION_OCEANIA" - Oceania including Australia,
// New Zealand, and surrounding Pacific Ocean islands such as Papua New
// Guinea and Fiji. This region excludes Hawaii.
// "CACHE_EGRESS_DESTINATION_LATIN_AMERICA" - Latin America (Including
// the Caribbean, South America and Central America.)
// "CACHE_EGRESS_DESTINATION_OTHER_DESTINATIONS" - All other
// destinations (including Africa and Antarctica)
CacheEgressDestination string `json:"cacheEgressDestination,omitempty"`
// CacheEgressRate: Cache data transfer usage. The rate of data cache
// transferred to the destination. Use units such as GiBy/s or TiBy/mo,
// based on The Unified Code for Units of Measure
// (https://ucum.org/ucum.html) standard.
CacheEgressRate *Usage `json:"cacheEgressRate,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "CacheEgressDestination") to unconditionally include in API requests.
// By default, fields with empty or default values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CacheEgressDestination")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *CloudCdnEgressWorkload) MarshalJSON() ([]byte, error) {
type NoMethod CloudCdnEgressWorkload
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CloudCdnWorkload: Specifies usage for Cloud CDN resources.
type CloudCdnWorkload struct {
// CacheFillOriginService: The source service for the cache fill.
//
// Possible values:
// "CACHE_FILL_ORIGIN_SERVICE_UNSPECIFIED" - Not specified.
// "CACHE_FILL_ORIGIN_SERVICE_GOOGLE_CLOUD_STORAGE_BUCKET" - Origin
// service is Google Cloud Storage.
// "CACHE_FILL_ORIGIN_SERVICE_BACKEND_SERVICE" - Origin service is
// backend service, such as Compute VMs, external backend, etc.
CacheFillOriginService string `json:"cacheFillOriginService,omitempty"`
// CacheFillRate: Cache fill usage. The rate of data transferred between
// cache fill regions. For example: units such as "GiBy/s" or "TBy/mo".
CacheFillRate *Usage `json:"cacheFillRate,omitempty"`
// CacheFillRegions: The regions where data is transferred from Google
// data locations into Google global cache servers. The SKU prices for
// cache fill across services are the same.
CacheFillRegions *CacheFillRegions `json:"cacheFillRegions,omitempty"`
// CacheLookUpRate: Cache look up requests. This is specified to
// indicate the number of requests. For example: units such as "1/s".
CacheLookUpRate *Usage `json:"cacheLookUpRate,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "CacheFillOriginService") to unconditionally include in API requests.
// By default, fields with empty or default values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CacheFillOriginService")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *CloudCdnWorkload) MarshalJSON() ([]byte, error) {
type NoMethod CloudCdnWorkload
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CloudInterconnectEgressWorkload: Includes the estimate for
// Interconnect Data Transfer only. To specify usage for data transfer
// between VMs and internet end-points, use the Standard Tier Internet
// Data Transfer interface.
type CloudInterconnectEgressWorkload struct {
// EgressRate: Outbound data transfer usage. This usage applies when you
// move or copy data from one Google Cloud service to another service.
// The units are GiBy/s, By/s, and so on, based on The Unified Code for
// Units of Measure (https://ucum.org/ucum.html) standard.
EgressRate *Usage `json:"egressRate,omitempty"`
// InterconnectConnectionLocation: Locations in the Interconnect
// connection location table
// (https://cloud.google.com/vpc/network-pricing#interconnect-pricing).
// These are the Interconnect Data Transfer charges.
//
// Possible values:
// "INTERCONNECT_CONNECTION_LOCATION_UNSPECIFIED" - Unspecified.
// "INTERCONNECT_CONNECTION_LOCATION_ASIA" - Asia.
// "INTERCONNECT_CONNECTION_LOCATION_EUROPE" - Europe.
// "INTERCONNECT_CONNECTION_LOCATION_NORTH_AMERICA" - North America.
// "INTERCONNECT_CONNECTION_LOCATION_SOUTH_AMERICA" - South America.
// "INTERCONNECT_CONNECTION_LOCATION_AUSTRALIA" - Australia.
InterconnectConnectionLocation string `json:"interconnectConnectionLocation,omitempty"`
// ForceSendFields is a list of field names (e.g. "EgressRate") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EgressRate") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CloudInterconnectEgressWorkload) MarshalJSON() ([]byte, error) {
type NoMethod CloudInterconnectEgressWorkload
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CloudInterconnectWorkload: Specifies usage for Cloud Interconnect
// resources.
type CloudInterconnectWorkload struct {
// InterconnectAttachments: VLAN attachment used for interconnect.
InterconnectAttachments []*VlanAttachment `json:"interconnectAttachments,omitempty"`
// InterconnectType: VLAN attachment type
//
// Possible values:
// "INTERCONNECT_TYPE_UNSPECIFIED" - Unspecified
// "INTERCONNECT_TYPE_DEDICATED" - Type is dedicated
// "INTERCONNECT_TYPE_PARTNER" - Type is partner
InterconnectType string `json:"interconnectType,omitempty"`
// LinkType: Interconnect circuit link type.
//
// Possible values:
// "LINK_TYPE_UNSPECIFIED" - Unspecified
// "LINK_TYPE_ETHERNET_10G_LR" - Link type is 10 Gbps.
// "LINK_TYPE_ETHERNET_100G_LR" - Link type is 100 Gbps.
LinkType string `json:"linkType,omitempty"`
// ProvisionedLinkCount: Interconnect usage. This is specified as a
// unitless quantity which indicates the number of circuit provisioned
// in interconnect.
ProvisionedLinkCount *Usage `json:"provisionedLinkCount,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "InterconnectAttachments") to unconditionally include in API
// requests. By default, fields with empty or default values are omitted
// from API requests. However, any non-pointer, non-interface field
// appearing in ForceSendFields will be sent to the server regardless of
// whether the field is empty or not. This may be used to include empty
// fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InterconnectAttachments")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *CloudInterconnectWorkload) MarshalJSON() ([]byte, error) {
type NoMethod CloudInterconnectWorkload
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CloudStorageEgressWorkload: Specification of a network type. Network
// data transfer within Google Cloud applies when you move or copy data
// from one Cloud Storage bucket to another or when another Google Cloud
// service accesses data in your Cloud Storage bucket.This includes the
// network data transfer within Google Cloud and the general network
// usage.
type CloudStorageEgressWorkload struct {
// DestinationContinent: Where the data is sent to.
//
// Possible values:
// "DESTINATION_CONTINENT_UNSPECIFIED" - Not specified.
// "DESTINATION_CONTINENT_ASIA_PACIFIC" - Asia Pacific.
// "DESTINATION_CONTINENT_AUTRALIA" - Australia.
// "DESTINATION_CONTINENT_EUROPE" - Europe.
// "DESTINATION_CONTINENT_NORTH_AMERICA" - North America.
// "DESTINATION_CONTINENT_SOUTH_AMERICA" - South America
DestinationContinent string `json:"destinationContinent,omitempty"`
// EgressRate: Data transfer usage rate. This usage applies when you
// move or copy data from one Cloud Storage bucket to another or when
// another Google Cloud service accesses data in your Cloud Storage
// bucket. The expected units are GiBy/s, By/s, and so on, based on The
// Unified Code for Units of Measure (https://ucum.org/ucum.html)
// standard.
EgressRate *Usage `json:"egressRate,omitempty"`
// SourceContinent: Where the data comes from.
//
// Possible values:
// "SOURCE_CONTINENT_UNSPECIFIED" - Not specified.
// "SOURCE_CONTINENT_ASIA_PACIFIC" - Asia Pacific.
// "SOURCE_CONTINENT_AUSTRALIA" - Australia.
// "SOURCE_CONTINENT_EUROPE" - Europe.
// "SOURCE_CONTINENT_NORTH_AMERICA" - North America.
// "SOURCE_CONTINENT_SOUTH_AMERICA" - South America.
SourceContinent string `json:"sourceContinent,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "DestinationContinent") to unconditionally include in API requests.
// By default, fields with empty or default values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DestinationContinent") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *CloudStorageEgressWorkload) MarshalJSON() ([]byte, error) {
type NoMethod CloudStorageEgressWorkload
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CloudStorageWorkload: Specifies usage of Cloud Storage resources.
type CloudStorageWorkload struct {
// DataRetrieval: Data retrieval usage. A retrieval cost applies when
// data or metadata is read, copied, or rewritten . For example: units
// such as "GiB/s" or "B/s".
DataRetrieval *Usage `json:"dataRetrieval,omitempty"`
// DataStored: Data storage usage. The amount of data stored in buckets.
// For example: units such as GiBy/s or TiBy/mo, based on The Unified
// Code for Units of Measure (https://ucum.org/ucum.html) standard.
DataStored *Usage `json:"dataStored,omitempty"`
// DualRegion: Specify dual regions.
DualRegion *DualRegional `json:"dualRegion,omitempty"`
// MultiRegion: Specify multi regions.
MultiRegion *MultiRegional `json:"multiRegion,omitempty"`
// OperationA: 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
// for a list of which operations fall into each class. For example:
// units such as "1/s".
OperationA *Usage `json:"operationA,omitempty"`
// OperationB: 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 which operations fall into each class. For example:
// units such as "1/s".
OperationB *Usage `json:"operationB,omitempty"`
// Region: Specify a single region.
Region *Regional `json:"region,omitempty"`
// StorageClass: The storage class
// (https://cloud.google.com/storage/docs/storage-classes#classes) of
// the data and operation. For example: "standard" and "nearline".
StorageClass string `json:"storageClass,omitempty"`
// ForceSendFields is a list of field names (e.g. "DataRetrieval") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DataRetrieval") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CloudStorageWorkload) MarshalJSON() ([]byte, error) {
type NoMethod CloudStorageWorkload
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Commitment: Commitments give you the ability to pay a recurring fee
// in exchange for a benefit, such as a discount for your use. For
// example, this object might contain details of a spend-based committed
// use discount (CUD)
// (https://cloud.google.com/docs/cuds#spend_based_commitments). Within
// a CostScenario, adding a commitment includes the cost of the
// commitment and any discounts.
type Commitment struct {
// Name: Required. A name for this commitment. All commitments in a
// CostScenario must have unique names. Each name may be at most 128
// characters long.
Name string `json:"name,omitempty"`
// VmResourceBasedCud: A resource-based committed use discount (CUD).
VmResourceBasedCud *VmResourceBasedCud `json:"vmResourceBasedCud,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Commitment) MarshalJSON() ([]byte, error) {
type NoMethod Commitment
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CommitmentCostEstimate: Estimated cost for a commitment.
type CommitmentCostEstimate struct {
// CommitmentTotalCostEstimate: Total estimated costs for the
// commitment.
CommitmentTotalCostEstimate *CostEstimate `json:"commitmentTotalCostEstimate,omitempty"`
// Name: The name of the commitment, as specified in the `CostScenario`.
Name string `json:"name,omitempty"`
// SkuCostEstimates: Estimated costs for each SKU in the commitment.
SkuCostEstimates []*SkuCostEstimate `json:"skuCostEstimates,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "CommitmentTotalCostEstimate") to unconditionally include in API
// requests. By default, fields with empty or default values are omitted
// from API requests. However, any non-pointer, non-interface field
// appearing in ForceSendFields will be sent to the server regardless of
// whether the field is empty or not. This may be used to include empty
// fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "CommitmentTotalCostEstimate") to include in API requests with the
// JSON null value. By default, fields with empty values are omitted
// from API requests. However, any field with an empty value appearing
// in NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CommitmentCostEstimate) MarshalJSON() ([]byte, error) {
type NoMethod CommitmentCostEstimate
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ComputeVmWorkload: Specificies usage of a set of identical compute VM
// instances.
type ComputeVmWorkload struct {
// EnableConfidentialCompute: Defines whether each instance has
// confidential compute enabled.
EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"`
// GuestAccelerator: Guest accelerators attached to each machine.
GuestAccelerator *GuestAccelerator `json:"guestAccelerator,omitempty"`
// InstancesRunning: VM usage. This is specified as a unitless quantity
// which indicates the number of instances running.
InstancesRunning *Usage `json:"instancesRunning,omitempty"`
// Licenses: Premium image licenses used by each instance.
Licenses []string `json:"licenses,omitempty"`
// MachineType: The machine type.
MachineType *MachineType `json:"machineType,omitempty"`
// PersistentDisks: Persistent disks attached to each instance. Must
// include a boot disk.
PersistentDisks []*PersistentDisk `json:"persistentDisks,omitempty"`
// Preemptible: Defines whether each instance is preemptible.
Preemptible bool `json:"preemptible,omitempty"`
// Region: The region
// (https://cloud.google.com/compute/docs/regions-zones) where the VMs
// run. For example: "us-central1".
Region string `json:"region,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "EnableConfidentialCompute") to unconditionally include in API
// requests. By default, fields with empty or default values are omitted
// from API requests. However, any non-pointer, non-interface field
// appearing in ForceSendFields will be sent to the server regardless of
// whether the field is empty or not. This may be used to include empty
// fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "EnableConfidentialCompute") to include in API requests with the JSON
// null value. By default, fields with empty values are omitted from API
// requests. However, any field with an empty value appearing in
// NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ComputeVmWorkload) MarshalJSON() ([]byte, error) {
type NoMethod ComputeVmWorkload
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CostEstimate: An estimated cost.
type CostEstimate struct {
// CreditEstimates: The estimated credits applied.
CreditEstimates []*CreditEstimate `json:"creditEstimates,omitempty"`
// NetCostEstimate: The estimated net cost after applying credits.
NetCostEstimate *Money `json:"netCostEstimate,omitempty"`
// PreCreditCostEstimate: The estimated cost prior to applying credits.
PreCreditCostEstimate *Money `json:"preCreditCostEstimate,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreditEstimates") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreditEstimates") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *CostEstimate) MarshalJSON() ([]byte, error) {
type NoMethod CostEstimate
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CostEstimationResult: The result of a estimating the costs of a
// `CostScenario`.
type CostEstimationResult struct {
// CurrencyCode: Required. The ISO 4217 currency code for the cost
// estimate.
CurrencyCode string `json:"currencyCode,omitempty"`
// SegmentCostEstimates: Required. Estimated costs for each idealized
// month of a `CostScenario`.
SegmentCostEstimates []*SegmentCostEstimate `json:"segmentCostEstimates,omitempty"`
// Skus: Required. Information about SKUs used in the estimate.
Skus []*Sku `json:"skus,omitempty"`
// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CurrencyCode") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CostEstimationResult) MarshalJSON() ([]byte, error) {
type NoMethod CostEstimationResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CostScenario: Encapsulates all the information needed to perform a
// cost estimate. It includes a specification of the Google Cloud usage
// whose costs are estimated, and configuration options.
type CostScenario struct {
// Commitments: 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 cost
// estimates. A maximum of 100 workloads can be provided.
Commitments []*Commitment `json:"commitments,omitempty"`
// ScenarioConfig: Configuration for the scenario.
ScenarioConfig *ScenarioConfig `json:"scenarioConfig,omitempty"`
// Workloads: The Google Cloud usage whose costs are estimated. A
// maximum of 100 workloads can be provided.
Workloads []*Workload `json:"workloads,omitempty"`
// ForceSendFields is a list of field names (e.g. "Commitments") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Commitments") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CostScenario) MarshalJSON() ([]byte, error) {
type NoMethod CostScenario
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CreditEstimate: An estimated credit applied to the costs on a SKU.
type CreditEstimate struct {
// CreditAmount: The estimated credit amount.
CreditAmount *Money `json:"creditAmount,omitempty"`
// CreditDescription: The credit description.
CreditDescription string `json:"creditDescription,omitempty"`
// CreditType: The credit type.
CreditType string `json:"creditType,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreditAmount") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreditAmount") to include
// in API requests with the JSON null value. By default, fields with