-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_checkpoint.go
347 lines (292 loc) · 9.14 KB
/
model_checkpoint.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
/*
Uptrends API v4
This document describes Uptrends API version 4. This Swagger environment also lets you execute API methods directly. Please note that this is not a sandbox environment: these API methods operate directly on your actual Uptrends account. For more information, please visit https://www.uptrends.com/api.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package uptrends
import (
"encoding/json"
)
// Checkpoint Checkpoint
type Checkpoint struct {
// The Id of the checkpoint
CheckpointId int32 `json:"CheckpointId"`
// The name of the checkpoint
CheckpointName *string `json:"CheckpointName,omitempty"`
// The location code of the checkpoint
Code *string `json:"Code,omitempty"`
// The IPv4 addresses of the checkpoint
Ipv4Addresses []string `json:"Ipv4Addresses,omitempty"`
// The IPv6 addresses of the checkpoint
Ipv6Addresses []Ipv6Address `json:"Ipv6Addresses,omitempty"`
// Checkpoint is primary
IsPrimaryCheckpoint bool `json:"IsPrimaryCheckpoint"`
// Checkpoint supports IPv6
SupportsIpv6 bool `json:"SupportsIpv6"`
// Checkpoint has high availability
HasHighAvailability bool `json:"HasHighAvailability"`
}
// NewCheckpoint instantiates a new Checkpoint 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 NewCheckpoint(checkpointId int32, isPrimaryCheckpoint bool, supportsIpv6 bool, hasHighAvailability bool) *Checkpoint {
this := Checkpoint{}
this.CheckpointId = checkpointId
this.IsPrimaryCheckpoint = isPrimaryCheckpoint
this.SupportsIpv6 = supportsIpv6
this.HasHighAvailability = hasHighAvailability
return &this
}
// NewCheckpointWithDefaults instantiates a new Checkpoint 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 NewCheckpointWithDefaults() *Checkpoint {
this := Checkpoint{}
return &this
}
// GetCheckpointId returns the CheckpointId field value
func (o *Checkpoint) GetCheckpointId() int32 {
if o == nil {
var ret int32
return ret
}
return o.CheckpointId
}
// GetCheckpointIdOk returns a tuple with the CheckpointId field value
// and a boolean to check if the value has been set.
func (o *Checkpoint) GetCheckpointIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.CheckpointId, true
}
// SetCheckpointId sets field value
func (o *Checkpoint) SetCheckpointId(v int32) {
o.CheckpointId = v
}
// GetCheckpointName returns the CheckpointName field value if set, zero value otherwise.
func (o *Checkpoint) GetCheckpointName() string {
if o == nil || isNil(o.CheckpointName) {
var ret string
return ret
}
return *o.CheckpointName
}
// GetCheckpointNameOk returns a tuple with the CheckpointName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Checkpoint) GetCheckpointNameOk() (*string, bool) {
if o == nil || isNil(o.CheckpointName) {
return nil, false
}
return o.CheckpointName, true
}
// HasCheckpointName returns a boolean if a field has been set.
func (o *Checkpoint) HasCheckpointName() bool {
if o != nil && !isNil(o.CheckpointName) {
return true
}
return false
}
// SetCheckpointName gets a reference to the given string and assigns it to the CheckpointName field.
func (o *Checkpoint) SetCheckpointName(v string) {
o.CheckpointName = &v
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *Checkpoint) GetCode() string {
if o == nil || isNil(o.Code) {
var ret string
return ret
}
return *o.Code
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Checkpoint) GetCodeOk() (*string, bool) {
if o == nil || isNil(o.Code) {
return nil, false
}
return o.Code, true
}
// HasCode returns a boolean if a field has been set.
func (o *Checkpoint) HasCode() bool {
if o != nil && !isNil(o.Code) {
return true
}
return false
}
// SetCode gets a reference to the given string and assigns it to the Code field.
func (o *Checkpoint) SetCode(v string) {
o.Code = &v
}
// GetIpv4Addresses returns the Ipv4Addresses field value if set, zero value otherwise.
func (o *Checkpoint) GetIpv4Addresses() []string {
if o == nil || isNil(o.Ipv4Addresses) {
var ret []string
return ret
}
return o.Ipv4Addresses
}
// GetIpv4AddressesOk returns a tuple with the Ipv4Addresses field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Checkpoint) GetIpv4AddressesOk() ([]string, bool) {
if o == nil || isNil(o.Ipv4Addresses) {
return nil, false
}
return o.Ipv4Addresses, true
}
// HasIpv4Addresses returns a boolean if a field has been set.
func (o *Checkpoint) HasIpv4Addresses() bool {
if o != nil && !isNil(o.Ipv4Addresses) {
return true
}
return false
}
// SetIpv4Addresses gets a reference to the given []string and assigns it to the Ipv4Addresses field.
func (o *Checkpoint) SetIpv4Addresses(v []string) {
o.Ipv4Addresses = v
}
// GetIpv6Addresses returns the Ipv6Addresses field value if set, zero value otherwise.
func (o *Checkpoint) GetIpv6Addresses() []Ipv6Address {
if o == nil || isNil(o.Ipv6Addresses) {
var ret []Ipv6Address
return ret
}
return o.Ipv6Addresses
}
// GetIpv6AddressesOk returns a tuple with the Ipv6Addresses field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Checkpoint) GetIpv6AddressesOk() ([]Ipv6Address, bool) {
if o == nil || isNil(o.Ipv6Addresses) {
return nil, false
}
return o.Ipv6Addresses, true
}
// HasIpv6Addresses returns a boolean if a field has been set.
func (o *Checkpoint) HasIpv6Addresses() bool {
if o != nil && !isNil(o.Ipv6Addresses) {
return true
}
return false
}
// SetIpv6Addresses gets a reference to the given []Ipv6Address and assigns it to the Ipv6Addresses field.
func (o *Checkpoint) SetIpv6Addresses(v []Ipv6Address) {
o.Ipv6Addresses = v
}
// GetIsPrimaryCheckpoint returns the IsPrimaryCheckpoint field value
func (o *Checkpoint) GetIsPrimaryCheckpoint() bool {
if o == nil {
var ret bool
return ret
}
return o.IsPrimaryCheckpoint
}
// GetIsPrimaryCheckpointOk returns a tuple with the IsPrimaryCheckpoint field value
// and a boolean to check if the value has been set.
func (o *Checkpoint) GetIsPrimaryCheckpointOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.IsPrimaryCheckpoint, true
}
// SetIsPrimaryCheckpoint sets field value
func (o *Checkpoint) SetIsPrimaryCheckpoint(v bool) {
o.IsPrimaryCheckpoint = v
}
// GetSupportsIpv6 returns the SupportsIpv6 field value
func (o *Checkpoint) GetSupportsIpv6() bool {
if o == nil {
var ret bool
return ret
}
return o.SupportsIpv6
}
// GetSupportsIpv6Ok returns a tuple with the SupportsIpv6 field value
// and a boolean to check if the value has been set.
func (o *Checkpoint) GetSupportsIpv6Ok() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.SupportsIpv6, true
}
// SetSupportsIpv6 sets field value
func (o *Checkpoint) SetSupportsIpv6(v bool) {
o.SupportsIpv6 = v
}
// GetHasHighAvailability returns the HasHighAvailability field value
func (o *Checkpoint) GetHasHighAvailability() bool {
if o == nil {
var ret bool
return ret
}
return o.HasHighAvailability
}
// GetHasHighAvailabilityOk returns a tuple with the HasHighAvailability field value
// and a boolean to check if the value has been set.
func (o *Checkpoint) GetHasHighAvailabilityOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.HasHighAvailability, true
}
// SetHasHighAvailability sets field value
func (o *Checkpoint) SetHasHighAvailability(v bool) {
o.HasHighAvailability = v
}
func (o Checkpoint) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["CheckpointId"] = o.CheckpointId
}
if !isNil(o.CheckpointName) {
toSerialize["CheckpointName"] = o.CheckpointName
}
if !isNil(o.Code) {
toSerialize["Code"] = o.Code
}
if !isNil(o.Ipv4Addresses) {
toSerialize["Ipv4Addresses"] = o.Ipv4Addresses
}
if !isNil(o.Ipv6Addresses) {
toSerialize["Ipv6Addresses"] = o.Ipv6Addresses
}
if true {
toSerialize["IsPrimaryCheckpoint"] = o.IsPrimaryCheckpoint
}
if true {
toSerialize["SupportsIpv6"] = o.SupportsIpv6
}
if true {
toSerialize["HasHighAvailability"] = o.HasHighAvailability
}
return json.Marshal(toSerialize)
}
type NullableCheckpoint struct {
value *Checkpoint
isSet bool
}
func (v NullableCheckpoint) Get() *Checkpoint {
return v.value
}
func (v *NullableCheckpoint) Set(val *Checkpoint) {
v.value = val
v.isSet = true
}
func (v NullableCheckpoint) IsSet() bool {
return v.isSet
}
func (v *NullableCheckpoint) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCheckpoint(val *Checkpoint) *NullableCheckpoint {
return &NullableCheckpoint{value: val, isSet: true}
}
func (v NullableCheckpoint) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCheckpoint) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}