-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_online_archive_schedule.go
296 lines (250 loc) · 8.13 KB
/
model_online_archive_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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// OnlineArchiveSchedule Regular frequency and duration when archiving process occurs.
type OnlineArchiveSchedule struct {
// Type of schedule.
Type string `json:"type"`
// Hour of the day when the scheduled window to run one online archive ends.
EndHour *int `json:"endHour,omitempty"`
// Minute of the hour when the scheduled window to run one online archive ends.
EndMinute *int `json:"endMinute,omitempty"`
// Hour of the day when the when the scheduled window to run one online archive starts.
StartHour *int `json:"startHour,omitempty"`
// Minute of the hour when the scheduled window to run one online archive starts.
StartMinute *int `json:"startMinute,omitempty"`
// Day of the week when the scheduled archive starts. The week starts with Monday (`1`) and ends with Sunday (`7`).
DayOfWeek *int `json:"dayOfWeek,omitempty"`
// Day of the month when the scheduled archive starts.
DayOfMonth *int `json:"dayOfMonth,omitempty"`
}
// NewOnlineArchiveSchedule instantiates a new OnlineArchiveSchedule 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 NewOnlineArchiveSchedule(type_ string) *OnlineArchiveSchedule {
this := OnlineArchiveSchedule{}
this.Type = type_
return &this
}
// NewOnlineArchiveScheduleWithDefaults instantiates a new OnlineArchiveSchedule 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 NewOnlineArchiveScheduleWithDefaults() *OnlineArchiveSchedule {
this := OnlineArchiveSchedule{}
return &this
}
// GetType returns the Type field value
func (o *OnlineArchiveSchedule) GetType() string {
if o == nil {
var ret string
return ret
}
return o.Type
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *OnlineArchiveSchedule) GetTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value
func (o *OnlineArchiveSchedule) SetType(v string) {
o.Type = v
}
// GetEndHour returns the EndHour field value if set, zero value otherwise
func (o *OnlineArchiveSchedule) GetEndHour() int {
if o == nil || IsNil(o.EndHour) {
var ret int
return ret
}
return *o.EndHour
}
// GetEndHourOk returns a tuple with the EndHour field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OnlineArchiveSchedule) GetEndHourOk() (*int, bool) {
if o == nil || IsNil(o.EndHour) {
return nil, false
}
return o.EndHour, true
}
// HasEndHour returns a boolean if a field has been set.
func (o *OnlineArchiveSchedule) HasEndHour() bool {
if o != nil && !IsNil(o.EndHour) {
return true
}
return false
}
// SetEndHour gets a reference to the given int and assigns it to the EndHour field.
func (o *OnlineArchiveSchedule) SetEndHour(v int) {
o.EndHour = &v
}
// GetEndMinute returns the EndMinute field value if set, zero value otherwise
func (o *OnlineArchiveSchedule) GetEndMinute() int {
if o == nil || IsNil(o.EndMinute) {
var ret int
return ret
}
return *o.EndMinute
}
// GetEndMinuteOk returns a tuple with the EndMinute field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OnlineArchiveSchedule) GetEndMinuteOk() (*int, bool) {
if o == nil || IsNil(o.EndMinute) {
return nil, false
}
return o.EndMinute, true
}
// HasEndMinute returns a boolean if a field has been set.
func (o *OnlineArchiveSchedule) HasEndMinute() bool {
if o != nil && !IsNil(o.EndMinute) {
return true
}
return false
}
// SetEndMinute gets a reference to the given int and assigns it to the EndMinute field.
func (o *OnlineArchiveSchedule) SetEndMinute(v int) {
o.EndMinute = &v
}
// GetStartHour returns the StartHour field value if set, zero value otherwise
func (o *OnlineArchiveSchedule) GetStartHour() int {
if o == nil || IsNil(o.StartHour) {
var ret int
return ret
}
return *o.StartHour
}
// GetStartHourOk returns a tuple with the StartHour field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OnlineArchiveSchedule) GetStartHourOk() (*int, bool) {
if o == nil || IsNil(o.StartHour) {
return nil, false
}
return o.StartHour, true
}
// HasStartHour returns a boolean if a field has been set.
func (o *OnlineArchiveSchedule) HasStartHour() bool {
if o != nil && !IsNil(o.StartHour) {
return true
}
return false
}
// SetStartHour gets a reference to the given int and assigns it to the StartHour field.
func (o *OnlineArchiveSchedule) SetStartHour(v int) {
o.StartHour = &v
}
// GetStartMinute returns the StartMinute field value if set, zero value otherwise
func (o *OnlineArchiveSchedule) GetStartMinute() int {
if o == nil || IsNil(o.StartMinute) {
var ret int
return ret
}
return *o.StartMinute
}
// GetStartMinuteOk returns a tuple with the StartMinute field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OnlineArchiveSchedule) GetStartMinuteOk() (*int, bool) {
if o == nil || IsNil(o.StartMinute) {
return nil, false
}
return o.StartMinute, true
}
// HasStartMinute returns a boolean if a field has been set.
func (o *OnlineArchiveSchedule) HasStartMinute() bool {
if o != nil && !IsNil(o.StartMinute) {
return true
}
return false
}
// SetStartMinute gets a reference to the given int and assigns it to the StartMinute field.
func (o *OnlineArchiveSchedule) SetStartMinute(v int) {
o.StartMinute = &v
}
// GetDayOfWeek returns the DayOfWeek field value if set, zero value otherwise
func (o *OnlineArchiveSchedule) GetDayOfWeek() int {
if o == nil || IsNil(o.DayOfWeek) {
var ret int
return ret
}
return *o.DayOfWeek
}
// GetDayOfWeekOk returns a tuple with the DayOfWeek field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OnlineArchiveSchedule) GetDayOfWeekOk() (*int, bool) {
if o == nil || IsNil(o.DayOfWeek) {
return nil, false
}
return o.DayOfWeek, true
}
// HasDayOfWeek returns a boolean if a field has been set.
func (o *OnlineArchiveSchedule) HasDayOfWeek() bool {
if o != nil && !IsNil(o.DayOfWeek) {
return true
}
return false
}
// SetDayOfWeek gets a reference to the given int and assigns it to the DayOfWeek field.
func (o *OnlineArchiveSchedule) SetDayOfWeek(v int) {
o.DayOfWeek = &v
}
// GetDayOfMonth returns the DayOfMonth field value if set, zero value otherwise
func (o *OnlineArchiveSchedule) GetDayOfMonth() int {
if o == nil || IsNil(o.DayOfMonth) {
var ret int
return ret
}
return *o.DayOfMonth
}
// GetDayOfMonthOk returns a tuple with the DayOfMonth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OnlineArchiveSchedule) GetDayOfMonthOk() (*int, bool) {
if o == nil || IsNil(o.DayOfMonth) {
return nil, false
}
return o.DayOfMonth, true
}
// HasDayOfMonth returns a boolean if a field has been set.
func (o *OnlineArchiveSchedule) HasDayOfMonth() bool {
if o != nil && !IsNil(o.DayOfMonth) {
return true
}
return false
}
// SetDayOfMonth gets a reference to the given int and assigns it to the DayOfMonth field.
func (o *OnlineArchiveSchedule) SetDayOfMonth(v int) {
o.DayOfMonth = &v
}
func (o OnlineArchiveSchedule) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o OnlineArchiveSchedule) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["type"] = o.Type
if !IsNil(o.EndHour) {
toSerialize["endHour"] = o.EndHour
}
if !IsNil(o.EndMinute) {
toSerialize["endMinute"] = o.EndMinute
}
if !IsNil(o.StartHour) {
toSerialize["startHour"] = o.StartHour
}
if !IsNil(o.StartMinute) {
toSerialize["startMinute"] = o.StartMinute
}
if !IsNil(o.DayOfWeek) {
toSerialize["dayOfWeek"] = o.DayOfWeek
}
if !IsNil(o.DayOfMonth) {
toSerialize["dayOfMonth"] = o.DayOfMonth
}
return toSerialize, nil
}