-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodel_v0_0_39_partition_info_maximums.go
343 lines (287 loc) · 9.87 KB
/
model_v0_0_39_partition_info_maximums.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
/*
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 V0039PartitionInfoMaximums type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &V0039PartitionInfoMaximums{}
// V0039PartitionInfoMaximums struct for V0039PartitionInfoMaximums
type V0039PartitionInfoMaximums struct {
CpusPerNode *V0039Uint32NoVal `json:"cpus_per_node,omitempty"`
CpusPerSocket *V0039Uint32NoVal `json:"cpus_per_socket,omitempty"`
MemoryPerCpu *int64 `json:"memory_per_cpu,omitempty"`
Nodes *V0039Uint32NoVal `json:"nodes,omitempty"`
Shares *int32 `json:"shares,omitempty"`
Time *V0039Uint32NoVal `json:"time,omitempty"`
OverTimeLimit *V0039Uint16NoVal `json:"over_time_limit,omitempty"`
}
// NewV0039PartitionInfoMaximums instantiates a new V0039PartitionInfoMaximums 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 NewV0039PartitionInfoMaximums() *V0039PartitionInfoMaximums {
this := V0039PartitionInfoMaximums{}
return &this
}
// NewV0039PartitionInfoMaximumsWithDefaults instantiates a new V0039PartitionInfoMaximums 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 NewV0039PartitionInfoMaximumsWithDefaults() *V0039PartitionInfoMaximums {
this := V0039PartitionInfoMaximums{}
return &this
}
// GetCpusPerNode returns the CpusPerNode field value if set, zero value otherwise.
func (o *V0039PartitionInfoMaximums) GetCpusPerNode() V0039Uint32NoVal {
if o == nil || IsNil(o.CpusPerNode) {
var ret V0039Uint32NoVal
return ret
}
return *o.CpusPerNode
}
// GetCpusPerNodeOk returns a tuple with the CpusPerNode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039PartitionInfoMaximums) GetCpusPerNodeOk() (*V0039Uint32NoVal, bool) {
if o == nil || IsNil(o.CpusPerNode) {
return nil, false
}
return o.CpusPerNode, true
}
// HasCpusPerNode returns a boolean if a field has been set.
func (o *V0039PartitionInfoMaximums) HasCpusPerNode() bool {
if o != nil && !IsNil(o.CpusPerNode) {
return true
}
return false
}
// SetCpusPerNode gets a reference to the given V0039Uint32NoVal and assigns it to the CpusPerNode field.
func (o *V0039PartitionInfoMaximums) SetCpusPerNode(v V0039Uint32NoVal) {
o.CpusPerNode = &v
}
// GetCpusPerSocket returns the CpusPerSocket field value if set, zero value otherwise.
func (o *V0039PartitionInfoMaximums) GetCpusPerSocket() V0039Uint32NoVal {
if o == nil || IsNil(o.CpusPerSocket) {
var ret V0039Uint32NoVal
return ret
}
return *o.CpusPerSocket
}
// GetCpusPerSocketOk returns a tuple with the CpusPerSocket field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039PartitionInfoMaximums) GetCpusPerSocketOk() (*V0039Uint32NoVal, bool) {
if o == nil || IsNil(o.CpusPerSocket) {
return nil, false
}
return o.CpusPerSocket, true
}
// HasCpusPerSocket returns a boolean if a field has been set.
func (o *V0039PartitionInfoMaximums) HasCpusPerSocket() bool {
if o != nil && !IsNil(o.CpusPerSocket) {
return true
}
return false
}
// SetCpusPerSocket gets a reference to the given V0039Uint32NoVal and assigns it to the CpusPerSocket field.
func (o *V0039PartitionInfoMaximums) SetCpusPerSocket(v V0039Uint32NoVal) {
o.CpusPerSocket = &v
}
// GetMemoryPerCpu returns the MemoryPerCpu field value if set, zero value otherwise.
func (o *V0039PartitionInfoMaximums) GetMemoryPerCpu() int64 {
if o == nil || IsNil(o.MemoryPerCpu) {
var ret int64
return ret
}
return *o.MemoryPerCpu
}
// GetMemoryPerCpuOk returns a tuple with the MemoryPerCpu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039PartitionInfoMaximums) GetMemoryPerCpuOk() (*int64, bool) {
if o == nil || IsNil(o.MemoryPerCpu) {
return nil, false
}
return o.MemoryPerCpu, true
}
// HasMemoryPerCpu returns a boolean if a field has been set.
func (o *V0039PartitionInfoMaximums) HasMemoryPerCpu() bool {
if o != nil && !IsNil(o.MemoryPerCpu) {
return true
}
return false
}
// SetMemoryPerCpu gets a reference to the given int64 and assigns it to the MemoryPerCpu field.
func (o *V0039PartitionInfoMaximums) SetMemoryPerCpu(v int64) {
o.MemoryPerCpu = &v
}
// GetNodes returns the Nodes field value if set, zero value otherwise.
func (o *V0039PartitionInfoMaximums) GetNodes() V0039Uint32NoVal {
if o == nil || IsNil(o.Nodes) {
var ret V0039Uint32NoVal
return ret
}
return *o.Nodes
}
// GetNodesOk returns a tuple with the Nodes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039PartitionInfoMaximums) GetNodesOk() (*V0039Uint32NoVal, bool) {
if o == nil || IsNil(o.Nodes) {
return nil, false
}
return o.Nodes, true
}
// HasNodes returns a boolean if a field has been set.
func (o *V0039PartitionInfoMaximums) HasNodes() bool {
if o != nil && !IsNil(o.Nodes) {
return true
}
return false
}
// SetNodes gets a reference to the given V0039Uint32NoVal and assigns it to the Nodes field.
func (o *V0039PartitionInfoMaximums) SetNodes(v V0039Uint32NoVal) {
o.Nodes = &v
}
// GetShares returns the Shares field value if set, zero value otherwise.
func (o *V0039PartitionInfoMaximums) GetShares() int32 {
if o == nil || IsNil(o.Shares) {
var ret int32
return ret
}
return *o.Shares
}
// GetSharesOk returns a tuple with the Shares field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039PartitionInfoMaximums) GetSharesOk() (*int32, bool) {
if o == nil || IsNil(o.Shares) {
return nil, false
}
return o.Shares, true
}
// HasShares returns a boolean if a field has been set.
func (o *V0039PartitionInfoMaximums) HasShares() bool {
if o != nil && !IsNil(o.Shares) {
return true
}
return false
}
// SetShares gets a reference to the given int32 and assigns it to the Shares field.
func (o *V0039PartitionInfoMaximums) SetShares(v int32) {
o.Shares = &v
}
// GetTime returns the Time field value if set, zero value otherwise.
func (o *V0039PartitionInfoMaximums) GetTime() V0039Uint32NoVal {
if o == nil || IsNil(o.Time) {
var ret V0039Uint32NoVal
return ret
}
return *o.Time
}
// GetTimeOk returns a tuple with the Time field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039PartitionInfoMaximums) GetTimeOk() (*V0039Uint32NoVal, bool) {
if o == nil || IsNil(o.Time) {
return nil, false
}
return o.Time, true
}
// HasTime returns a boolean if a field has been set.
func (o *V0039PartitionInfoMaximums) HasTime() bool {
if o != nil && !IsNil(o.Time) {
return true
}
return false
}
// SetTime gets a reference to the given V0039Uint32NoVal and assigns it to the Time field.
func (o *V0039PartitionInfoMaximums) SetTime(v V0039Uint32NoVal) {
o.Time = &v
}
// GetOverTimeLimit returns the OverTimeLimit field value if set, zero value otherwise.
func (o *V0039PartitionInfoMaximums) GetOverTimeLimit() V0039Uint16NoVal {
if o == nil || IsNil(o.OverTimeLimit) {
var ret V0039Uint16NoVal
return ret
}
return *o.OverTimeLimit
}
// GetOverTimeLimitOk returns a tuple with the OverTimeLimit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039PartitionInfoMaximums) GetOverTimeLimitOk() (*V0039Uint16NoVal, bool) {
if o == nil || IsNil(o.OverTimeLimit) {
return nil, false
}
return o.OverTimeLimit, true
}
// HasOverTimeLimit returns a boolean if a field has been set.
func (o *V0039PartitionInfoMaximums) HasOverTimeLimit() bool {
if o != nil && !IsNil(o.OverTimeLimit) {
return true
}
return false
}
// SetOverTimeLimit gets a reference to the given V0039Uint16NoVal and assigns it to the OverTimeLimit field.
func (o *V0039PartitionInfoMaximums) SetOverTimeLimit(v V0039Uint16NoVal) {
o.OverTimeLimit = &v
}
func (o V0039PartitionInfoMaximums) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o V0039PartitionInfoMaximums) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CpusPerNode) {
toSerialize["cpus_per_node"] = o.CpusPerNode
}
if !IsNil(o.CpusPerSocket) {
toSerialize["cpus_per_socket"] = o.CpusPerSocket
}
if !IsNil(o.MemoryPerCpu) {
toSerialize["memory_per_cpu"] = o.MemoryPerCpu
}
if !IsNil(o.Nodes) {
toSerialize["nodes"] = o.Nodes
}
if !IsNil(o.Shares) {
toSerialize["shares"] = o.Shares
}
if !IsNil(o.Time) {
toSerialize["time"] = o.Time
}
if !IsNil(o.OverTimeLimit) {
toSerialize["over_time_limit"] = o.OverTimeLimit
}
return toSerialize, nil
}
type NullableV0039PartitionInfoMaximums struct {
value *V0039PartitionInfoMaximums
isSet bool
}
func (v NullableV0039PartitionInfoMaximums) Get() *V0039PartitionInfoMaximums {
return v.value
}
func (v *NullableV0039PartitionInfoMaximums) Set(val *V0039PartitionInfoMaximums) {
v.value = val
v.isSet = true
}
func (v NullableV0039PartitionInfoMaximums) IsSet() bool {
return v.isSet
}
func (v *NullableV0039PartitionInfoMaximums) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableV0039PartitionInfoMaximums(val *V0039PartitionInfoMaximums) *NullableV0039PartitionInfoMaximums {
return &NullableV0039PartitionInfoMaximums{value: val, isSet: true}
}
func (v NullableV0039PartitionInfoMaximums) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableV0039PartitionInfoMaximums) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}