forked from meraki/dashboard-api-go
/
model_get_network_sensor_alerts_overview_by_metric_200_response_inner.go
201 lines (165 loc) · 7.2 KB
/
model_get_network_sensor_alerts_overview_by_metric_200_response_inner.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
/*
Meraki Dashboard API
A RESTful API to programmatically manage and monitor Cisco Meraki networks at scale. > Date: 02 August, 2023 > > [Recent Updates](https://meraki.io/whats-new/) --- [API Documentation](https://meraki.io/api) [Community Support](https://meraki.io/community) [Meraki Homepage](https://www.meraki.com)
API version: 1.36.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
"time"
)
// checks if the GetNetworkSensorAlertsOverviewByMetric200ResponseInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetNetworkSensorAlertsOverviewByMetric200ResponseInner{}
// GetNetworkSensorAlertsOverviewByMetric200ResponseInner struct for GetNetworkSensorAlertsOverviewByMetric200ResponseInner
type GetNetworkSensorAlertsOverviewByMetric200ResponseInner struct {
// Start of the timespan over which sensor alerts are counted
StartTs *time.Time `json:"startTs,omitempty"`
// End of the timespan over which sensor alerts are counted
EndTs *time.Time `json:"endTs,omitempty"`
Counts *GetNetworkSensorAlertsOverviewByMetric200ResponseInnerCounts `json:"counts,omitempty"`
}
// NewGetNetworkSensorAlertsOverviewByMetric200ResponseInner instantiates a new GetNetworkSensorAlertsOverviewByMetric200ResponseInner 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 NewGetNetworkSensorAlertsOverviewByMetric200ResponseInner() *GetNetworkSensorAlertsOverviewByMetric200ResponseInner {
this := GetNetworkSensorAlertsOverviewByMetric200ResponseInner{}
return &this
}
// NewGetNetworkSensorAlertsOverviewByMetric200ResponseInnerWithDefaults instantiates a new GetNetworkSensorAlertsOverviewByMetric200ResponseInner 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 NewGetNetworkSensorAlertsOverviewByMetric200ResponseInnerWithDefaults() *GetNetworkSensorAlertsOverviewByMetric200ResponseInner {
this := GetNetworkSensorAlertsOverviewByMetric200ResponseInner{}
return &this
}
// GetStartTs returns the StartTs field value if set, zero value otherwise.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) GetStartTs() time.Time {
if o == nil || IsNil(o.StartTs) {
var ret time.Time
return ret
}
return *o.StartTs
}
// GetStartTsOk returns a tuple with the StartTs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) GetStartTsOk() (*time.Time, bool) {
if o == nil || IsNil(o.StartTs) {
return nil, false
}
return o.StartTs, true
}
// HasStartTs returns a boolean if a field has been set.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) HasStartTs() bool {
if o != nil && !IsNil(o.StartTs) {
return true
}
return false
}
// SetStartTs gets a reference to the given time.Time and assigns it to the StartTs field.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) SetStartTs(v time.Time) {
o.StartTs = &v
}
// GetEndTs returns the EndTs field value if set, zero value otherwise.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) GetEndTs() time.Time {
if o == nil || IsNil(o.EndTs) {
var ret time.Time
return ret
}
return *o.EndTs
}
// GetEndTsOk returns a tuple with the EndTs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) GetEndTsOk() (*time.Time, bool) {
if o == nil || IsNil(o.EndTs) {
return nil, false
}
return o.EndTs, true
}
// HasEndTs returns a boolean if a field has been set.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) HasEndTs() bool {
if o != nil && !IsNil(o.EndTs) {
return true
}
return false
}
// SetEndTs gets a reference to the given time.Time and assigns it to the EndTs field.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) SetEndTs(v time.Time) {
o.EndTs = &v
}
// GetCounts returns the Counts field value if set, zero value otherwise.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) GetCounts() GetNetworkSensorAlertsOverviewByMetric200ResponseInnerCounts {
if o == nil || IsNil(o.Counts) {
var ret GetNetworkSensorAlertsOverviewByMetric200ResponseInnerCounts
return ret
}
return *o.Counts
}
// GetCountsOk returns a tuple with the Counts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) GetCountsOk() (*GetNetworkSensorAlertsOverviewByMetric200ResponseInnerCounts, bool) {
if o == nil || IsNil(o.Counts) {
return nil, false
}
return o.Counts, true
}
// HasCounts returns a boolean if a field has been set.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) HasCounts() bool {
if o != nil && !IsNil(o.Counts) {
return true
}
return false
}
// SetCounts gets a reference to the given GetNetworkSensorAlertsOverviewByMetric200ResponseInnerCounts and assigns it to the Counts field.
func (o *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) SetCounts(v GetNetworkSensorAlertsOverviewByMetric200ResponseInnerCounts) {
o.Counts = &v
}
func (o GetNetworkSensorAlertsOverviewByMetric200ResponseInner) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GetNetworkSensorAlertsOverviewByMetric200ResponseInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.StartTs) {
toSerialize["startTs"] = o.StartTs
}
if !IsNil(o.EndTs) {
toSerialize["endTs"] = o.EndTs
}
if !IsNil(o.Counts) {
toSerialize["counts"] = o.Counts
}
return toSerialize, nil
}
type NullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner struct {
value *GetNetworkSensorAlertsOverviewByMetric200ResponseInner
isSet bool
}
func (v NullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner) Get() *GetNetworkSensorAlertsOverviewByMetric200ResponseInner {
return v.value
}
func (v *NullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner) Set(val *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) {
v.value = val
v.isSet = true
}
func (v NullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner) IsSet() bool {
return v.isSet
}
func (v *NullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner(val *GetNetworkSensorAlertsOverviewByMetric200ResponseInner) *NullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner {
return &NullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner{value: val, isSet: true}
}
func (v NullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetNetworkSensorAlertsOverviewByMetric200ResponseInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}