forked from meraki/dashboard-api-go
/
model_create_device_switch_routing_interface_request_ipv6.go
238 lines (197 loc) · 7.99 KB
/
model_create_device_switch_routing_interface_request_ipv6.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
/*
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 CreateDeviceSwitchRoutingInterfaceRequestIpv6 type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateDeviceSwitchRoutingInterfaceRequestIpv6{}
// CreateDeviceSwitchRoutingInterfaceRequestIpv6 The IPv6 settings of the interface.
type CreateDeviceSwitchRoutingInterfaceRequestIpv6 struct {
// The IPv6 assignment mode for the interface. Can be either 'eui-64' or 'static'.
AssignmentMode *string `json:"assignmentMode,omitempty"`
// The IPv6 prefix of the interface. Required if IPv6 object is included.
Prefix *string `json:"prefix,omitempty"`
// The IPv6 address of the interface. Required if assignmentMode is 'static'. Must not be included if assignmentMode is 'eui-64'.
Address *string `json:"address,omitempty"`
// The IPv6 default gateway of the interface. Required if prefix is defined and this is the first interface with IPv6 configured for the switch.
Gateway *string `json:"gateway,omitempty"`
}
// NewCreateDeviceSwitchRoutingInterfaceRequestIpv6 instantiates a new CreateDeviceSwitchRoutingInterfaceRequestIpv6 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 NewCreateDeviceSwitchRoutingInterfaceRequestIpv6() *CreateDeviceSwitchRoutingInterfaceRequestIpv6 {
this := CreateDeviceSwitchRoutingInterfaceRequestIpv6{}
return &this
}
// NewCreateDeviceSwitchRoutingInterfaceRequestIpv6WithDefaults instantiates a new CreateDeviceSwitchRoutingInterfaceRequestIpv6 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 NewCreateDeviceSwitchRoutingInterfaceRequestIpv6WithDefaults() *CreateDeviceSwitchRoutingInterfaceRequestIpv6 {
this := CreateDeviceSwitchRoutingInterfaceRequestIpv6{}
return &this
}
// GetAssignmentMode returns the AssignmentMode field value if set, zero value otherwise.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) GetAssignmentMode() string {
if o == nil || IsNil(o.AssignmentMode) {
var ret string
return ret
}
return *o.AssignmentMode
}
// GetAssignmentModeOk returns a tuple with the AssignmentMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) GetAssignmentModeOk() (*string, bool) {
if o == nil || IsNil(o.AssignmentMode) {
return nil, false
}
return o.AssignmentMode, true
}
// HasAssignmentMode returns a boolean if a field has been set.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) HasAssignmentMode() bool {
if o != nil && !IsNil(o.AssignmentMode) {
return true
}
return false
}
// SetAssignmentMode gets a reference to the given string and assigns it to the AssignmentMode field.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) SetAssignmentMode(v string) {
o.AssignmentMode = &v
}
// GetPrefix returns the Prefix field value if set, zero value otherwise.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) GetPrefix() string {
if o == nil || IsNil(o.Prefix) {
var ret string
return ret
}
return *o.Prefix
}
// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) GetPrefixOk() (*string, bool) {
if o == nil || IsNil(o.Prefix) {
return nil, false
}
return o.Prefix, true
}
// HasPrefix returns a boolean if a field has been set.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) HasPrefix() bool {
if o != nil && !IsNil(o.Prefix) {
return true
}
return false
}
// SetPrefix gets a reference to the given string and assigns it to the Prefix field.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) SetPrefix(v string) {
o.Prefix = &v
}
// GetAddress returns the Address field value if set, zero value otherwise.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) GetAddress() string {
if o == nil || IsNil(o.Address) {
var ret string
return ret
}
return *o.Address
}
// GetAddressOk returns a tuple with the Address field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) GetAddressOk() (*string, bool) {
if o == nil || IsNil(o.Address) {
return nil, false
}
return o.Address, true
}
// HasAddress returns a boolean if a field has been set.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) HasAddress() bool {
if o != nil && !IsNil(o.Address) {
return true
}
return false
}
// SetAddress gets a reference to the given string and assigns it to the Address field.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) SetAddress(v string) {
o.Address = &v
}
// GetGateway returns the Gateway field value if set, zero value otherwise.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) GetGateway() string {
if o == nil || IsNil(o.Gateway) {
var ret string
return ret
}
return *o.Gateway
}
// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) GetGatewayOk() (*string, bool) {
if o == nil || IsNil(o.Gateway) {
return nil, false
}
return o.Gateway, true
}
// HasGateway returns a boolean if a field has been set.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) HasGateway() bool {
if o != nil && !IsNil(o.Gateway) {
return true
}
return false
}
// SetGateway gets a reference to the given string and assigns it to the Gateway field.
func (o *CreateDeviceSwitchRoutingInterfaceRequestIpv6) SetGateway(v string) {
o.Gateway = &v
}
func (o CreateDeviceSwitchRoutingInterfaceRequestIpv6) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateDeviceSwitchRoutingInterfaceRequestIpv6) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AssignmentMode) {
toSerialize["assignmentMode"] = o.AssignmentMode
}
if !IsNil(o.Prefix) {
toSerialize["prefix"] = o.Prefix
}
if !IsNil(o.Address) {
toSerialize["address"] = o.Address
}
if !IsNil(o.Gateway) {
toSerialize["gateway"] = o.Gateway
}
return toSerialize, nil
}
type NullableCreateDeviceSwitchRoutingInterfaceRequestIpv6 struct {
value *CreateDeviceSwitchRoutingInterfaceRequestIpv6
isSet bool
}
func (v NullableCreateDeviceSwitchRoutingInterfaceRequestIpv6) Get() *CreateDeviceSwitchRoutingInterfaceRequestIpv6 {
return v.value
}
func (v *NullableCreateDeviceSwitchRoutingInterfaceRequestIpv6) Set(val *CreateDeviceSwitchRoutingInterfaceRequestIpv6) {
v.value = val
v.isSet = true
}
func (v NullableCreateDeviceSwitchRoutingInterfaceRequestIpv6) IsSet() bool {
return v.isSet
}
func (v *NullableCreateDeviceSwitchRoutingInterfaceRequestIpv6) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateDeviceSwitchRoutingInterfaceRequestIpv6(val *CreateDeviceSwitchRoutingInterfaceRequestIpv6) *NullableCreateDeviceSwitchRoutingInterfaceRequestIpv6 {
return &NullableCreateDeviceSwitchRoutingInterfaceRequestIpv6{value: val, isSet: true}
}
func (v NullableCreateDeviceSwitchRoutingInterfaceRequestIpv6) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateDeviceSwitchRoutingInterfaceRequestIpv6) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}