-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathmodel_backup.go
More file actions
431 lines (355 loc) · 17.6 KB
/
Copy pathmodel_backup.go
File metadata and controls
431 lines (355 loc) · 17.6 KB
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
425
426
427
428
429
430
431
/*
STACKIT MariaDB API
The STACKIT MariaDB API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects.
API version: 2.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
package mariadb
import (
"encoding/json"
)
// checks if the Backup type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Backup{}
/*
types and functions for downloadable
*/
// isBoolean
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupgetDownloadableAttributeType = *bool
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupgetDownloadableArgType = bool
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupgetDownloadableRetType = bool
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getBackupgetDownloadableAttributeTypeOk(arg BackupgetDownloadableAttributeType) (ret BackupgetDownloadableRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setBackupgetDownloadableAttributeType(arg *BackupgetDownloadableAttributeType, val BackupgetDownloadableRetType) {
*arg = &val
}
/*
types and functions for finished_at
*/
// isNotNullableString
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetFinishedAtAttributeType = *string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getBackupGetFinishedAtAttributeTypeOk(arg BackupGetFinishedAtAttributeType) (ret BackupGetFinishedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setBackupGetFinishedAtAttributeType(arg *BackupGetFinishedAtAttributeType, val BackupGetFinishedAtRetType) {
*arg = &val
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetFinishedAtArgType = string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetFinishedAtRetType = string
/*
types and functions for id
*/
// isInteger
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetIdAttributeType = *int64
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetIdArgType = int64
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetIdRetType = int64
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getBackupGetIdAttributeTypeOk(arg BackupGetIdAttributeType) (ret BackupGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setBackupGetIdAttributeType(arg *BackupGetIdAttributeType, val BackupGetIdRetType) {
*arg = &val
}
/*
types and functions for size
*/
// isInteger
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetSizeAttributeType = *int64
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetSizeArgType = int64
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetSizeRetType = int64
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getBackupGetSizeAttributeTypeOk(arg BackupGetSizeAttributeType) (ret BackupGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setBackupGetSizeAttributeType(arg *BackupGetSizeAttributeType, val BackupGetSizeRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetStatusAttributeType = *string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getBackupGetStatusAttributeTypeOk(arg BackupGetStatusAttributeType) (ret BackupGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setBackupGetStatusAttributeType(arg *BackupGetStatusAttributeType, val BackupGetStatusRetType) {
*arg = &val
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetStatusArgType = string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetStatusRetType = string
/*
types and functions for triggered_at
*/
// isNotNullableString
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetTriggeredAtAttributeType = *string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getBackupGetTriggeredAtAttributeTypeOk(arg BackupGetTriggeredAtAttributeType) (ret BackupGetTriggeredAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setBackupGetTriggeredAtAttributeType(arg *BackupGetTriggeredAtAttributeType, val BackupGetTriggeredAtRetType) {
*arg = &val
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetTriggeredAtArgType = string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type BackupGetTriggeredAtRetType = string
// Backup struct for Backup
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type Backup struct {
Downloadable BackupgetDownloadableAttributeType `json:"downloadable,omitempty"`
// REQUIRED
FinishedAt BackupGetFinishedAtAttributeType `json:"finished_at" required:"true"`
// Can be cast to int32 without loss of precision.
// REQUIRED
Id BackupGetIdAttributeType `json:"id" required:"true"`
// Can be cast to int32 without loss of precision.
Size BackupGetSizeAttributeType `json:"size,omitempty"`
// REQUIRED
Status BackupGetStatusAttributeType `json:"status" required:"true"`
TriggeredAt BackupGetTriggeredAtAttributeType `json:"triggered_at,omitempty"`
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type _Backup Backup
// NewBackup instantiates a new Backup 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
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func NewBackup(finishedAt BackupGetFinishedAtArgType, id BackupGetIdArgType, status BackupGetStatusArgType) *Backup {
this := Backup{}
setBackupGetFinishedAtAttributeType(&this.FinishedAt, finishedAt)
setBackupGetIdAttributeType(&this.Id, id)
setBackupGetStatusAttributeType(&this.Status, status)
return &this
}
// NewBackupWithDefaults instantiates a new Backup 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
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func NewBackupWithDefaults() *Backup {
this := Backup{}
return &this
}
// GetDownloadable returns the Downloadable field value if set, zero value otherwise.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetDownloadable() (res BackupgetDownloadableRetType) {
res, _ = o.GetDownloadableOk()
return
}
// GetDownloadableOk returns a tuple with the Downloadable field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetDownloadableOk() (ret BackupgetDownloadableRetType, ok bool) {
return getBackupgetDownloadableAttributeTypeOk(o.Downloadable)
}
// HasDownloadable returns a boolean if a field has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) HasDownloadable() bool {
_, ok := o.GetDownloadableOk()
return ok
}
// SetDownloadable gets a reference to the given bool and assigns it to the Downloadable field.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) SetDownloadable(v BackupgetDownloadableRetType) {
setBackupgetDownloadableAttributeType(&o.Downloadable, v)
}
// GetFinishedAt returns the FinishedAt field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetFinishedAt() (ret BackupGetFinishedAtRetType) {
ret, _ = o.GetFinishedAtOk()
return ret
}
// GetFinishedAtOk returns a tuple with the FinishedAt field value
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetFinishedAtOk() (ret BackupGetFinishedAtRetType, ok bool) {
return getBackupGetFinishedAtAttributeTypeOk(o.FinishedAt)
}
// SetFinishedAt sets field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) SetFinishedAt(v BackupGetFinishedAtRetType) {
setBackupGetFinishedAtAttributeType(&o.FinishedAt, v)
}
// GetId returns the Id field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetId() (ret BackupGetIdRetType) {
ret, _ = o.GetIdOk()
return ret
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetIdOk() (ret BackupGetIdRetType, ok bool) {
return getBackupGetIdAttributeTypeOk(o.Id)
}
// SetId sets field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) SetId(v BackupGetIdRetType) {
setBackupGetIdAttributeType(&o.Id, v)
}
// GetSize returns the Size field value if set, zero value otherwise.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetSize() (res BackupGetSizeRetType) {
res, _ = o.GetSizeOk()
return
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetSizeOk() (ret BackupGetSizeRetType, ok bool) {
return getBackupGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) SetSize(v BackupGetSizeRetType) {
setBackupGetSizeAttributeType(&o.Size, v)
}
// GetStatus returns the Status field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetStatus() (ret BackupGetStatusRetType) {
ret, _ = o.GetStatusOk()
return ret
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetStatusOk() (ret BackupGetStatusRetType, ok bool) {
return getBackupGetStatusAttributeTypeOk(o.Status)
}
// SetStatus sets field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) SetStatus(v BackupGetStatusRetType) {
setBackupGetStatusAttributeType(&o.Status, v)
}
// GetTriggeredAt returns the TriggeredAt field value if set, zero value otherwise.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetTriggeredAt() (res BackupGetTriggeredAtRetType) {
res, _ = o.GetTriggeredAtOk()
return
}
// GetTriggeredAtOk returns a tuple with the TriggeredAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) GetTriggeredAtOk() (ret BackupGetTriggeredAtRetType, ok bool) {
return getBackupGetTriggeredAtAttributeTypeOk(o.TriggeredAt)
}
// HasTriggeredAt returns a boolean if a field has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) HasTriggeredAt() bool {
_, ok := o.GetTriggeredAtOk()
return ok
}
// SetTriggeredAt gets a reference to the given string and assigns it to the TriggeredAt field.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *Backup) SetTriggeredAt(v BackupGetTriggeredAtRetType) {
setBackupGetTriggeredAtAttributeType(&o.TriggeredAt, v)
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o Backup) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getBackupgetDownloadableAttributeTypeOk(o.Downloadable); ok {
toSerialize["Downloadable"] = val
}
if val, ok := getBackupGetFinishedAtAttributeTypeOk(o.FinishedAt); ok {
toSerialize["FinishedAt"] = val
}
if val, ok := getBackupGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getBackupGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
if val, ok := getBackupGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getBackupGetTriggeredAtAttributeTypeOk(o.TriggeredAt); ok {
toSerialize["TriggeredAt"] = val
}
return toSerialize, nil
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type NullableBackup struct {
value *Backup
isSet bool
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v NullableBackup) Get() *Backup {
return v.value
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v *NullableBackup) Set(val *Backup) {
v.value = val
v.isSet = true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v NullableBackup) IsSet() bool {
return v.isSet
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v *NullableBackup) Unset() {
v.value = nil
v.isSet = false
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func NewNullableBackup(val *Backup) *NullableBackup {
return &NullableBackup{value: val, isSet: true}
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v NullableBackup) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v *NullableBackup) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}