-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_tcp_udp_image.go
272 lines (229 loc) · 6.77 KB
/
model_tcp_udp_image.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
/* Copyright 2018-2020 KoreWireless
*
* This is part of the KoreWireless Omnicore SDK.
* It is licensed under the BSD 3-Clause license; you may not use this file
* except in compliance with the License.
*
* You may obtain a copy of the License at:
* https://opensource.org/licenses/BSD-3-Clause
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package OmniCore
import (
"encoding/json"
"os"
)
// checks if the TcpUdpImage type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TcpUdpImage{}
// TcpUdpImage struct for TcpUdpImage
type TcpUdpImage struct {
// Indicates if the image is valid
Valid bool `json:"valid"`
// The content type of the image
ContentType *string `json:"contentType,omitempty"`
// The storage key of the image
StorageKey *string `json:"storageKey,omitempty"`
// The link to the image
Link *string `json:"link,omitempty"`
// The binary data of the image
Data **os.File `json:"data,omitempty"`
}
// NewTcpUdpImage instantiates a new TcpUdpImage 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 NewTcpUdpImage(valid bool) *TcpUdpImage {
this := TcpUdpImage{}
this.Valid = valid
return &this
}
// NewTcpUdpImageWithDefaults instantiates a new TcpUdpImage 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 NewTcpUdpImageWithDefaults() *TcpUdpImage {
this := TcpUdpImage{}
return &this
}
// GetValid returns the Valid field value
func (o *TcpUdpImage) GetValid() bool {
if o == nil {
var ret bool
return ret
}
return o.Valid
}
// GetValidOk returns a tuple with the Valid field value
// and a boolean to check if the value has been set.
func (o *TcpUdpImage) GetValidOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Valid, true
}
// SetValid sets field value
func (o *TcpUdpImage) SetValid(v bool) {
o.Valid = v
}
// GetContentType returns the ContentType field value if set, zero value otherwise.
func (o *TcpUdpImage) GetContentType() string {
if o == nil || IsNil(o.ContentType) {
var ret string
return ret
}
return *o.ContentType
}
// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TcpUdpImage) GetContentTypeOk() (*string, bool) {
if o == nil || IsNil(o.ContentType) {
return nil, false
}
return o.ContentType, true
}
// HasContentType returns a boolean if a field has been set.
func (o *TcpUdpImage) HasContentType() bool {
if o != nil && !IsNil(o.ContentType) {
return true
}
return false
}
// SetContentType gets a reference to the given string and assigns it to the ContentType field.
func (o *TcpUdpImage) SetContentType(v string) {
o.ContentType = &v
}
// GetStorageKey returns the StorageKey field value if set, zero value otherwise.
func (o *TcpUdpImage) GetStorageKey() string {
if o == nil || IsNil(o.StorageKey) {
var ret string
return ret
}
return *o.StorageKey
}
// GetStorageKeyOk returns a tuple with the StorageKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TcpUdpImage) GetStorageKeyOk() (*string, bool) {
if o == nil || IsNil(o.StorageKey) {
return nil, false
}
return o.StorageKey, true
}
// HasStorageKey returns a boolean if a field has been set.
func (o *TcpUdpImage) HasStorageKey() bool {
if o != nil && !IsNil(o.StorageKey) {
return true
}
return false
}
// SetStorageKey gets a reference to the given string and assigns it to the StorageKey field.
func (o *TcpUdpImage) SetStorageKey(v string) {
o.StorageKey = &v
}
// GetLink returns the Link field value if set, zero value otherwise.
func (o *TcpUdpImage) GetLink() string {
if o == nil || IsNil(o.Link) {
var ret string
return ret
}
return *o.Link
}
// GetLinkOk returns a tuple with the Link field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TcpUdpImage) GetLinkOk() (*string, bool) {
if o == nil || IsNil(o.Link) {
return nil, false
}
return o.Link, true
}
// HasLink returns a boolean if a field has been set.
func (o *TcpUdpImage) HasLink() bool {
if o != nil && !IsNil(o.Link) {
return true
}
return false
}
// SetLink gets a reference to the given string and assigns it to the Link field.
func (o *TcpUdpImage) SetLink(v string) {
o.Link = &v
}
// GetData returns the Data field value if set, zero value otherwise.
func (o *TcpUdpImage) GetData() *os.File {
if o == nil || IsNil(o.Data) {
var ret *os.File
return ret
}
return *o.Data
}
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TcpUdpImage) GetDataOk() (**os.File, bool) {
if o == nil || IsNil(o.Data) {
return nil, false
}
return o.Data, true
}
// HasData returns a boolean if a field has been set.
func (o *TcpUdpImage) HasData() bool {
if o != nil && !IsNil(o.Data) {
return true
}
return false
}
// SetData gets a reference to the given *os.File and assigns it to the Data field.
func (o *TcpUdpImage) SetData(v *os.File) {
o.Data = &v
}
func (o TcpUdpImage) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TcpUdpImage) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["valid"] = o.Valid
if !IsNil(o.ContentType) {
toSerialize["contentType"] = o.ContentType
}
if !IsNil(o.StorageKey) {
toSerialize["storageKey"] = o.StorageKey
}
// skip: link is readOnly
if !IsNil(o.Data) {
toSerialize["data"] = o.Data
}
return toSerialize, nil
}
type NullableTcpUdpImage struct {
value *TcpUdpImage
isSet bool
}
func (v NullableTcpUdpImage) Get() *TcpUdpImage {
return v.value
}
func (v *NullableTcpUdpImage) Set(val *TcpUdpImage) {
v.value = val
v.isSet = true
}
func (v NullableTcpUdpImage) IsSet() bool {
return v.isSet
}
func (v *NullableTcpUdpImage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTcpUdpImage(val *TcpUdpImage) *NullableTcpUdpImage {
return &NullableTcpUdpImage{value: val, isSet: true}
}
func (v NullableTcpUdpImage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTcpUdpImage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}