-
Notifications
You must be signed in to change notification settings - Fork 52
/
model_security_monitoring_rule_options.go
183 lines (153 loc) · 6.26 KB
/
model_security_monitoring_rule_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
/*
* 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.
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package datadog
import (
"encoding/json"
)
// SecurityMonitoringRuleOptions Options on rules.
type SecurityMonitoringRuleOptions struct {
EvaluationWindow *SecurityMonitoringRuleEvaluationWindow `json:"evaluationWindow,omitempty"`
KeepAlive *SecurityMonitoringRuleKeepAlive `json:"keepAlive,omitempty"`
MaxSignalDuration *SecurityMonitoringRuleMaxSignalDuration `json:"maxSignalDuration,omitempty"`
}
// NewSecurityMonitoringRuleOptions instantiates a new SecurityMonitoringRuleOptions 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 NewSecurityMonitoringRuleOptions() *SecurityMonitoringRuleOptions {
this := SecurityMonitoringRuleOptions{}
return &this
}
// NewSecurityMonitoringRuleOptionsWithDefaults instantiates a new SecurityMonitoringRuleOptions 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 NewSecurityMonitoringRuleOptionsWithDefaults() *SecurityMonitoringRuleOptions {
this := SecurityMonitoringRuleOptions{}
return &this
}
// GetEvaluationWindow returns the EvaluationWindow field value if set, zero value otherwise.
func (o *SecurityMonitoringRuleOptions) GetEvaluationWindow() SecurityMonitoringRuleEvaluationWindow {
if o == nil || o.EvaluationWindow == nil {
var ret SecurityMonitoringRuleEvaluationWindow
return ret
}
return *o.EvaluationWindow
}
// GetEvaluationWindowOk returns a tuple with the EvaluationWindow field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecurityMonitoringRuleOptions) GetEvaluationWindowOk() (*SecurityMonitoringRuleEvaluationWindow, bool) {
if o == nil || o.EvaluationWindow == nil {
return nil, false
}
return o.EvaluationWindow, true
}
// HasEvaluationWindow returns a boolean if a field has been set.
func (o *SecurityMonitoringRuleOptions) HasEvaluationWindow() bool {
if o != nil && o.EvaluationWindow != nil {
return true
}
return false
}
// SetEvaluationWindow gets a reference to the given SecurityMonitoringRuleEvaluationWindow and assigns it to the EvaluationWindow field.
func (o *SecurityMonitoringRuleOptions) SetEvaluationWindow(v SecurityMonitoringRuleEvaluationWindow) {
o.EvaluationWindow = &v
}
// GetKeepAlive returns the KeepAlive field value if set, zero value otherwise.
func (o *SecurityMonitoringRuleOptions) GetKeepAlive() SecurityMonitoringRuleKeepAlive {
if o == nil || o.KeepAlive == nil {
var ret SecurityMonitoringRuleKeepAlive
return ret
}
return *o.KeepAlive
}
// GetKeepAliveOk returns a tuple with the KeepAlive field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecurityMonitoringRuleOptions) GetKeepAliveOk() (*SecurityMonitoringRuleKeepAlive, bool) {
if o == nil || o.KeepAlive == nil {
return nil, false
}
return o.KeepAlive, true
}
// HasKeepAlive returns a boolean if a field has been set.
func (o *SecurityMonitoringRuleOptions) HasKeepAlive() bool {
if o != nil && o.KeepAlive != nil {
return true
}
return false
}
// SetKeepAlive gets a reference to the given SecurityMonitoringRuleKeepAlive and assigns it to the KeepAlive field.
func (o *SecurityMonitoringRuleOptions) SetKeepAlive(v SecurityMonitoringRuleKeepAlive) {
o.KeepAlive = &v
}
// GetMaxSignalDuration returns the MaxSignalDuration field value if set, zero value otherwise.
func (o *SecurityMonitoringRuleOptions) GetMaxSignalDuration() SecurityMonitoringRuleMaxSignalDuration {
if o == nil || o.MaxSignalDuration == nil {
var ret SecurityMonitoringRuleMaxSignalDuration
return ret
}
return *o.MaxSignalDuration
}
// GetMaxSignalDurationOk returns a tuple with the MaxSignalDuration field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecurityMonitoringRuleOptions) GetMaxSignalDurationOk() (*SecurityMonitoringRuleMaxSignalDuration, bool) {
if o == nil || o.MaxSignalDuration == nil {
return nil, false
}
return o.MaxSignalDuration, true
}
// HasMaxSignalDuration returns a boolean if a field has been set.
func (o *SecurityMonitoringRuleOptions) HasMaxSignalDuration() bool {
if o != nil && o.MaxSignalDuration != nil {
return true
}
return false
}
// SetMaxSignalDuration gets a reference to the given SecurityMonitoringRuleMaxSignalDuration and assigns it to the MaxSignalDuration field.
func (o *SecurityMonitoringRuleOptions) SetMaxSignalDuration(v SecurityMonitoringRuleMaxSignalDuration) {
o.MaxSignalDuration = &v
}
func (o SecurityMonitoringRuleOptions) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.EvaluationWindow != nil {
toSerialize["evaluationWindow"] = o.EvaluationWindow
}
if o.KeepAlive != nil {
toSerialize["keepAlive"] = o.KeepAlive
}
if o.MaxSignalDuration != nil {
toSerialize["maxSignalDuration"] = o.MaxSignalDuration
}
return json.Marshal(toSerialize)
}
type NullableSecurityMonitoringRuleOptions struct {
value *SecurityMonitoringRuleOptions
isSet bool
}
func (v NullableSecurityMonitoringRuleOptions) Get() *SecurityMonitoringRuleOptions {
return v.value
}
func (v *NullableSecurityMonitoringRuleOptions) Set(val *SecurityMonitoringRuleOptions) {
v.value = val
v.isSet = true
}
func (v NullableSecurityMonitoringRuleOptions) IsSet() bool {
return v.isSet
}
func (v *NullableSecurityMonitoringRuleOptions) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSecurityMonitoringRuleOptions(val *SecurityMonitoringRuleOptions) *NullableSecurityMonitoringRuleOptions {
return &NullableSecurityMonitoringRuleOptions{value: val, isSet: true}
}
func (v NullableSecurityMonitoringRuleOptions) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSecurityMonitoringRuleOptions) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}