This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
/
model_ddd_traffic_descriptor.go
235 lines (196 loc) · 6.56 KB
/
model_ddd_traffic_descriptor.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
/*
Namf_Communication
AMF Communication Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.3.0-alpha.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi_Namf_Communication
import (
"encoding/json"
)
// checks if the DddTrafficDescriptor type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DddTrafficDescriptor{}
// DddTrafficDescriptor Contains a Traffic Descriptor.
type DddTrafficDescriptor struct {
// String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166.
Ipv4Addr *string `json:"ipv4Addr,omitempty"`
Ipv6Addr *Ipv6Addr `json:"ipv6Addr,omitempty"`
// Unsigned Integer, i.e. only value 0 and integers above 0 are permissible.
PortNumber *int32 `json:"portNumber,omitempty"`
// String identifying a MAC address formatted in the hexadecimal notation according to clause 1.1 and clause 2.1 of RFC 7042.
MacAddr *string `json:"macAddr,omitempty"`
}
// NewDddTrafficDescriptor instantiates a new DddTrafficDescriptor 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 NewDddTrafficDescriptor() *DddTrafficDescriptor {
this := DddTrafficDescriptor{}
return &this
}
// NewDddTrafficDescriptorWithDefaults instantiates a new DddTrafficDescriptor 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 NewDddTrafficDescriptorWithDefaults() *DddTrafficDescriptor {
this := DddTrafficDescriptor{}
return &this
}
// GetIpv4Addr returns the Ipv4Addr field value if set, zero value otherwise.
func (o *DddTrafficDescriptor) GetIpv4Addr() string {
if o == nil || IsNil(o.Ipv4Addr) {
var ret string
return ret
}
return *o.Ipv4Addr
}
// GetIpv4AddrOk returns a tuple with the Ipv4Addr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DddTrafficDescriptor) GetIpv4AddrOk() (*string, bool) {
if o == nil || IsNil(o.Ipv4Addr) {
return nil, false
}
return o.Ipv4Addr, true
}
// HasIpv4Addr returns a boolean if a field has been set.
func (o *DddTrafficDescriptor) HasIpv4Addr() bool {
if o != nil && !IsNil(o.Ipv4Addr) {
return true
}
return false
}
// SetIpv4Addr gets a reference to the given string and assigns it to the Ipv4Addr field.
func (o *DddTrafficDescriptor) SetIpv4Addr(v string) {
o.Ipv4Addr = &v
}
// GetIpv6Addr returns the Ipv6Addr field value if set, zero value otherwise.
func (o *DddTrafficDescriptor) GetIpv6Addr() Ipv6Addr {
if o == nil || IsNil(o.Ipv6Addr) {
var ret Ipv6Addr
return ret
}
return *o.Ipv6Addr
}
// GetIpv6AddrOk returns a tuple with the Ipv6Addr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DddTrafficDescriptor) GetIpv6AddrOk() (*Ipv6Addr, bool) {
if o == nil || IsNil(o.Ipv6Addr) {
return nil, false
}
return o.Ipv6Addr, true
}
// HasIpv6Addr returns a boolean if a field has been set.
func (o *DddTrafficDescriptor) HasIpv6Addr() bool {
if o != nil && !IsNil(o.Ipv6Addr) {
return true
}
return false
}
// SetIpv6Addr gets a reference to the given Ipv6Addr and assigns it to the Ipv6Addr field.
func (o *DddTrafficDescriptor) SetIpv6Addr(v Ipv6Addr) {
o.Ipv6Addr = &v
}
// GetPortNumber returns the PortNumber field value if set, zero value otherwise.
func (o *DddTrafficDescriptor) GetPortNumber() int32 {
if o == nil || IsNil(o.PortNumber) {
var ret int32
return ret
}
return *o.PortNumber
}
// GetPortNumberOk returns a tuple with the PortNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DddTrafficDescriptor) GetPortNumberOk() (*int32, bool) {
if o == nil || IsNil(o.PortNumber) {
return nil, false
}
return o.PortNumber, true
}
// HasPortNumber returns a boolean if a field has been set.
func (o *DddTrafficDescriptor) HasPortNumber() bool {
if o != nil && !IsNil(o.PortNumber) {
return true
}
return false
}
// SetPortNumber gets a reference to the given int32 and assigns it to the PortNumber field.
func (o *DddTrafficDescriptor) SetPortNumber(v int32) {
o.PortNumber = &v
}
// GetMacAddr returns the MacAddr field value if set, zero value otherwise.
func (o *DddTrafficDescriptor) GetMacAddr() string {
if o == nil || IsNil(o.MacAddr) {
var ret string
return ret
}
return *o.MacAddr
}
// GetMacAddrOk returns a tuple with the MacAddr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DddTrafficDescriptor) GetMacAddrOk() (*string, bool) {
if o == nil || IsNil(o.MacAddr) {
return nil, false
}
return o.MacAddr, true
}
// HasMacAddr returns a boolean if a field has been set.
func (o *DddTrafficDescriptor) HasMacAddr() bool {
if o != nil && !IsNil(o.MacAddr) {
return true
}
return false
}
// SetMacAddr gets a reference to the given string and assigns it to the MacAddr field.
func (o *DddTrafficDescriptor) SetMacAddr(v string) {
o.MacAddr = &v
}
func (o DddTrafficDescriptor) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DddTrafficDescriptor) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Ipv4Addr) {
toSerialize["ipv4Addr"] = o.Ipv4Addr
}
if !IsNil(o.Ipv6Addr) {
toSerialize["ipv6Addr"] = o.Ipv6Addr
}
if !IsNil(o.PortNumber) {
toSerialize["portNumber"] = o.PortNumber
}
if !IsNil(o.MacAddr) {
toSerialize["macAddr"] = o.MacAddr
}
return toSerialize, nil
}
type NullableDddTrafficDescriptor struct {
value *DddTrafficDescriptor
isSet bool
}
func (v NullableDddTrafficDescriptor) Get() *DddTrafficDescriptor {
return v.value
}
func (v *NullableDddTrafficDescriptor) Set(val *DddTrafficDescriptor) {
v.value = val
v.isSet = true
}
func (v NullableDddTrafficDescriptor) IsSet() bool {
return v.isSet
}
func (v *NullableDddTrafficDescriptor) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDddTrafficDescriptor(val *DddTrafficDescriptor) *NullableDddTrafficDescriptor {
return &NullableDddTrafficDescriptor{value: val, isSet: true}
}
func (v NullableDddTrafficDescriptor) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDddTrafficDescriptor) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}