-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_virtual_machine_balloon_summary.go
414 lines (348 loc) · 12 KB
/
model_virtual_machine_balloon_summary.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
/*
Proxmox
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 2023-01-01
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package proxmox
import (
"encoding/json"
)
// checks if the VirtualMachineBalloonSummary type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &VirtualMachineBalloonSummary{}
// VirtualMachineBalloonSummary struct for VirtualMachineBalloonSummary
type VirtualMachineBalloonSummary struct {
MaxMem *float32 `json:"max_mem,omitempty"`
FreeMem *float32 `json:"free_mem,omitempty"`
MemSwappedOut *float32 `json:"mem_swapped_out,omitempty"`
MemSwappedIn *float32 `json:"mem_swapped_in,omitempty"`
TotalMem *float32 `json:"total_mem,omitempty"`
Actual *float32 `json:"actual,omitempty"`
LastUpdate *float32 `json:"last_update,omitempty"`
MinorPageFaults *float32 `json:"minor_page_faults,omitempty"`
MajorPageFaults *float32 `json:"major_page_faults,omitempty"`
}
// NewVirtualMachineBalloonSummary instantiates a new VirtualMachineBalloonSummary 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 NewVirtualMachineBalloonSummary() *VirtualMachineBalloonSummary {
this := VirtualMachineBalloonSummary{}
return &this
}
// NewVirtualMachineBalloonSummaryWithDefaults instantiates a new VirtualMachineBalloonSummary 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 NewVirtualMachineBalloonSummaryWithDefaults() *VirtualMachineBalloonSummary {
this := VirtualMachineBalloonSummary{}
return &this
}
// GetMaxMem returns the MaxMem field value if set, zero value otherwise.
func (o *VirtualMachineBalloonSummary) GetMaxMem() float32 {
if o == nil || isNil(o.MaxMem) {
var ret float32
return ret
}
return *o.MaxMem
}
// GetMaxMemOk returns a tuple with the MaxMem field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VirtualMachineBalloonSummary) GetMaxMemOk() (*float32, bool) {
if o == nil || isNil(o.MaxMem) {
return nil, false
}
return o.MaxMem, true
}
// HasMaxMem returns a boolean if a field has been set.
func (o *VirtualMachineBalloonSummary) HasMaxMem() bool {
if o != nil && !isNil(o.MaxMem) {
return true
}
return false
}
// SetMaxMem gets a reference to the given float32 and assigns it to the MaxMem field.
func (o *VirtualMachineBalloonSummary) SetMaxMem(v float32) {
o.MaxMem = &v
}
// GetFreeMem returns the FreeMem field value if set, zero value otherwise.
func (o *VirtualMachineBalloonSummary) GetFreeMem() float32 {
if o == nil || isNil(o.FreeMem) {
var ret float32
return ret
}
return *o.FreeMem
}
// GetFreeMemOk returns a tuple with the FreeMem field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VirtualMachineBalloonSummary) GetFreeMemOk() (*float32, bool) {
if o == nil || isNil(o.FreeMem) {
return nil, false
}
return o.FreeMem, true
}
// HasFreeMem returns a boolean if a field has been set.
func (o *VirtualMachineBalloonSummary) HasFreeMem() bool {
if o != nil && !isNil(o.FreeMem) {
return true
}
return false
}
// SetFreeMem gets a reference to the given float32 and assigns it to the FreeMem field.
func (o *VirtualMachineBalloonSummary) SetFreeMem(v float32) {
o.FreeMem = &v
}
// GetMemSwappedOut returns the MemSwappedOut field value if set, zero value otherwise.
func (o *VirtualMachineBalloonSummary) GetMemSwappedOut() float32 {
if o == nil || isNil(o.MemSwappedOut) {
var ret float32
return ret
}
return *o.MemSwappedOut
}
// GetMemSwappedOutOk returns a tuple with the MemSwappedOut field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VirtualMachineBalloonSummary) GetMemSwappedOutOk() (*float32, bool) {
if o == nil || isNil(o.MemSwappedOut) {
return nil, false
}
return o.MemSwappedOut, true
}
// HasMemSwappedOut returns a boolean if a field has been set.
func (o *VirtualMachineBalloonSummary) HasMemSwappedOut() bool {
if o != nil && !isNil(o.MemSwappedOut) {
return true
}
return false
}
// SetMemSwappedOut gets a reference to the given float32 and assigns it to the MemSwappedOut field.
func (o *VirtualMachineBalloonSummary) SetMemSwappedOut(v float32) {
o.MemSwappedOut = &v
}
// GetMemSwappedIn returns the MemSwappedIn field value if set, zero value otherwise.
func (o *VirtualMachineBalloonSummary) GetMemSwappedIn() float32 {
if o == nil || isNil(o.MemSwappedIn) {
var ret float32
return ret
}
return *o.MemSwappedIn
}
// GetMemSwappedInOk returns a tuple with the MemSwappedIn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VirtualMachineBalloonSummary) GetMemSwappedInOk() (*float32, bool) {
if o == nil || isNil(o.MemSwappedIn) {
return nil, false
}
return o.MemSwappedIn, true
}
// HasMemSwappedIn returns a boolean if a field has been set.
func (o *VirtualMachineBalloonSummary) HasMemSwappedIn() bool {
if o != nil && !isNil(o.MemSwappedIn) {
return true
}
return false
}
// SetMemSwappedIn gets a reference to the given float32 and assigns it to the MemSwappedIn field.
func (o *VirtualMachineBalloonSummary) SetMemSwappedIn(v float32) {
o.MemSwappedIn = &v
}
// GetTotalMem returns the TotalMem field value if set, zero value otherwise.
func (o *VirtualMachineBalloonSummary) GetTotalMem() float32 {
if o == nil || isNil(o.TotalMem) {
var ret float32
return ret
}
return *o.TotalMem
}
// GetTotalMemOk returns a tuple with the TotalMem field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VirtualMachineBalloonSummary) GetTotalMemOk() (*float32, bool) {
if o == nil || isNil(o.TotalMem) {
return nil, false
}
return o.TotalMem, true
}
// HasTotalMem returns a boolean if a field has been set.
func (o *VirtualMachineBalloonSummary) HasTotalMem() bool {
if o != nil && !isNil(o.TotalMem) {
return true
}
return false
}
// SetTotalMem gets a reference to the given float32 and assigns it to the TotalMem field.
func (o *VirtualMachineBalloonSummary) SetTotalMem(v float32) {
o.TotalMem = &v
}
// GetActual returns the Actual field value if set, zero value otherwise.
func (o *VirtualMachineBalloonSummary) GetActual() float32 {
if o == nil || isNil(o.Actual) {
var ret float32
return ret
}
return *o.Actual
}
// GetActualOk returns a tuple with the Actual field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VirtualMachineBalloonSummary) GetActualOk() (*float32, bool) {
if o == nil || isNil(o.Actual) {
return nil, false
}
return o.Actual, true
}
// HasActual returns a boolean if a field has been set.
func (o *VirtualMachineBalloonSummary) HasActual() bool {
if o != nil && !isNil(o.Actual) {
return true
}
return false
}
// SetActual gets a reference to the given float32 and assigns it to the Actual field.
func (o *VirtualMachineBalloonSummary) SetActual(v float32) {
o.Actual = &v
}
// GetLastUpdate returns the LastUpdate field value if set, zero value otherwise.
func (o *VirtualMachineBalloonSummary) GetLastUpdate() float32 {
if o == nil || isNil(o.LastUpdate) {
var ret float32
return ret
}
return *o.LastUpdate
}
// GetLastUpdateOk returns a tuple with the LastUpdate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VirtualMachineBalloonSummary) GetLastUpdateOk() (*float32, bool) {
if o == nil || isNil(o.LastUpdate) {
return nil, false
}
return o.LastUpdate, true
}
// HasLastUpdate returns a boolean if a field has been set.
func (o *VirtualMachineBalloonSummary) HasLastUpdate() bool {
if o != nil && !isNil(o.LastUpdate) {
return true
}
return false
}
// SetLastUpdate gets a reference to the given float32 and assigns it to the LastUpdate field.
func (o *VirtualMachineBalloonSummary) SetLastUpdate(v float32) {
o.LastUpdate = &v
}
// GetMinorPageFaults returns the MinorPageFaults field value if set, zero value otherwise.
func (o *VirtualMachineBalloonSummary) GetMinorPageFaults() float32 {
if o == nil || isNil(o.MinorPageFaults) {
var ret float32
return ret
}
return *o.MinorPageFaults
}
// GetMinorPageFaultsOk returns a tuple with the MinorPageFaults field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VirtualMachineBalloonSummary) GetMinorPageFaultsOk() (*float32, bool) {
if o == nil || isNil(o.MinorPageFaults) {
return nil, false
}
return o.MinorPageFaults, true
}
// HasMinorPageFaults returns a boolean if a field has been set.
func (o *VirtualMachineBalloonSummary) HasMinorPageFaults() bool {
if o != nil && !isNil(o.MinorPageFaults) {
return true
}
return false
}
// SetMinorPageFaults gets a reference to the given float32 and assigns it to the MinorPageFaults field.
func (o *VirtualMachineBalloonSummary) SetMinorPageFaults(v float32) {
o.MinorPageFaults = &v
}
// GetMajorPageFaults returns the MajorPageFaults field value if set, zero value otherwise.
func (o *VirtualMachineBalloonSummary) GetMajorPageFaults() float32 {
if o == nil || isNil(o.MajorPageFaults) {
var ret float32
return ret
}
return *o.MajorPageFaults
}
// GetMajorPageFaultsOk returns a tuple with the MajorPageFaults field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VirtualMachineBalloonSummary) GetMajorPageFaultsOk() (*float32, bool) {
if o == nil || isNil(o.MajorPageFaults) {
return nil, false
}
return o.MajorPageFaults, true
}
// HasMajorPageFaults returns a boolean if a field has been set.
func (o *VirtualMachineBalloonSummary) HasMajorPageFaults() bool {
if o != nil && !isNil(o.MajorPageFaults) {
return true
}
return false
}
// SetMajorPageFaults gets a reference to the given float32 and assigns it to the MajorPageFaults field.
func (o *VirtualMachineBalloonSummary) SetMajorPageFaults(v float32) {
o.MajorPageFaults = &v
}
func (o VirtualMachineBalloonSummary) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o VirtualMachineBalloonSummary) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !isNil(o.MaxMem) {
toSerialize["max_mem"] = o.MaxMem
}
if !isNil(o.FreeMem) {
toSerialize["free_mem"] = o.FreeMem
}
if !isNil(o.MemSwappedOut) {
toSerialize["mem_swapped_out"] = o.MemSwappedOut
}
if !isNil(o.MemSwappedIn) {
toSerialize["mem_swapped_in"] = o.MemSwappedIn
}
if !isNil(o.TotalMem) {
toSerialize["total_mem"] = o.TotalMem
}
if !isNil(o.Actual) {
toSerialize["actual"] = o.Actual
}
if !isNil(o.LastUpdate) {
toSerialize["last_update"] = o.LastUpdate
}
if !isNil(o.MinorPageFaults) {
toSerialize["minor_page_faults"] = o.MinorPageFaults
}
if !isNil(o.MajorPageFaults) {
toSerialize["major_page_faults"] = o.MajorPageFaults
}
return toSerialize, nil
}
type NullableVirtualMachineBalloonSummary struct {
value *VirtualMachineBalloonSummary
isSet bool
}
func (v NullableVirtualMachineBalloonSummary) Get() *VirtualMachineBalloonSummary {
return v.value
}
func (v *NullableVirtualMachineBalloonSummary) Set(val *VirtualMachineBalloonSummary) {
v.value = val
v.isSet = true
}
func (v NullableVirtualMachineBalloonSummary) IsSet() bool {
return v.isSet
}
func (v *NullableVirtualMachineBalloonSummary) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVirtualMachineBalloonSummary(val *VirtualMachineBalloonSummary) *NullableVirtualMachineBalloonSummary {
return &NullableVirtualMachineBalloonSummary{value: val, isSet: true}
}
func (v NullableVirtualMachineBalloonSummary) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVirtualMachineBalloonSummary) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}