-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodel_v0_0_39_assoc_usage.go
523 lines (442 loc) · 15.2 KB
/
model_v0_0_39_assoc_usage.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
/*
Slurm REST API
API to access and control Slurm
API version: Slurm-24.05.2&openapi/dbv0.0.39&openapi/v0.0.39&openapi/slurmdbd&openapi/slurmctld
Contact: sales@schedmd.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package slurmrest
import (
"encoding/json"
)
// checks if the V0039AssocUsage type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &V0039AssocUsage{}
// V0039AssocUsage struct for V0039AssocUsage
type V0039AssocUsage struct {
AccrueJobCount *int32 `json:"accrue_job_count,omitempty"`
GroupUsedWallclock *float64 `json:"group_used_wallclock,omitempty"`
FairshareFactor *float64 `json:"fairshare_factor,omitempty"`
FairshareShares *int32 `json:"fairshare_shares,omitempty"`
NormalizedPriority *float64 `json:"normalized_priority,omitempty"`
NormalizedShares *float64 `json:"normalized_shares,omitempty"`
EffectiveNormalizedUsage *float32 `json:"effective_normalized_usage,omitempty"`
NormalizedUsage *float32 `json:"normalized_usage,omitempty"`
RawUsage *float32 `json:"raw_usage,omitempty"`
ActiveJobs *int32 `json:"active_jobs,omitempty"`
JobCount *int32 `json:"job_count,omitempty"`
FairshareLevel *float32 `json:"fairshare_level,omitempty"`
}
// NewV0039AssocUsage instantiates a new V0039AssocUsage 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 NewV0039AssocUsage() *V0039AssocUsage {
this := V0039AssocUsage{}
return &this
}
// NewV0039AssocUsageWithDefaults instantiates a new V0039AssocUsage 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 NewV0039AssocUsageWithDefaults() *V0039AssocUsage {
this := V0039AssocUsage{}
return &this
}
// GetAccrueJobCount returns the AccrueJobCount field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetAccrueJobCount() int32 {
if o == nil || IsNil(o.AccrueJobCount) {
var ret int32
return ret
}
return *o.AccrueJobCount
}
// GetAccrueJobCountOk returns a tuple with the AccrueJobCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetAccrueJobCountOk() (*int32, bool) {
if o == nil || IsNil(o.AccrueJobCount) {
return nil, false
}
return o.AccrueJobCount, true
}
// HasAccrueJobCount returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasAccrueJobCount() bool {
if o != nil && !IsNil(o.AccrueJobCount) {
return true
}
return false
}
// SetAccrueJobCount gets a reference to the given int32 and assigns it to the AccrueJobCount field.
func (o *V0039AssocUsage) SetAccrueJobCount(v int32) {
o.AccrueJobCount = &v
}
// GetGroupUsedWallclock returns the GroupUsedWallclock field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetGroupUsedWallclock() float64 {
if o == nil || IsNil(o.GroupUsedWallclock) {
var ret float64
return ret
}
return *o.GroupUsedWallclock
}
// GetGroupUsedWallclockOk returns a tuple with the GroupUsedWallclock field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetGroupUsedWallclockOk() (*float64, bool) {
if o == nil || IsNil(o.GroupUsedWallclock) {
return nil, false
}
return o.GroupUsedWallclock, true
}
// HasGroupUsedWallclock returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasGroupUsedWallclock() bool {
if o != nil && !IsNil(o.GroupUsedWallclock) {
return true
}
return false
}
// SetGroupUsedWallclock gets a reference to the given float64 and assigns it to the GroupUsedWallclock field.
func (o *V0039AssocUsage) SetGroupUsedWallclock(v float64) {
o.GroupUsedWallclock = &v
}
// GetFairshareFactor returns the FairshareFactor field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetFairshareFactor() float64 {
if o == nil || IsNil(o.FairshareFactor) {
var ret float64
return ret
}
return *o.FairshareFactor
}
// GetFairshareFactorOk returns a tuple with the FairshareFactor field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetFairshareFactorOk() (*float64, bool) {
if o == nil || IsNil(o.FairshareFactor) {
return nil, false
}
return o.FairshareFactor, true
}
// HasFairshareFactor returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasFairshareFactor() bool {
if o != nil && !IsNil(o.FairshareFactor) {
return true
}
return false
}
// SetFairshareFactor gets a reference to the given float64 and assigns it to the FairshareFactor field.
func (o *V0039AssocUsage) SetFairshareFactor(v float64) {
o.FairshareFactor = &v
}
// GetFairshareShares returns the FairshareShares field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetFairshareShares() int32 {
if o == nil || IsNil(o.FairshareShares) {
var ret int32
return ret
}
return *o.FairshareShares
}
// GetFairshareSharesOk returns a tuple with the FairshareShares field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetFairshareSharesOk() (*int32, bool) {
if o == nil || IsNil(o.FairshareShares) {
return nil, false
}
return o.FairshareShares, true
}
// HasFairshareShares returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasFairshareShares() bool {
if o != nil && !IsNil(o.FairshareShares) {
return true
}
return false
}
// SetFairshareShares gets a reference to the given int32 and assigns it to the FairshareShares field.
func (o *V0039AssocUsage) SetFairshareShares(v int32) {
o.FairshareShares = &v
}
// GetNormalizedPriority returns the NormalizedPriority field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetNormalizedPriority() float64 {
if o == nil || IsNil(o.NormalizedPriority) {
var ret float64
return ret
}
return *o.NormalizedPriority
}
// GetNormalizedPriorityOk returns a tuple with the NormalizedPriority field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetNormalizedPriorityOk() (*float64, bool) {
if o == nil || IsNil(o.NormalizedPriority) {
return nil, false
}
return o.NormalizedPriority, true
}
// HasNormalizedPriority returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasNormalizedPriority() bool {
if o != nil && !IsNil(o.NormalizedPriority) {
return true
}
return false
}
// SetNormalizedPriority gets a reference to the given float64 and assigns it to the NormalizedPriority field.
func (o *V0039AssocUsage) SetNormalizedPriority(v float64) {
o.NormalizedPriority = &v
}
// GetNormalizedShares returns the NormalizedShares field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetNormalizedShares() float64 {
if o == nil || IsNil(o.NormalizedShares) {
var ret float64
return ret
}
return *o.NormalizedShares
}
// GetNormalizedSharesOk returns a tuple with the NormalizedShares field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetNormalizedSharesOk() (*float64, bool) {
if o == nil || IsNil(o.NormalizedShares) {
return nil, false
}
return o.NormalizedShares, true
}
// HasNormalizedShares returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasNormalizedShares() bool {
if o != nil && !IsNil(o.NormalizedShares) {
return true
}
return false
}
// SetNormalizedShares gets a reference to the given float64 and assigns it to the NormalizedShares field.
func (o *V0039AssocUsage) SetNormalizedShares(v float64) {
o.NormalizedShares = &v
}
// GetEffectiveNormalizedUsage returns the EffectiveNormalizedUsage field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetEffectiveNormalizedUsage() float32 {
if o == nil || IsNil(o.EffectiveNormalizedUsage) {
var ret float32
return ret
}
return *o.EffectiveNormalizedUsage
}
// GetEffectiveNormalizedUsageOk returns a tuple with the EffectiveNormalizedUsage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetEffectiveNormalizedUsageOk() (*float32, bool) {
if o == nil || IsNil(o.EffectiveNormalizedUsage) {
return nil, false
}
return o.EffectiveNormalizedUsage, true
}
// HasEffectiveNormalizedUsage returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasEffectiveNormalizedUsage() bool {
if o != nil && !IsNil(o.EffectiveNormalizedUsage) {
return true
}
return false
}
// SetEffectiveNormalizedUsage gets a reference to the given float32 and assigns it to the EffectiveNormalizedUsage field.
func (o *V0039AssocUsage) SetEffectiveNormalizedUsage(v float32) {
o.EffectiveNormalizedUsage = &v
}
// GetNormalizedUsage returns the NormalizedUsage field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetNormalizedUsage() float32 {
if o == nil || IsNil(o.NormalizedUsage) {
var ret float32
return ret
}
return *o.NormalizedUsage
}
// GetNormalizedUsageOk returns a tuple with the NormalizedUsage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetNormalizedUsageOk() (*float32, bool) {
if o == nil || IsNil(o.NormalizedUsage) {
return nil, false
}
return o.NormalizedUsage, true
}
// HasNormalizedUsage returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasNormalizedUsage() bool {
if o != nil && !IsNil(o.NormalizedUsage) {
return true
}
return false
}
// SetNormalizedUsage gets a reference to the given float32 and assigns it to the NormalizedUsage field.
func (o *V0039AssocUsage) SetNormalizedUsage(v float32) {
o.NormalizedUsage = &v
}
// GetRawUsage returns the RawUsage field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetRawUsage() float32 {
if o == nil || IsNil(o.RawUsage) {
var ret float32
return ret
}
return *o.RawUsage
}
// GetRawUsageOk returns a tuple with the RawUsage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetRawUsageOk() (*float32, bool) {
if o == nil || IsNil(o.RawUsage) {
return nil, false
}
return o.RawUsage, true
}
// HasRawUsage returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasRawUsage() bool {
if o != nil && !IsNil(o.RawUsage) {
return true
}
return false
}
// SetRawUsage gets a reference to the given float32 and assigns it to the RawUsage field.
func (o *V0039AssocUsage) SetRawUsage(v float32) {
o.RawUsage = &v
}
// GetActiveJobs returns the ActiveJobs field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetActiveJobs() int32 {
if o == nil || IsNil(o.ActiveJobs) {
var ret int32
return ret
}
return *o.ActiveJobs
}
// GetActiveJobsOk returns a tuple with the ActiveJobs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetActiveJobsOk() (*int32, bool) {
if o == nil || IsNil(o.ActiveJobs) {
return nil, false
}
return o.ActiveJobs, true
}
// HasActiveJobs returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasActiveJobs() bool {
if o != nil && !IsNil(o.ActiveJobs) {
return true
}
return false
}
// SetActiveJobs gets a reference to the given int32 and assigns it to the ActiveJobs field.
func (o *V0039AssocUsage) SetActiveJobs(v int32) {
o.ActiveJobs = &v
}
// GetJobCount returns the JobCount field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetJobCount() int32 {
if o == nil || IsNil(o.JobCount) {
var ret int32
return ret
}
return *o.JobCount
}
// GetJobCountOk returns a tuple with the JobCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetJobCountOk() (*int32, bool) {
if o == nil || IsNil(o.JobCount) {
return nil, false
}
return o.JobCount, true
}
// HasJobCount returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasJobCount() bool {
if o != nil && !IsNil(o.JobCount) {
return true
}
return false
}
// SetJobCount gets a reference to the given int32 and assigns it to the JobCount field.
func (o *V0039AssocUsage) SetJobCount(v int32) {
o.JobCount = &v
}
// GetFairshareLevel returns the FairshareLevel field value if set, zero value otherwise.
func (o *V0039AssocUsage) GetFairshareLevel() float32 {
if o == nil || IsNil(o.FairshareLevel) {
var ret float32
return ret
}
return *o.FairshareLevel
}
// GetFairshareLevelOk returns a tuple with the FairshareLevel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039AssocUsage) GetFairshareLevelOk() (*float32, bool) {
if o == nil || IsNil(o.FairshareLevel) {
return nil, false
}
return o.FairshareLevel, true
}
// HasFairshareLevel returns a boolean if a field has been set.
func (o *V0039AssocUsage) HasFairshareLevel() bool {
if o != nil && !IsNil(o.FairshareLevel) {
return true
}
return false
}
// SetFairshareLevel gets a reference to the given float32 and assigns it to the FairshareLevel field.
func (o *V0039AssocUsage) SetFairshareLevel(v float32) {
o.FairshareLevel = &v
}
func (o V0039AssocUsage) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o V0039AssocUsage) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AccrueJobCount) {
toSerialize["accrue_job_count"] = o.AccrueJobCount
}
if !IsNil(o.GroupUsedWallclock) {
toSerialize["group_used_wallclock"] = o.GroupUsedWallclock
}
if !IsNil(o.FairshareFactor) {
toSerialize["fairshare_factor"] = o.FairshareFactor
}
if !IsNil(o.FairshareShares) {
toSerialize["fairshare_shares"] = o.FairshareShares
}
if !IsNil(o.NormalizedPriority) {
toSerialize["normalized_priority"] = o.NormalizedPriority
}
if !IsNil(o.NormalizedShares) {
toSerialize["normalized_shares"] = o.NormalizedShares
}
if !IsNil(o.EffectiveNormalizedUsage) {
toSerialize["effective_normalized_usage"] = o.EffectiveNormalizedUsage
}
if !IsNil(o.NormalizedUsage) {
toSerialize["normalized_usage"] = o.NormalizedUsage
}
if !IsNil(o.RawUsage) {
toSerialize["raw_usage"] = o.RawUsage
}
if !IsNil(o.ActiveJobs) {
toSerialize["active_jobs"] = o.ActiveJobs
}
if !IsNil(o.JobCount) {
toSerialize["job_count"] = o.JobCount
}
if !IsNil(o.FairshareLevel) {
toSerialize["fairshare_level"] = o.FairshareLevel
}
return toSerialize, nil
}
type NullableV0039AssocUsage struct {
value *V0039AssocUsage
isSet bool
}
func (v NullableV0039AssocUsage) Get() *V0039AssocUsage {
return v.value
}
func (v *NullableV0039AssocUsage) Set(val *V0039AssocUsage) {
v.value = val
v.isSet = true
}
func (v NullableV0039AssocUsage) IsSet() bool {
return v.isSet
}
func (v *NullableV0039AssocUsage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableV0039AssocUsage(val *V0039AssocUsage) *NullableV0039AssocUsage {
return &NullableV0039AssocUsage{value: val, isSet: true}
}
func (v NullableV0039AssocUsage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableV0039AssocUsage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}