forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compute-gen.go
16952 lines (15358 loc) · 524 KB
/
compute-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
// Package compute provides access to the Compute Engine API.
//
// See https://developers.google.com/compute/docs/reference/latest/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/compute/v1"
// ...
// computeService, err := compute.New(oauthHttpClient)
package compute
import (
"bytes"
"code.google.com/p/google-api-go-client/googleapi"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// 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 _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
const apiId = "compute:v1"
const apiName = "compute"
const apiVersion = "v1"
const basePath = "https://www.googleapis.com/compute/v1/projects/"
// OAuth2 scopes used by this API.
const (
// View and manage your Google Compute Engine resources
ComputeScope = "https://www.googleapis.com/auth/compute"
// View your Google Compute Engine resources
ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly"
// Manage your data and permissions in Google Cloud Storage
DevstorageFull_controlScope = "https://www.googleapis.com/auth/devstorage.full_control"
// View your data in Google Cloud Storage
DevstorageRead_onlyScope = "https://www.googleapis.com/auth/devstorage.read_only"
// Manage your data in Google Cloud Storage
DevstorageRead_writeScope = "https://www.googleapis.com/auth/devstorage.read_write"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Addresses = NewAddressesService(s)
s.BackendServices = NewBackendServicesService(s)
s.DiskTypes = NewDiskTypesService(s)
s.Disks = NewDisksService(s)
s.Firewalls = NewFirewallsService(s)
s.ForwardingRules = NewForwardingRulesService(s)
s.GlobalAddresses = NewGlobalAddressesService(s)
s.GlobalForwardingRules = NewGlobalForwardingRulesService(s)
s.GlobalOperations = NewGlobalOperationsService(s)
s.HttpHealthChecks = NewHttpHealthChecksService(s)
s.Images = NewImagesService(s)
s.InstanceTemplates = NewInstanceTemplatesService(s)
s.Instances = NewInstancesService(s)
s.Licenses = NewLicensesService(s)
s.MachineTypes = NewMachineTypesService(s)
s.Networks = NewNetworksService(s)
s.Projects = NewProjectsService(s)
s.RegionOperations = NewRegionOperationsService(s)
s.Regions = NewRegionsService(s)
s.Routes = NewRoutesService(s)
s.Snapshots = NewSnapshotsService(s)
s.TargetHttpProxies = NewTargetHttpProxiesService(s)
s.TargetInstances = NewTargetInstancesService(s)
s.TargetPools = NewTargetPoolsService(s)
s.UrlMaps = NewUrlMapsService(s)
s.ZoneOperations = NewZoneOperationsService(s)
s.Zones = NewZonesService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
Addresses *AddressesService
BackendServices *BackendServicesService
DiskTypes *DiskTypesService
Disks *DisksService
Firewalls *FirewallsService
ForwardingRules *ForwardingRulesService
GlobalAddresses *GlobalAddressesService
GlobalForwardingRules *GlobalForwardingRulesService
GlobalOperations *GlobalOperationsService
HttpHealthChecks *HttpHealthChecksService
Images *ImagesService
InstanceTemplates *InstanceTemplatesService
Instances *InstancesService
Licenses *LicensesService
MachineTypes *MachineTypesService
Networks *NetworksService
Projects *ProjectsService
RegionOperations *RegionOperationsService
Regions *RegionsService
Routes *RoutesService
Snapshots *SnapshotsService
TargetHttpProxies *TargetHttpProxiesService
TargetInstances *TargetInstancesService
TargetPools *TargetPoolsService
UrlMaps *UrlMapsService
ZoneOperations *ZoneOperationsService
Zones *ZonesService
}
func NewAddressesService(s *Service) *AddressesService {
rs := &AddressesService{s: s}
return rs
}
type AddressesService struct {
s *Service
}
func NewBackendServicesService(s *Service) *BackendServicesService {
rs := &BackendServicesService{s: s}
return rs
}
type BackendServicesService struct {
s *Service
}
func NewDiskTypesService(s *Service) *DiskTypesService {
rs := &DiskTypesService{s: s}
return rs
}
type DiskTypesService struct {
s *Service
}
func NewDisksService(s *Service) *DisksService {
rs := &DisksService{s: s}
return rs
}
type DisksService struct {
s *Service
}
func NewFirewallsService(s *Service) *FirewallsService {
rs := &FirewallsService{s: s}
return rs
}
type FirewallsService struct {
s *Service
}
func NewForwardingRulesService(s *Service) *ForwardingRulesService {
rs := &ForwardingRulesService{s: s}
return rs
}
type ForwardingRulesService struct {
s *Service
}
func NewGlobalAddressesService(s *Service) *GlobalAddressesService {
rs := &GlobalAddressesService{s: s}
return rs
}
type GlobalAddressesService struct {
s *Service
}
func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService {
rs := &GlobalForwardingRulesService{s: s}
return rs
}
type GlobalForwardingRulesService struct {
s *Service
}
func NewGlobalOperationsService(s *Service) *GlobalOperationsService {
rs := &GlobalOperationsService{s: s}
return rs
}
type GlobalOperationsService struct {
s *Service
}
func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService {
rs := &HttpHealthChecksService{s: s}
return rs
}
type HttpHealthChecksService struct {
s *Service
}
func NewImagesService(s *Service) *ImagesService {
rs := &ImagesService{s: s}
return rs
}
type ImagesService struct {
s *Service
}
func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService {
rs := &InstanceTemplatesService{s: s}
return rs
}
type InstanceTemplatesService struct {
s *Service
}
func NewInstancesService(s *Service) *InstancesService {
rs := &InstancesService{s: s}
return rs
}
type InstancesService struct {
s *Service
}
func NewLicensesService(s *Service) *LicensesService {
rs := &LicensesService{s: s}
return rs
}
type LicensesService struct {
s *Service
}
func NewMachineTypesService(s *Service) *MachineTypesService {
rs := &MachineTypesService{s: s}
return rs
}
type MachineTypesService struct {
s *Service
}
func NewNetworksService(s *Service) *NetworksService {
rs := &NetworksService{s: s}
return rs
}
type NetworksService struct {
s *Service
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
return rs
}
type ProjectsService struct {
s *Service
}
func NewRegionOperationsService(s *Service) *RegionOperationsService {
rs := &RegionOperationsService{s: s}
return rs
}
type RegionOperationsService struct {
s *Service
}
func NewRegionsService(s *Service) *RegionsService {
rs := &RegionsService{s: s}
return rs
}
type RegionsService struct {
s *Service
}
func NewRoutesService(s *Service) *RoutesService {
rs := &RoutesService{s: s}
return rs
}
type RoutesService struct {
s *Service
}
func NewSnapshotsService(s *Service) *SnapshotsService {
rs := &SnapshotsService{s: s}
return rs
}
type SnapshotsService struct {
s *Service
}
func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService {
rs := &TargetHttpProxiesService{s: s}
return rs
}
type TargetHttpProxiesService struct {
s *Service
}
func NewTargetInstancesService(s *Service) *TargetInstancesService {
rs := &TargetInstancesService{s: s}
return rs
}
type TargetInstancesService struct {
s *Service
}
func NewTargetPoolsService(s *Service) *TargetPoolsService {
rs := &TargetPoolsService{s: s}
return rs
}
type TargetPoolsService struct {
s *Service
}
func NewUrlMapsService(s *Service) *UrlMapsService {
rs := &UrlMapsService{s: s}
return rs
}
type UrlMapsService struct {
s *Service
}
func NewZoneOperationsService(s *Service) *ZoneOperationsService {
rs := &ZoneOperationsService{s: s}
return rs
}
type ZoneOperationsService struct {
s *Service
}
func NewZonesService(s *Service) *ZonesService {
rs := &ZonesService{s: s}
return rs
}
type ZonesService struct {
s *Service
}
type AccessConfig struct {
// Kind: Type of the resource.
Kind string `json:"kind,omitempty"`
// Name: Name of this access configuration.
Name string `json:"name,omitempty"`
// NatIP: An external IP address associated with this instance. Specify
// an unused static IP address available to the project. If not
// specified, the external IP will be drawn from a shared ephemeral
// pool.
NatIP string `json:"natIP,omitempty"`
// Type: Type of configuration. Must be set to "ONE_TO_ONE_NAT". This
// configures port-for-port NAT to the internet.
Type string `json:"type,omitempty"`
}
type Address struct {
// Address: The IP address represented by this resource.
Address string `json:"address,omitempty"`
// CreationTimestamp: Creation timestamp in RFC3339 text format (output
// only).
CreationTimestamp string `json:"creationTimestamp,omitempty"`
// Description: An optional textual description of the resource;
// provided by the client when the resource is created.
Description string `json:"description,omitempty"`
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id uint64 `json:"id,omitempty,string"`
// Kind: Type of the resource.
Kind string `json:"kind,omitempty"`
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035.
Name string `json:"name,omitempty"`
// Region: URL of the region where the regional address resides (output
// only). This field is not applicable to global addresses.
Region string `json:"region,omitempty"`
// SelfLink: Server defined URL for the resource (output only).
SelfLink string `json:"selfLink,omitempty"`
// Status: The status of the address (output only).
Status string `json:"status,omitempty"`
// Users: The resources that are using this address resource.
Users []string `json:"users,omitempty"`
}
type AddressAggregatedList struct {
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id string `json:"id,omitempty"`
// Items: A map of scoped address lists.
Items map[string]AddressesScopedList `json:"items,omitempty"`
// Kind: Type of resource.
Kind string `json:"kind,omitempty"`
// NextPageToken: A token used to continue a truncated list request
// (output only).
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: Server defined URL for this resource (output only).
SelfLink string `json:"selfLink,omitempty"`
}
type AddressList struct {
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id string `json:"id,omitempty"`
// Items: The address resources.
Items []*Address `json:"items,omitempty"`
// Kind: Type of resource.
Kind string `json:"kind,omitempty"`
// NextPageToken: A token used to continue a truncated list request
// (output only).
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: Server defined URL for the resource (output only).
SelfLink string `json:"selfLink,omitempty"`
}
type AddressesScopedList struct {
// Addresses: List of addresses contained in this scope.
Addresses []*Address `json:"addresses,omitempty"`
// Warning: Informational warning which replaces the list of addresses
// when the list is empty.
Warning *AddressesScopedListWarning `json:"warning,omitempty"`
}
type AddressesScopedListWarning struct {
// Code: The warning type identifier for this warning.
Code string `json:"code,omitempty"`
// Data: Metadata for this warning in 'key: value' format.
Data []*AddressesScopedListWarningData `json:"data,omitempty"`
// Message: Optional human-readable details for this warning.
Message string `json:"message,omitempty"`
}
type AddressesScopedListWarningData struct {
// Key: A key for the warning data.
Key string `json:"key,omitempty"`
// Value: A warning data value corresponding to the key.
Value string `json:"value,omitempty"`
}
type AttachedDisk struct {
// AutoDelete: Whether the disk will be auto-deleted when the instance
// is deleted (but not when the disk is detached from the instance).
AutoDelete bool `json:"autoDelete,omitempty"`
// Boot: Indicates that this is a boot disk. VM will use the first
// partition of the disk for its root filesystem.
Boot bool `json:"boot,omitempty"`
// DeviceName: Persistent disk only; must be unique within the instance
// when specified. This represents a unique device name that is
// reflected into the /dev/ tree of a Linux operating system running
// within the instance. If not specified, a default will be chosen by
// the system.
DeviceName string `json:"deviceName,omitempty"`
// Index: A zero-based index to assign to this disk, where 0 is reserved
// for the boot disk. If not specified, the server will choose an
// appropriate value (output only).
Index int64 `json:"index,omitempty"`
// InitializeParams: Initialization parameters.
InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"`
Interface string `json:"interface,omitempty"`
// Kind: Type of the resource.
Kind string `json:"kind,omitempty"`
// Licenses: Public visible licenses.
Licenses []string `json:"licenses,omitempty"`
// Mode: The mode in which to attach this disk, either "READ_WRITE" or
// "READ_ONLY".
Mode string `json:"mode,omitempty"`
// Source: Persistent disk only; the URL of the persistent disk
// resource.
Source string `json:"source,omitempty"`
// Type: Type of the disk, either "SCRATCH" or "PERSISTENT". Note that
// persistent disks must be created before you can specify them here.
Type string `json:"type,omitempty"`
}
type AttachedDiskInitializeParams struct {
// DiskName: Name of the disk (when not provided defaults to the name of
// the instance).
DiskName string `json:"diskName,omitempty"`
// DiskSizeGb: Size of the disk in base-2 GB.
DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
// DiskType: URL of the disk type resource describing which disk type to
// use to create the disk; provided by the client when the disk is
// created.
DiskType string `json:"diskType,omitempty"`
// SourceImage: The source image used to create this disk.
SourceImage string `json:"sourceImage,omitempty"`
}
type Backend struct {
// BalancingMode: The balancing mode of this backend, default is
// UTILIZATION.
BalancingMode string `json:"balancingMode,omitempty"`
// CapacityScaler: The multiplier (a value between 0 and 1e6) of the max
// capacity (CPU or RPS, depending on 'balancingMode') the group should
// serve up to. 0 means the group is totally drained. Default value is
// 1. Valid range is [0, 1e6].
CapacityScaler float64 `json:"capacityScaler,omitempty"`
// Description: An optional textual description of the resource, which
// is provided by the client when the resource is created.
Description string `json:"description,omitempty"`
// Group: URL of a zonal Cloud Resource View resource. This resource
// view defines the list of instances that serve traffic. Member virtual
// machine instances from each resource view must live in the same zone
// as the resource view itself. No two backends in a backend service are
// allowed to use same Resource View resource.
Group string `json:"group,omitempty"`
// MaxRate: The max RPS of the group. Can be used with either balancing
// mode, but required if RATE mode. For RATE mode, either maxRate or
// maxRatePerInstance must be set.
MaxRate int64 `json:"maxRate,omitempty"`
// MaxRatePerInstance: The max RPS that a single backed instance can
// handle. This is used to calculate the capacity of the group. Can be
// used in either balancing mode. For RATE mode, either maxRate or
// maxRatePerInstance must be set.
MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"`
// MaxUtilization: Used when 'balancingMode' is UTILIZATION. This ratio
// defines the CPU utilization target for the group. The default is 0.8.
// Valid range is [0, 1].
MaxUtilization float64 `json:"maxUtilization,omitempty"`
}
type BackendService struct {
// Backends: The list of backends that serve this BackendService.
Backends []*Backend `json:"backends,omitempty"`
// CreationTimestamp: Creation timestamp in RFC3339 text format (output
// only).
CreationTimestamp string `json:"creationTimestamp,omitempty"`
// Description: An optional textual description of the resource;
// provided by the client when the resource is created.
Description string `json:"description,omitempty"`
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a BackendService. An up-to-date
// fingerprint must be provided in order to update the BackendService.
Fingerprint string `json:"fingerprint,omitempty"`
// HealthChecks: The list of URLs to the HttpHealthCheck resource for
// health checking this BackendService. Currently at most one health
// check can be specified, and a health check is required.
HealthChecks []string `json:"healthChecks,omitempty"`
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id uint64 `json:"id,omitempty,string"`
// Kind: Type of the resource.
Kind string `json:"kind,omitempty"`
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035.
Name string `json:"name,omitempty"`
// Port: Deprecated in favor of port_name. The TCP port to connect on
// the backend. The default value is 80.
Port int64 `json:"port,omitempty"`
// PortName: Name of backend port. The same name should appear in the
// resource views referenced by this service. Required.
PortName string `json:"portName,omitempty"`
Protocol string `json:"protocol,omitempty"`
// SelfLink: Server defined URL for the resource (output only).
SelfLink string `json:"selfLink,omitempty"`
// TimeoutSec: How many seconds to wait for the backend before
// considering it a failed request. Default is 30 seconds.
TimeoutSec int64 `json:"timeoutSec,omitempty"`
}
type BackendServiceGroupHealth struct {
HealthStatus []*HealthStatus `json:"healthStatus,omitempty"`
// Kind: Type of resource.
Kind string `json:"kind,omitempty"`
}
type BackendServiceList struct {
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id string `json:"id,omitempty"`
// Items: The BackendService resources.
Items []*BackendService `json:"items,omitempty"`
// Kind: Type of resource.
Kind string `json:"kind,omitempty"`
// NextPageToken: A token used to continue a truncated list request
// (output only).
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: Server defined URL for this resource (output only).
SelfLink string `json:"selfLink,omitempty"`
}
type DeprecationStatus struct {
// Deleted: An optional RFC3339 timestamp on or after which the
// deprecation state of this resource will be changed to DELETED.
Deleted string `json:"deleted,omitempty"`
// Deprecated: An optional RFC3339 timestamp on or after which the
// deprecation state of this resource will be changed to DEPRECATED.
Deprecated string `json:"deprecated,omitempty"`
// Obsolete: An optional RFC3339 timestamp on or after which the
// deprecation state of this resource will be changed to OBSOLETE.
Obsolete string `json:"obsolete,omitempty"`
// Replacement: A URL of the suggested replacement for the deprecated
// resource. The deprecated resource and its replacement must be
// resources of the same kind.
Replacement string `json:"replacement,omitempty"`
// State: The deprecation state. Can be "DEPRECATED", "OBSOLETE", or
// "DELETED". Operations which create a new resource using a
// "DEPRECATED" resource will return successfully, but with a warning
// indicating the deprecated resource and recommending its replacement.
// New uses of "OBSOLETE" or "DELETED" resources will result in an
// error.
State string `json:"state,omitempty"`
}
type Disk struct {
// CreationTimestamp: Creation timestamp in RFC3339 text format (output
// only).
CreationTimestamp string `json:"creationTimestamp,omitempty"`
// Description: An optional textual description of the resource;
// provided by the client when the resource is created.
Description string `json:"description,omitempty"`
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id uint64 `json:"id,omitempty,string"`
// Kind: Type of the resource.
Kind string `json:"kind,omitempty"`
// Licenses: Public visible licenses.
Licenses []string `json:"licenses,omitempty"`
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035.
Name string `json:"name,omitempty"`
// Options: Internal use only.
Options string `json:"options,omitempty"`
// SelfLink: Server defined URL for the resource (output only).
SelfLink string `json:"selfLink,omitempty"`
// SizeGb: Size of the persistent disk, specified in GB. This parameter
// is optional when creating a disk from a disk image or a snapshot,
// otherwise it is required.
SizeGb int64 `json:"sizeGb,omitempty,string"`
// SourceImage: The source image used to create this disk.
SourceImage string `json:"sourceImage,omitempty"`
// SourceImageId: The 'id' value of the image used to create this disk.
// This value may be used to determine whether the disk was created from
// the current or a previous instance of a given image.
SourceImageId string `json:"sourceImageId,omitempty"`
// SourceSnapshot: The source snapshot used to create this disk.
SourceSnapshot string `json:"sourceSnapshot,omitempty"`
// SourceSnapshotId: The 'id' value of the snapshot used to create this
// disk. This value may be used to determine whether the disk was
// created from the current or a previous instance of a given disk
// snapshot.
SourceSnapshotId string `json:"sourceSnapshotId,omitempty"`
// Status: The status of disk creation (output only).
Status string `json:"status,omitempty"`
// Type: URL of the disk type resource describing which disk type to use
// to create the disk; provided by the client when the disk is created.
Type string `json:"type,omitempty"`
// Zone: URL of the zone where the disk resides (output only).
Zone string `json:"zone,omitempty"`
}
type DiskAggregatedList struct {
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id string `json:"id,omitempty"`
// Items: A map of scoped disk lists.
Items map[string]DisksScopedList `json:"items,omitempty"`
// Kind: Type of resource.
Kind string `json:"kind,omitempty"`
// NextPageToken: A token used to continue a truncated list request
// (output only).
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: Server defined URL for this resource (output only).
SelfLink string `json:"selfLink,omitempty"`
}
type DiskList struct {
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id string `json:"id,omitempty"`
// Items: The persistent disk resources.
Items []*Disk `json:"items,omitempty"`
// Kind: Type of resource.
Kind string `json:"kind,omitempty"`
// NextPageToken: A token used to continue a truncated list request
// (output only).
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: Server defined URL for this resource (output only).
SelfLink string `json:"selfLink,omitempty"`
}
type DiskType struct {
// CreationTimestamp: Creation timestamp in RFC3339 text format (output
// only).
CreationTimestamp string `json:"creationTimestamp,omitempty"`
// DefaultDiskSizeGb: Server defined default disk size in gb (output
// only).
DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"`
// Deprecated: The deprecation status associated with this disk type.
Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
// Description: An optional textual description of the resource.
Description string `json:"description,omitempty"`
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id uint64 `json:"id,omitempty,string"`
// Kind: Type of the resource.
Kind string `json:"kind,omitempty"`
// Name: Name of the resource.
Name string `json:"name,omitempty"`
// SelfLink: Server defined URL for the resource (output only).
SelfLink string `json:"selfLink,omitempty"`
// ValidDiskSize: An optional textual descroption of the valid disk
// size, e.g., "10GB-10TB".
ValidDiskSize string `json:"validDiskSize,omitempty"`
// Zone: Url of the zone where the disk type resides (output only).
Zone string `json:"zone,omitempty"`
}
type DiskTypeAggregatedList struct {
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id string `json:"id,omitempty"`
// Items: A map of scoped disk type lists.
Items map[string]DiskTypesScopedList `json:"items,omitempty"`
// Kind: Type of resource.
Kind string `json:"kind,omitempty"`
// NextPageToken: A token used to continue a truncated list request
// (output only).
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: Server defined URL for this resource (output only).
SelfLink string `json:"selfLink,omitempty"`
}
type DiskTypeList struct {
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id string `json:"id,omitempty"`
// Items: The disk type resources.
Items []*DiskType `json:"items,omitempty"`
// Kind: Type of resource.
Kind string `json:"kind,omitempty"`
// NextPageToken: A token used to continue a truncated list request
// (output only).
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: Server defined URL for this resource (output only).
SelfLink string `json:"selfLink,omitempty"`
}
type DiskTypesScopedList struct {
// DiskTypes: List of disk types contained in this scope.
DiskTypes []*DiskType `json:"diskTypes,omitempty"`
// Warning: Informational warning which replaces the list of disk types
// when the list is empty.
Warning *DiskTypesScopedListWarning `json:"warning,omitempty"`
}
type DiskTypesScopedListWarning struct {
// Code: The warning type identifier for this warning.
Code string `json:"code,omitempty"`
// Data: Metadata for this warning in 'key: value' format.
Data []*DiskTypesScopedListWarningData `json:"data,omitempty"`
// Message: Optional human-readable details for this warning.
Message string `json:"message,omitempty"`
}
type DiskTypesScopedListWarningData struct {
// Key: A key for the warning data.
Key string `json:"key,omitempty"`
// Value: A warning data value corresponding to the key.
Value string `json:"value,omitempty"`
}
type DisksScopedList struct {
// Disks: List of disks contained in this scope.
Disks []*Disk `json:"disks,omitempty"`
// Warning: Informational warning which replaces the list of disks when
// the list is empty.
Warning *DisksScopedListWarning `json:"warning,omitempty"`
}
type DisksScopedListWarning struct {
// Code: The warning type identifier for this warning.
Code string `json:"code,omitempty"`
// Data: Metadata for this warning in 'key: value' format.
Data []*DisksScopedListWarningData `json:"data,omitempty"`
// Message: Optional human-readable details for this warning.
Message string `json:"message,omitempty"`
}
type DisksScopedListWarningData struct {
// Key: A key for the warning data.
Key string `json:"key,omitempty"`
// Value: A warning data value corresponding to the key.
Value string `json:"value,omitempty"`
}
type Firewall struct {
// Allowed: The list of rules specified by this firewall. Each rule
// specifies a protocol and port-range tuple that describes a permitted
// connection.
Allowed []*FirewallAllowed `json:"allowed,omitempty"`
// CreationTimestamp: Creation timestamp in RFC3339 text format (output
// only).
CreationTimestamp string `json:"creationTimestamp,omitempty"`
// Description: An optional textual description of the resource;
// provided by the client when the resource is created.
Description string `json:"description,omitempty"`
// Id: Unique identifier for the resource; defined by the server (output
// only).
Id uint64 `json:"id,omitempty,string"`
// Kind: Type of the resource.
Kind string `json:"kind,omitempty"`
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035.
Name string `json:"name,omitempty"`
// Network: URL of the network to which this firewall is applied;
// provided by the client when the firewall is created.
Network string `json:"network,omitempty"`
// SelfLink: Server defined URL for the resource (output only).
SelfLink string `json:"selfLink,omitempty"`
// SourceRanges: A list of IP address blocks expressed in CIDR format
// which this rule applies to. One or both of sourceRanges and
// sourceTags may be set; an inbound connection is allowed if either the
// range or the tag of the source matches.
SourceRanges []string `json:"sourceRanges,omitempty"`
// SourceTags: A list of instance tags which this rule applies to. One
// or both of sourceRanges and sourceTags may be set; an inbound
// connection is allowed if either the range or the tag of the source
// matches.
SourceTags []string `json:"sourceTags,omitempty"`