-
Notifications
You must be signed in to change notification settings - Fork 88
/
model_beacon_user_request_address_nullable.go
342 lines (287 loc) · 10.7 KB
/
model_beacon_user_request_address_nullable.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
/*
* The Plaid API
*
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* API version: 2020-09-14_1.508.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package plaid
import (
"encoding/json"
)
// BeaconUserRequestAddressNullable Home address for the associated user. For more context on this field, see [Input Validation by Country](https://plaid.com/docs/identity-verification/hybrid-input-validation/#input-validation-by-country).
type BeaconUserRequestAddressNullable struct {
// The primary street portion of an address. If an address is provided, this field will always be filled. A string with at least one non-whitespace alphabetical character, with a max length of 80 characters.
Street string `json:"street"`
// Extra street information, like an apartment or suite number. If provided, a string with at least one non-whitespace character, with a max length of 20 characters.
Street2 NullableString `json:"street2,omitempty"`
// City from the end user's address. A string with at least one non-whitespace alphabetical character, with a max length of 100 characters.\"
City string `json:"city"`
// An ISO 3166-2 subdivision code. Related terms would be \"state\", \"province\", \"prefecture\", \"zone\", \"subdivision\", etc.
Region NullableString `json:"region,omitempty"`
// The postal code for the associated address. Between 2 and 10 alphanumeric characters. For US-based addresses this must be 5 numeric digits.
PostalCode NullableString `json:"postal_code,omitempty"`
// Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form.
Country string `json:"country"`
AdditionalProperties map[string]interface{}
}
type _BeaconUserRequestAddressNullable BeaconUserRequestAddressNullable
// NewBeaconUserRequestAddressNullable instantiates a new BeaconUserRequestAddressNullable 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 NewBeaconUserRequestAddressNullable(street string, city string, country string) *BeaconUserRequestAddressNullable {
this := BeaconUserRequestAddressNullable{}
this.Street = street
this.City = city
this.Country = country
return &this
}
// NewBeaconUserRequestAddressNullableWithDefaults instantiates a new BeaconUserRequestAddressNullable 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 NewBeaconUserRequestAddressNullableWithDefaults() *BeaconUserRequestAddressNullable {
this := BeaconUserRequestAddressNullable{}
return &this
}
// GetStreet returns the Street field value
func (o *BeaconUserRequestAddressNullable) GetStreet() string {
if o == nil {
var ret string
return ret
}
return o.Street
}
// GetStreetOk returns a tuple with the Street field value
// and a boolean to check if the value has been set.
func (o *BeaconUserRequestAddressNullable) GetStreetOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Street, true
}
// SetStreet sets field value
func (o *BeaconUserRequestAddressNullable) SetStreet(v string) {
o.Street = v
}
// GetStreet2 returns the Street2 field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BeaconUserRequestAddressNullable) GetStreet2() string {
if o == nil || o.Street2.Get() == nil {
var ret string
return ret
}
return *o.Street2.Get()
}
// GetStreet2Ok returns a tuple with the Street2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BeaconUserRequestAddressNullable) GetStreet2Ok() (*string, bool) {
if o == nil {
return nil, false
}
return o.Street2.Get(), o.Street2.IsSet()
}
// HasStreet2 returns a boolean if a field has been set.
func (o *BeaconUserRequestAddressNullable) HasStreet2() bool {
if o != nil && o.Street2.IsSet() {
return true
}
return false
}
// SetStreet2 gets a reference to the given NullableString and assigns it to the Street2 field.
func (o *BeaconUserRequestAddressNullable) SetStreet2(v string) {
o.Street2.Set(&v)
}
// SetStreet2Nil sets the value for Street2 to be an explicit nil
func (o *BeaconUserRequestAddressNullable) SetStreet2Nil() {
o.Street2.Set(nil)
}
// UnsetStreet2 ensures that no value is present for Street2, not even an explicit nil
func (o *BeaconUserRequestAddressNullable) UnsetStreet2() {
o.Street2.Unset()
}
// GetCity returns the City field value
func (o *BeaconUserRequestAddressNullable) GetCity() string {
if o == nil {
var ret string
return ret
}
return o.City
}
// GetCityOk returns a tuple with the City field value
// and a boolean to check if the value has been set.
func (o *BeaconUserRequestAddressNullable) GetCityOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.City, true
}
// SetCity sets field value
func (o *BeaconUserRequestAddressNullable) SetCity(v string) {
o.City = v
}
// GetRegion returns the Region field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BeaconUserRequestAddressNullable) GetRegion() string {
if o == nil || o.Region.Get() == nil {
var ret string
return ret
}
return *o.Region.Get()
}
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BeaconUserRequestAddressNullable) GetRegionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Region.Get(), o.Region.IsSet()
}
// HasRegion returns a boolean if a field has been set.
func (o *BeaconUserRequestAddressNullable) HasRegion() bool {
if o != nil && o.Region.IsSet() {
return true
}
return false
}
// SetRegion gets a reference to the given NullableString and assigns it to the Region field.
func (o *BeaconUserRequestAddressNullable) SetRegion(v string) {
o.Region.Set(&v)
}
// SetRegionNil sets the value for Region to be an explicit nil
func (o *BeaconUserRequestAddressNullable) SetRegionNil() {
o.Region.Set(nil)
}
// UnsetRegion ensures that no value is present for Region, not even an explicit nil
func (o *BeaconUserRequestAddressNullable) UnsetRegion() {
o.Region.Unset()
}
// GetPostalCode returns the PostalCode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BeaconUserRequestAddressNullable) GetPostalCode() string {
if o == nil || o.PostalCode.Get() == nil {
var ret string
return ret
}
return *o.PostalCode.Get()
}
// GetPostalCodeOk returns a tuple with the PostalCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BeaconUserRequestAddressNullable) GetPostalCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.PostalCode.Get(), o.PostalCode.IsSet()
}
// HasPostalCode returns a boolean if a field has been set.
func (o *BeaconUserRequestAddressNullable) HasPostalCode() bool {
if o != nil && o.PostalCode.IsSet() {
return true
}
return false
}
// SetPostalCode gets a reference to the given NullableString and assigns it to the PostalCode field.
func (o *BeaconUserRequestAddressNullable) SetPostalCode(v string) {
o.PostalCode.Set(&v)
}
// SetPostalCodeNil sets the value for PostalCode to be an explicit nil
func (o *BeaconUserRequestAddressNullable) SetPostalCodeNil() {
o.PostalCode.Set(nil)
}
// UnsetPostalCode ensures that no value is present for PostalCode, not even an explicit nil
func (o *BeaconUserRequestAddressNullable) UnsetPostalCode() {
o.PostalCode.Unset()
}
// GetCountry returns the Country field value
func (o *BeaconUserRequestAddressNullable) GetCountry() string {
if o == nil {
var ret string
return ret
}
return o.Country
}
// GetCountryOk returns a tuple with the Country field value
// and a boolean to check if the value has been set.
func (o *BeaconUserRequestAddressNullable) GetCountryOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Country, true
}
// SetCountry sets field value
func (o *BeaconUserRequestAddressNullable) SetCountry(v string) {
o.Country = v
}
func (o BeaconUserRequestAddressNullable) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["street"] = o.Street
}
if o.Street2.IsSet() {
toSerialize["street2"] = o.Street2.Get()
}
if true {
toSerialize["city"] = o.City
}
if o.Region.IsSet() {
toSerialize["region"] = o.Region.Get()
}
if o.PostalCode.IsSet() {
toSerialize["postal_code"] = o.PostalCode.Get()
}
if true {
toSerialize["country"] = o.Country
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *BeaconUserRequestAddressNullable) UnmarshalJSON(bytes []byte) (err error) {
varBeaconUserRequestAddressNullable := _BeaconUserRequestAddressNullable{}
if err = json.Unmarshal(bytes, &varBeaconUserRequestAddressNullable); err == nil {
*o = BeaconUserRequestAddressNullable(varBeaconUserRequestAddressNullable)
} else {
return err
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "street")
delete(additionalProperties, "street2")
delete(additionalProperties, "city")
delete(additionalProperties, "region")
delete(additionalProperties, "postal_code")
delete(additionalProperties, "country")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableBeaconUserRequestAddressNullable struct {
value *BeaconUserRequestAddressNullable
isSet bool
}
func (v NullableBeaconUserRequestAddressNullable) Get() *BeaconUserRequestAddressNullable {
return v.value
}
func (v *NullableBeaconUserRequestAddressNullable) Set(val *BeaconUserRequestAddressNullable) {
v.value = val
v.isSet = true
}
func (v NullableBeaconUserRequestAddressNullable) IsSet() bool {
return v.isSet
}
func (v *NullableBeaconUserRequestAddressNullable) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBeaconUserRequestAddressNullable(val *BeaconUserRequestAddressNullable) *NullableBeaconUserRequestAddressNullable {
return &NullableBeaconUserRequestAddressNullable{value: val, isSet: true}
}
func (v NullableBeaconUserRequestAddressNullable) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBeaconUserRequestAddressNullable) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}