-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_schedule_v1_0_1_schedule.go
426 lines (364 loc) · 13.9 KB
/
model_schedule_v1_0_1_schedule.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
/*
* Redfish
*
* This contains the definition of a Redfish service.
*
* API version: 2020.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package redfish
import (
"encoding/json"
"time"
)
// ScheduleV101Schedule Schedule a series of occurrences.
type ScheduleV101Schedule struct {
// Days of the month when scheduled occurrences are enabled. `0` indicates that every day of the month is enabled.
EnabledDaysOfMonth *[]int64 `json:"EnabledDaysOfMonth,omitempty"`
// Days of the week when scheduled occurrences are enabled, for enabled days of the month and months of the year. If not present, all days of the week are enabled.
EnabledDaysOfWeek *[]ScheduleV101DayOfWeek `json:"EnabledDaysOfWeek,omitempty"`
// The months of the year when scheduled occurrences are enabled. If not present, all months of the year are enabled.
EnabledMonthsOfYear *[]ScheduleV101MonthOfYear `json:"EnabledMonthsOfYear,omitempty"`
// The date and time when the initial occurrence is scheduled to occur.
InitialStartTime NullableTime `json:"InitialStartTime,omitempty"`
// The time after provisioning when the schedule as a whole expires.
Lifetime NullableString `json:"Lifetime,omitempty"`
// The maximum number of scheduled occurrences.
MaxOccurrences NullableInt64 `json:"MaxOccurrences,omitempty"`
// The schedule name.
Name NullableString `json:"Name,omitempty"`
// The amount of time until the next occurrence occurs.
RecurrenceInterval NullableString `json:"RecurrenceInterval,omitempty"`
}
// NewScheduleV101Schedule instantiates a new ScheduleV101Schedule 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 NewScheduleV101Schedule() *ScheduleV101Schedule {
this := ScheduleV101Schedule{}
return &this
}
// NewScheduleV101ScheduleWithDefaults instantiates a new ScheduleV101Schedule 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 NewScheduleV101ScheduleWithDefaults() *ScheduleV101Schedule {
this := ScheduleV101Schedule{}
return &this
}
// GetEnabledDaysOfMonth returns the EnabledDaysOfMonth field value if set, zero value otherwise.
func (o *ScheduleV101Schedule) GetEnabledDaysOfMonth() []int64 {
if o == nil || o.EnabledDaysOfMonth == nil {
var ret []int64
return ret
}
return *o.EnabledDaysOfMonth
}
// GetEnabledDaysOfMonthOk returns a tuple with the EnabledDaysOfMonth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScheduleV101Schedule) GetEnabledDaysOfMonthOk() (*[]int64, bool) {
if o == nil || o.EnabledDaysOfMonth == nil {
return nil, false
}
return o.EnabledDaysOfMonth, true
}
// HasEnabledDaysOfMonth returns a boolean if a field has been set.
func (o *ScheduleV101Schedule) HasEnabledDaysOfMonth() bool {
if o != nil && o.EnabledDaysOfMonth != nil {
return true
}
return false
}
// SetEnabledDaysOfMonth gets a reference to the given []int64 and assigns it to the EnabledDaysOfMonth field.
func (o *ScheduleV101Schedule) SetEnabledDaysOfMonth(v []int64) {
o.EnabledDaysOfMonth = &v
}
// GetEnabledDaysOfWeek returns the EnabledDaysOfWeek field value if set, zero value otherwise.
func (o *ScheduleV101Schedule) GetEnabledDaysOfWeek() []ScheduleV101DayOfWeek {
if o == nil || o.EnabledDaysOfWeek == nil {
var ret []ScheduleV101DayOfWeek
return ret
}
return *o.EnabledDaysOfWeek
}
// GetEnabledDaysOfWeekOk returns a tuple with the EnabledDaysOfWeek field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScheduleV101Schedule) GetEnabledDaysOfWeekOk() (*[]ScheduleV101DayOfWeek, bool) {
if o == nil || o.EnabledDaysOfWeek == nil {
return nil, false
}
return o.EnabledDaysOfWeek, true
}
// HasEnabledDaysOfWeek returns a boolean if a field has been set.
func (o *ScheduleV101Schedule) HasEnabledDaysOfWeek() bool {
if o != nil && o.EnabledDaysOfWeek != nil {
return true
}
return false
}
// SetEnabledDaysOfWeek gets a reference to the given []ScheduleV101DayOfWeek and assigns it to the EnabledDaysOfWeek field.
func (o *ScheduleV101Schedule) SetEnabledDaysOfWeek(v []ScheduleV101DayOfWeek) {
o.EnabledDaysOfWeek = &v
}
// GetEnabledMonthsOfYear returns the EnabledMonthsOfYear field value if set, zero value otherwise.
func (o *ScheduleV101Schedule) GetEnabledMonthsOfYear() []ScheduleV101MonthOfYear {
if o == nil || o.EnabledMonthsOfYear == nil {
var ret []ScheduleV101MonthOfYear
return ret
}
return *o.EnabledMonthsOfYear
}
// GetEnabledMonthsOfYearOk returns a tuple with the EnabledMonthsOfYear field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScheduleV101Schedule) GetEnabledMonthsOfYearOk() (*[]ScheduleV101MonthOfYear, bool) {
if o == nil || o.EnabledMonthsOfYear == nil {
return nil, false
}
return o.EnabledMonthsOfYear, true
}
// HasEnabledMonthsOfYear returns a boolean if a field has been set.
func (o *ScheduleV101Schedule) HasEnabledMonthsOfYear() bool {
if o != nil && o.EnabledMonthsOfYear != nil {
return true
}
return false
}
// SetEnabledMonthsOfYear gets a reference to the given []ScheduleV101MonthOfYear and assigns it to the EnabledMonthsOfYear field.
func (o *ScheduleV101Schedule) SetEnabledMonthsOfYear(v []ScheduleV101MonthOfYear) {
o.EnabledMonthsOfYear = &v
}
// GetInitialStartTime returns the InitialStartTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ScheduleV101Schedule) GetInitialStartTime() time.Time {
if o == nil || o.InitialStartTime.Get() == nil {
var ret time.Time
return ret
}
return *o.InitialStartTime.Get()
}
// GetInitialStartTimeOk returns a tuple with the InitialStartTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ScheduleV101Schedule) GetInitialStartTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.InitialStartTime.Get(), o.InitialStartTime.IsSet()
}
// HasInitialStartTime returns a boolean if a field has been set.
func (o *ScheduleV101Schedule) HasInitialStartTime() bool {
if o != nil && o.InitialStartTime.IsSet() {
return true
}
return false
}
// SetInitialStartTime gets a reference to the given NullableTime and assigns it to the InitialStartTime field.
func (o *ScheduleV101Schedule) SetInitialStartTime(v time.Time) {
o.InitialStartTime.Set(&v)
}
// SetInitialStartTimeNil sets the value for InitialStartTime to be an explicit nil
func (o *ScheduleV101Schedule) SetInitialStartTimeNil() {
o.InitialStartTime.Set(nil)
}
// UnsetInitialStartTime ensures that no value is present for InitialStartTime, not even an explicit nil
func (o *ScheduleV101Schedule) UnsetInitialStartTime() {
o.InitialStartTime.Unset()
}
// GetLifetime returns the Lifetime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ScheduleV101Schedule) GetLifetime() string {
if o == nil || o.Lifetime.Get() == nil {
var ret string
return ret
}
return *o.Lifetime.Get()
}
// GetLifetimeOk returns a tuple with the Lifetime field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ScheduleV101Schedule) GetLifetimeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Lifetime.Get(), o.Lifetime.IsSet()
}
// HasLifetime returns a boolean if a field has been set.
func (o *ScheduleV101Schedule) HasLifetime() bool {
if o != nil && o.Lifetime.IsSet() {
return true
}
return false
}
// SetLifetime gets a reference to the given NullableString and assigns it to the Lifetime field.
func (o *ScheduleV101Schedule) SetLifetime(v string) {
o.Lifetime.Set(&v)
}
// SetLifetimeNil sets the value for Lifetime to be an explicit nil
func (o *ScheduleV101Schedule) SetLifetimeNil() {
o.Lifetime.Set(nil)
}
// UnsetLifetime ensures that no value is present for Lifetime, not even an explicit nil
func (o *ScheduleV101Schedule) UnsetLifetime() {
o.Lifetime.Unset()
}
// GetMaxOccurrences returns the MaxOccurrences field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ScheduleV101Schedule) GetMaxOccurrences() int64 {
if o == nil || o.MaxOccurrences.Get() == nil {
var ret int64
return ret
}
return *o.MaxOccurrences.Get()
}
// GetMaxOccurrencesOk returns a tuple with the MaxOccurrences field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ScheduleV101Schedule) GetMaxOccurrencesOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.MaxOccurrences.Get(), o.MaxOccurrences.IsSet()
}
// HasMaxOccurrences returns a boolean if a field has been set.
func (o *ScheduleV101Schedule) HasMaxOccurrences() bool {
if o != nil && o.MaxOccurrences.IsSet() {
return true
}
return false
}
// SetMaxOccurrences gets a reference to the given NullableInt64 and assigns it to the MaxOccurrences field.
func (o *ScheduleV101Schedule) SetMaxOccurrences(v int64) {
o.MaxOccurrences.Set(&v)
}
// SetMaxOccurrencesNil sets the value for MaxOccurrences to be an explicit nil
func (o *ScheduleV101Schedule) SetMaxOccurrencesNil() {
o.MaxOccurrences.Set(nil)
}
// UnsetMaxOccurrences ensures that no value is present for MaxOccurrences, not even an explicit nil
func (o *ScheduleV101Schedule) UnsetMaxOccurrences() {
o.MaxOccurrences.Unset()
}
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ScheduleV101Schedule) GetName() string {
if o == nil || o.Name.Get() == nil {
var ret string
return ret
}
return *o.Name.Get()
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ScheduleV101Schedule) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name.Get(), o.Name.IsSet()
}
// HasName returns a boolean if a field has been set.
func (o *ScheduleV101Schedule) HasName() bool {
if o != nil && o.Name.IsSet() {
return true
}
return false
}
// SetName gets a reference to the given NullableString and assigns it to the Name field.
func (o *ScheduleV101Schedule) SetName(v string) {
o.Name.Set(&v)
}
// SetNameNil sets the value for Name to be an explicit nil
func (o *ScheduleV101Schedule) SetNameNil() {
o.Name.Set(nil)
}
// UnsetName ensures that no value is present for Name, not even an explicit nil
func (o *ScheduleV101Schedule) UnsetName() {
o.Name.Unset()
}
// GetRecurrenceInterval returns the RecurrenceInterval field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ScheduleV101Schedule) GetRecurrenceInterval() string {
if o == nil || o.RecurrenceInterval.Get() == nil {
var ret string
return ret
}
return *o.RecurrenceInterval.Get()
}
// GetRecurrenceIntervalOk returns a tuple with the RecurrenceInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ScheduleV101Schedule) GetRecurrenceIntervalOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RecurrenceInterval.Get(), o.RecurrenceInterval.IsSet()
}
// HasRecurrenceInterval returns a boolean if a field has been set.
func (o *ScheduleV101Schedule) HasRecurrenceInterval() bool {
if o != nil && o.RecurrenceInterval.IsSet() {
return true
}
return false
}
// SetRecurrenceInterval gets a reference to the given NullableString and assigns it to the RecurrenceInterval field.
func (o *ScheduleV101Schedule) SetRecurrenceInterval(v string) {
o.RecurrenceInterval.Set(&v)
}
// SetRecurrenceIntervalNil sets the value for RecurrenceInterval to be an explicit nil
func (o *ScheduleV101Schedule) SetRecurrenceIntervalNil() {
o.RecurrenceInterval.Set(nil)
}
// UnsetRecurrenceInterval ensures that no value is present for RecurrenceInterval, not even an explicit nil
func (o *ScheduleV101Schedule) UnsetRecurrenceInterval() {
o.RecurrenceInterval.Unset()
}
func (o ScheduleV101Schedule) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.EnabledDaysOfMonth != nil {
toSerialize["EnabledDaysOfMonth"] = o.EnabledDaysOfMonth
}
if o.EnabledDaysOfWeek != nil {
toSerialize["EnabledDaysOfWeek"] = o.EnabledDaysOfWeek
}
if o.EnabledMonthsOfYear != nil {
toSerialize["EnabledMonthsOfYear"] = o.EnabledMonthsOfYear
}
if o.InitialStartTime.IsSet() {
toSerialize["InitialStartTime"] = o.InitialStartTime.Get()
}
if o.Lifetime.IsSet() {
toSerialize["Lifetime"] = o.Lifetime.Get()
}
if o.MaxOccurrences.IsSet() {
toSerialize["MaxOccurrences"] = o.MaxOccurrences.Get()
}
if o.Name.IsSet() {
toSerialize["Name"] = o.Name.Get()
}
if o.RecurrenceInterval.IsSet() {
toSerialize["RecurrenceInterval"] = o.RecurrenceInterval.Get()
}
return json.Marshal(toSerialize)
}
type NullableScheduleV101Schedule struct {
value *ScheduleV101Schedule
isSet bool
}
func (v NullableScheduleV101Schedule) Get() *ScheduleV101Schedule {
return v.value
}
func (v *NullableScheduleV101Schedule) Set(val *ScheduleV101Schedule) {
v.value = val
v.isSet = true
}
func (v NullableScheduleV101Schedule) IsSet() bool {
return v.isSet
}
func (v *NullableScheduleV101Schedule) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableScheduleV101Schedule(val *ScheduleV101Schedule) *NullableScheduleV101Schedule {
return &NullableScheduleV101Schedule{value: val, isSet: true}
}
func (v NullableScheduleV101Schedule) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableScheduleV101Schedule) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}