-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathmodel_monitor_options.go
1380 lines (1224 loc) · 53.1 KB
/
model_monitor_options.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
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019-Present Datadog, Inc.
package datadogV1
import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
// MonitorOptions List of options associated with your monitor.
type MonitorOptions struct {
// Type of aggregation performed in the monitor query.
Aggregation *MonitorOptionsAggregation `json:"aggregation,omitempty"`
// IDs of the device the Synthetics monitor is running on.
// Deprecated
DeviceIds []MonitorDeviceID `json:"device_ids,omitempty"`
// Whether or not to send a log sample when the log monitor triggers.
EnableLogsSample *bool `json:"enable_logs_sample,omitempty"`
// Whether or not to send a list of samples when the monitor triggers. This is only used by CI Test and Pipeline monitors.
EnableSamples *bool `json:"enable_samples,omitempty"`
// We recommend using the [is_renotify](https://docs.datadoghq.com/monitors/notify/?tab=is_alert#renotify),
// block in the original message instead.
// A message to include with a re-notification. Supports the `@username` notification we allow elsewhere.
// Not applicable if `renotify_interval` is `None`.
EscalationMessage *string `json:"escalation_message,omitempty"`
// Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to `300` (5min),
// the timeframe is set to `last_5m` and the time is 7:00, the monitor evaluates data from 6:50 to 6:55.
// This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor always has data during evaluation.
EvaluationDelay datadog.NullableInt64 `json:"evaluation_delay,omitempty"`
// The time span after which groups with missing data are dropped from the monitor state.
// The minimum value is one hour, and the maximum value is 72 hours.
// Example values are: "60m", "1h", and "2d".
// This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.
GroupRetentionDuration *string `json:"group_retention_duration,omitempty"`
// Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold. Use `notify_by` instead.
// Deprecated
GroupbySimpleMonitor *bool `json:"groupby_simple_monitor,omitempty"`
// A Boolean indicating whether notifications from this monitor automatically inserts its triggering tags into the title.
//
// **Examples**
// - If `True`, `[Triggered on {host:h1}] Monitor Title`
// - If `False`, `[Triggered] Monitor Title`
IncludeTags *bool `json:"include_tags,omitempty"`
// Whether or not the monitor is locked (only editable by creator and admins). Use `restricted_roles` instead.
// Deprecated
Locked *bool `json:"locked,omitempty"`
// How long the test should be in failure before alerting (integer, number of seconds, max 7200).
MinFailureDuration datadog.NullableInt64 `json:"min_failure_duration,omitempty"`
// The minimum number of locations in failure at the same time during
// at least one moment in the `min_failure_duration` period (`min_location_failed` and `min_failure_duration`
// are part of the advanced alerting rules - integer, >= 1).
MinLocationFailed datadog.NullableInt64 `json:"min_location_failed,omitempty"`
// Time (in seconds) to skip evaluations for new groups.
//
// For example, this option can be used to skip evaluations for new hosts while they initialize.
//
// Must be a non negative integer.
NewGroupDelay datadog.NullableInt64 `json:"new_group_delay,omitempty"`
// Time (in seconds) to allow a host to boot and applications
// to fully start before starting the evaluation of monitor results.
// Should be a non negative integer.
//
// Use new_group_delay instead.
// Deprecated
NewHostDelay datadog.NullableInt64 `json:"new_host_delay,omitempty"`
// The number of minutes before a monitor notifies after data stops reporting.
// Datadog recommends at least 2x the monitor timeframe for query alerts or 2 minutes for service checks.
// If omitted, 2x the evaluation timeframe is used for query alerts, and 24 hours is used for service checks.
NoDataTimeframe datadog.NullableInt64 `json:"no_data_timeframe,omitempty"`
// Toggles the display of additional content sent in the monitor notification.
NotificationPresetName *MonitorOptionsNotificationPresets `json:"notification_preset_name,omitempty"`
// A Boolean indicating whether tagged users is notified on changes to this monitor.
NotifyAudit *bool `json:"notify_audit,omitempty"`
// Controls what granularity a monitor alerts on. Only available for monitors with groupings.
// For instance, a monitor grouped by `cluster`, `namespace`, and `pod` can be configured to only notify on each
// new `cluster` violating the alert conditions by setting `notify_by` to `["cluster"]`. Tags mentioned
// in `notify_by` must be a subset of the grouping tags in the query.
// For example, a query grouped by `cluster` and `namespace` cannot notify on `region`.
// Setting `notify_by` to `[*]` configures the monitor to notify as a simple-alert.
NotifyBy []string `json:"notify_by,omitempty"`
// A Boolean indicating whether this monitor notifies when data stops reporting. Defaults to `false`.
NotifyNoData *bool `json:"notify_no_data,omitempty"`
// Controls how groups or monitors are treated if an evaluation does not return any data points.
// The default option results in different behavior depending on the monitor query type.
// For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions.
// For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status.
// This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.
OnMissingData *OnMissingDataOption `json:"on_missing_data,omitempty"`
// The number of minutes after the last notification before a monitor re-notifies on the current status.
// It only re-notifies if it’s not resolved.
RenotifyInterval datadog.NullableInt64 `json:"renotify_interval,omitempty"`
// The number of times re-notification messages should be sent on the current status at the provided re-notification interval.
RenotifyOccurrences datadog.NullableInt64 `json:"renotify_occurrences,omitempty"`
// The types of monitor statuses for which re-notification messages are sent.
// Default: **null** if `renotify_interval` is **null**.
// If `renotify_interval` is set, defaults to renotify on `Alert` and `No Data`.
RenotifyStatuses []MonitorRenotifyStatusType `json:"renotify_statuses,omitempty"`
// A Boolean indicating whether this monitor needs a full window of data before it’s evaluated.
// We highly recommend you set this to `false` for sparse metrics,
// otherwise some evaluations are skipped. Default is false. This setting only applies to
// metric monitors.
RequireFullWindow *bool `json:"require_full_window,omitempty"`
// Configuration options for scheduling.
SchedulingOptions *MonitorOptionsSchedulingOptions `json:"scheduling_options,omitempty"`
// Information about the downtime applied to the monitor. Only shows v1 downtimes.
// Deprecated
Silenced map[string]int64 `json:"silenced,omitempty"`
// ID of the corresponding Synthetic check.
// Deprecated
SyntheticsCheckId datadog.NullableString `json:"synthetics_check_id,omitempty"`
// Alerting time window options.
ThresholdWindows *MonitorThresholdWindowOptions `json:"threshold_windows,omitempty"`
// List of the different monitor threshold available.
Thresholds *MonitorThresholds `json:"thresholds,omitempty"`
// The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.
TimeoutH datadog.NullableInt64 `json:"timeout_h,omitempty"`
// List of requests that can be used in the monitor query. **This feature is currently in beta.**
Variables []MonitorFormulaAndFunctionQueryDefinition `json:"variables,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{} `json:"-"`
}
// NewMonitorOptions instantiates a new MonitorOptions 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 NewMonitorOptions() *MonitorOptions {
this := MonitorOptions{}
var includeTags bool = true
this.IncludeTags = &includeTags
var minFailureDuration int64 = 0
this.MinFailureDuration = *datadog.NewNullableInt64(&minFailureDuration)
var minLocationFailed int64 = 1
this.MinLocationFailed = *datadog.NewNullableInt64(&minLocationFailed)
var newHostDelay int64 = 300
this.NewHostDelay = *datadog.NewNullableInt64(&newHostDelay)
var notificationPresetName MonitorOptionsNotificationPresets = MONITOROPTIONSNOTIFICATIONPRESETS_SHOW_ALL
this.NotificationPresetName = ¬ificationPresetName
var notifyAudit bool = false
this.NotifyAudit = ¬ifyAudit
this.RenotifyInterval = *datadog.NewNullableInt64(nil)
this.TimeoutH = *datadog.NewNullableInt64(nil)
return &this
}
// NewMonitorOptionsWithDefaults instantiates a new MonitorOptions 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 NewMonitorOptionsWithDefaults() *MonitorOptions {
this := MonitorOptions{}
var includeTags bool = true
this.IncludeTags = &includeTags
var minFailureDuration int64 = 0
this.MinFailureDuration = *datadog.NewNullableInt64(&minFailureDuration)
var minLocationFailed int64 = 1
this.MinLocationFailed = *datadog.NewNullableInt64(&minLocationFailed)
var newHostDelay int64 = 300
this.NewHostDelay = *datadog.NewNullableInt64(&newHostDelay)
var notificationPresetName MonitorOptionsNotificationPresets = MONITOROPTIONSNOTIFICATIONPRESETS_SHOW_ALL
this.NotificationPresetName = ¬ificationPresetName
var notifyAudit bool = false
this.NotifyAudit = ¬ifyAudit
this.RenotifyInterval = *datadog.NewNullableInt64(nil)
this.TimeoutH = *datadog.NewNullableInt64(nil)
return &this
}
// GetAggregation returns the Aggregation field value if set, zero value otherwise.
func (o *MonitorOptions) GetAggregation() MonitorOptionsAggregation {
if o == nil || o.Aggregation == nil {
var ret MonitorOptionsAggregation
return ret
}
return *o.Aggregation
}
// GetAggregationOk returns a tuple with the Aggregation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetAggregationOk() (*MonitorOptionsAggregation, bool) {
if o == nil || o.Aggregation == nil {
return nil, false
}
return o.Aggregation, true
}
// HasAggregation returns a boolean if a field has been set.
func (o *MonitorOptions) HasAggregation() bool {
return o != nil && o.Aggregation != nil
}
// SetAggregation gets a reference to the given MonitorOptionsAggregation and assigns it to the Aggregation field.
func (o *MonitorOptions) SetAggregation(v MonitorOptionsAggregation) {
o.Aggregation = &v
}
// GetDeviceIds returns the DeviceIds field value if set, zero value otherwise.
// Deprecated
func (o *MonitorOptions) GetDeviceIds() []MonitorDeviceID {
if o == nil || o.DeviceIds == nil {
var ret []MonitorDeviceID
return ret
}
return o.DeviceIds
}
// GetDeviceIdsOk returns a tuple with the DeviceIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *MonitorOptions) GetDeviceIdsOk() (*[]MonitorDeviceID, bool) {
if o == nil || o.DeviceIds == nil {
return nil, false
}
return &o.DeviceIds, true
}
// HasDeviceIds returns a boolean if a field has been set.
func (o *MonitorOptions) HasDeviceIds() bool {
return o != nil && o.DeviceIds != nil
}
// SetDeviceIds gets a reference to the given []MonitorDeviceID and assigns it to the DeviceIds field.
// Deprecated
func (o *MonitorOptions) SetDeviceIds(v []MonitorDeviceID) {
o.DeviceIds = v
}
// GetEnableLogsSample returns the EnableLogsSample field value if set, zero value otherwise.
func (o *MonitorOptions) GetEnableLogsSample() bool {
if o == nil || o.EnableLogsSample == nil {
var ret bool
return ret
}
return *o.EnableLogsSample
}
// GetEnableLogsSampleOk returns a tuple with the EnableLogsSample field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetEnableLogsSampleOk() (*bool, bool) {
if o == nil || o.EnableLogsSample == nil {
return nil, false
}
return o.EnableLogsSample, true
}
// HasEnableLogsSample returns a boolean if a field has been set.
func (o *MonitorOptions) HasEnableLogsSample() bool {
return o != nil && o.EnableLogsSample != nil
}
// SetEnableLogsSample gets a reference to the given bool and assigns it to the EnableLogsSample field.
func (o *MonitorOptions) SetEnableLogsSample(v bool) {
o.EnableLogsSample = &v
}
// GetEnableSamples returns the EnableSamples field value if set, zero value otherwise.
func (o *MonitorOptions) GetEnableSamples() bool {
if o == nil || o.EnableSamples == nil {
var ret bool
return ret
}
return *o.EnableSamples
}
// GetEnableSamplesOk returns a tuple with the EnableSamples field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetEnableSamplesOk() (*bool, bool) {
if o == nil || o.EnableSamples == nil {
return nil, false
}
return o.EnableSamples, true
}
// HasEnableSamples returns a boolean if a field has been set.
func (o *MonitorOptions) HasEnableSamples() bool {
return o != nil && o.EnableSamples != nil
}
// SetEnableSamples gets a reference to the given bool and assigns it to the EnableSamples field.
func (o *MonitorOptions) SetEnableSamples(v bool) {
o.EnableSamples = &v
}
// GetEscalationMessage returns the EscalationMessage field value if set, zero value otherwise.
func (o *MonitorOptions) GetEscalationMessage() string {
if o == nil || o.EscalationMessage == nil {
var ret string
return ret
}
return *o.EscalationMessage
}
// GetEscalationMessageOk returns a tuple with the EscalationMessage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetEscalationMessageOk() (*string, bool) {
if o == nil || o.EscalationMessage == nil {
return nil, false
}
return o.EscalationMessage, true
}
// HasEscalationMessage returns a boolean if a field has been set.
func (o *MonitorOptions) HasEscalationMessage() bool {
return o != nil && o.EscalationMessage != nil
}
// SetEscalationMessage gets a reference to the given string and assigns it to the EscalationMessage field.
func (o *MonitorOptions) SetEscalationMessage(v string) {
o.EscalationMessage = &v
}
// GetEvaluationDelay returns the EvaluationDelay field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorOptions) GetEvaluationDelay() int64 {
if o == nil || o.EvaluationDelay.Get() == nil {
var ret int64
return ret
}
return *o.EvaluationDelay.Get()
}
// GetEvaluationDelayOk returns a tuple with the EvaluationDelay field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorOptions) GetEvaluationDelayOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.EvaluationDelay.Get(), o.EvaluationDelay.IsSet()
}
// HasEvaluationDelay returns a boolean if a field has been set.
func (o *MonitorOptions) HasEvaluationDelay() bool {
return o != nil && o.EvaluationDelay.IsSet()
}
// SetEvaluationDelay gets a reference to the given datadog.NullableInt64 and assigns it to the EvaluationDelay field.
func (o *MonitorOptions) SetEvaluationDelay(v int64) {
o.EvaluationDelay.Set(&v)
}
// SetEvaluationDelayNil sets the value for EvaluationDelay to be an explicit nil.
func (o *MonitorOptions) SetEvaluationDelayNil() {
o.EvaluationDelay.Set(nil)
}
// UnsetEvaluationDelay ensures that no value is present for EvaluationDelay, not even an explicit nil.
func (o *MonitorOptions) UnsetEvaluationDelay() {
o.EvaluationDelay.Unset()
}
// GetGroupRetentionDuration returns the GroupRetentionDuration field value if set, zero value otherwise.
func (o *MonitorOptions) GetGroupRetentionDuration() string {
if o == nil || o.GroupRetentionDuration == nil {
var ret string
return ret
}
return *o.GroupRetentionDuration
}
// GetGroupRetentionDurationOk returns a tuple with the GroupRetentionDuration field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetGroupRetentionDurationOk() (*string, bool) {
if o == nil || o.GroupRetentionDuration == nil {
return nil, false
}
return o.GroupRetentionDuration, true
}
// HasGroupRetentionDuration returns a boolean if a field has been set.
func (o *MonitorOptions) HasGroupRetentionDuration() bool {
return o != nil && o.GroupRetentionDuration != nil
}
// SetGroupRetentionDuration gets a reference to the given string and assigns it to the GroupRetentionDuration field.
func (o *MonitorOptions) SetGroupRetentionDuration(v string) {
o.GroupRetentionDuration = &v
}
// GetGroupbySimpleMonitor returns the GroupbySimpleMonitor field value if set, zero value otherwise.
// Deprecated
func (o *MonitorOptions) GetGroupbySimpleMonitor() bool {
if o == nil || o.GroupbySimpleMonitor == nil {
var ret bool
return ret
}
return *o.GroupbySimpleMonitor
}
// GetGroupbySimpleMonitorOk returns a tuple with the GroupbySimpleMonitor field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *MonitorOptions) GetGroupbySimpleMonitorOk() (*bool, bool) {
if o == nil || o.GroupbySimpleMonitor == nil {
return nil, false
}
return o.GroupbySimpleMonitor, true
}
// HasGroupbySimpleMonitor returns a boolean if a field has been set.
func (o *MonitorOptions) HasGroupbySimpleMonitor() bool {
return o != nil && o.GroupbySimpleMonitor != nil
}
// SetGroupbySimpleMonitor gets a reference to the given bool and assigns it to the GroupbySimpleMonitor field.
// Deprecated
func (o *MonitorOptions) SetGroupbySimpleMonitor(v bool) {
o.GroupbySimpleMonitor = &v
}
// GetIncludeTags returns the IncludeTags field value if set, zero value otherwise.
func (o *MonitorOptions) GetIncludeTags() bool {
if o == nil || o.IncludeTags == nil {
var ret bool
return ret
}
return *o.IncludeTags
}
// GetIncludeTagsOk returns a tuple with the IncludeTags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetIncludeTagsOk() (*bool, bool) {
if o == nil || o.IncludeTags == nil {
return nil, false
}
return o.IncludeTags, true
}
// HasIncludeTags returns a boolean if a field has been set.
func (o *MonitorOptions) HasIncludeTags() bool {
return o != nil && o.IncludeTags != nil
}
// SetIncludeTags gets a reference to the given bool and assigns it to the IncludeTags field.
func (o *MonitorOptions) SetIncludeTags(v bool) {
o.IncludeTags = &v
}
// GetLocked returns the Locked field value if set, zero value otherwise.
// Deprecated
func (o *MonitorOptions) GetLocked() bool {
if o == nil || o.Locked == nil {
var ret bool
return ret
}
return *o.Locked
}
// GetLockedOk returns a tuple with the Locked field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *MonitorOptions) GetLockedOk() (*bool, bool) {
if o == nil || o.Locked == nil {
return nil, false
}
return o.Locked, true
}
// HasLocked returns a boolean if a field has been set.
func (o *MonitorOptions) HasLocked() bool {
return o != nil && o.Locked != nil
}
// SetLocked gets a reference to the given bool and assigns it to the Locked field.
// Deprecated
func (o *MonitorOptions) SetLocked(v bool) {
o.Locked = &v
}
// GetMinFailureDuration returns the MinFailureDuration field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorOptions) GetMinFailureDuration() int64 {
if o == nil || o.MinFailureDuration.Get() == nil {
var ret int64
return ret
}
return *o.MinFailureDuration.Get()
}
// GetMinFailureDurationOk returns a tuple with the MinFailureDuration field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorOptions) GetMinFailureDurationOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.MinFailureDuration.Get(), o.MinFailureDuration.IsSet()
}
// HasMinFailureDuration returns a boolean if a field has been set.
func (o *MonitorOptions) HasMinFailureDuration() bool {
return o != nil && o.MinFailureDuration.IsSet()
}
// SetMinFailureDuration gets a reference to the given datadog.NullableInt64 and assigns it to the MinFailureDuration field.
func (o *MonitorOptions) SetMinFailureDuration(v int64) {
o.MinFailureDuration.Set(&v)
}
// SetMinFailureDurationNil sets the value for MinFailureDuration to be an explicit nil.
func (o *MonitorOptions) SetMinFailureDurationNil() {
o.MinFailureDuration.Set(nil)
}
// UnsetMinFailureDuration ensures that no value is present for MinFailureDuration, not even an explicit nil.
func (o *MonitorOptions) UnsetMinFailureDuration() {
o.MinFailureDuration.Unset()
}
// GetMinLocationFailed returns the MinLocationFailed field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorOptions) GetMinLocationFailed() int64 {
if o == nil || o.MinLocationFailed.Get() == nil {
var ret int64
return ret
}
return *o.MinLocationFailed.Get()
}
// GetMinLocationFailedOk returns a tuple with the MinLocationFailed field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorOptions) GetMinLocationFailedOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.MinLocationFailed.Get(), o.MinLocationFailed.IsSet()
}
// HasMinLocationFailed returns a boolean if a field has been set.
func (o *MonitorOptions) HasMinLocationFailed() bool {
return o != nil && o.MinLocationFailed.IsSet()
}
// SetMinLocationFailed gets a reference to the given datadog.NullableInt64 and assigns it to the MinLocationFailed field.
func (o *MonitorOptions) SetMinLocationFailed(v int64) {
o.MinLocationFailed.Set(&v)
}
// SetMinLocationFailedNil sets the value for MinLocationFailed to be an explicit nil.
func (o *MonitorOptions) SetMinLocationFailedNil() {
o.MinLocationFailed.Set(nil)
}
// UnsetMinLocationFailed ensures that no value is present for MinLocationFailed, not even an explicit nil.
func (o *MonitorOptions) UnsetMinLocationFailed() {
o.MinLocationFailed.Unset()
}
// GetNewGroupDelay returns the NewGroupDelay field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorOptions) GetNewGroupDelay() int64 {
if o == nil || o.NewGroupDelay.Get() == nil {
var ret int64
return ret
}
return *o.NewGroupDelay.Get()
}
// GetNewGroupDelayOk returns a tuple with the NewGroupDelay field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorOptions) GetNewGroupDelayOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.NewGroupDelay.Get(), o.NewGroupDelay.IsSet()
}
// HasNewGroupDelay returns a boolean if a field has been set.
func (o *MonitorOptions) HasNewGroupDelay() bool {
return o != nil && o.NewGroupDelay.IsSet()
}
// SetNewGroupDelay gets a reference to the given datadog.NullableInt64 and assigns it to the NewGroupDelay field.
func (o *MonitorOptions) SetNewGroupDelay(v int64) {
o.NewGroupDelay.Set(&v)
}
// SetNewGroupDelayNil sets the value for NewGroupDelay to be an explicit nil.
func (o *MonitorOptions) SetNewGroupDelayNil() {
o.NewGroupDelay.Set(nil)
}
// UnsetNewGroupDelay ensures that no value is present for NewGroupDelay, not even an explicit nil.
func (o *MonitorOptions) UnsetNewGroupDelay() {
o.NewGroupDelay.Unset()
}
// GetNewHostDelay returns the NewHostDelay field value if set, zero value otherwise (both if not set or set to explicit null).
// Deprecated
func (o *MonitorOptions) GetNewHostDelay() int64 {
if o == nil || o.NewHostDelay.Get() == nil {
var ret int64
return ret
}
return *o.NewHostDelay.Get()
}
// GetNewHostDelayOk returns a tuple with the NewHostDelay field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
// Deprecated
func (o *MonitorOptions) GetNewHostDelayOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.NewHostDelay.Get(), o.NewHostDelay.IsSet()
}
// HasNewHostDelay returns a boolean if a field has been set.
func (o *MonitorOptions) HasNewHostDelay() bool {
return o != nil && o.NewHostDelay.IsSet()
}
// SetNewHostDelay gets a reference to the given datadog.NullableInt64 and assigns it to the NewHostDelay field.
// Deprecated
func (o *MonitorOptions) SetNewHostDelay(v int64) {
o.NewHostDelay.Set(&v)
}
// SetNewHostDelayNil sets the value for NewHostDelay to be an explicit nil.
func (o *MonitorOptions) SetNewHostDelayNil() {
o.NewHostDelay.Set(nil)
}
// UnsetNewHostDelay ensures that no value is present for NewHostDelay, not even an explicit nil.
func (o *MonitorOptions) UnsetNewHostDelay() {
o.NewHostDelay.Unset()
}
// GetNoDataTimeframe returns the NoDataTimeframe field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorOptions) GetNoDataTimeframe() int64 {
if o == nil || o.NoDataTimeframe.Get() == nil {
var ret int64
return ret
}
return *o.NoDataTimeframe.Get()
}
// GetNoDataTimeframeOk returns a tuple with the NoDataTimeframe field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorOptions) GetNoDataTimeframeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.NoDataTimeframe.Get(), o.NoDataTimeframe.IsSet()
}
// HasNoDataTimeframe returns a boolean if a field has been set.
func (o *MonitorOptions) HasNoDataTimeframe() bool {
return o != nil && o.NoDataTimeframe.IsSet()
}
// SetNoDataTimeframe gets a reference to the given datadog.NullableInt64 and assigns it to the NoDataTimeframe field.
func (o *MonitorOptions) SetNoDataTimeframe(v int64) {
o.NoDataTimeframe.Set(&v)
}
// SetNoDataTimeframeNil sets the value for NoDataTimeframe to be an explicit nil.
func (o *MonitorOptions) SetNoDataTimeframeNil() {
o.NoDataTimeframe.Set(nil)
}
// UnsetNoDataTimeframe ensures that no value is present for NoDataTimeframe, not even an explicit nil.
func (o *MonitorOptions) UnsetNoDataTimeframe() {
o.NoDataTimeframe.Unset()
}
// GetNotificationPresetName returns the NotificationPresetName field value if set, zero value otherwise.
func (o *MonitorOptions) GetNotificationPresetName() MonitorOptionsNotificationPresets {
if o == nil || o.NotificationPresetName == nil {
var ret MonitorOptionsNotificationPresets
return ret
}
return *o.NotificationPresetName
}
// GetNotificationPresetNameOk returns a tuple with the NotificationPresetName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetNotificationPresetNameOk() (*MonitorOptionsNotificationPresets, bool) {
if o == nil || o.NotificationPresetName == nil {
return nil, false
}
return o.NotificationPresetName, true
}
// HasNotificationPresetName returns a boolean if a field has been set.
func (o *MonitorOptions) HasNotificationPresetName() bool {
return o != nil && o.NotificationPresetName != nil
}
// SetNotificationPresetName gets a reference to the given MonitorOptionsNotificationPresets and assigns it to the NotificationPresetName field.
func (o *MonitorOptions) SetNotificationPresetName(v MonitorOptionsNotificationPresets) {
o.NotificationPresetName = &v
}
// GetNotifyAudit returns the NotifyAudit field value if set, zero value otherwise.
func (o *MonitorOptions) GetNotifyAudit() bool {
if o == nil || o.NotifyAudit == nil {
var ret bool
return ret
}
return *o.NotifyAudit
}
// GetNotifyAuditOk returns a tuple with the NotifyAudit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetNotifyAuditOk() (*bool, bool) {
if o == nil || o.NotifyAudit == nil {
return nil, false
}
return o.NotifyAudit, true
}
// HasNotifyAudit returns a boolean if a field has been set.
func (o *MonitorOptions) HasNotifyAudit() bool {
return o != nil && o.NotifyAudit != nil
}
// SetNotifyAudit gets a reference to the given bool and assigns it to the NotifyAudit field.
func (o *MonitorOptions) SetNotifyAudit(v bool) {
o.NotifyAudit = &v
}
// GetNotifyBy returns the NotifyBy field value if set, zero value otherwise.
func (o *MonitorOptions) GetNotifyBy() []string {
if o == nil || o.NotifyBy == nil {
var ret []string
return ret
}
return o.NotifyBy
}
// GetNotifyByOk returns a tuple with the NotifyBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetNotifyByOk() (*[]string, bool) {
if o == nil || o.NotifyBy == nil {
return nil, false
}
return &o.NotifyBy, true
}
// HasNotifyBy returns a boolean if a field has been set.
func (o *MonitorOptions) HasNotifyBy() bool {
return o != nil && o.NotifyBy != nil
}
// SetNotifyBy gets a reference to the given []string and assigns it to the NotifyBy field.
func (o *MonitorOptions) SetNotifyBy(v []string) {
o.NotifyBy = v
}
// GetNotifyNoData returns the NotifyNoData field value if set, zero value otherwise.
func (o *MonitorOptions) GetNotifyNoData() bool {
if o == nil || o.NotifyNoData == nil {
var ret bool
return ret
}
return *o.NotifyNoData
}
// GetNotifyNoDataOk returns a tuple with the NotifyNoData field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetNotifyNoDataOk() (*bool, bool) {
if o == nil || o.NotifyNoData == nil {
return nil, false
}
return o.NotifyNoData, true
}
// HasNotifyNoData returns a boolean if a field has been set.
func (o *MonitorOptions) HasNotifyNoData() bool {
return o != nil && o.NotifyNoData != nil
}
// SetNotifyNoData gets a reference to the given bool and assigns it to the NotifyNoData field.
func (o *MonitorOptions) SetNotifyNoData(v bool) {
o.NotifyNoData = &v
}
// GetOnMissingData returns the OnMissingData field value if set, zero value otherwise.
func (o *MonitorOptions) GetOnMissingData() OnMissingDataOption {
if o == nil || o.OnMissingData == nil {
var ret OnMissingDataOption
return ret
}
return *o.OnMissingData
}
// GetOnMissingDataOk returns a tuple with the OnMissingData field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetOnMissingDataOk() (*OnMissingDataOption, bool) {
if o == nil || o.OnMissingData == nil {
return nil, false
}
return o.OnMissingData, true
}
// HasOnMissingData returns a boolean if a field has been set.
func (o *MonitorOptions) HasOnMissingData() bool {
return o != nil && o.OnMissingData != nil
}
// SetOnMissingData gets a reference to the given OnMissingDataOption and assigns it to the OnMissingData field.
func (o *MonitorOptions) SetOnMissingData(v OnMissingDataOption) {
o.OnMissingData = &v
}
// GetRenotifyInterval returns the RenotifyInterval field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorOptions) GetRenotifyInterval() int64 {
if o == nil || o.RenotifyInterval.Get() == nil {
var ret int64
return ret
}
return *o.RenotifyInterval.Get()
}
// GetRenotifyIntervalOk returns a tuple with the RenotifyInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorOptions) GetRenotifyIntervalOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.RenotifyInterval.Get(), o.RenotifyInterval.IsSet()
}
// HasRenotifyInterval returns a boolean if a field has been set.
func (o *MonitorOptions) HasRenotifyInterval() bool {
return o != nil && o.RenotifyInterval.IsSet()
}
// SetRenotifyInterval gets a reference to the given datadog.NullableInt64 and assigns it to the RenotifyInterval field.
func (o *MonitorOptions) SetRenotifyInterval(v int64) {
o.RenotifyInterval.Set(&v)
}
// SetRenotifyIntervalNil sets the value for RenotifyInterval to be an explicit nil.
func (o *MonitorOptions) SetRenotifyIntervalNil() {
o.RenotifyInterval.Set(nil)
}
// UnsetRenotifyInterval ensures that no value is present for RenotifyInterval, not even an explicit nil.
func (o *MonitorOptions) UnsetRenotifyInterval() {
o.RenotifyInterval.Unset()
}
// GetRenotifyOccurrences returns the RenotifyOccurrences field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorOptions) GetRenotifyOccurrences() int64 {
if o == nil || o.RenotifyOccurrences.Get() == nil {
var ret int64
return ret
}
return *o.RenotifyOccurrences.Get()
}
// GetRenotifyOccurrencesOk returns a tuple with the RenotifyOccurrences field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorOptions) GetRenotifyOccurrencesOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.RenotifyOccurrences.Get(), o.RenotifyOccurrences.IsSet()
}
// HasRenotifyOccurrences returns a boolean if a field has been set.
func (o *MonitorOptions) HasRenotifyOccurrences() bool {
return o != nil && o.RenotifyOccurrences.IsSet()
}
// SetRenotifyOccurrences gets a reference to the given datadog.NullableInt64 and assigns it to the RenotifyOccurrences field.
func (o *MonitorOptions) SetRenotifyOccurrences(v int64) {
o.RenotifyOccurrences.Set(&v)
}
// SetRenotifyOccurrencesNil sets the value for RenotifyOccurrences to be an explicit nil.
func (o *MonitorOptions) SetRenotifyOccurrencesNil() {
o.RenotifyOccurrences.Set(nil)
}
// UnsetRenotifyOccurrences ensures that no value is present for RenotifyOccurrences, not even an explicit nil.
func (o *MonitorOptions) UnsetRenotifyOccurrences() {
o.RenotifyOccurrences.Unset()
}
// GetRenotifyStatuses returns the RenotifyStatuses field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorOptions) GetRenotifyStatuses() []MonitorRenotifyStatusType {
if o == nil {
var ret []MonitorRenotifyStatusType
return ret
}
return o.RenotifyStatuses
}
// GetRenotifyStatusesOk returns a tuple with the RenotifyStatuses field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorOptions) GetRenotifyStatusesOk() (*[]MonitorRenotifyStatusType, bool) {
if o == nil || o.RenotifyStatuses == nil {
return nil, false
}
return &o.RenotifyStatuses, true
}
// HasRenotifyStatuses returns a boolean if a field has been set.
func (o *MonitorOptions) HasRenotifyStatuses() bool {
return o != nil && o.RenotifyStatuses != nil
}
// SetRenotifyStatuses gets a reference to the given []MonitorRenotifyStatusType and assigns it to the RenotifyStatuses field.
func (o *MonitorOptions) SetRenotifyStatuses(v []MonitorRenotifyStatusType) {
o.RenotifyStatuses = v
}
// GetRequireFullWindow returns the RequireFullWindow field value if set, zero value otherwise.
func (o *MonitorOptions) GetRequireFullWindow() bool {
if o == nil || o.RequireFullWindow == nil {
var ret bool
return ret
}
return *o.RequireFullWindow
}
// GetRequireFullWindowOk returns a tuple with the RequireFullWindow field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetRequireFullWindowOk() (*bool, bool) {
if o == nil || o.RequireFullWindow == nil {
return nil, false
}
return o.RequireFullWindow, true
}
// HasRequireFullWindow returns a boolean if a field has been set.
func (o *MonitorOptions) HasRequireFullWindow() bool {
return o != nil && o.RequireFullWindow != nil
}
// SetRequireFullWindow gets a reference to the given bool and assigns it to the RequireFullWindow field.
func (o *MonitorOptions) SetRequireFullWindow(v bool) {
o.RequireFullWindow = &v
}
// GetSchedulingOptions returns the SchedulingOptions field value if set, zero value otherwise.
func (o *MonitorOptions) GetSchedulingOptions() MonitorOptionsSchedulingOptions {
if o == nil || o.SchedulingOptions == nil {
var ret MonitorOptionsSchedulingOptions
return ret
}
return *o.SchedulingOptions
}
// GetSchedulingOptionsOk returns a tuple with the SchedulingOptions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorOptions) GetSchedulingOptionsOk() (*MonitorOptionsSchedulingOptions, bool) {
if o == nil || o.SchedulingOptions == nil {
return nil, false
}
return o.SchedulingOptions, true
}
// HasSchedulingOptions returns a boolean if a field has been set.
func (o *MonitorOptions) HasSchedulingOptions() bool {
return o != nil && o.SchedulingOptions != nil
}
// SetSchedulingOptions gets a reference to the given MonitorOptionsSchedulingOptions and assigns it to the SchedulingOptions field.
func (o *MonitorOptions) SetSchedulingOptions(v MonitorOptionsSchedulingOptions) {
o.SchedulingOptions = &v
}
// GetSilenced returns the Silenced field value if set, zero value otherwise.
// Deprecated
func (o *MonitorOptions) GetSilenced() map[string]int64 {
if o == nil || o.Silenced == nil {
var ret map[string]int64
return ret
}
return o.Silenced
}
// GetSilencedOk returns a tuple with the Silenced field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *MonitorOptions) GetSilencedOk() (*map[string]int64, bool) {
if o == nil || o.Silenced == nil {
return nil, false
}
return &o.Silenced, true
}
// HasSilenced returns a boolean if a field has been set.
func (o *MonitorOptions) HasSilenced() bool {
return o != nil && o.Silenced != nil
}
// SetSilenced gets a reference to the given map[string]int64 and assigns it to the Silenced field.
// Deprecated
func (o *MonitorOptions) SetSilenced(v map[string]int64) {
o.Silenced = v
}