-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_disk_backup_snapshot_restore_job.go
694 lines (582 loc) · 21.7 KB
/
model_disk_backup_snapshot_restore_job.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
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
"time"
)
// DiskBackupSnapshotRestoreJob struct for DiskBackupSnapshotRestoreJob
type DiskBackupSnapshotRestoreJob struct {
// Flag that indicates whether someone canceled this restore job.
// Read only field.
Cancelled *bool `json:"cancelled,omitempty"`
// Information on the restore job for each replica set in the sharded cluster.
// Read only field.
Components *[]DiskBackupBaseRestoreMember `json:"components,omitempty"`
// Human-readable label that categorizes the restore job to create.
DeliveryType string `json:"deliveryType"`
// One or more Uniform Resource Locators (URLs) that point to the compressed snapshot files for manual download. MongoDB Cloud returns this parameter when `\"deliveryType\" : \"download\"`.
// Read only field.
DeliveryUrl *[]string `json:"deliveryUrl,omitempty"`
DesiredTimestamp *ApiBSONTimestamp `json:"desiredTimestamp,omitempty"`
// Flag that indicates whether the restore job expired.
// Read only field.
Expired *bool `json:"expired,omitempty"`
// Date and time when the restore job expires. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
// Read only field.
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
// Flag that indicates whether the restore job failed.
// Read only field.
Failed *bool `json:"failed,omitempty"`
// Date and time when the restore job completed. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
// Read only field.
FinishedAt *time.Time `json:"finishedAt,omitempty"`
// Unique 24-hexadecimal character string that identifies the restore job.
// Read only field.
Id *string `json:"id,omitempty"`
// List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships.
// Read only field.
Links *[]Link `json:"links,omitempty"`
// Oplog operation number from which you want to restore this snapshot. This number represents the second part of an Oplog timestamp. The resource returns this parameter when `\"deliveryType\" : \"pointInTime\"` and **oplogTs** exceeds `0`.
OplogInc *int `json:"oplogInc,omitempty"`
// Date and time from which you want to restore this snapshot. This parameter expresses this timestamp in the number of seconds that have elapsed since the UNIX epoch. This number represents the first part of an Oplog timestamp. The resource returns this parameter when `\"deliveryType\" : \"pointInTime\"` and **oplogTs** exceeds `0`.
OplogTs *int `json:"oplogTs,omitempty"`
// Date and time from which MongoDB Cloud restored this snapshot. This parameter expresses this timestamp in the number of seconds that have elapsed since the UNIX epoch. The resource returns this parameter when `\"deliveryType\" : \"pointInTime\"` and **pointInTimeUTCSeconds** exceeds `0`.
PointInTimeUTCSeconds *int `json:"pointInTimeUTCSeconds,omitempty"`
// Unique 24-hexadecimal character string that identifies the snapshot.
SnapshotId *string `json:"snapshotId,omitempty"`
// Human-readable label that identifies the target cluster to which the restore job restores the snapshot. The resource returns this parameter when `\"deliveryType\":` `\"automated\"`. Required for `automated` and `pointInTime` restore types.
TargetClusterName *string `json:"targetClusterName,omitempty"`
// Unique 24-hexadecimal digit string that identifies the target project for the specified **targetClusterName**. Required for `automated` and `pointInTime` restore types.
TargetGroupId *string `json:"targetGroupId,omitempty"`
// Date and time when MongoDB Cloud took the snapshot associated with **snapshotId**. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
// Read only field.
Timestamp *time.Time `json:"timestamp,omitempty"`
}
// NewDiskBackupSnapshotRestoreJob instantiates a new DiskBackupSnapshotRestoreJob 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 NewDiskBackupSnapshotRestoreJob(deliveryType string) *DiskBackupSnapshotRestoreJob {
this := DiskBackupSnapshotRestoreJob{}
this.DeliveryType = deliveryType
return &this
}
// NewDiskBackupSnapshotRestoreJobWithDefaults instantiates a new DiskBackupSnapshotRestoreJob 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 NewDiskBackupSnapshotRestoreJobWithDefaults() *DiskBackupSnapshotRestoreJob {
this := DiskBackupSnapshotRestoreJob{}
return &this
}
// GetCancelled returns the Cancelled field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetCancelled() bool {
if o == nil || IsNil(o.Cancelled) {
var ret bool
return ret
}
return *o.Cancelled
}
// GetCancelledOk returns a tuple with the Cancelled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetCancelledOk() (*bool, bool) {
if o == nil || IsNil(o.Cancelled) {
return nil, false
}
return o.Cancelled, true
}
// HasCancelled returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasCancelled() bool {
if o != nil && !IsNil(o.Cancelled) {
return true
}
return false
}
// SetCancelled gets a reference to the given bool and assigns it to the Cancelled field.
func (o *DiskBackupSnapshotRestoreJob) SetCancelled(v bool) {
o.Cancelled = &v
}
// GetComponents returns the Components field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetComponents() []DiskBackupBaseRestoreMember {
if o == nil || IsNil(o.Components) {
var ret []DiskBackupBaseRestoreMember
return ret
}
return *o.Components
}
// GetComponentsOk returns a tuple with the Components field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetComponentsOk() (*[]DiskBackupBaseRestoreMember, bool) {
if o == nil || IsNil(o.Components) {
return nil, false
}
return o.Components, true
}
// HasComponents returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasComponents() bool {
if o != nil && !IsNil(o.Components) {
return true
}
return false
}
// SetComponents gets a reference to the given []DiskBackupBaseRestoreMember and assigns it to the Components field.
func (o *DiskBackupSnapshotRestoreJob) SetComponents(v []DiskBackupBaseRestoreMember) {
o.Components = &v
}
// GetDeliveryType returns the DeliveryType field value
func (o *DiskBackupSnapshotRestoreJob) GetDeliveryType() string {
if o == nil {
var ret string
return ret
}
return o.DeliveryType
}
// GetDeliveryTypeOk returns a tuple with the DeliveryType field value
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetDeliveryTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DeliveryType, true
}
// SetDeliveryType sets field value
func (o *DiskBackupSnapshotRestoreJob) SetDeliveryType(v string) {
o.DeliveryType = v
}
// GetDeliveryUrl returns the DeliveryUrl field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetDeliveryUrl() []string {
if o == nil || IsNil(o.DeliveryUrl) {
var ret []string
return ret
}
return *o.DeliveryUrl
}
// GetDeliveryUrlOk returns a tuple with the DeliveryUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetDeliveryUrlOk() (*[]string, bool) {
if o == nil || IsNil(o.DeliveryUrl) {
return nil, false
}
return o.DeliveryUrl, true
}
// HasDeliveryUrl returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasDeliveryUrl() bool {
if o != nil && !IsNil(o.DeliveryUrl) {
return true
}
return false
}
// SetDeliveryUrl gets a reference to the given []string and assigns it to the DeliveryUrl field.
func (o *DiskBackupSnapshotRestoreJob) SetDeliveryUrl(v []string) {
o.DeliveryUrl = &v
}
// GetDesiredTimestamp returns the DesiredTimestamp field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetDesiredTimestamp() ApiBSONTimestamp {
if o == nil || IsNil(o.DesiredTimestamp) {
var ret ApiBSONTimestamp
return ret
}
return *o.DesiredTimestamp
}
// GetDesiredTimestampOk returns a tuple with the DesiredTimestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetDesiredTimestampOk() (*ApiBSONTimestamp, bool) {
if o == nil || IsNil(o.DesiredTimestamp) {
return nil, false
}
return o.DesiredTimestamp, true
}
// HasDesiredTimestamp returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasDesiredTimestamp() bool {
if o != nil && !IsNil(o.DesiredTimestamp) {
return true
}
return false
}
// SetDesiredTimestamp gets a reference to the given ApiBSONTimestamp and assigns it to the DesiredTimestamp field.
func (o *DiskBackupSnapshotRestoreJob) SetDesiredTimestamp(v ApiBSONTimestamp) {
o.DesiredTimestamp = &v
}
// GetExpired returns the Expired field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetExpired() bool {
if o == nil || IsNil(o.Expired) {
var ret bool
return ret
}
return *o.Expired
}
// GetExpiredOk returns a tuple with the Expired field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetExpiredOk() (*bool, bool) {
if o == nil || IsNil(o.Expired) {
return nil, false
}
return o.Expired, true
}
// HasExpired returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasExpired() bool {
if o != nil && !IsNil(o.Expired) {
return true
}
return false
}
// SetExpired gets a reference to the given bool and assigns it to the Expired field.
func (o *DiskBackupSnapshotRestoreJob) SetExpired(v bool) {
o.Expired = &v
}
// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetExpiresAt() time.Time {
if o == nil || IsNil(o.ExpiresAt) {
var ret time.Time
return ret
}
return *o.ExpiresAt
}
// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetExpiresAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.ExpiresAt) {
return nil, false
}
return o.ExpiresAt, true
}
// HasExpiresAt returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasExpiresAt() bool {
if o != nil && !IsNil(o.ExpiresAt) {
return true
}
return false
}
// SetExpiresAt gets a reference to the given time.Time and assigns it to the ExpiresAt field.
func (o *DiskBackupSnapshotRestoreJob) SetExpiresAt(v time.Time) {
o.ExpiresAt = &v
}
// GetFailed returns the Failed field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetFailed() bool {
if o == nil || IsNil(o.Failed) {
var ret bool
return ret
}
return *o.Failed
}
// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetFailedOk() (*bool, bool) {
if o == nil || IsNil(o.Failed) {
return nil, false
}
return o.Failed, true
}
// HasFailed returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasFailed() bool {
if o != nil && !IsNil(o.Failed) {
return true
}
return false
}
// SetFailed gets a reference to the given bool and assigns it to the Failed field.
func (o *DiskBackupSnapshotRestoreJob) SetFailed(v bool) {
o.Failed = &v
}
// GetFinishedAt returns the FinishedAt field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetFinishedAt() time.Time {
if o == nil || IsNil(o.FinishedAt) {
var ret time.Time
return ret
}
return *o.FinishedAt
}
// GetFinishedAtOk returns a tuple with the FinishedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetFinishedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.FinishedAt) {
return nil, false
}
return o.FinishedAt, true
}
// HasFinishedAt returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasFinishedAt() bool {
if o != nil && !IsNil(o.FinishedAt) {
return true
}
return false
}
// SetFinishedAt gets a reference to the given time.Time and assigns it to the FinishedAt field.
func (o *DiskBackupSnapshotRestoreJob) SetFinishedAt(v time.Time) {
o.FinishedAt = &v
}
// GetId returns the Id field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *DiskBackupSnapshotRestoreJob) SetId(v string) {
o.Id = &v
}
// GetLinks returns the Links field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetLinks() []Link {
if o == nil || IsNil(o.Links) {
var ret []Link
return ret
}
return *o.Links
}
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetLinksOk() (*[]Link, bool) {
if o == nil || IsNil(o.Links) {
return nil, false
}
return o.Links, true
}
// HasLinks returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasLinks() bool {
if o != nil && !IsNil(o.Links) {
return true
}
return false
}
// SetLinks gets a reference to the given []Link and assigns it to the Links field.
func (o *DiskBackupSnapshotRestoreJob) SetLinks(v []Link) {
o.Links = &v
}
// GetOplogInc returns the OplogInc field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetOplogInc() int {
if o == nil || IsNil(o.OplogInc) {
var ret int
return ret
}
return *o.OplogInc
}
// GetOplogIncOk returns a tuple with the OplogInc field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetOplogIncOk() (*int, bool) {
if o == nil || IsNil(o.OplogInc) {
return nil, false
}
return o.OplogInc, true
}
// HasOplogInc returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasOplogInc() bool {
if o != nil && !IsNil(o.OplogInc) {
return true
}
return false
}
// SetOplogInc gets a reference to the given int and assigns it to the OplogInc field.
func (o *DiskBackupSnapshotRestoreJob) SetOplogInc(v int) {
o.OplogInc = &v
}
// GetOplogTs returns the OplogTs field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetOplogTs() int {
if o == nil || IsNil(o.OplogTs) {
var ret int
return ret
}
return *o.OplogTs
}
// GetOplogTsOk returns a tuple with the OplogTs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetOplogTsOk() (*int, bool) {
if o == nil || IsNil(o.OplogTs) {
return nil, false
}
return o.OplogTs, true
}
// HasOplogTs returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasOplogTs() bool {
if o != nil && !IsNil(o.OplogTs) {
return true
}
return false
}
// SetOplogTs gets a reference to the given int and assigns it to the OplogTs field.
func (o *DiskBackupSnapshotRestoreJob) SetOplogTs(v int) {
o.OplogTs = &v
}
// GetPointInTimeUTCSeconds returns the PointInTimeUTCSeconds field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetPointInTimeUTCSeconds() int {
if o == nil || IsNil(o.PointInTimeUTCSeconds) {
var ret int
return ret
}
return *o.PointInTimeUTCSeconds
}
// GetPointInTimeUTCSecondsOk returns a tuple with the PointInTimeUTCSeconds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetPointInTimeUTCSecondsOk() (*int, bool) {
if o == nil || IsNil(o.PointInTimeUTCSeconds) {
return nil, false
}
return o.PointInTimeUTCSeconds, true
}
// HasPointInTimeUTCSeconds returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasPointInTimeUTCSeconds() bool {
if o != nil && !IsNil(o.PointInTimeUTCSeconds) {
return true
}
return false
}
// SetPointInTimeUTCSeconds gets a reference to the given int and assigns it to the PointInTimeUTCSeconds field.
func (o *DiskBackupSnapshotRestoreJob) SetPointInTimeUTCSeconds(v int) {
o.PointInTimeUTCSeconds = &v
}
// GetSnapshotId returns the SnapshotId field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetSnapshotId() string {
if o == nil || IsNil(o.SnapshotId) {
var ret string
return ret
}
return *o.SnapshotId
}
// GetSnapshotIdOk returns a tuple with the SnapshotId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetSnapshotIdOk() (*string, bool) {
if o == nil || IsNil(o.SnapshotId) {
return nil, false
}
return o.SnapshotId, true
}
// HasSnapshotId returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasSnapshotId() bool {
if o != nil && !IsNil(o.SnapshotId) {
return true
}
return false
}
// SetSnapshotId gets a reference to the given string and assigns it to the SnapshotId field.
func (o *DiskBackupSnapshotRestoreJob) SetSnapshotId(v string) {
o.SnapshotId = &v
}
// GetTargetClusterName returns the TargetClusterName field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetTargetClusterName() string {
if o == nil || IsNil(o.TargetClusterName) {
var ret string
return ret
}
return *o.TargetClusterName
}
// GetTargetClusterNameOk returns a tuple with the TargetClusterName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetTargetClusterNameOk() (*string, bool) {
if o == nil || IsNil(o.TargetClusterName) {
return nil, false
}
return o.TargetClusterName, true
}
// HasTargetClusterName returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasTargetClusterName() bool {
if o != nil && !IsNil(o.TargetClusterName) {
return true
}
return false
}
// SetTargetClusterName gets a reference to the given string and assigns it to the TargetClusterName field.
func (o *DiskBackupSnapshotRestoreJob) SetTargetClusterName(v string) {
o.TargetClusterName = &v
}
// GetTargetGroupId returns the TargetGroupId field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetTargetGroupId() string {
if o == nil || IsNil(o.TargetGroupId) {
var ret string
return ret
}
return *o.TargetGroupId
}
// GetTargetGroupIdOk returns a tuple with the TargetGroupId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetTargetGroupIdOk() (*string, bool) {
if o == nil || IsNil(o.TargetGroupId) {
return nil, false
}
return o.TargetGroupId, true
}
// HasTargetGroupId returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasTargetGroupId() bool {
if o != nil && !IsNil(o.TargetGroupId) {
return true
}
return false
}
// SetTargetGroupId gets a reference to the given string and assigns it to the TargetGroupId field.
func (o *DiskBackupSnapshotRestoreJob) SetTargetGroupId(v string) {
o.TargetGroupId = &v
}
// GetTimestamp returns the Timestamp field value if set, zero value otherwise
func (o *DiskBackupSnapshotRestoreJob) GetTimestamp() time.Time {
if o == nil || IsNil(o.Timestamp) {
var ret time.Time
return ret
}
return *o.Timestamp
}
// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskBackupSnapshotRestoreJob) GetTimestampOk() (*time.Time, bool) {
if o == nil || IsNil(o.Timestamp) {
return nil, false
}
return o.Timestamp, true
}
// HasTimestamp returns a boolean if a field has been set.
func (o *DiskBackupSnapshotRestoreJob) HasTimestamp() bool {
if o != nil && !IsNil(o.Timestamp) {
return true
}
return false
}
// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field.
func (o *DiskBackupSnapshotRestoreJob) SetTimestamp(v time.Time) {
o.Timestamp = &v
}
func (o DiskBackupSnapshotRestoreJob) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DiskBackupSnapshotRestoreJob) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["deliveryType"] = o.DeliveryType
if !IsNil(o.DesiredTimestamp) {
toSerialize["desiredTimestamp"] = o.DesiredTimestamp
}
if !IsNil(o.OplogInc) {
toSerialize["oplogInc"] = o.OplogInc
}
if !IsNil(o.OplogTs) {
toSerialize["oplogTs"] = o.OplogTs
}
if !IsNil(o.PointInTimeUTCSeconds) {
toSerialize["pointInTimeUTCSeconds"] = o.PointInTimeUTCSeconds
}
if !IsNil(o.SnapshotId) {
toSerialize["snapshotId"] = o.SnapshotId
}
if !IsNil(o.TargetClusterName) {
toSerialize["targetClusterName"] = o.TargetClusterName
}
if !IsNil(o.TargetGroupId) {
toSerialize["targetGroupId"] = o.TargetGroupId
}
return toSerialize, nil
}