generated from delphix/.github
/
model_hyperscale_task_event.go
608 lines (517 loc) · 17.5 KB
/
model_hyperscale_task_event.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
/*
Delphix DCT API
Delphix DCT API
API version: 3.5.0
Contact: support@delphix.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package delphix_dct_api
import (
"encoding/json"
"time"
)
// checks if the HyperscaleTaskEvent type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &HyperscaleTaskEvent{}
// HyperscaleTaskEvent struct for HyperscaleTaskEvent
type HyperscaleTaskEvent struct {
// Name of the task (Unload, Masking, Load, Post-Load)
Name *string `json:"name,omitempty"`
// progress of the task (between 0 and 1)
Progress *float32 `json:"progress,omitempty"`
Status *string `json:"status,omitempty"`
// The number of objects (tables) already processed by this task.
ProcessedObjects *int64 `json:"processed_objects,omitempty"`
// The number of rows already processed by this task.
ProcessedRows *int64 `json:"processed_rows,omitempty"`
// The number of constraints processed by this task (Post-load task only)
ProcessedConstraints *int64 `json:"processed_constraints,omitempty"`
// The total number of constraints to be processed by this task (Post-load task only)
TotalConstraints *int64 `json:"total_constraints,omitempty"`
// The number of indexes processed by this task (Post-load task only)
ProcessedIndexes *int64 `json:"processed_indexes,omitempty"`
// The total number of indexes to be processed by this task (Post-load task only)
TotalIndexes *int64 `json:"total_indexes,omitempty"`
// The number of triggered processed by this task (Post-load task only)
ProcessedTriggers *int64 `json:"processed_triggers,omitempty"`
// The total number of triggers to be processed by this task (Post-load task only)
TotalTriggers *int64 `json:"total_triggers,omitempty"`
// The date and time that this task was started.
StartTime *time.Time `json:"start_time,omitempty"`
// The date and time that this task completed.
EndTime *time.Time `json:"end_time,omitempty"`
Errors []HyperscaleTaskError `json:"errors,omitempty"`
}
// NewHyperscaleTaskEvent instantiates a new HyperscaleTaskEvent 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 NewHyperscaleTaskEvent() *HyperscaleTaskEvent {
this := HyperscaleTaskEvent{}
return &this
}
// NewHyperscaleTaskEventWithDefaults instantiates a new HyperscaleTaskEvent 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 NewHyperscaleTaskEventWithDefaults() *HyperscaleTaskEvent {
this := HyperscaleTaskEvent{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *HyperscaleTaskEvent) SetName(v string) {
o.Name = &v
}
// GetProgress returns the Progress field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetProgress() float32 {
if o == nil || IsNil(o.Progress) {
var ret float32
return ret
}
return *o.Progress
}
// GetProgressOk returns a tuple with the Progress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetProgressOk() (*float32, bool) {
if o == nil || IsNil(o.Progress) {
return nil, false
}
return o.Progress, true
}
// HasProgress returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasProgress() bool {
if o != nil && !IsNil(o.Progress) {
return true
}
return false
}
// SetProgress gets a reference to the given float32 and assigns it to the Progress field.
func (o *HyperscaleTaskEvent) SetProgress(v float32) {
o.Progress = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *HyperscaleTaskEvent) SetStatus(v string) {
o.Status = &v
}
// GetProcessedObjects returns the ProcessedObjects field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetProcessedObjects() int64 {
if o == nil || IsNil(o.ProcessedObjects) {
var ret int64
return ret
}
return *o.ProcessedObjects
}
// GetProcessedObjectsOk returns a tuple with the ProcessedObjects field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetProcessedObjectsOk() (*int64, bool) {
if o == nil || IsNil(o.ProcessedObjects) {
return nil, false
}
return o.ProcessedObjects, true
}
// HasProcessedObjects returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasProcessedObjects() bool {
if o != nil && !IsNil(o.ProcessedObjects) {
return true
}
return false
}
// SetProcessedObjects gets a reference to the given int64 and assigns it to the ProcessedObjects field.
func (o *HyperscaleTaskEvent) SetProcessedObjects(v int64) {
o.ProcessedObjects = &v
}
// GetProcessedRows returns the ProcessedRows field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetProcessedRows() int64 {
if o == nil || IsNil(o.ProcessedRows) {
var ret int64
return ret
}
return *o.ProcessedRows
}
// GetProcessedRowsOk returns a tuple with the ProcessedRows field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetProcessedRowsOk() (*int64, bool) {
if o == nil || IsNil(o.ProcessedRows) {
return nil, false
}
return o.ProcessedRows, true
}
// HasProcessedRows returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasProcessedRows() bool {
if o != nil && !IsNil(o.ProcessedRows) {
return true
}
return false
}
// SetProcessedRows gets a reference to the given int64 and assigns it to the ProcessedRows field.
func (o *HyperscaleTaskEvent) SetProcessedRows(v int64) {
o.ProcessedRows = &v
}
// GetProcessedConstraints returns the ProcessedConstraints field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetProcessedConstraints() int64 {
if o == nil || IsNil(o.ProcessedConstraints) {
var ret int64
return ret
}
return *o.ProcessedConstraints
}
// GetProcessedConstraintsOk returns a tuple with the ProcessedConstraints field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetProcessedConstraintsOk() (*int64, bool) {
if o == nil || IsNil(o.ProcessedConstraints) {
return nil, false
}
return o.ProcessedConstraints, true
}
// HasProcessedConstraints returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasProcessedConstraints() bool {
if o != nil && !IsNil(o.ProcessedConstraints) {
return true
}
return false
}
// SetProcessedConstraints gets a reference to the given int64 and assigns it to the ProcessedConstraints field.
func (o *HyperscaleTaskEvent) SetProcessedConstraints(v int64) {
o.ProcessedConstraints = &v
}
// GetTotalConstraints returns the TotalConstraints field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetTotalConstraints() int64 {
if o == nil || IsNil(o.TotalConstraints) {
var ret int64
return ret
}
return *o.TotalConstraints
}
// GetTotalConstraintsOk returns a tuple with the TotalConstraints field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetTotalConstraintsOk() (*int64, bool) {
if o == nil || IsNil(o.TotalConstraints) {
return nil, false
}
return o.TotalConstraints, true
}
// HasTotalConstraints returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasTotalConstraints() bool {
if o != nil && !IsNil(o.TotalConstraints) {
return true
}
return false
}
// SetTotalConstraints gets a reference to the given int64 and assigns it to the TotalConstraints field.
func (o *HyperscaleTaskEvent) SetTotalConstraints(v int64) {
o.TotalConstraints = &v
}
// GetProcessedIndexes returns the ProcessedIndexes field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetProcessedIndexes() int64 {
if o == nil || IsNil(o.ProcessedIndexes) {
var ret int64
return ret
}
return *o.ProcessedIndexes
}
// GetProcessedIndexesOk returns a tuple with the ProcessedIndexes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetProcessedIndexesOk() (*int64, bool) {
if o == nil || IsNil(o.ProcessedIndexes) {
return nil, false
}
return o.ProcessedIndexes, true
}
// HasProcessedIndexes returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasProcessedIndexes() bool {
if o != nil && !IsNil(o.ProcessedIndexes) {
return true
}
return false
}
// SetProcessedIndexes gets a reference to the given int64 and assigns it to the ProcessedIndexes field.
func (o *HyperscaleTaskEvent) SetProcessedIndexes(v int64) {
o.ProcessedIndexes = &v
}
// GetTotalIndexes returns the TotalIndexes field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetTotalIndexes() int64 {
if o == nil || IsNil(o.TotalIndexes) {
var ret int64
return ret
}
return *o.TotalIndexes
}
// GetTotalIndexesOk returns a tuple with the TotalIndexes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetTotalIndexesOk() (*int64, bool) {
if o == nil || IsNil(o.TotalIndexes) {
return nil, false
}
return o.TotalIndexes, true
}
// HasTotalIndexes returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasTotalIndexes() bool {
if o != nil && !IsNil(o.TotalIndexes) {
return true
}
return false
}
// SetTotalIndexes gets a reference to the given int64 and assigns it to the TotalIndexes field.
func (o *HyperscaleTaskEvent) SetTotalIndexes(v int64) {
o.TotalIndexes = &v
}
// GetProcessedTriggers returns the ProcessedTriggers field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetProcessedTriggers() int64 {
if o == nil || IsNil(o.ProcessedTriggers) {
var ret int64
return ret
}
return *o.ProcessedTriggers
}
// GetProcessedTriggersOk returns a tuple with the ProcessedTriggers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetProcessedTriggersOk() (*int64, bool) {
if o == nil || IsNil(o.ProcessedTriggers) {
return nil, false
}
return o.ProcessedTriggers, true
}
// HasProcessedTriggers returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasProcessedTriggers() bool {
if o != nil && !IsNil(o.ProcessedTriggers) {
return true
}
return false
}
// SetProcessedTriggers gets a reference to the given int64 and assigns it to the ProcessedTriggers field.
func (o *HyperscaleTaskEvent) SetProcessedTriggers(v int64) {
o.ProcessedTriggers = &v
}
// GetTotalTriggers returns the TotalTriggers field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetTotalTriggers() int64 {
if o == nil || IsNil(o.TotalTriggers) {
var ret int64
return ret
}
return *o.TotalTriggers
}
// GetTotalTriggersOk returns a tuple with the TotalTriggers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetTotalTriggersOk() (*int64, bool) {
if o == nil || IsNil(o.TotalTriggers) {
return nil, false
}
return o.TotalTriggers, true
}
// HasTotalTriggers returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasTotalTriggers() bool {
if o != nil && !IsNil(o.TotalTriggers) {
return true
}
return false
}
// SetTotalTriggers gets a reference to the given int64 and assigns it to the TotalTriggers field.
func (o *HyperscaleTaskEvent) SetTotalTriggers(v int64) {
o.TotalTriggers = &v
}
// GetStartTime returns the StartTime field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetStartTime() time.Time {
if o == nil || IsNil(o.StartTime) {
var ret time.Time
return ret
}
return *o.StartTime
}
// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetStartTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.StartTime) {
return nil, false
}
return o.StartTime, true
}
// HasStartTime returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasStartTime() bool {
if o != nil && !IsNil(o.StartTime) {
return true
}
return false
}
// SetStartTime gets a reference to the given time.Time and assigns it to the StartTime field.
func (o *HyperscaleTaskEvent) SetStartTime(v time.Time) {
o.StartTime = &v
}
// GetEndTime returns the EndTime field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetEndTime() time.Time {
if o == nil || IsNil(o.EndTime) {
var ret time.Time
return ret
}
return *o.EndTime
}
// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetEndTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.EndTime) {
return nil, false
}
return o.EndTime, true
}
// HasEndTime returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasEndTime() bool {
if o != nil && !IsNil(o.EndTime) {
return true
}
return false
}
// SetEndTime gets a reference to the given time.Time and assigns it to the EndTime field.
func (o *HyperscaleTaskEvent) SetEndTime(v time.Time) {
o.EndTime = &v
}
// GetErrors returns the Errors field value if set, zero value otherwise.
func (o *HyperscaleTaskEvent) GetErrors() []HyperscaleTaskError {
if o == nil || IsNil(o.Errors) {
var ret []HyperscaleTaskError
return ret
}
return o.Errors
}
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HyperscaleTaskEvent) GetErrorsOk() ([]HyperscaleTaskError, bool) {
if o == nil || IsNil(o.Errors) {
return nil, false
}
return o.Errors, true
}
// HasErrors returns a boolean if a field has been set.
func (o *HyperscaleTaskEvent) HasErrors() bool {
if o != nil && !IsNil(o.Errors) {
return true
}
return false
}
// SetErrors gets a reference to the given []HyperscaleTaskError and assigns it to the Errors field.
func (o *HyperscaleTaskEvent) SetErrors(v []HyperscaleTaskError) {
o.Errors = v
}
func (o HyperscaleTaskEvent) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o HyperscaleTaskEvent) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Progress) {
toSerialize["progress"] = o.Progress
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.ProcessedObjects) {
toSerialize["processed_objects"] = o.ProcessedObjects
}
if !IsNil(o.ProcessedRows) {
toSerialize["processed_rows"] = o.ProcessedRows
}
if !IsNil(o.ProcessedConstraints) {
toSerialize["processed_constraints"] = o.ProcessedConstraints
}
if !IsNil(o.TotalConstraints) {
toSerialize["total_constraints"] = o.TotalConstraints
}
if !IsNil(o.ProcessedIndexes) {
toSerialize["processed_indexes"] = o.ProcessedIndexes
}
if !IsNil(o.TotalIndexes) {
toSerialize["total_indexes"] = o.TotalIndexes
}
if !IsNil(o.ProcessedTriggers) {
toSerialize["processed_triggers"] = o.ProcessedTriggers
}
if !IsNil(o.TotalTriggers) {
toSerialize["total_triggers"] = o.TotalTriggers
}
if !IsNil(o.StartTime) {
toSerialize["start_time"] = o.StartTime
}
if !IsNil(o.EndTime) {
toSerialize["end_time"] = o.EndTime
}
if !IsNil(o.Errors) {
toSerialize["errors"] = o.Errors
}
return toSerialize, nil
}
type NullableHyperscaleTaskEvent struct {
value *HyperscaleTaskEvent
isSet bool
}
func (v NullableHyperscaleTaskEvent) Get() *HyperscaleTaskEvent {
return v.value
}
func (v *NullableHyperscaleTaskEvent) Set(val *HyperscaleTaskEvent) {
v.value = val
v.isSet = true
}
func (v NullableHyperscaleTaskEvent) IsSet() bool {
return v.isSet
}
func (v *NullableHyperscaleTaskEvent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableHyperscaleTaskEvent(val *HyperscaleTaskEvent) *NullableHyperscaleTaskEvent {
return &NullableHyperscaleTaskEvent{value: val, isSet: true}
}
func (v NullableHyperscaleTaskEvent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableHyperscaleTaskEvent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}