forked from meraki/dashboard-api-go
/
model_update_organization_appliance_vpn_third_party_vpn_peers_request_peers_inner.go
436 lines (368 loc) · 15.9 KB
/
model_update_organization_appliance_vpn_third_party_vpn_peers_request_peers_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
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
/*
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"
)
// checks if the UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner{}
// UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner struct for UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner
type UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner struct {
// The name of the VPN peer
Name string `json:"name"`
// [optional] The public IP of the VPN peer
PublicIp *string `json:"publicIp,omitempty"`
// The list of the private subnets of the VPN peer
PrivateSubnets []string `json:"privateSubnets"`
// [optional] The local ID is used to identify the MX to the peer. This will apply to all MXs this peer applies to.
LocalId *string `json:"localId,omitempty"`
// [optional] The remote ID is used to identify the connecting VPN peer. This can either be a valid IPv4 Address, FQDN or User FQDN.
RemoteId *string `json:"remoteId,omitempty"`
IpsecPolicies *GetOrganizationApplianceVpnThirdPartyVPNPeers200ResponsePeersInnerIpsecPolicies `json:"ipsecPolicies,omitempty"`
// One of the following available presets: 'default', 'aws', 'azure'. If this is provided, the 'ipsecPolicies' parameter is ignored.
IpsecPoliciesPreset *string `json:"ipsecPoliciesPreset,omitempty"`
// The shared secret with the VPN peer
Secret string `json:"secret"`
// [optional] The IKE version to be used for the IPsec VPN peer configuration. Defaults to '1' when omitted.
IkeVersion *string `json:"ikeVersion,omitempty"`
// A list of network tags that will connect with this peer. Use ['all'] for all networks. Use ['none'] for no networks. If not included, the default is ['all'].
NetworkTags []string `json:"networkTags,omitempty"`
}
// NewUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner instantiates a new UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner 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 NewUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner(name string, privateSubnets []string, secret string) *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner {
this := UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner{}
this.Name = name
this.PrivateSubnets = privateSubnets
this.Secret = secret
var ikeVersion string = "1"
this.IkeVersion = &ikeVersion
return &this
}
// NewUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInnerWithDefaults instantiates a new UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner 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 NewUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInnerWithDefaults() *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner {
this := UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner{}
var ikeVersion string = "1"
this.IkeVersion = &ikeVersion
return &this
}
// GetName returns the Name field value
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetName(v string) {
o.Name = v
}
// GetPublicIp returns the PublicIp field value if set, zero value otherwise.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetPublicIp() string {
if o == nil || IsNil(o.PublicIp) {
var ret string
return ret
}
return *o.PublicIp
}
// GetPublicIpOk returns a tuple with the PublicIp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetPublicIpOk() (*string, bool) {
if o == nil || IsNil(o.PublicIp) {
return nil, false
}
return o.PublicIp, true
}
// HasPublicIp returns a boolean if a field has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) HasPublicIp() bool {
if o != nil && !IsNil(o.PublicIp) {
return true
}
return false
}
// SetPublicIp gets a reference to the given string and assigns it to the PublicIp field.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetPublicIp(v string) {
o.PublicIp = &v
}
// GetPrivateSubnets returns the PrivateSubnets field value
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetPrivateSubnets() []string {
if o == nil {
var ret []string
return ret
}
return o.PrivateSubnets
}
// GetPrivateSubnetsOk returns a tuple with the PrivateSubnets field value
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetPrivateSubnetsOk() ([]string, bool) {
if o == nil {
return nil, false
}
return o.PrivateSubnets, true
}
// SetPrivateSubnets sets field value
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetPrivateSubnets(v []string) {
o.PrivateSubnets = v
}
// GetLocalId returns the LocalId field value if set, zero value otherwise.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetLocalId() string {
if o == nil || IsNil(o.LocalId) {
var ret string
return ret
}
return *o.LocalId
}
// GetLocalIdOk returns a tuple with the LocalId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetLocalIdOk() (*string, bool) {
if o == nil || IsNil(o.LocalId) {
return nil, false
}
return o.LocalId, true
}
// HasLocalId returns a boolean if a field has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) HasLocalId() bool {
if o != nil && !IsNil(o.LocalId) {
return true
}
return false
}
// SetLocalId gets a reference to the given string and assigns it to the LocalId field.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetLocalId(v string) {
o.LocalId = &v
}
// GetRemoteId returns the RemoteId field value if set, zero value otherwise.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetRemoteId() string {
if o == nil || IsNil(o.RemoteId) {
var ret string
return ret
}
return *o.RemoteId
}
// GetRemoteIdOk returns a tuple with the RemoteId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetRemoteIdOk() (*string, bool) {
if o == nil || IsNil(o.RemoteId) {
return nil, false
}
return o.RemoteId, true
}
// HasRemoteId returns a boolean if a field has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) HasRemoteId() bool {
if o != nil && !IsNil(o.RemoteId) {
return true
}
return false
}
// SetRemoteId gets a reference to the given string and assigns it to the RemoteId field.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetRemoteId(v string) {
o.RemoteId = &v
}
// GetIpsecPolicies returns the IpsecPolicies field value if set, zero value otherwise.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetIpsecPolicies() GetOrganizationApplianceVpnThirdPartyVPNPeers200ResponsePeersInnerIpsecPolicies {
if o == nil || IsNil(o.IpsecPolicies) {
var ret GetOrganizationApplianceVpnThirdPartyVPNPeers200ResponsePeersInnerIpsecPolicies
return ret
}
return *o.IpsecPolicies
}
// GetIpsecPoliciesOk returns a tuple with the IpsecPolicies field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetIpsecPoliciesOk() (*GetOrganizationApplianceVpnThirdPartyVPNPeers200ResponsePeersInnerIpsecPolicies, bool) {
if o == nil || IsNil(o.IpsecPolicies) {
return nil, false
}
return o.IpsecPolicies, true
}
// HasIpsecPolicies returns a boolean if a field has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) HasIpsecPolicies() bool {
if o != nil && !IsNil(o.IpsecPolicies) {
return true
}
return false
}
// SetIpsecPolicies gets a reference to the given GetOrganizationApplianceVpnThirdPartyVPNPeers200ResponsePeersInnerIpsecPolicies and assigns it to the IpsecPolicies field.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetIpsecPolicies(v GetOrganizationApplianceVpnThirdPartyVPNPeers200ResponsePeersInnerIpsecPolicies) {
o.IpsecPolicies = &v
}
// GetIpsecPoliciesPreset returns the IpsecPoliciesPreset field value if set, zero value otherwise.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetIpsecPoliciesPreset() string {
if o == nil || IsNil(o.IpsecPoliciesPreset) {
var ret string
return ret
}
return *o.IpsecPoliciesPreset
}
// GetIpsecPoliciesPresetOk returns a tuple with the IpsecPoliciesPreset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetIpsecPoliciesPresetOk() (*string, bool) {
if o == nil || IsNil(o.IpsecPoliciesPreset) {
return nil, false
}
return o.IpsecPoliciesPreset, true
}
// HasIpsecPoliciesPreset returns a boolean if a field has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) HasIpsecPoliciesPreset() bool {
if o != nil && !IsNil(o.IpsecPoliciesPreset) {
return true
}
return false
}
// SetIpsecPoliciesPreset gets a reference to the given string and assigns it to the IpsecPoliciesPreset field.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetIpsecPoliciesPreset(v string) {
o.IpsecPoliciesPreset = &v
}
// GetSecret returns the Secret field value
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetSecret() string {
if o == nil {
var ret string
return ret
}
return o.Secret
}
// GetSecretOk returns a tuple with the Secret field value
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetSecretOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Secret, true
}
// SetSecret sets field value
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetSecret(v string) {
o.Secret = v
}
// GetIkeVersion returns the IkeVersion field value if set, zero value otherwise.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetIkeVersion() string {
if o == nil || IsNil(o.IkeVersion) {
var ret string
return ret
}
return *o.IkeVersion
}
// GetIkeVersionOk returns a tuple with the IkeVersion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetIkeVersionOk() (*string, bool) {
if o == nil || IsNil(o.IkeVersion) {
return nil, false
}
return o.IkeVersion, true
}
// HasIkeVersion returns a boolean if a field has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) HasIkeVersion() bool {
if o != nil && !IsNil(o.IkeVersion) {
return true
}
return false
}
// SetIkeVersion gets a reference to the given string and assigns it to the IkeVersion field.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetIkeVersion(v string) {
o.IkeVersion = &v
}
// GetNetworkTags returns the NetworkTags field value if set, zero value otherwise.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetNetworkTags() []string {
if o == nil || IsNil(o.NetworkTags) {
var ret []string
return ret
}
return o.NetworkTags
}
// GetNetworkTagsOk returns a tuple with the NetworkTags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) GetNetworkTagsOk() ([]string, bool) {
if o == nil || IsNil(o.NetworkTags) {
return nil, false
}
return o.NetworkTags, true
}
// HasNetworkTags returns a boolean if a field has been set.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) HasNetworkTags() bool {
if o != nil && !IsNil(o.NetworkTags) {
return true
}
return false
}
// SetNetworkTags gets a reference to the given []string and assigns it to the NetworkTags field.
func (o *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) SetNetworkTags(v []string) {
o.NetworkTags = v
}
func (o UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
if !IsNil(o.PublicIp) {
toSerialize["publicIp"] = o.PublicIp
}
toSerialize["privateSubnets"] = o.PrivateSubnets
if !IsNil(o.LocalId) {
toSerialize["localId"] = o.LocalId
}
if !IsNil(o.RemoteId) {
toSerialize["remoteId"] = o.RemoteId
}
if !IsNil(o.IpsecPolicies) {
toSerialize["ipsecPolicies"] = o.IpsecPolicies
}
if !IsNil(o.IpsecPoliciesPreset) {
toSerialize["ipsecPoliciesPreset"] = o.IpsecPoliciesPreset
}
toSerialize["secret"] = o.Secret
if !IsNil(o.IkeVersion) {
toSerialize["ikeVersion"] = o.IkeVersion
}
if !IsNil(o.NetworkTags) {
toSerialize["networkTags"] = o.NetworkTags
}
return toSerialize, nil
}
type NullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner struct {
value *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner
isSet bool
}
func (v NullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) Get() *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner {
return v.value
}
func (v *NullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) Set(val *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) {
v.value = val
v.isSet = true
}
func (v NullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner(val *UpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) *NullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner {
return &NullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner{value: val, isSet: true}
}
func (v NullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateOrganizationApplianceVpnThirdPartyVPNPeersRequestPeersInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}