/
model_services.go
executable file
·271 lines (225 loc) · 6.42 KB
/
model_services.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
/*
Tenant API
Tenant API
API version: 0.0.1
Contact: abc@layer.fr
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sdk
import (
"encoding/json"
)
// checks if the Services type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Services{}
// Services struct for Services
type Services struct {
Logging *bool `json:"logging,omitempty"`
Workflow *bool `json:"workflow,omitempty"`
Nvidia *bool `json:"nvidia,omitempty"`
Scheduler *bool `json:"scheduler,omitempty"`
Runtimes *ServicesRuntimes `json:"runtimes,omitempty"`
}
// NewServices instantiates a new Services 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 NewServices() *Services {
this := Services{}
return &this
}
// NewServicesWithDefaults instantiates a new Services 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 NewServicesWithDefaults() *Services {
this := Services{}
return &this
}
// GetLogging returns the Logging field value if set, zero value otherwise.
func (o *Services) GetLogging() bool {
if o == nil || IsNil(o.Logging) {
var ret bool
return ret
}
return *o.Logging
}
// GetLoggingOk returns a tuple with the Logging field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Services) GetLoggingOk() (*bool, bool) {
if o == nil || IsNil(o.Logging) {
return nil, false
}
return o.Logging, true
}
// HasLogging returns a boolean if a field has been set.
func (o *Services) HasLogging() bool {
if o != nil && !IsNil(o.Logging) {
return true
}
return false
}
// SetLogging gets a reference to the given bool and assigns it to the Logging field.
func (o *Services) SetLogging(v bool) {
o.Logging = &v
}
// GetWorkflow returns the Workflow field value if set, zero value otherwise.
func (o *Services) GetWorkflow() bool {
if o == nil || IsNil(o.Workflow) {
var ret bool
return ret
}
return *o.Workflow
}
// GetWorkflowOk returns a tuple with the Workflow field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Services) GetWorkflowOk() (*bool, bool) {
if o == nil || IsNil(o.Workflow) {
return nil, false
}
return o.Workflow, true
}
// HasWorkflow returns a boolean if a field has been set.
func (o *Services) HasWorkflow() bool {
if o != nil && !IsNil(o.Workflow) {
return true
}
return false
}
// SetWorkflow gets a reference to the given bool and assigns it to the Workflow field.
func (o *Services) SetWorkflow(v bool) {
o.Workflow = &v
}
// GetNvidia returns the Nvidia field value if set, zero value otherwise.
func (o *Services) GetNvidia() bool {
if o == nil || IsNil(o.Nvidia) {
var ret bool
return ret
}
return *o.Nvidia
}
// GetNvidiaOk returns a tuple with the Nvidia field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Services) GetNvidiaOk() (*bool, bool) {
if o == nil || IsNil(o.Nvidia) {
return nil, false
}
return o.Nvidia, true
}
// HasNvidia returns a boolean if a field has been set.
func (o *Services) HasNvidia() bool {
if o != nil && !IsNil(o.Nvidia) {
return true
}
return false
}
// SetNvidia gets a reference to the given bool and assigns it to the Nvidia field.
func (o *Services) SetNvidia(v bool) {
o.Nvidia = &v
}
// GetScheduler returns the Scheduler field value if set, zero value otherwise.
func (o *Services) GetScheduler() bool {
if o == nil || IsNil(o.Scheduler) {
var ret bool
return ret
}
return *o.Scheduler
}
// GetSchedulerOk returns a tuple with the Scheduler field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Services) GetSchedulerOk() (*bool, bool) {
if o == nil || IsNil(o.Scheduler) {
return nil, false
}
return o.Scheduler, true
}
// HasScheduler returns a boolean if a field has been set.
func (o *Services) HasScheduler() bool {
if o != nil && !IsNil(o.Scheduler) {
return true
}
return false
}
// SetScheduler gets a reference to the given bool and assigns it to the Scheduler field.
func (o *Services) SetScheduler(v bool) {
o.Scheduler = &v
}
// GetRuntimes returns the Runtimes field value if set, zero value otherwise.
func (o *Services) GetRuntimes() ServicesRuntimes {
if o == nil || IsNil(o.Runtimes) {
var ret ServicesRuntimes
return ret
}
return *o.Runtimes
}
// GetRuntimesOk returns a tuple with the Runtimes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Services) GetRuntimesOk() (*ServicesRuntimes, bool) {
if o == nil || IsNil(o.Runtimes) {
return nil, false
}
return o.Runtimes, true
}
// HasRuntimes returns a boolean if a field has been set.
func (o *Services) HasRuntimes() bool {
if o != nil && !IsNil(o.Runtimes) {
return true
}
return false
}
// SetRuntimes gets a reference to the given ServicesRuntimes and assigns it to the Runtimes field.
func (o *Services) SetRuntimes(v ServicesRuntimes) {
o.Runtimes = &v
}
func (o Services) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Services) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Logging) {
toSerialize["logging"] = o.Logging
}
if !IsNil(o.Workflow) {
toSerialize["workflow"] = o.Workflow
}
if !IsNil(o.Nvidia) {
toSerialize["nvidia"] = o.Nvidia
}
if !IsNil(o.Scheduler) {
toSerialize["scheduler"] = o.Scheduler
}
if !IsNil(o.Runtimes) {
toSerialize["runtimes"] = o.Runtimes
}
return toSerialize, nil
}
type NullableServices struct {
value *Services
isSet bool
}
func (v NullableServices) Get() *Services {
return v.value
}
func (v *NullableServices) Set(val *Services) {
v.value = val
v.isSet = true
}
func (v NullableServices) IsSet() bool {
return v.isSet
}
func (v *NullableServices) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableServices(val *Services) *NullableServices {
return &NullableServices{value: val, isSet: true}
}
func (v NullableServices) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableServices) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}