-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_api_alert_view.go
772 lines (660 loc) · 23.1 KB
/
model_api_alert_view.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
/*
MongoDB Atlas Administration API
The MongoDB Atlas Administration API allows developers to manage all components in MongoDB Atlas. To learn more, review the [Administration API overview](https://www.mongodb.com/docs/atlas/api/atlas-admin-api/). This OpenAPI specification covers all of the collections with the exception of Alerts, Alert Configurations, and Events. Refer to the [legacy documentation](https://www.mongodb.com/docs/atlas/reference/api-resources/) for the specifications of these resources.
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
"time"
)
// ApiAlertView struct for ApiAlertView
type ApiAlertView struct {
// Date and time until which this alert has been acknowledged. This parameter expresses its value in the ISO 8601 timestamp format in UTC. The resource returns this parameter if a MongoDB User previously acknowledged this alert. - To acknowledge this alert forever, set the parameter value to 100 years in the future. - To unacknowledge a previously acknowledged alert, set the parameter value to a date in the past.
AcknowledgedUntil time.Time `json:"acknowledgedUntil"`
// Comment that a MongoDB Cloud user submitted when acknowledging the alert.
AcknowledgementComment *string `json:"acknowledgementComment,omitempty"`
// MongoDB Cloud username of the person who acknowledged the alert. The response returns this parameter if a MongoDB Cloud user previously acknowledged this alert.
AcknowledgingUsername *string `json:"acknowledgingUsername,omitempty"`
// Unique 24-hexadecimal digit string that identifies the alert configuration that sets this alert.
AlertConfigId *string `json:"alertConfigId,omitempty"`
// Human-readable label that identifies the cluster to which this alert applies. This resource returns this parameter for alerts of events impacting backups, replica sets, or sharded clusters.
ClusterName *string `json:"clusterName,omitempty"`
// Date and time when MongoDB Cloud created this alert. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
Created *time.Time `json:"created,omitempty"`
CurrentValue *ApiMetricValueView `json:"currentValue,omitempty"`
// Incident that triggered this alert.
EventTypeName *string `json:"eventTypeName,omitempty"`
// Unique 24-hexadecimal digit string that identifies the project that owns this alert.
GroupId *string `json:"groupId,omitempty"`
// Hostname and port of the host to which this alert applies. The resource returns this parameter for alerts of events impacting hosts or replica sets.
HostnameAndPort *string `json:"hostnameAndPort,omitempty"`
// Unique 24-hexadecimal digit string that identifies this alert.
Id *string `json:"id,omitempty"`
// Date and time that any notifications were last sent for this alert. This parameter expresses its value in the ISO 8601 timestamp format in UTC. The resource returns this parameter if MongoDB Cloud has sent notifications for this alert.
LastNotified *time.Time `json:"lastNotified,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.
Links []Link `json:"links"`
// Human-readable label that identifies the metric against which MongoDB Cloud checks the alert.
MetricName *string `json:"metricName,omitempty"`
// Name of the replica set to which this alert applies. The response returns this parameter for alerts of events impacting backups, hosts, or replica sets.
ReplicaSetName *string `json:"replicaSetName,omitempty"`
// Date and time that this alert changed to `\"status\" : \"CLOSED\"`. This parameter expresses its value in the ISO 8601 timestamp format in UTC. The resource returns this parameter once `\"status\" : \"CLOSED\"`.
Resolved *time.Time `json:"resolved,omitempty"`
// State of this alert at the time you requested its details.
Status *string `json:"status,omitempty"`
// Category in which MongoDB Cloud classifies this alert.
// Deprecated
TypeName *string `json:"typeName,omitempty"`
// Date and time when someone last updated this alert. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
Updated *time.Time `json:"updated,omitempty"`
}
// NewApiAlertView instantiates a new ApiAlertView 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 NewApiAlertView(acknowledgedUntil time.Time, links []Link) *ApiAlertView {
this := ApiAlertView{}
this.AcknowledgedUntil = acknowledgedUntil
this.Links = links
return &this
}
// NewApiAlertViewWithDefaults instantiates a new ApiAlertView 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 NewApiAlertViewWithDefaults() *ApiAlertView {
this := ApiAlertView{}
return &this
}
// GetAcknowledgedUntil returns the AcknowledgedUntil field value
func (o *ApiAlertView) GetAcknowledgedUntil() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.AcknowledgedUntil
}
// GetAcknowledgedUntilOk returns a tuple with the AcknowledgedUntil field value
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetAcknowledgedUntilOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.AcknowledgedUntil, true
}
// SetAcknowledgedUntil sets field value
func (o *ApiAlertView) SetAcknowledgedUntil(v time.Time) {
o.AcknowledgedUntil = v
}
// GetAcknowledgementComment returns the AcknowledgementComment field value if set, zero value otherwise.
func (o *ApiAlertView) GetAcknowledgementComment() string {
if o == nil || isNil(o.AcknowledgementComment) {
var ret string
return ret
}
return *o.AcknowledgementComment
}
// GetAcknowledgementCommentOk returns a tuple with the AcknowledgementComment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetAcknowledgementCommentOk() (*string, bool) {
if o == nil || isNil(o.AcknowledgementComment) {
return nil, false
}
return o.AcknowledgementComment, true
}
// HasAcknowledgementComment returns a boolean if a field has been set.
func (o *ApiAlertView) HasAcknowledgementComment() bool {
if o != nil && !isNil(o.AcknowledgementComment) {
return true
}
return false
}
// SetAcknowledgementComment gets a reference to the given string and assigns it to the AcknowledgementComment field.
func (o *ApiAlertView) SetAcknowledgementComment(v string) {
o.AcknowledgementComment = &v
}
// GetAcknowledgingUsername returns the AcknowledgingUsername field value if set, zero value otherwise.
func (o *ApiAlertView) GetAcknowledgingUsername() string {
if o == nil || isNil(o.AcknowledgingUsername) {
var ret string
return ret
}
return *o.AcknowledgingUsername
}
// GetAcknowledgingUsernameOk returns a tuple with the AcknowledgingUsername field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetAcknowledgingUsernameOk() (*string, bool) {
if o == nil || isNil(o.AcknowledgingUsername) {
return nil, false
}
return o.AcknowledgingUsername, true
}
// HasAcknowledgingUsername returns a boolean if a field has been set.
func (o *ApiAlertView) HasAcknowledgingUsername() bool {
if o != nil && !isNil(o.AcknowledgingUsername) {
return true
}
return false
}
// SetAcknowledgingUsername gets a reference to the given string and assigns it to the AcknowledgingUsername field.
func (o *ApiAlertView) SetAcknowledgingUsername(v string) {
o.AcknowledgingUsername = &v
}
// GetAlertConfigId returns the AlertConfigId field value if set, zero value otherwise.
func (o *ApiAlertView) GetAlertConfigId() string {
if o == nil || isNil(o.AlertConfigId) {
var ret string
return ret
}
return *o.AlertConfigId
}
// GetAlertConfigIdOk returns a tuple with the AlertConfigId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetAlertConfigIdOk() (*string, bool) {
if o == nil || isNil(o.AlertConfigId) {
return nil, false
}
return o.AlertConfigId, true
}
// HasAlertConfigId returns a boolean if a field has been set.
func (o *ApiAlertView) HasAlertConfigId() bool {
if o != nil && !isNil(o.AlertConfigId) {
return true
}
return false
}
// SetAlertConfigId gets a reference to the given string and assigns it to the AlertConfigId field.
func (o *ApiAlertView) SetAlertConfigId(v string) {
o.AlertConfigId = &v
}
// GetClusterName returns the ClusterName field value if set, zero value otherwise.
func (o *ApiAlertView) GetClusterName() string {
if o == nil || isNil(o.ClusterName) {
var ret string
return ret
}
return *o.ClusterName
}
// GetClusterNameOk returns a tuple with the ClusterName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetClusterNameOk() (*string, bool) {
if o == nil || isNil(o.ClusterName) {
return nil, false
}
return o.ClusterName, true
}
// HasClusterName returns a boolean if a field has been set.
func (o *ApiAlertView) HasClusterName() bool {
if o != nil && !isNil(o.ClusterName) {
return true
}
return false
}
// SetClusterName gets a reference to the given string and assigns it to the ClusterName field.
func (o *ApiAlertView) SetClusterName(v string) {
o.ClusterName = &v
}
// GetCreated returns the Created field value if set, zero value otherwise.
func (o *ApiAlertView) GetCreated() time.Time {
if o == nil || isNil(o.Created) {
var ret time.Time
return ret
}
return *o.Created
}
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetCreatedOk() (*time.Time, bool) {
if o == nil || isNil(o.Created) {
return nil, false
}
return o.Created, true
}
// HasCreated returns a boolean if a field has been set.
func (o *ApiAlertView) HasCreated() bool {
if o != nil && !isNil(o.Created) {
return true
}
return false
}
// SetCreated gets a reference to the given time.Time and assigns it to the Created field.
func (o *ApiAlertView) SetCreated(v time.Time) {
o.Created = &v
}
// GetCurrentValue returns the CurrentValue field value if set, zero value otherwise.
func (o *ApiAlertView) GetCurrentValue() ApiMetricValueView {
if o == nil || isNil(o.CurrentValue) {
var ret ApiMetricValueView
return ret
}
return *o.CurrentValue
}
// GetCurrentValueOk returns a tuple with the CurrentValue field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetCurrentValueOk() (*ApiMetricValueView, bool) {
if o == nil || isNil(o.CurrentValue) {
return nil, false
}
return o.CurrentValue, true
}
// HasCurrentValue returns a boolean if a field has been set.
func (o *ApiAlertView) HasCurrentValue() bool {
if o != nil && !isNil(o.CurrentValue) {
return true
}
return false
}
// SetCurrentValue gets a reference to the given ApiMetricValueView and assigns it to the CurrentValue field.
func (o *ApiAlertView) SetCurrentValue(v ApiMetricValueView) {
o.CurrentValue = &v
}
// GetEventTypeName returns the EventTypeName field value if set, zero value otherwise.
func (o *ApiAlertView) GetEventTypeName() string {
if o == nil || isNil(o.EventTypeName) {
var ret string
return ret
}
return *o.EventTypeName
}
// GetEventTypeNameOk returns a tuple with the EventTypeName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetEventTypeNameOk() (*string, bool) {
if o == nil || isNil(o.EventTypeName) {
return nil, false
}
return o.EventTypeName, true
}
// HasEventTypeName returns a boolean if a field has been set.
func (o *ApiAlertView) HasEventTypeName() bool {
if o != nil && !isNil(o.EventTypeName) {
return true
}
return false
}
// SetEventTypeName gets a reference to the given string and assigns it to the EventTypeName field.
func (o *ApiAlertView) SetEventTypeName(v string) {
o.EventTypeName = &v
}
// GetGroupId returns the GroupId field value if set, zero value otherwise.
func (o *ApiAlertView) GetGroupId() string {
if o == nil || isNil(o.GroupId) {
var ret string
return ret
}
return *o.GroupId
}
// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetGroupIdOk() (*string, bool) {
if o == nil || isNil(o.GroupId) {
return nil, false
}
return o.GroupId, true
}
// HasGroupId returns a boolean if a field has been set.
func (o *ApiAlertView) HasGroupId() bool {
if o != nil && !isNil(o.GroupId) {
return true
}
return false
}
// SetGroupId gets a reference to the given string and assigns it to the GroupId field.
func (o *ApiAlertView) SetGroupId(v string) {
o.GroupId = &v
}
// GetHostnameAndPort returns the HostnameAndPort field value if set, zero value otherwise.
func (o *ApiAlertView) GetHostnameAndPort() string {
if o == nil || isNil(o.HostnameAndPort) {
var ret string
return ret
}
return *o.HostnameAndPort
}
// GetHostnameAndPortOk returns a tuple with the HostnameAndPort field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetHostnameAndPortOk() (*string, bool) {
if o == nil || isNil(o.HostnameAndPort) {
return nil, false
}
return o.HostnameAndPort, true
}
// HasHostnameAndPort returns a boolean if a field has been set.
func (o *ApiAlertView) HasHostnameAndPort() bool {
if o != nil && !isNil(o.HostnameAndPort) {
return true
}
return false
}
// SetHostnameAndPort gets a reference to the given string and assigns it to the HostnameAndPort field.
func (o *ApiAlertView) SetHostnameAndPort(v string) {
o.HostnameAndPort = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ApiAlertView) 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 *ApiAlertView) 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 *ApiAlertView) 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 *ApiAlertView) SetId(v string) {
o.Id = &v
}
// GetLastNotified returns the LastNotified field value if set, zero value otherwise.
func (o *ApiAlertView) GetLastNotified() time.Time {
if o == nil || isNil(o.LastNotified) {
var ret time.Time
return ret
}
return *o.LastNotified
}
// GetLastNotifiedOk returns a tuple with the LastNotified field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetLastNotifiedOk() (*time.Time, bool) {
if o == nil || isNil(o.LastNotified) {
return nil, false
}
return o.LastNotified, true
}
// HasLastNotified returns a boolean if a field has been set.
func (o *ApiAlertView) HasLastNotified() bool {
if o != nil && !isNil(o.LastNotified) {
return true
}
return false
}
// SetLastNotified gets a reference to the given time.Time and assigns it to the LastNotified field.
func (o *ApiAlertView) SetLastNotified(v time.Time) {
o.LastNotified = &v
}
// GetLinks returns the Links field value
func (o *ApiAlertView) GetLinks() []Link {
if o == nil {
var ret []Link
return ret
}
return o.Links
}
// GetLinksOk returns a tuple with the Links field value
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetLinksOk() ([]Link, bool) {
if o == nil {
return nil, false
}
return o.Links, true
}
// SetLinks sets field value
func (o *ApiAlertView) SetLinks(v []Link) {
o.Links = v
}
// GetMetricName returns the MetricName field value if set, zero value otherwise.
func (o *ApiAlertView) GetMetricName() string {
if o == nil || isNil(o.MetricName) {
var ret string
return ret
}
return *o.MetricName
}
// GetMetricNameOk returns a tuple with the MetricName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetMetricNameOk() (*string, bool) {
if o == nil || isNil(o.MetricName) {
return nil, false
}
return o.MetricName, true
}
// HasMetricName returns a boolean if a field has been set.
func (o *ApiAlertView) HasMetricName() bool {
if o != nil && !isNil(o.MetricName) {
return true
}
return false
}
// SetMetricName gets a reference to the given string and assigns it to the MetricName field.
func (o *ApiAlertView) SetMetricName(v string) {
o.MetricName = &v
}
// GetReplicaSetName returns the ReplicaSetName field value if set, zero value otherwise.
func (o *ApiAlertView) GetReplicaSetName() string {
if o == nil || isNil(o.ReplicaSetName) {
var ret string
return ret
}
return *o.ReplicaSetName
}
// GetReplicaSetNameOk returns a tuple with the ReplicaSetName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetReplicaSetNameOk() (*string, bool) {
if o == nil || isNil(o.ReplicaSetName) {
return nil, false
}
return o.ReplicaSetName, true
}
// HasReplicaSetName returns a boolean if a field has been set.
func (o *ApiAlertView) HasReplicaSetName() bool {
if o != nil && !isNil(o.ReplicaSetName) {
return true
}
return false
}
// SetReplicaSetName gets a reference to the given string and assigns it to the ReplicaSetName field.
func (o *ApiAlertView) SetReplicaSetName(v string) {
o.ReplicaSetName = &v
}
// GetResolved returns the Resolved field value if set, zero value otherwise.
func (o *ApiAlertView) GetResolved() time.Time {
if o == nil || isNil(o.Resolved) {
var ret time.Time
return ret
}
return *o.Resolved
}
// GetResolvedOk returns a tuple with the Resolved field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetResolvedOk() (*time.Time, bool) {
if o == nil || isNil(o.Resolved) {
return nil, false
}
return o.Resolved, true
}
// HasResolved returns a boolean if a field has been set.
func (o *ApiAlertView) HasResolved() bool {
if o != nil && !isNil(o.Resolved) {
return true
}
return false
}
// SetResolved gets a reference to the given time.Time and assigns it to the Resolved field.
func (o *ApiAlertView) SetResolved(v time.Time) {
o.Resolved = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ApiAlertView) 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 *ApiAlertView) 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 *ApiAlertView) 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 *ApiAlertView) SetStatus(v string) {
o.Status = &v
}
// GetTypeName returns the TypeName field value if set, zero value otherwise.
// Deprecated
func (o *ApiAlertView) GetTypeName() string {
if o == nil || isNil(o.TypeName) {
var ret string
return ret
}
return *o.TypeName
}
// GetTypeNameOk returns a tuple with the TypeName field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *ApiAlertView) GetTypeNameOk() (*string, bool) {
if o == nil || isNil(o.TypeName) {
return nil, false
}
return o.TypeName, true
}
// HasTypeName returns a boolean if a field has been set.
func (o *ApiAlertView) HasTypeName() bool {
if o != nil && !isNil(o.TypeName) {
return true
}
return false
}
// SetTypeName gets a reference to the given string and assigns it to the TypeName field.
// Deprecated
func (o *ApiAlertView) SetTypeName(v string) {
o.TypeName = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise.
func (o *ApiAlertView) GetUpdated() time.Time {
if o == nil || isNil(o.Updated) {
var ret time.Time
return ret
}
return *o.Updated
}
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiAlertView) GetUpdatedOk() (*time.Time, bool) {
if o == nil || isNil(o.Updated) {
return nil, false
}
return o.Updated, true
}
// HasUpdated returns a boolean if a field has been set.
func (o *ApiAlertView) HasUpdated() bool {
if o != nil && !isNil(o.Updated) {
return true
}
return false
}
// SetUpdated gets a reference to the given time.Time and assigns it to the Updated field.
func (o *ApiAlertView) SetUpdated(v time.Time) {
o.Updated = &v
}
func (o ApiAlertView) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["acknowledgedUntil"] = o.AcknowledgedUntil
}
if !isNil(o.AcknowledgementComment) {
toSerialize["acknowledgementComment"] = o.AcknowledgementComment
}
if !isNil(o.AcknowledgingUsername) {
toSerialize["acknowledgingUsername"] = o.AcknowledgingUsername
}
if !isNil(o.AlertConfigId) {
toSerialize["alertConfigId"] = o.AlertConfigId
}
if !isNil(o.ClusterName) {
toSerialize["clusterName"] = o.ClusterName
}
if !isNil(o.Created) {
toSerialize["created"] = o.Created
}
if !isNil(o.CurrentValue) {
toSerialize["currentValue"] = o.CurrentValue
}
if !isNil(o.EventTypeName) {
toSerialize["eventTypeName"] = o.EventTypeName
}
if !isNil(o.GroupId) {
toSerialize["groupId"] = o.GroupId
}
if !isNil(o.HostnameAndPort) {
toSerialize["hostnameAndPort"] = o.HostnameAndPort
}
if !isNil(o.Id) {
toSerialize["id"] = o.Id
}
if !isNil(o.LastNotified) {
toSerialize["lastNotified"] = o.LastNotified
}
if true {
toSerialize["links"] = o.Links
}
if !isNil(o.MetricName) {
toSerialize["metricName"] = o.MetricName
}
if !isNil(o.ReplicaSetName) {
toSerialize["replicaSetName"] = o.ReplicaSetName
}
if !isNil(o.Resolved) {
toSerialize["resolved"] = o.Resolved
}
if !isNil(o.Status) {
toSerialize["status"] = o.Status
}
if !isNil(o.TypeName) {
toSerialize["typeName"] = o.TypeName
}
if !isNil(o.Updated) {
toSerialize["updated"] = o.Updated
}
return json.Marshal(toSerialize)
}
type NullableApiAlertView struct {
value *ApiAlertView
isSet bool
}
func (v NullableApiAlertView) Get() *ApiAlertView {
return v.value
}
func (v *NullableApiAlertView) Set(val *ApiAlertView) {
v.value = val
v.isSet = true
}
func (v NullableApiAlertView) IsSet() bool {
return v.isSet
}
func (v *NullableApiAlertView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableApiAlertView(val *ApiAlertView) *NullableApiAlertView {
return &NullableApiAlertView{value: val, isSet: true}
}
func (v NullableApiAlertView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableApiAlertView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}