-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_node_pod_info_dto.go
537 lines (451 loc) · 15.5 KB
/
model_node_pod_info_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
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
/*
websocket-gateway
Describe the websocket endpoints of Qovery
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 NodePodInfoDto type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &NodePodInfoDto{}
// NodePodInfoDto struct for NodePodInfoDto
type NodePodInfoDto struct {
CpuMilliLimit NullableInt32 `json:"cpu_milli_limit,omitempty"`
CpuMilliRequest NullableInt32 `json:"cpu_milli_request,omitempty"`
EnvironmentId NullableString `json:"environment_id,omitempty"`
ImagesVersion map[string]string `json:"images_version"`
MemoryMibLimit NullableInt32 `json:"memory_mib_limit,omitempty"`
MemoryMibRequest NullableInt32 `json:"memory_mib_request,omitempty"`
Name string `json:"name"`
Namespace string `json:"namespace"`
ProjectId NullableString `json:"project_id,omitempty"`
ServiceId NullableString `json:"service_id,omitempty"`
}
type _NodePodInfoDto NodePodInfoDto
// NewNodePodInfoDto instantiates a new NodePodInfoDto 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 NewNodePodInfoDto(imagesVersion map[string]string, name string, namespace string) *NodePodInfoDto {
this := NodePodInfoDto{}
this.ImagesVersion = imagesVersion
this.Name = name
this.Namespace = namespace
return &this
}
// NewNodePodInfoDtoWithDefaults instantiates a new NodePodInfoDto 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 NewNodePodInfoDtoWithDefaults() *NodePodInfoDto {
this := NodePodInfoDto{}
return &this
}
// GetCpuMilliLimit returns the CpuMilliLimit field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NodePodInfoDto) GetCpuMilliLimit() int32 {
if o == nil || IsNil(o.CpuMilliLimit.Get()) {
var ret int32
return ret
}
return *o.CpuMilliLimit.Get()
}
// GetCpuMilliLimitOk returns a tuple with the CpuMilliLimit field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NodePodInfoDto) GetCpuMilliLimitOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.CpuMilliLimit.Get(), o.CpuMilliLimit.IsSet()
}
// HasCpuMilliLimit returns a boolean if a field has been set.
func (o *NodePodInfoDto) HasCpuMilliLimit() bool {
if o != nil && o.CpuMilliLimit.IsSet() {
return true
}
return false
}
// SetCpuMilliLimit gets a reference to the given NullableInt32 and assigns it to the CpuMilliLimit field.
func (o *NodePodInfoDto) SetCpuMilliLimit(v int32) {
o.CpuMilliLimit.Set(&v)
}
// SetCpuMilliLimitNil sets the value for CpuMilliLimit to be an explicit nil
func (o *NodePodInfoDto) SetCpuMilliLimitNil() {
o.CpuMilliLimit.Set(nil)
}
// UnsetCpuMilliLimit ensures that no value is present for CpuMilliLimit, not even an explicit nil
func (o *NodePodInfoDto) UnsetCpuMilliLimit() {
o.CpuMilliLimit.Unset()
}
// GetCpuMilliRequest returns the CpuMilliRequest field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NodePodInfoDto) GetCpuMilliRequest() int32 {
if o == nil || IsNil(o.CpuMilliRequest.Get()) {
var ret int32
return ret
}
return *o.CpuMilliRequest.Get()
}
// GetCpuMilliRequestOk returns a tuple with the CpuMilliRequest field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NodePodInfoDto) GetCpuMilliRequestOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.CpuMilliRequest.Get(), o.CpuMilliRequest.IsSet()
}
// HasCpuMilliRequest returns a boolean if a field has been set.
func (o *NodePodInfoDto) HasCpuMilliRequest() bool {
if o != nil && o.CpuMilliRequest.IsSet() {
return true
}
return false
}
// SetCpuMilliRequest gets a reference to the given NullableInt32 and assigns it to the CpuMilliRequest field.
func (o *NodePodInfoDto) SetCpuMilliRequest(v int32) {
o.CpuMilliRequest.Set(&v)
}
// SetCpuMilliRequestNil sets the value for CpuMilliRequest to be an explicit nil
func (o *NodePodInfoDto) SetCpuMilliRequestNil() {
o.CpuMilliRequest.Set(nil)
}
// UnsetCpuMilliRequest ensures that no value is present for CpuMilliRequest, not even an explicit nil
func (o *NodePodInfoDto) UnsetCpuMilliRequest() {
o.CpuMilliRequest.Unset()
}
// GetEnvironmentId returns the EnvironmentId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NodePodInfoDto) GetEnvironmentId() string {
if o == nil || IsNil(o.EnvironmentId.Get()) {
var ret string
return ret
}
return *o.EnvironmentId.Get()
}
// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NodePodInfoDto) GetEnvironmentIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.EnvironmentId.Get(), o.EnvironmentId.IsSet()
}
// HasEnvironmentId returns a boolean if a field has been set.
func (o *NodePodInfoDto) HasEnvironmentId() bool {
if o != nil && o.EnvironmentId.IsSet() {
return true
}
return false
}
// SetEnvironmentId gets a reference to the given NullableString and assigns it to the EnvironmentId field.
func (o *NodePodInfoDto) SetEnvironmentId(v string) {
o.EnvironmentId.Set(&v)
}
// SetEnvironmentIdNil sets the value for EnvironmentId to be an explicit nil
func (o *NodePodInfoDto) SetEnvironmentIdNil() {
o.EnvironmentId.Set(nil)
}
// UnsetEnvironmentId ensures that no value is present for EnvironmentId, not even an explicit nil
func (o *NodePodInfoDto) UnsetEnvironmentId() {
o.EnvironmentId.Unset()
}
// GetImagesVersion returns the ImagesVersion field value
func (o *NodePodInfoDto) GetImagesVersion() map[string]string {
if o == nil {
var ret map[string]string
return ret
}
return o.ImagesVersion
}
// GetImagesVersionOk returns a tuple with the ImagesVersion field value
// and a boolean to check if the value has been set.
func (o *NodePodInfoDto) GetImagesVersionOk() (map[string]string, bool) {
if o == nil {
return map[string]string{}, false
}
return o.ImagesVersion, true
}
// SetImagesVersion sets field value
func (o *NodePodInfoDto) SetImagesVersion(v map[string]string) {
o.ImagesVersion = v
}
// GetMemoryMibLimit returns the MemoryMibLimit field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NodePodInfoDto) GetMemoryMibLimit() int32 {
if o == nil || IsNil(o.MemoryMibLimit.Get()) {
var ret int32
return ret
}
return *o.MemoryMibLimit.Get()
}
// GetMemoryMibLimitOk returns a tuple with the MemoryMibLimit field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NodePodInfoDto) GetMemoryMibLimitOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.MemoryMibLimit.Get(), o.MemoryMibLimit.IsSet()
}
// HasMemoryMibLimit returns a boolean if a field has been set.
func (o *NodePodInfoDto) HasMemoryMibLimit() bool {
if o != nil && o.MemoryMibLimit.IsSet() {
return true
}
return false
}
// SetMemoryMibLimit gets a reference to the given NullableInt32 and assigns it to the MemoryMibLimit field.
func (o *NodePodInfoDto) SetMemoryMibLimit(v int32) {
o.MemoryMibLimit.Set(&v)
}
// SetMemoryMibLimitNil sets the value for MemoryMibLimit to be an explicit nil
func (o *NodePodInfoDto) SetMemoryMibLimitNil() {
o.MemoryMibLimit.Set(nil)
}
// UnsetMemoryMibLimit ensures that no value is present for MemoryMibLimit, not even an explicit nil
func (o *NodePodInfoDto) UnsetMemoryMibLimit() {
o.MemoryMibLimit.Unset()
}
// GetMemoryMibRequest returns the MemoryMibRequest field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NodePodInfoDto) GetMemoryMibRequest() int32 {
if o == nil || IsNil(o.MemoryMibRequest.Get()) {
var ret int32
return ret
}
return *o.MemoryMibRequest.Get()
}
// GetMemoryMibRequestOk returns a tuple with the MemoryMibRequest field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NodePodInfoDto) GetMemoryMibRequestOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.MemoryMibRequest.Get(), o.MemoryMibRequest.IsSet()
}
// HasMemoryMibRequest returns a boolean if a field has been set.
func (o *NodePodInfoDto) HasMemoryMibRequest() bool {
if o != nil && o.MemoryMibRequest.IsSet() {
return true
}
return false
}
// SetMemoryMibRequest gets a reference to the given NullableInt32 and assigns it to the MemoryMibRequest field.
func (o *NodePodInfoDto) SetMemoryMibRequest(v int32) {
o.MemoryMibRequest.Set(&v)
}
// SetMemoryMibRequestNil sets the value for MemoryMibRequest to be an explicit nil
func (o *NodePodInfoDto) SetMemoryMibRequestNil() {
o.MemoryMibRequest.Set(nil)
}
// UnsetMemoryMibRequest ensures that no value is present for MemoryMibRequest, not even an explicit nil
func (o *NodePodInfoDto) UnsetMemoryMibRequest() {
o.MemoryMibRequest.Unset()
}
// GetName returns the Name field value
func (o *NodePodInfoDto) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *NodePodInfoDto) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *NodePodInfoDto) SetName(v string) {
o.Name = v
}
// GetNamespace returns the Namespace field value
func (o *NodePodInfoDto) GetNamespace() string {
if o == nil {
var ret string
return ret
}
return o.Namespace
}
// GetNamespaceOk returns a tuple with the Namespace field value
// and a boolean to check if the value has been set.
func (o *NodePodInfoDto) GetNamespaceOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Namespace, true
}
// SetNamespace sets field value
func (o *NodePodInfoDto) SetNamespace(v string) {
o.Namespace = v
}
// GetProjectId returns the ProjectId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NodePodInfoDto) GetProjectId() string {
if o == nil || IsNil(o.ProjectId.Get()) {
var ret string
return ret
}
return *o.ProjectId.Get()
}
// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NodePodInfoDto) GetProjectIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ProjectId.Get(), o.ProjectId.IsSet()
}
// HasProjectId returns a boolean if a field has been set.
func (o *NodePodInfoDto) HasProjectId() bool {
if o != nil && o.ProjectId.IsSet() {
return true
}
return false
}
// SetProjectId gets a reference to the given NullableString and assigns it to the ProjectId field.
func (o *NodePodInfoDto) SetProjectId(v string) {
o.ProjectId.Set(&v)
}
// SetProjectIdNil sets the value for ProjectId to be an explicit nil
func (o *NodePodInfoDto) SetProjectIdNil() {
o.ProjectId.Set(nil)
}
// UnsetProjectId ensures that no value is present for ProjectId, not even an explicit nil
func (o *NodePodInfoDto) UnsetProjectId() {
o.ProjectId.Unset()
}
// GetServiceId returns the ServiceId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NodePodInfoDto) GetServiceId() string {
if o == nil || IsNil(o.ServiceId.Get()) {
var ret string
return ret
}
return *o.ServiceId.Get()
}
// GetServiceIdOk returns a tuple with the ServiceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NodePodInfoDto) GetServiceIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ServiceId.Get(), o.ServiceId.IsSet()
}
// HasServiceId returns a boolean if a field has been set.
func (o *NodePodInfoDto) HasServiceId() bool {
if o != nil && o.ServiceId.IsSet() {
return true
}
return false
}
// SetServiceId gets a reference to the given NullableString and assigns it to the ServiceId field.
func (o *NodePodInfoDto) SetServiceId(v string) {
o.ServiceId.Set(&v)
}
// SetServiceIdNil sets the value for ServiceId to be an explicit nil
func (o *NodePodInfoDto) SetServiceIdNil() {
o.ServiceId.Set(nil)
}
// UnsetServiceId ensures that no value is present for ServiceId, not even an explicit nil
func (o *NodePodInfoDto) UnsetServiceId() {
o.ServiceId.Unset()
}
func (o NodePodInfoDto) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o NodePodInfoDto) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.CpuMilliLimit.IsSet() {
toSerialize["cpu_milli_limit"] = o.CpuMilliLimit.Get()
}
if o.CpuMilliRequest.IsSet() {
toSerialize["cpu_milli_request"] = o.CpuMilliRequest.Get()
}
if o.EnvironmentId.IsSet() {
toSerialize["environment_id"] = o.EnvironmentId.Get()
}
toSerialize["images_version"] = o.ImagesVersion
if o.MemoryMibLimit.IsSet() {
toSerialize["memory_mib_limit"] = o.MemoryMibLimit.Get()
}
if o.MemoryMibRequest.IsSet() {
toSerialize["memory_mib_request"] = o.MemoryMibRequest.Get()
}
toSerialize["name"] = o.Name
toSerialize["namespace"] = o.Namespace
if o.ProjectId.IsSet() {
toSerialize["project_id"] = o.ProjectId.Get()
}
if o.ServiceId.IsSet() {
toSerialize["service_id"] = o.ServiceId.Get()
}
return toSerialize, nil
}
func (o *NodePodInfoDto) 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{
"images_version",
"name",
"namespace",
}
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)
}
}
varNodePodInfoDto := _NodePodInfoDto{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varNodePodInfoDto)
if err != nil {
return err
}
*o = NodePodInfoDto(varNodePodInfoDto)
return err
}
type NullableNodePodInfoDto struct {
value *NodePodInfoDto
isSet bool
}
func (v NullableNodePodInfoDto) Get() *NodePodInfoDto {
return v.value
}
func (v *NullableNodePodInfoDto) Set(val *NodePodInfoDto) {
v.value = val
v.isSet = true
}
func (v NullableNodePodInfoDto) IsSet() bool {
return v.isSet
}
func (v *NullableNodePodInfoDto) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNodePodInfoDto(val *NodePodInfoDto) *NullableNodePodInfoDto {
return &NullableNodePodInfoDto{value: val, isSet: true}
}
func (v NullableNodePodInfoDto) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNodePodInfoDto) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}