-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_cluster_computed_status_dto.go
271 lines (219 loc) · 8.14 KB
/
model_cluster_computed_status_dto.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
/*
websocket-gateway
Describe the weboscket endpoints
API version: 0.1.0
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package qovery-ws
import (
"encoding/json"
"bytes"
"fmt"
)
// checks if the ClusterComputedStatusDto type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ClusterComputedStatusDto{}
// ClusterComputedStatusDto struct for ClusterComputedStatusDto
type ClusterComputedStatusDto struct {
GlobalStatus ClusterStatusGlobalStatus `json:"global_status"`
IsMaxNodesSizeReached bool `json:"is_max_nodes_size_reached"`
KubeVersionStatus QoveryClusterKubeVersionStatus `json:"kube_version_status"`
NodeWarnings map[string][]QoveryNodeFailure `json:"node_warnings"`
QoveryComponentsInFailure []QoveryComponentInFailure `json:"qovery_components_in_failure"`
}
type _ClusterComputedStatusDto ClusterComputedStatusDto
// NewClusterComputedStatusDto instantiates a new ClusterComputedStatusDto 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 NewClusterComputedStatusDto(globalStatus ClusterStatusGlobalStatus, isMaxNodesSizeReached bool, kubeVersionStatus QoveryClusterKubeVersionStatus, nodeWarnings map[string][]QoveryNodeFailure, qoveryComponentsInFailure []QoveryComponentInFailure) *ClusterComputedStatusDto {
this := ClusterComputedStatusDto{}
this.GlobalStatus = globalStatus
this.IsMaxNodesSizeReached = isMaxNodesSizeReached
this.KubeVersionStatus = kubeVersionStatus
this.NodeWarnings = nodeWarnings
this.QoveryComponentsInFailure = qoveryComponentsInFailure
return &this
}
// NewClusterComputedStatusDtoWithDefaults instantiates a new ClusterComputedStatusDto 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 NewClusterComputedStatusDtoWithDefaults() *ClusterComputedStatusDto {
this := ClusterComputedStatusDto{}
return &this
}
// GetGlobalStatus returns the GlobalStatus field value
func (o *ClusterComputedStatusDto) GetGlobalStatus() ClusterStatusGlobalStatus {
if o == nil {
var ret ClusterStatusGlobalStatus
return ret
}
return o.GlobalStatus
}
// GetGlobalStatusOk returns a tuple with the GlobalStatus field value
// and a boolean to check if the value has been set.
func (o *ClusterComputedStatusDto) GetGlobalStatusOk() (*ClusterStatusGlobalStatus, bool) {
if o == nil {
return nil, false
}
return &o.GlobalStatus, true
}
// SetGlobalStatus sets field value
func (o *ClusterComputedStatusDto) SetGlobalStatus(v ClusterStatusGlobalStatus) {
o.GlobalStatus = v
}
// GetIsMaxNodesSizeReached returns the IsMaxNodesSizeReached field value
func (o *ClusterComputedStatusDto) GetIsMaxNodesSizeReached() bool {
if o == nil {
var ret bool
return ret
}
return o.IsMaxNodesSizeReached
}
// GetIsMaxNodesSizeReachedOk returns a tuple with the IsMaxNodesSizeReached field value
// and a boolean to check if the value has been set.
func (o *ClusterComputedStatusDto) GetIsMaxNodesSizeReachedOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.IsMaxNodesSizeReached, true
}
// SetIsMaxNodesSizeReached sets field value
func (o *ClusterComputedStatusDto) SetIsMaxNodesSizeReached(v bool) {
o.IsMaxNodesSizeReached = v
}
// GetKubeVersionStatus returns the KubeVersionStatus field value
func (o *ClusterComputedStatusDto) GetKubeVersionStatus() QoveryClusterKubeVersionStatus {
if o == nil {
var ret QoveryClusterKubeVersionStatus
return ret
}
return o.KubeVersionStatus
}
// GetKubeVersionStatusOk returns a tuple with the KubeVersionStatus field value
// and a boolean to check if the value has been set.
func (o *ClusterComputedStatusDto) GetKubeVersionStatusOk() (*QoveryClusterKubeVersionStatus, bool) {
if o == nil {
return nil, false
}
return &o.KubeVersionStatus, true
}
// SetKubeVersionStatus sets field value
func (o *ClusterComputedStatusDto) SetKubeVersionStatus(v QoveryClusterKubeVersionStatus) {
o.KubeVersionStatus = v
}
// GetNodeWarnings returns the NodeWarnings field value
func (o *ClusterComputedStatusDto) GetNodeWarnings() map[string][]QoveryNodeFailure {
if o == nil {
var ret map[string][]QoveryNodeFailure
return ret
}
return o.NodeWarnings
}
// GetNodeWarningsOk returns a tuple with the NodeWarnings field value
// and a boolean to check if the value has been set.
func (o *ClusterComputedStatusDto) GetNodeWarningsOk() (*map[string][]QoveryNodeFailure, bool) {
if o == nil {
return nil, false
}
return &o.NodeWarnings, true
}
// SetNodeWarnings sets field value
func (o *ClusterComputedStatusDto) SetNodeWarnings(v map[string][]QoveryNodeFailure) {
o.NodeWarnings = v
}
// GetQoveryComponentsInFailure returns the QoveryComponentsInFailure field value
func (o *ClusterComputedStatusDto) GetQoveryComponentsInFailure() []QoveryComponentInFailure {
if o == nil {
var ret []QoveryComponentInFailure
return ret
}
return o.QoveryComponentsInFailure
}
// GetQoveryComponentsInFailureOk returns a tuple with the QoveryComponentsInFailure field value
// and a boolean to check if the value has been set.
func (o *ClusterComputedStatusDto) GetQoveryComponentsInFailureOk() ([]QoveryComponentInFailure, bool) {
if o == nil {
return nil, false
}
return o.QoveryComponentsInFailure, true
}
// SetQoveryComponentsInFailure sets field value
func (o *ClusterComputedStatusDto) SetQoveryComponentsInFailure(v []QoveryComponentInFailure) {
o.QoveryComponentsInFailure = v
}
func (o ClusterComputedStatusDto) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ClusterComputedStatusDto) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["global_status"] = o.GlobalStatus
toSerialize["is_max_nodes_size_reached"] = o.IsMaxNodesSizeReached
toSerialize["kube_version_status"] = o.KubeVersionStatus
toSerialize["node_warnings"] = o.NodeWarnings
toSerialize["qovery_components_in_failure"] = o.QoveryComponentsInFailure
return toSerialize, nil
}
func (o *ClusterComputedStatusDto) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"global_status",
"is_max_nodes_size_reached",
"kube_version_status",
"node_warnings",
"qovery_components_in_failure",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varClusterComputedStatusDto := _ClusterComputedStatusDto{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varClusterComputedStatusDto)
if err != nil {
return err
}
*o = ClusterComputedStatusDto(varClusterComputedStatusDto)
return err
}
type NullableClusterComputedStatusDto struct {
value *ClusterComputedStatusDto
isSet bool
}
func (v NullableClusterComputedStatusDto) Get() *ClusterComputedStatusDto {
return v.value
}
func (v *NullableClusterComputedStatusDto) Set(val *ClusterComputedStatusDto) {
v.value = val
v.isSet = true
}
func (v NullableClusterComputedStatusDto) IsSet() bool {
return v.isSet
}
func (v *NullableClusterComputedStatusDto) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableClusterComputedStatusDto(val *ClusterComputedStatusDto) *NullableClusterComputedStatusDto {
return &NullableClusterComputedStatusDto{value: val, isSet: true}
}
func (v NullableClusterComputedStatusDto) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableClusterComputedStatusDto) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}