-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_v0_0_39_job_array.go
235 lines (194 loc) · 5.95 KB
/
model_v0_0_39_job_array.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
/*
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 V0039JobArray type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &V0039JobArray{}
// V0039JobArray struct for V0039JobArray
type V0039JobArray struct {
JobId *int32 `json:"job_id,omitempty"`
Limits *V0041OpenapiSlurmdbdJobsRespJobsInnerArrayLimits `json:"limits,omitempty"`
TaskId *V0039Uint32NoVal `json:"task_id,omitempty"`
Task *string `json:"task,omitempty"`
}
// NewV0039JobArray instantiates a new V0039JobArray 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 NewV0039JobArray() *V0039JobArray {
this := V0039JobArray{}
return &this
}
// NewV0039JobArrayWithDefaults instantiates a new V0039JobArray 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 NewV0039JobArrayWithDefaults() *V0039JobArray {
this := V0039JobArray{}
return &this
}
// GetJobId returns the JobId field value if set, zero value otherwise.
func (o *V0039JobArray) GetJobId() int32 {
if o == nil || IsNil(o.JobId) {
var ret int32
return ret
}
return *o.JobId
}
// GetJobIdOk returns a tuple with the JobId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039JobArray) GetJobIdOk() (*int32, bool) {
if o == nil || IsNil(o.JobId) {
return nil, false
}
return o.JobId, true
}
// HasJobId returns a boolean if a field has been set.
func (o *V0039JobArray) HasJobId() bool {
if o != nil && !IsNil(o.JobId) {
return true
}
return false
}
// SetJobId gets a reference to the given int32 and assigns it to the JobId field.
func (o *V0039JobArray) SetJobId(v int32) {
o.JobId = &v
}
// GetLimits returns the Limits field value if set, zero value otherwise.
func (o *V0039JobArray) GetLimits() V0041OpenapiSlurmdbdJobsRespJobsInnerArrayLimits {
if o == nil || IsNil(o.Limits) {
var ret V0041OpenapiSlurmdbdJobsRespJobsInnerArrayLimits
return ret
}
return *o.Limits
}
// GetLimitsOk returns a tuple with the Limits field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039JobArray) GetLimitsOk() (*V0041OpenapiSlurmdbdJobsRespJobsInnerArrayLimits, bool) {
if o == nil || IsNil(o.Limits) {
return nil, false
}
return o.Limits, true
}
// HasLimits returns a boolean if a field has been set.
func (o *V0039JobArray) HasLimits() bool {
if o != nil && !IsNil(o.Limits) {
return true
}
return false
}
// SetLimits gets a reference to the given V0041OpenapiSlurmdbdJobsRespJobsInnerArrayLimits and assigns it to the Limits field.
func (o *V0039JobArray) SetLimits(v V0041OpenapiSlurmdbdJobsRespJobsInnerArrayLimits) {
o.Limits = &v
}
// GetTaskId returns the TaskId field value if set, zero value otherwise.
func (o *V0039JobArray) GetTaskId() V0039Uint32NoVal {
if o == nil || IsNil(o.TaskId) {
var ret V0039Uint32NoVal
return ret
}
return *o.TaskId
}
// GetTaskIdOk returns a tuple with the TaskId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039JobArray) GetTaskIdOk() (*V0039Uint32NoVal, bool) {
if o == nil || IsNil(o.TaskId) {
return nil, false
}
return o.TaskId, true
}
// HasTaskId returns a boolean if a field has been set.
func (o *V0039JobArray) HasTaskId() bool {
if o != nil && !IsNil(o.TaskId) {
return true
}
return false
}
// SetTaskId gets a reference to the given V0039Uint32NoVal and assigns it to the TaskId field.
func (o *V0039JobArray) SetTaskId(v V0039Uint32NoVal) {
o.TaskId = &v
}
// GetTask returns the Task field value if set, zero value otherwise.
func (o *V0039JobArray) GetTask() string {
if o == nil || IsNil(o.Task) {
var ret string
return ret
}
return *o.Task
}
// GetTaskOk returns a tuple with the Task field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V0039JobArray) GetTaskOk() (*string, bool) {
if o == nil || IsNil(o.Task) {
return nil, false
}
return o.Task, true
}
// HasTask returns a boolean if a field has been set.
func (o *V0039JobArray) HasTask() bool {
if o != nil && !IsNil(o.Task) {
return true
}
return false
}
// SetTask gets a reference to the given string and assigns it to the Task field.
func (o *V0039JobArray) SetTask(v string) {
o.Task = &v
}
func (o V0039JobArray) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o V0039JobArray) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.JobId) {
toSerialize["job_id"] = o.JobId
}
if !IsNil(o.Limits) {
toSerialize["limits"] = o.Limits
}
if !IsNil(o.TaskId) {
toSerialize["task_id"] = o.TaskId
}
if !IsNil(o.Task) {
toSerialize["task"] = o.Task
}
return toSerialize, nil
}
type NullableV0039JobArray struct {
value *V0039JobArray
isSet bool
}
func (v NullableV0039JobArray) Get() *V0039JobArray {
return v.value
}
func (v *NullableV0039JobArray) Set(val *V0039JobArray) {
v.value = val
v.isSet = true
}
func (v NullableV0039JobArray) IsSet() bool {
return v.isSet
}
func (v *NullableV0039JobArray) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableV0039JobArray(val *V0039JobArray) *NullableV0039JobArray {
return &NullableV0039JobArray{value: val, isSet: true}
}
func (v NullableV0039JobArray) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableV0039JobArray) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}