-
Notifications
You must be signed in to change notification settings - Fork 30
/
common.go
147 lines (116 loc) · 3.01 KB
/
common.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
package azure
import "github.com/spotinst/spotinst-sdk-go/spotinst/util/jsonutil"
// region Tag
type Tag struct {
Key *string `json:"tagKey,omitempty"`
Value *string `json:"tagValue,omitempty"`
forceSendFields []string
nullFields []string
}
func (o Tag) MarshalJSON() ([]byte, error) {
type noMethod Tag
raw := noMethod(o)
return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields)
}
func (o *Tag) SetKey(v *string) *Tag {
if o.Key = v; o.Key == nil {
o.nullFields = append(o.nullFields, "Key")
}
return o
}
func (o *Tag) SetValue(v *string) *Tag {
if o.Value = v; o.Value == nil {
o.nullFields = append(o.nullFields, "Value")
}
return o
}
// endregion
// region OSDisk
type OSDisk struct {
SizeGB *int `json:"sizeGB,omitempty"`
Type *string `json:"type,omitempty"`
UtilizeEphemeralStorage *bool `json:"utilizeEphemeralStorage,omitempty"`
forceSendFields []string
nullFields []string
}
func (o OSDisk) MarshalJSON() ([]byte, error) {
type noMethod OSDisk
raw := noMethod(o)
return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields)
}
func (o *OSDisk) SetSizeGB(v *int) *OSDisk {
if o.SizeGB = v; o.SizeGB == nil {
o.nullFields = append(o.nullFields, "SizeGB")
}
return o
}
func (o *OSDisk) SetType(v *string) *OSDisk {
if o.Type = v; o.Type == nil {
o.nullFields = append(o.nullFields, "Type")
}
return o
}
func (o *OSDisk) SetUtilizeEphemeralStorage(v *bool) *OSDisk {
if o.UtilizeEphemeralStorage = v; o.UtilizeEphemeralStorage == nil {
o.nullFields = append(o.nullFields, "UtilizeEphemeralStorage")
}
return o
}
// endregion
// region Label
type Label struct {
Key *string `json:"key,omitempty"`
Value *string `json:"value,omitempty"`
forceSendFields []string
nullFields []string
}
func (o Label) MarshalJSON() ([]byte, error) {
type noMethod Label
raw := noMethod(o)
return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields)
}
func (o *Label) SetKey(v *string) *Label {
if o.Key = v; o.Key == nil {
o.nullFields = append(o.nullFields, "Key")
}
return o
}
func (o *Label) SetValue(v *string) *Label {
if o.Value = v; o.Value == nil {
o.nullFields = append(o.nullFields, "Value")
}
return o
}
// endregion
// region Taint
type Taint struct {
Key *string `json:"key,omitempty"`
Value *string `json:"value,omitempty"`
Effect *string `json:"effect,omitempty"`
forceSendFields []string
nullFields []string
}
func (o Taint) MarshalJSON() ([]byte, error) {
type noMethod Taint
raw := noMethod(o)
return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields)
}
func (o *Taint) SetKey(v *string) *Taint {
if o.Key = v; o.Key == nil {
o.nullFields = append(o.nullFields, "Key")
}
return o
}
func (o *Taint) SetValue(v *string) *Taint {
if o.Value = v; o.Value == nil {
o.nullFields = append(o.nullFields, "Value")
}
return o
}
func (o *Taint) SetEffect(v *string) *Taint {
if o.Effect = v; o.Effect == nil {
o.nullFields = append(o.nullFields, "Effect")
}
return o
}
// endregion