/
model_v1_deployment_config_rollback_spec.go
266 lines (220 loc) · 7.91 KB
/
model_v1_deployment_config_rollback_spec.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
/*
Arvancloud PaaS REST API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: v1.11
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package paas
import (
"encoding/json"
)
// checks if the V1DeploymentConfigRollbackSpec type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &V1DeploymentConfigRollbackSpec{}
// V1DeploymentConfigRollbackSpec DeploymentConfigRollbackSpec represents the options for rollback generation.
type V1DeploymentConfigRollbackSpec struct {
From V1ObjectReference `json:"from"`
// IncludeReplicationMeta specifies whether to include the replica count and selector.
IncludeReplicationMeta bool `json:"includeReplicationMeta"`
// IncludeStrategy specifies whether to include the deployment Strategy.
IncludeStrategy bool `json:"includeStrategy"`
// IncludeTemplate specifies whether to include the PodTemplateSpec.
IncludeTemplate bool `json:"includeTemplate"`
// IncludeTriggers specifies whether to include config Triggers.
IncludeTriggers bool `json:"includeTriggers"`
// Revision to rollback to. If set to 0, rollback to the last revision.
Revision *int64 `json:"revision,omitempty"`
}
// NewV1DeploymentConfigRollbackSpec instantiates a new V1DeploymentConfigRollbackSpec object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewV1DeploymentConfigRollbackSpec(from V1ObjectReference, includeReplicationMeta bool, includeStrategy bool, includeTemplate bool, includeTriggers bool) *V1DeploymentConfigRollbackSpec {
this := V1DeploymentConfigRollbackSpec{}
this.From = from
this.IncludeReplicationMeta = includeReplicationMeta
this.IncludeStrategy = includeStrategy
this.IncludeTemplate = includeTemplate
this.IncludeTriggers = includeTriggers
return &this
}
// NewV1DeploymentConfigRollbackSpecWithDefaults instantiates a new V1DeploymentConfigRollbackSpec object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewV1DeploymentConfigRollbackSpecWithDefaults() *V1DeploymentConfigRollbackSpec {
this := V1DeploymentConfigRollbackSpec{}
return &this
}
// GetFrom returns the From field value
func (o *V1DeploymentConfigRollbackSpec) GetFrom() V1ObjectReference {
if o == nil {
var ret V1ObjectReference
return ret
}
return o.From
}
// GetFromOk returns a tuple with the From field value
// and a boolean to check if the value has been set.
func (o *V1DeploymentConfigRollbackSpec) GetFromOk() (*V1ObjectReference, bool) {
if o == nil {
return nil, false
}
return &o.From, true
}
// SetFrom sets field value
func (o *V1DeploymentConfigRollbackSpec) SetFrom(v V1ObjectReference) {
o.From = v
}
// GetIncludeReplicationMeta returns the IncludeReplicationMeta field value
func (o *V1DeploymentConfigRollbackSpec) GetIncludeReplicationMeta() bool {
if o == nil {
var ret bool
return ret
}
return o.IncludeReplicationMeta
}
// GetIncludeReplicationMetaOk returns a tuple with the IncludeReplicationMeta field value
// and a boolean to check if the value has been set.
func (o *V1DeploymentConfigRollbackSpec) GetIncludeReplicationMetaOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.IncludeReplicationMeta, true
}
// SetIncludeReplicationMeta sets field value
func (o *V1DeploymentConfigRollbackSpec) SetIncludeReplicationMeta(v bool) {
o.IncludeReplicationMeta = v
}
// GetIncludeStrategy returns the IncludeStrategy field value
func (o *V1DeploymentConfigRollbackSpec) GetIncludeStrategy() bool {
if o == nil {
var ret bool
return ret
}
return o.IncludeStrategy
}
// GetIncludeStrategyOk returns a tuple with the IncludeStrategy field value
// and a boolean to check if the value has been set.
func (o *V1DeploymentConfigRollbackSpec) GetIncludeStrategyOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.IncludeStrategy, true
}
// SetIncludeStrategy sets field value
func (o *V1DeploymentConfigRollbackSpec) SetIncludeStrategy(v bool) {
o.IncludeStrategy = v
}
// GetIncludeTemplate returns the IncludeTemplate field value
func (o *V1DeploymentConfigRollbackSpec) GetIncludeTemplate() bool {
if o == nil {
var ret bool
return ret
}
return o.IncludeTemplate
}
// GetIncludeTemplateOk returns a tuple with the IncludeTemplate field value
// and a boolean to check if the value has been set.
func (o *V1DeploymentConfigRollbackSpec) GetIncludeTemplateOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.IncludeTemplate, true
}
// SetIncludeTemplate sets field value
func (o *V1DeploymentConfigRollbackSpec) SetIncludeTemplate(v bool) {
o.IncludeTemplate = v
}
// GetIncludeTriggers returns the IncludeTriggers field value
func (o *V1DeploymentConfigRollbackSpec) GetIncludeTriggers() bool {
if o == nil {
var ret bool
return ret
}
return o.IncludeTriggers
}
// GetIncludeTriggersOk returns a tuple with the IncludeTriggers field value
// and a boolean to check if the value has been set.
func (o *V1DeploymentConfigRollbackSpec) GetIncludeTriggersOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.IncludeTriggers, true
}
// SetIncludeTriggers sets field value
func (o *V1DeploymentConfigRollbackSpec) SetIncludeTriggers(v bool) {
o.IncludeTriggers = v
}
// GetRevision returns the Revision field value if set, zero value otherwise.
func (o *V1DeploymentConfigRollbackSpec) GetRevision() int64 {
if o == nil || IsNil(o.Revision) {
var ret int64
return ret
}
return *o.Revision
}
// GetRevisionOk returns a tuple with the Revision field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V1DeploymentConfigRollbackSpec) GetRevisionOk() (*int64, bool) {
if o == nil || IsNil(o.Revision) {
return nil, false
}
return o.Revision, true
}
// HasRevision returns a boolean if a field has been set.
func (o *V1DeploymentConfigRollbackSpec) HasRevision() bool {
if o != nil && !IsNil(o.Revision) {
return true
}
return false
}
// SetRevision gets a reference to the given int64 and assigns it to the Revision field.
func (o *V1DeploymentConfigRollbackSpec) SetRevision(v int64) {
o.Revision = &v
}
func (o V1DeploymentConfigRollbackSpec) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o V1DeploymentConfigRollbackSpec) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["from"] = o.From
toSerialize["includeReplicationMeta"] = o.IncludeReplicationMeta
toSerialize["includeStrategy"] = o.IncludeStrategy
toSerialize["includeTemplate"] = o.IncludeTemplate
toSerialize["includeTriggers"] = o.IncludeTriggers
if !IsNil(o.Revision) {
toSerialize["revision"] = o.Revision
}
return toSerialize, nil
}
type NullableV1DeploymentConfigRollbackSpec struct {
value *V1DeploymentConfigRollbackSpec
isSet bool
}
func (v NullableV1DeploymentConfigRollbackSpec) Get() *V1DeploymentConfigRollbackSpec {
return v.value
}
func (v *NullableV1DeploymentConfigRollbackSpec) Set(val *V1DeploymentConfigRollbackSpec) {
v.value = val
v.isSet = true
}
func (v NullableV1DeploymentConfigRollbackSpec) IsSet() bool {
return v.isSet
}
func (v *NullableV1DeploymentConfigRollbackSpec) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableV1DeploymentConfigRollbackSpec(val *V1DeploymentConfigRollbackSpec) *NullableV1DeploymentConfigRollbackSpec {
return &NullableV1DeploymentConfigRollbackSpec{value: val, isSet: true}
}
func (v NullableV1DeploymentConfigRollbackSpec) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableV1DeploymentConfigRollbackSpec) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}