forked from go-openapi/strfmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.go
305 lines (244 loc) · 6.66 KB
/
default.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
package conv
import (
"github.com/go-openapi/strfmt"
)
// Base64 returns a pointer to of the Base64 value passed in.
func Base64(v strfmt.Base64) *strfmt.Base64 {
return &v
}
// Base64Value returns the value of the Base64 pointer passed in or
// the default value if the pointer is nil.
func Base64Value(v *strfmt.Base64) strfmt.Base64 {
if v == nil {
return nil
}
return *v
}
// URI returns a pointer to of the URI value passed in.
func URI(v strfmt.URI) *strfmt.URI {
return &v
}
// URIValue returns the value of the URI pointer passed in or
// the default value if the pointer is nil.
func URIValue(v *strfmt.URI) strfmt.URI {
if v == nil {
return strfmt.URI("")
}
return *v
}
// Email returns a pointer to of the Email value passed in.
func Email(v strfmt.Email) *strfmt.Email {
return &v
}
// EmailValue returns the value of the Email pointer passed in or
// the default value if the pointer is nil.
func EmailValue(v *strfmt.Email) strfmt.Email {
if v == nil {
return strfmt.Email("")
}
return *v
}
// Hostname returns a pointer to of the Hostname value passed in.
func Hostname(v strfmt.Hostname) *strfmt.Hostname {
return &v
}
// HostnameValue returns the value of the Hostname pointer passed in or
// the default value if the pointer is nil.
func HostnameValue(v *strfmt.Hostname) strfmt.Hostname {
if v == nil {
return strfmt.Hostname("")
}
return *v
}
// IPv4 returns a pointer to of the IPv4 value passed in.
func IPv4(v strfmt.IPv4) *strfmt.IPv4 {
return &v
}
// IPv4Value returns the value of the IPv4 pointer passed in or
// the default value if the pointer is nil.
func IPv4Value(v *strfmt.IPv4) strfmt.IPv4 {
if v == nil {
return strfmt.IPv4("")
}
return *v
}
// IPv6 returns a pointer to of the IPv6 value passed in.
func IPv6(v strfmt.IPv6) *strfmt.IPv6 {
return &v
}
// IPv6Value returns the value of the IPv6 pointer passed in or
// the default value if the pointer is nil.
func IPv6Value(v *strfmt.IPv6) strfmt.IPv6 {
if v == nil {
return strfmt.IPv6("")
}
return *v
}
// CIDR returns a pointer to of the CIDR value passed in.
func CIDR(v strfmt.CIDR) *strfmt.CIDR {
return &v
}
// CIDRValue returns the value of the CIDR pointer passed in or
// the default value if the pointer is nil.
func CIDRValue(v *strfmt.CIDR) strfmt.CIDR {
if v == nil {
return strfmt.CIDR("")
}
return *v
}
// MAC returns a pointer to of the MAC value passed in.
func MAC(v strfmt.MAC) *strfmt.MAC {
return &v
}
// MACValue returns the value of the MAC pointer passed in or
// the default value if the pointer is nil.
func MACValue(v *strfmt.MAC) strfmt.MAC {
if v == nil {
return strfmt.MAC("")
}
return *v
}
// UUID returns a pointer to of the UUID value passed in.
func UUID(v strfmt.UUID) *strfmt.UUID {
return &v
}
// UUIDValue returns the value of the UUID pointer passed in or
// the default value if the pointer is nil.
func UUIDValue(v *strfmt.UUID) strfmt.UUID {
if v == nil {
return strfmt.UUID("")
}
return *v
}
// UUID3 returns a pointer to of the UUID3 value passed in.
func UUID3(v strfmt.UUID3) *strfmt.UUID3 {
return &v
}
// UUID3Value returns the value of the UUID3 pointer passed in or
// the default value if the pointer is nil.
func UUID3Value(v *strfmt.UUID3) strfmt.UUID3 {
if v == nil {
return strfmt.UUID3("")
}
return *v
}
// UUID4 returns a pointer to of the UUID4 value passed in.
func UUID4(v strfmt.UUID4) *strfmt.UUID4 {
return &v
}
// UUID4Value returns the value of the UUID4 pointer passed in or
// the default value if the pointer is nil.
func UUID4Value(v *strfmt.UUID4) strfmt.UUID4 {
if v == nil {
return strfmt.UUID4("")
}
return *v
}
// UUID5 returns a pointer to of the UUID5 value passed in.
func UUID5(v strfmt.UUID5) *strfmt.UUID5 {
return &v
}
// UUID5Value returns the value of the UUID5 pointer passed in or
// the default value if the pointer is nil.
func UUID5Value(v *strfmt.UUID5) strfmt.UUID5 {
if v == nil {
return strfmt.UUID5("")
}
return *v
}
// ISBN returns a pointer to of the ISBN value passed in.
func ISBN(v strfmt.ISBN) *strfmt.ISBN {
return &v
}
// ISBNValue returns the value of the ISBN pointer passed in or
// the default value if the pointer is nil.
func ISBNValue(v *strfmt.ISBN) strfmt.ISBN {
if v == nil {
return strfmt.ISBN("")
}
return *v
}
// ISBN10 returns a pointer to of the ISBN10 value passed in.
func ISBN10(v strfmt.ISBN10) *strfmt.ISBN10 {
return &v
}
// ISBN10Value returns the value of the ISBN10 pointer passed in or
// the default value if the pointer is nil.
func ISBN10Value(v *strfmt.ISBN10) strfmt.ISBN10 {
if v == nil {
return strfmt.ISBN10("")
}
return *v
}
// ISBN13 returns a pointer to of the ISBN13 value passed in.
func ISBN13(v strfmt.ISBN13) *strfmt.ISBN13 {
return &v
}
// ISBN13Value returns the value of the ISBN13 pointer passed in or
// the default value if the pointer is nil.
func ISBN13Value(v *strfmt.ISBN13) strfmt.ISBN13 {
if v == nil {
return strfmt.ISBN13("")
}
return *v
}
// CreditCard returns a pointer to of the CreditCard value passed in.
func CreditCard(v strfmt.CreditCard) *strfmt.CreditCard {
return &v
}
// CreditCardValue returns the value of the CreditCard pointer passed in or
// the default value if the pointer is nil.
func CreditCardValue(v *strfmt.CreditCard) strfmt.CreditCard {
if v == nil {
return strfmt.CreditCard("")
}
return *v
}
// SSN returns a pointer to of the SSN value passed in.
func SSN(v strfmt.SSN) *strfmt.SSN {
return &v
}
// SSNValue returns the value of the SSN pointer passed in or
// the default value if the pointer is nil.
func SSNValue(v *strfmt.SSN) strfmt.SSN {
if v == nil {
return strfmt.SSN("")
}
return *v
}
// HexColor returns a pointer to of the HexColor value passed in.
func HexColor(v strfmt.HexColor) *strfmt.HexColor {
return &v
}
// HexColorValue returns the value of the HexColor pointer passed in or
// the default value if the pointer is nil.
func HexColorValue(v *strfmt.HexColor) strfmt.HexColor {
if v == nil {
return strfmt.HexColor("")
}
return *v
}
// RGBColor returns a pointer to of the RGBColor value passed in.
func RGBColor(v strfmt.RGBColor) *strfmt.RGBColor {
return &v
}
// RGBColorValue returns the value of the RGBColor pointer passed in or
// the default value if the pointer is nil.
func RGBColorValue(v *strfmt.RGBColor) strfmt.RGBColor {
if v == nil {
return strfmt.RGBColor("")
}
return *v
}
// Password returns a pointer to of the Password value passed in.
func Password(v strfmt.Password) *strfmt.Password {
return &v
}
// PasswordValue returns the value of the Password pointer passed in or
// the default value if the pointer is nil.
func PasswordValue(v *strfmt.Password) strfmt.Password {
if v == nil {
return strfmt.Password("")
}
return *v
}