-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodel_v0_0_40_update_node_msg.go
602 lines (511 loc) · 15.6 KB
/
model_v0_0_40_update_node_msg.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
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
/*
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: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package slurmrest
import (
"encoding/json"
)
// checks if the V0040UpdateNodeMsg type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &V0040UpdateNodeMsg{}
// V0040UpdateNodeMsg struct for V0040UpdateNodeMsg
type V0040UpdateNodeMsg struct {
// arbitrary comment
Comment *string `json:"comment,omitempty"`
// default CPU binding type
CpuBind *int32 `json:"cpu_bind,omitempty"`
// arbitrary string
Extra *string `json:"extra,omitempty"`
Features []string `json:"features,omitempty"`
FeaturesAct []string `json:"features_act,omitempty"`
// new generic resources for node
Gres *string `json:"gres,omitempty"`
Address []string `json:"address,omitempty"`
Hostname []string `json:"hostname,omitempty"`
Name []string `json:"name,omitempty"`
// assign new node state
State []string `json:"state,omitempty"`
// reason for node being DOWN or DRAINING
Reason *string `json:"reason,omitempty"`
// user ID of sending (needed if user root is sending message)
ReasonUid *string `json:"reason_uid,omitempty"`
ResumeAfter *V0040Uint32NoVal `json:"resume_after,omitempty"`
Weight *V0040Uint32NoVal `json:"weight,omitempty"`
}
// NewV0040UpdateNodeMsg instantiates a new V0040UpdateNodeMsg 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 NewV0040UpdateNodeMsg() *V0040UpdateNodeMsg {
this := V0040UpdateNodeMsg{}
return &this
}
// NewV0040UpdateNodeMsgWithDefaults instantiates a new V0040UpdateNodeMsg 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 NewV0040UpdateNodeMsgWithDefaults() *V0040UpdateNodeMsg {
this := V0040UpdateNodeMsg{}
return &this
}
// GetComment returns the Comment field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetComment() string {
if o == nil || IsNil(o.Comment) {
var ret string
return ret
}
return *o.Comment
}
// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetCommentOk() (*string, bool) {
if o == nil || IsNil(o.Comment) {
return nil, false
}
return o.Comment, true
}
// HasComment returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasComment() bool {
if o != nil && !IsNil(o.Comment) {
return true
}
return false
}
// SetComment gets a reference to the given string and assigns it to the Comment field.
func (o *V0040UpdateNodeMsg) SetComment(v string) {
o.Comment = &v
}
// GetCpuBind returns the CpuBind field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetCpuBind() int32 {
if o == nil || IsNil(o.CpuBind) {
var ret int32
return ret
}
return *o.CpuBind
}
// GetCpuBindOk returns a tuple with the CpuBind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetCpuBindOk() (*int32, bool) {
if o == nil || IsNil(o.CpuBind) {
return nil, false
}
return o.CpuBind, true
}
// HasCpuBind returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasCpuBind() bool {
if o != nil && !IsNil(o.CpuBind) {
return true
}
return false
}
// SetCpuBind gets a reference to the given int32 and assigns it to the CpuBind field.
func (o *V0040UpdateNodeMsg) SetCpuBind(v int32) {
o.CpuBind = &v
}
// GetExtra returns the Extra field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetExtra() string {
if o == nil || IsNil(o.Extra) {
var ret string
return ret
}
return *o.Extra
}
// GetExtraOk returns a tuple with the Extra field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetExtraOk() (*string, bool) {
if o == nil || IsNil(o.Extra) {
return nil, false
}
return o.Extra, true
}
// HasExtra returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasExtra() bool {
if o != nil && !IsNil(o.Extra) {
return true
}
return false
}
// SetExtra gets a reference to the given string and assigns it to the Extra field.
func (o *V0040UpdateNodeMsg) SetExtra(v string) {
o.Extra = &v
}
// GetFeatures returns the Features field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetFeatures() []string {
if o == nil || IsNil(o.Features) {
var ret []string
return ret
}
return o.Features
}
// GetFeaturesOk returns a tuple with the Features field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetFeaturesOk() ([]string, bool) {
if o == nil || IsNil(o.Features) {
return nil, false
}
return o.Features, true
}
// HasFeatures returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasFeatures() bool {
if o != nil && !IsNil(o.Features) {
return true
}
return false
}
// SetFeatures gets a reference to the given []string and assigns it to the Features field.
func (o *V0040UpdateNodeMsg) SetFeatures(v []string) {
o.Features = v
}
// GetFeaturesAct returns the FeaturesAct field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetFeaturesAct() []string {
if o == nil || IsNil(o.FeaturesAct) {
var ret []string
return ret
}
return o.FeaturesAct
}
// GetFeaturesActOk returns a tuple with the FeaturesAct field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetFeaturesActOk() ([]string, bool) {
if o == nil || IsNil(o.FeaturesAct) {
return nil, false
}
return o.FeaturesAct, true
}
// HasFeaturesAct returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasFeaturesAct() bool {
if o != nil && !IsNil(o.FeaturesAct) {
return true
}
return false
}
// SetFeaturesAct gets a reference to the given []string and assigns it to the FeaturesAct field.
func (o *V0040UpdateNodeMsg) SetFeaturesAct(v []string) {
o.FeaturesAct = v
}
// GetGres returns the Gres field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetGres() string {
if o == nil || IsNil(o.Gres) {
var ret string
return ret
}
return *o.Gres
}
// GetGresOk returns a tuple with the Gres field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetGresOk() (*string, bool) {
if o == nil || IsNil(o.Gres) {
return nil, false
}
return o.Gres, true
}
// HasGres returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasGres() bool {
if o != nil && !IsNil(o.Gres) {
return true
}
return false
}
// SetGres gets a reference to the given string and assigns it to the Gres field.
func (o *V0040UpdateNodeMsg) SetGres(v string) {
o.Gres = &v
}
// GetAddress returns the Address field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetAddress() []string {
if o == nil || IsNil(o.Address) {
var ret []string
return ret
}
return o.Address
}
// GetAddressOk returns a tuple with the Address field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetAddressOk() ([]string, bool) {
if o == nil || IsNil(o.Address) {
return nil, false
}
return o.Address, true
}
// HasAddress returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasAddress() bool {
if o != nil && !IsNil(o.Address) {
return true
}
return false
}
// SetAddress gets a reference to the given []string and assigns it to the Address field.
func (o *V0040UpdateNodeMsg) SetAddress(v []string) {
o.Address = v
}
// GetHostname returns the Hostname field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetHostname() []string {
if o == nil || IsNil(o.Hostname) {
var ret []string
return ret
}
return o.Hostname
}
// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetHostnameOk() ([]string, bool) {
if o == nil || IsNil(o.Hostname) {
return nil, false
}
return o.Hostname, true
}
// HasHostname returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasHostname() bool {
if o != nil && !IsNil(o.Hostname) {
return true
}
return false
}
// SetHostname gets a reference to the given []string and assigns it to the Hostname field.
func (o *V0040UpdateNodeMsg) SetHostname(v []string) {
o.Hostname = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetName() []string {
if o == nil || IsNil(o.Name) {
var ret []string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetNameOk() ([]string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given []string and assigns it to the Name field.
func (o *V0040UpdateNodeMsg) SetName(v []string) {
o.Name = v
}
// GetState returns the State field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetState() []string {
if o == nil || IsNil(o.State) {
var ret []string
return ret
}
return o.State
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetStateOk() ([]string, bool) {
if o == nil || IsNil(o.State) {
return nil, false
}
return o.State, true
}
// HasState returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasState() bool {
if o != nil && !IsNil(o.State) {
return true
}
return false
}
// SetState gets a reference to the given []string and assigns it to the State field.
func (o *V0040UpdateNodeMsg) SetState(v []string) {
o.State = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetReason() string {
if o == nil || IsNil(o.Reason) {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetReasonOk() (*string, bool) {
if o == nil || IsNil(o.Reason) {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasReason() bool {
if o != nil && !IsNil(o.Reason) {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *V0040UpdateNodeMsg) SetReason(v string) {
o.Reason = &v
}
// GetReasonUid returns the ReasonUid field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetReasonUid() string {
if o == nil || IsNil(o.ReasonUid) {
var ret string
return ret
}
return *o.ReasonUid
}
// GetReasonUidOk returns a tuple with the ReasonUid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetReasonUidOk() (*string, bool) {
if o == nil || IsNil(o.ReasonUid) {
return nil, false
}
return o.ReasonUid, true
}
// HasReasonUid returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasReasonUid() bool {
if o != nil && !IsNil(o.ReasonUid) {
return true
}
return false
}
// SetReasonUid gets a reference to the given string and assigns it to the ReasonUid field.
func (o *V0040UpdateNodeMsg) SetReasonUid(v string) {
o.ReasonUid = &v
}
// GetResumeAfter returns the ResumeAfter field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetResumeAfter() V0040Uint32NoVal {
if o == nil || IsNil(o.ResumeAfter) {
var ret V0040Uint32NoVal
return ret
}
return *o.ResumeAfter
}
// GetResumeAfterOk returns a tuple with the ResumeAfter field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetResumeAfterOk() (*V0040Uint32NoVal, bool) {
if o == nil || IsNil(o.ResumeAfter) {
return nil, false
}
return o.ResumeAfter, true
}
// HasResumeAfter returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasResumeAfter() bool {
if o != nil && !IsNil(o.ResumeAfter) {
return true
}
return false
}
// SetResumeAfter gets a reference to the given V0040Uint32NoVal and assigns it to the ResumeAfter field.
func (o *V0040UpdateNodeMsg) SetResumeAfter(v V0040Uint32NoVal) {
o.ResumeAfter = &v
}
// GetWeight returns the Weight field value if set, zero value otherwise.
func (o *V0040UpdateNodeMsg) GetWeight() V0040Uint32NoVal {
if o == nil || IsNil(o.Weight) {
var ret V0040Uint32NoVal
return ret
}
return *o.Weight
}
// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0040UpdateNodeMsg) GetWeightOk() (*V0040Uint32NoVal, bool) {
if o == nil || IsNil(o.Weight) {
return nil, false
}
return o.Weight, true
}
// HasWeight returns a boolean if a field has been set.
func (o *V0040UpdateNodeMsg) HasWeight() bool {
if o != nil && !IsNil(o.Weight) {
return true
}
return false
}
// SetWeight gets a reference to the given V0040Uint32NoVal and assigns it to the Weight field.
func (o *V0040UpdateNodeMsg) SetWeight(v V0040Uint32NoVal) {
o.Weight = &v
}
func (o V0040UpdateNodeMsg) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o V0040UpdateNodeMsg) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Comment) {
toSerialize["comment"] = o.Comment
}
if !IsNil(o.CpuBind) {
toSerialize["cpu_bind"] = o.CpuBind
}
if !IsNil(o.Extra) {
toSerialize["extra"] = o.Extra
}
if !IsNil(o.Features) {
toSerialize["features"] = o.Features
}
if !IsNil(o.FeaturesAct) {
toSerialize["features_act"] = o.FeaturesAct
}
if !IsNil(o.Gres) {
toSerialize["gres"] = o.Gres
}
if !IsNil(o.Address) {
toSerialize["address"] = o.Address
}
if !IsNil(o.Hostname) {
toSerialize["hostname"] = o.Hostname
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.State) {
toSerialize["state"] = o.State
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.ReasonUid) {
toSerialize["reason_uid"] = o.ReasonUid
}
if !IsNil(o.ResumeAfter) {
toSerialize["resume_after"] = o.ResumeAfter
}
if !IsNil(o.Weight) {
toSerialize["weight"] = o.Weight
}
return toSerialize, nil
}
type NullableV0040UpdateNodeMsg struct {
value *V0040UpdateNodeMsg
isSet bool
}
func (v NullableV0040UpdateNodeMsg) Get() *V0040UpdateNodeMsg {
return v.value
}
func (v *NullableV0040UpdateNodeMsg) Set(val *V0040UpdateNodeMsg) {
v.value = val
v.isSet = true
}
func (v NullableV0040UpdateNodeMsg) IsSet() bool {
return v.isSet
}
func (v *NullableV0040UpdateNodeMsg) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableV0040UpdateNodeMsg(val *V0040UpdateNodeMsg) *NullableV0040UpdateNodeMsg {
return &NullableV0040UpdateNodeMsg{value: val, isSet: true}
}
func (v NullableV0040UpdateNodeMsg) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableV0040UpdateNodeMsg) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}