forked from muxinc/mux-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_incident.go
835 lines (713 loc) · 23 KB
/
model_incident.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
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
/*
* Mux API
*
* Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
*
* API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package muxgo
import (
"encoding/json"
)
// Incident struct for Incident
type Incident struct {
Threshold *float64 `json:"threshold,omitempty"`
Status *string `json:"status,omitempty"`
StartedAt *string `json:"started_at,omitempty"`
Severity *string `json:"severity,omitempty"`
SampleSizeUnit *string `json:"sample_size_unit,omitempty"`
SampleSize *int64 `json:"sample_size,omitempty"`
ResolvedAt *string `json:"resolved_at,omitempty"`
Notifications *[]IncidentNotification `json:"notifications,omitempty"`
NotificationRules *[]IncidentNotificationRule `json:"notification_rules,omitempty"`
Measurement *string `json:"measurement,omitempty"`
MeasuredValueOnClose *float64 `json:"measured_value_on_close,omitempty"`
MeasuredValue *float64 `json:"measured_value,omitempty"`
IncidentKey *string `json:"incident_key,omitempty"`
Impact *string `json:"impact,omitempty"`
Id *string `json:"id,omitempty"`
ErrorDescription *string `json:"error_description,omitempty"`
Description *string `json:"description,omitempty"`
Breakdowns *[]IncidentBreakdown `json:"breakdowns,omitempty"`
AffectedViewsPerHourOnOpen *int64 `json:"affected_views_per_hour_on_open,omitempty"`
AffectedViewsPerHour *int64 `json:"affected_views_per_hour,omitempty"`
AffectedViews *int64 `json:"affected_views,omitempty"`
}
// NewIncident instantiates a new Incident 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 NewIncident() *Incident {
this := Incident{}
return &this
}
// NewIncidentWithDefaults instantiates a new Incident 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 NewIncidentWithDefaults() *Incident {
this := Incident{}
return &this
}
// GetThreshold returns the Threshold field value if set, zero value otherwise.
func (o *Incident) GetThreshold() float64 {
if o == nil || o.Threshold == nil {
var ret float64
return ret
}
return *o.Threshold
}
// GetThresholdOk returns a tuple with the Threshold field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetThresholdOk() (*float64, bool) {
if o == nil || o.Threshold == nil {
return nil, false
}
return o.Threshold, true
}
// HasThreshold returns a boolean if a field has been set.
func (o *Incident) HasThreshold() bool {
if o != nil && o.Threshold != nil {
return true
}
return false
}
// SetThreshold gets a reference to the given float64 and assigns it to the Threshold field.
func (o *Incident) SetThreshold(v float64) {
o.Threshold = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *Incident) GetStatus() string {
if o == nil || o.Status == nil {
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 *Incident) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *Incident) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *Incident) SetStatus(v string) {
o.Status = &v
}
// GetStartedAt returns the StartedAt field value if set, zero value otherwise.
func (o *Incident) GetStartedAt() string {
if o == nil || o.StartedAt == nil {
var ret string
return ret
}
return *o.StartedAt
}
// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetStartedAtOk() (*string, bool) {
if o == nil || o.StartedAt == nil {
return nil, false
}
return o.StartedAt, true
}
// HasStartedAt returns a boolean if a field has been set.
func (o *Incident) HasStartedAt() bool {
if o != nil && o.StartedAt != nil {
return true
}
return false
}
// SetStartedAt gets a reference to the given string and assigns it to the StartedAt field.
func (o *Incident) SetStartedAt(v string) {
o.StartedAt = &v
}
// GetSeverity returns the Severity field value if set, zero value otherwise.
func (o *Incident) GetSeverity() string {
if o == nil || o.Severity == nil {
var ret string
return ret
}
return *o.Severity
}
// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetSeverityOk() (*string, bool) {
if o == nil || o.Severity == nil {
return nil, false
}
return o.Severity, true
}
// HasSeverity returns a boolean if a field has been set.
func (o *Incident) HasSeverity() bool {
if o != nil && o.Severity != nil {
return true
}
return false
}
// SetSeverity gets a reference to the given string and assigns it to the Severity field.
func (o *Incident) SetSeverity(v string) {
o.Severity = &v
}
// GetSampleSizeUnit returns the SampleSizeUnit field value if set, zero value otherwise.
func (o *Incident) GetSampleSizeUnit() string {
if o == nil || o.SampleSizeUnit == nil {
var ret string
return ret
}
return *o.SampleSizeUnit
}
// GetSampleSizeUnitOk returns a tuple with the SampleSizeUnit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetSampleSizeUnitOk() (*string, bool) {
if o == nil || o.SampleSizeUnit == nil {
return nil, false
}
return o.SampleSizeUnit, true
}
// HasSampleSizeUnit returns a boolean if a field has been set.
func (o *Incident) HasSampleSizeUnit() bool {
if o != nil && o.SampleSizeUnit != nil {
return true
}
return false
}
// SetSampleSizeUnit gets a reference to the given string and assigns it to the SampleSizeUnit field.
func (o *Incident) SetSampleSizeUnit(v string) {
o.SampleSizeUnit = &v
}
// GetSampleSize returns the SampleSize field value if set, zero value otherwise.
func (o *Incident) GetSampleSize() int64 {
if o == nil || o.SampleSize == nil {
var ret int64
return ret
}
return *o.SampleSize
}
// GetSampleSizeOk returns a tuple with the SampleSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetSampleSizeOk() (*int64, bool) {
if o == nil || o.SampleSize == nil {
return nil, false
}
return o.SampleSize, true
}
// HasSampleSize returns a boolean if a field has been set.
func (o *Incident) HasSampleSize() bool {
if o != nil && o.SampleSize != nil {
return true
}
return false
}
// SetSampleSize gets a reference to the given int64 and assigns it to the SampleSize field.
func (o *Incident) SetSampleSize(v int64) {
o.SampleSize = &v
}
// GetResolvedAt returns the ResolvedAt field value if set, zero value otherwise.
func (o *Incident) GetResolvedAt() string {
if o == nil || o.ResolvedAt == nil {
var ret string
return ret
}
return *o.ResolvedAt
}
// GetResolvedAtOk returns a tuple with the ResolvedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetResolvedAtOk() (*string, bool) {
if o == nil || o.ResolvedAt == nil {
return nil, false
}
return o.ResolvedAt, true
}
// HasResolvedAt returns a boolean if a field has been set.
func (o *Incident) HasResolvedAt() bool {
if o != nil && o.ResolvedAt != nil {
return true
}
return false
}
// SetResolvedAt gets a reference to the given string and assigns it to the ResolvedAt field.
func (o *Incident) SetResolvedAt(v string) {
o.ResolvedAt = &v
}
// GetNotifications returns the Notifications field value if set, zero value otherwise.
func (o *Incident) GetNotifications() []IncidentNotification {
if o == nil || o.Notifications == nil {
var ret []IncidentNotification
return ret
}
return *o.Notifications
}
// GetNotificationsOk returns a tuple with the Notifications field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetNotificationsOk() (*[]IncidentNotification, bool) {
if o == nil || o.Notifications == nil {
return nil, false
}
return o.Notifications, true
}
// HasNotifications returns a boolean if a field has been set.
func (o *Incident) HasNotifications() bool {
if o != nil && o.Notifications != nil {
return true
}
return false
}
// SetNotifications gets a reference to the given []IncidentNotification and assigns it to the Notifications field.
func (o *Incident) SetNotifications(v []IncidentNotification) {
o.Notifications = &v
}
// GetNotificationRules returns the NotificationRules field value if set, zero value otherwise.
func (o *Incident) GetNotificationRules() []IncidentNotificationRule {
if o == nil || o.NotificationRules == nil {
var ret []IncidentNotificationRule
return ret
}
return *o.NotificationRules
}
// GetNotificationRulesOk returns a tuple with the NotificationRules field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetNotificationRulesOk() (*[]IncidentNotificationRule, bool) {
if o == nil || o.NotificationRules == nil {
return nil, false
}
return o.NotificationRules, true
}
// HasNotificationRules returns a boolean if a field has been set.
func (o *Incident) HasNotificationRules() bool {
if o != nil && o.NotificationRules != nil {
return true
}
return false
}
// SetNotificationRules gets a reference to the given []IncidentNotificationRule and assigns it to the NotificationRules field.
func (o *Incident) SetNotificationRules(v []IncidentNotificationRule) {
o.NotificationRules = &v
}
// GetMeasurement returns the Measurement field value if set, zero value otherwise.
func (o *Incident) GetMeasurement() string {
if o == nil || o.Measurement == nil {
var ret string
return ret
}
return *o.Measurement
}
// GetMeasurementOk returns a tuple with the Measurement field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetMeasurementOk() (*string, bool) {
if o == nil || o.Measurement == nil {
return nil, false
}
return o.Measurement, true
}
// HasMeasurement returns a boolean if a field has been set.
func (o *Incident) HasMeasurement() bool {
if o != nil && o.Measurement != nil {
return true
}
return false
}
// SetMeasurement gets a reference to the given string and assigns it to the Measurement field.
func (o *Incident) SetMeasurement(v string) {
o.Measurement = &v
}
// GetMeasuredValueOnClose returns the MeasuredValueOnClose field value if set, zero value otherwise.
func (o *Incident) GetMeasuredValueOnClose() float64 {
if o == nil || o.MeasuredValueOnClose == nil {
var ret float64
return ret
}
return *o.MeasuredValueOnClose
}
// GetMeasuredValueOnCloseOk returns a tuple with the MeasuredValueOnClose field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetMeasuredValueOnCloseOk() (*float64, bool) {
if o == nil || o.MeasuredValueOnClose == nil {
return nil, false
}
return o.MeasuredValueOnClose, true
}
// HasMeasuredValueOnClose returns a boolean if a field has been set.
func (o *Incident) HasMeasuredValueOnClose() bool {
if o != nil && o.MeasuredValueOnClose != nil {
return true
}
return false
}
// SetMeasuredValueOnClose gets a reference to the given float64 and assigns it to the MeasuredValueOnClose field.
func (o *Incident) SetMeasuredValueOnClose(v float64) {
o.MeasuredValueOnClose = &v
}
// GetMeasuredValue returns the MeasuredValue field value if set, zero value otherwise.
func (o *Incident) GetMeasuredValue() float64 {
if o == nil || o.MeasuredValue == nil {
var ret float64
return ret
}
return *o.MeasuredValue
}
// GetMeasuredValueOk returns a tuple with the MeasuredValue field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetMeasuredValueOk() (*float64, bool) {
if o == nil || o.MeasuredValue == nil {
return nil, false
}
return o.MeasuredValue, true
}
// HasMeasuredValue returns a boolean if a field has been set.
func (o *Incident) HasMeasuredValue() bool {
if o != nil && o.MeasuredValue != nil {
return true
}
return false
}
// SetMeasuredValue gets a reference to the given float64 and assigns it to the MeasuredValue field.
func (o *Incident) SetMeasuredValue(v float64) {
o.MeasuredValue = &v
}
// GetIncidentKey returns the IncidentKey field value if set, zero value otherwise.
func (o *Incident) GetIncidentKey() string {
if o == nil || o.IncidentKey == nil {
var ret string
return ret
}
return *o.IncidentKey
}
// GetIncidentKeyOk returns a tuple with the IncidentKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetIncidentKeyOk() (*string, bool) {
if o == nil || o.IncidentKey == nil {
return nil, false
}
return o.IncidentKey, true
}
// HasIncidentKey returns a boolean if a field has been set.
func (o *Incident) HasIncidentKey() bool {
if o != nil && o.IncidentKey != nil {
return true
}
return false
}
// SetIncidentKey gets a reference to the given string and assigns it to the IncidentKey field.
func (o *Incident) SetIncidentKey(v string) {
o.IncidentKey = &v
}
// GetImpact returns the Impact field value if set, zero value otherwise.
func (o *Incident) GetImpact() string {
if o == nil || o.Impact == nil {
var ret string
return ret
}
return *o.Impact
}
// GetImpactOk returns a tuple with the Impact field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetImpactOk() (*string, bool) {
if o == nil || o.Impact == nil {
return nil, false
}
return o.Impact, true
}
// HasImpact returns a boolean if a field has been set.
func (o *Incident) HasImpact() bool {
if o != nil && o.Impact != nil {
return true
}
return false
}
// SetImpact gets a reference to the given string and assigns it to the Impact field.
func (o *Incident) SetImpact(v string) {
o.Impact = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Incident) GetId() string {
if o == nil || o.Id == nil {
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 *Incident) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *Incident) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Incident) SetId(v string) {
o.Id = &v
}
// GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise.
func (o *Incident) GetErrorDescription() string {
if o == nil || o.ErrorDescription == nil {
var ret string
return ret
}
return *o.ErrorDescription
}
// GetErrorDescriptionOk returns a tuple with the ErrorDescription field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetErrorDescriptionOk() (*string, bool) {
if o == nil || o.ErrorDescription == nil {
return nil, false
}
return o.ErrorDescription, true
}
// HasErrorDescription returns a boolean if a field has been set.
func (o *Incident) HasErrorDescription() bool {
if o != nil && o.ErrorDescription != nil {
return true
}
return false
}
// SetErrorDescription gets a reference to the given string and assigns it to the ErrorDescription field.
func (o *Incident) SetErrorDescription(v string) {
o.ErrorDescription = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Incident) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *Incident) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Incident) SetDescription(v string) {
o.Description = &v
}
// GetBreakdowns returns the Breakdowns field value if set, zero value otherwise.
func (o *Incident) GetBreakdowns() []IncidentBreakdown {
if o == nil || o.Breakdowns == nil {
var ret []IncidentBreakdown
return ret
}
return *o.Breakdowns
}
// GetBreakdownsOk returns a tuple with the Breakdowns field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetBreakdownsOk() (*[]IncidentBreakdown, bool) {
if o == nil || o.Breakdowns == nil {
return nil, false
}
return o.Breakdowns, true
}
// HasBreakdowns returns a boolean if a field has been set.
func (o *Incident) HasBreakdowns() bool {
if o != nil && o.Breakdowns != nil {
return true
}
return false
}
// SetBreakdowns gets a reference to the given []IncidentBreakdown and assigns it to the Breakdowns field.
func (o *Incident) SetBreakdowns(v []IncidentBreakdown) {
o.Breakdowns = &v
}
// GetAffectedViewsPerHourOnOpen returns the AffectedViewsPerHourOnOpen field value if set, zero value otherwise.
func (o *Incident) GetAffectedViewsPerHourOnOpen() int64 {
if o == nil || o.AffectedViewsPerHourOnOpen == nil {
var ret int64
return ret
}
return *o.AffectedViewsPerHourOnOpen
}
// GetAffectedViewsPerHourOnOpenOk returns a tuple with the AffectedViewsPerHourOnOpen field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetAffectedViewsPerHourOnOpenOk() (*int64, bool) {
if o == nil || o.AffectedViewsPerHourOnOpen == nil {
return nil, false
}
return o.AffectedViewsPerHourOnOpen, true
}
// HasAffectedViewsPerHourOnOpen returns a boolean if a field has been set.
func (o *Incident) HasAffectedViewsPerHourOnOpen() bool {
if o != nil && o.AffectedViewsPerHourOnOpen != nil {
return true
}
return false
}
// SetAffectedViewsPerHourOnOpen gets a reference to the given int64 and assigns it to the AffectedViewsPerHourOnOpen field.
func (o *Incident) SetAffectedViewsPerHourOnOpen(v int64) {
o.AffectedViewsPerHourOnOpen = &v
}
// GetAffectedViewsPerHour returns the AffectedViewsPerHour field value if set, zero value otherwise.
func (o *Incident) GetAffectedViewsPerHour() int64 {
if o == nil || o.AffectedViewsPerHour == nil {
var ret int64
return ret
}
return *o.AffectedViewsPerHour
}
// GetAffectedViewsPerHourOk returns a tuple with the AffectedViewsPerHour field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetAffectedViewsPerHourOk() (*int64, bool) {
if o == nil || o.AffectedViewsPerHour == nil {
return nil, false
}
return o.AffectedViewsPerHour, true
}
// HasAffectedViewsPerHour returns a boolean if a field has been set.
func (o *Incident) HasAffectedViewsPerHour() bool {
if o != nil && o.AffectedViewsPerHour != nil {
return true
}
return false
}
// SetAffectedViewsPerHour gets a reference to the given int64 and assigns it to the AffectedViewsPerHour field.
func (o *Incident) SetAffectedViewsPerHour(v int64) {
o.AffectedViewsPerHour = &v
}
// GetAffectedViews returns the AffectedViews field value if set, zero value otherwise.
func (o *Incident) GetAffectedViews() int64 {
if o == nil || o.AffectedViews == nil {
var ret int64
return ret
}
return *o.AffectedViews
}
// GetAffectedViewsOk returns a tuple with the AffectedViews field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Incident) GetAffectedViewsOk() (*int64, bool) {
if o == nil || o.AffectedViews == nil {
return nil, false
}
return o.AffectedViews, true
}
// HasAffectedViews returns a boolean if a field has been set.
func (o *Incident) HasAffectedViews() bool {
if o != nil && o.AffectedViews != nil {
return true
}
return false
}
// SetAffectedViews gets a reference to the given int64 and assigns it to the AffectedViews field.
func (o *Incident) SetAffectedViews(v int64) {
o.AffectedViews = &v
}
func (o Incident) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Threshold != nil {
toSerialize["threshold"] = o.Threshold
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
if o.StartedAt != nil {
toSerialize["started_at"] = o.StartedAt
}
if o.Severity != nil {
toSerialize["severity"] = o.Severity
}
if o.SampleSizeUnit != nil {
toSerialize["sample_size_unit"] = o.SampleSizeUnit
}
if o.SampleSize != nil {
toSerialize["sample_size"] = o.SampleSize
}
if o.ResolvedAt != nil {
toSerialize["resolved_at"] = o.ResolvedAt
}
if o.Notifications != nil {
toSerialize["notifications"] = o.Notifications
}
if o.NotificationRules != nil {
toSerialize["notification_rules"] = o.NotificationRules
}
if o.Measurement != nil {
toSerialize["measurement"] = o.Measurement
}
if o.MeasuredValueOnClose != nil {
toSerialize["measured_value_on_close"] = o.MeasuredValueOnClose
}
if o.MeasuredValue != nil {
toSerialize["measured_value"] = o.MeasuredValue
}
if o.IncidentKey != nil {
toSerialize["incident_key"] = o.IncidentKey
}
if o.Impact != nil {
toSerialize["impact"] = o.Impact
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.ErrorDescription != nil {
toSerialize["error_description"] = o.ErrorDescription
}
if o.Description != nil {
toSerialize["description"] = o.Description
}
if o.Breakdowns != nil {
toSerialize["breakdowns"] = o.Breakdowns
}
if o.AffectedViewsPerHourOnOpen != nil {
toSerialize["affected_views_per_hour_on_open"] = o.AffectedViewsPerHourOnOpen
}
if o.AffectedViewsPerHour != nil {
toSerialize["affected_views_per_hour"] = o.AffectedViewsPerHour
}
if o.AffectedViews != nil {
toSerialize["affected_views"] = o.AffectedViews
}
return json.Marshal(toSerialize)
}
type NullableIncident struct {
value *Incident
isSet bool
}
func (v NullableIncident) Get() *Incident {
return v.value
}
func (v *NullableIncident) Set(val *Incident) {
v.value = val
v.isSet = true
}
func (v NullableIncident) IsSet() bool {
return v.isSet
}
func (v *NullableIncident) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIncident(val *Incident) *NullableIncident {
return &NullableIncident{value: val, isSet: true}
}
func (v NullableIncident) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIncident) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}