/
model_us_verifications_writable.go
executable file
·423 lines (357 loc) · 12.9 KB
/
model_us_verifications_writable.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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
/*
Lob
The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
API version: 1.3.0
Contact: lob-openapi@lob.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package lob
import (
"encoding/json"
)
// UsVerificationsWritable struct for UsVerificationsWritable
type UsVerificationsWritable struct {
// The entire address in one string (e.g., \"2261 Market Street 94114\"). _Does not support a recipient and will error when other payload parameters are provided._
Address *string `json:"address,omitempty"`
// The intended recipient, typically a person's or firm's name.
Recipient NullableString `json:"recipient,omitempty"`
// The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number`
PrimaryLine *string `json:"primary_line,omitempty"`
// The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.
SecondaryLine *string `json:"secondary_line,omitempty"`
// Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification.
Urbanization *string `json:"urbanization,omitempty"`
City *string `json:"city,omitempty"`
// The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed.
State *string `json:"state,omitempty"`
// Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`).
ZipCode *string `json:"zip_code,omitempty"`
// ID that is returned in the response body for the verification
TransientId *string `json:"transient_id,omitempty"`
}
// NewUsVerificationsWritable instantiates a new UsVerificationsWritable 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 NewUsVerificationsWritable() *UsVerificationsWritable {
this := UsVerificationsWritable{}
return &this
}
// NewUsVerificationsWritableWithDefaults instantiates a new UsVerificationsWritable 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 NewUsVerificationsWritableWithDefaults() *UsVerificationsWritable {
this := UsVerificationsWritable{}
return &this
}
// GetAddress returns the Address field value if set, zero value otherwise.
func (o *UsVerificationsWritable) GetAddress() string {
if o == nil || o.Address == nil {
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 *UsVerificationsWritable) GetAddressOk() (*string, bool) {
if o == nil || o.Address == nil {
return nil, false
}
return o.Address, true
}
// HasAddress returns a boolean if a field has been set.
func (o *UsVerificationsWritable) HasAddress() bool {
if o != nil && o.Address != nil {
return true
}
return false
}
// SetAddress gets a reference to the given string and assigns it to the Address field.
func (o *UsVerificationsWritable) SetAddress(v string) {
o.Address = &v
}
// GetRecipient returns the Recipient field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsVerificationsWritable) GetRecipient() string {
if o == nil || o.Recipient.Get() == nil {
var ret string
return ret
}
return *o.Recipient.Get()
}
// GetRecipientOk returns a tuple with the Recipient 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 *UsVerificationsWritable) GetRecipientOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Recipient.Get(), o.Recipient.IsSet()
}
// HasRecipient returns a boolean if a field has been set.
func (o *UsVerificationsWritable) HasRecipient() bool {
if o != nil && o.Recipient.IsSet() {
return true
}
return false
}
// SetRecipient gets a reference to the given NullableString and assigns it to the Recipient field.
func (o *UsVerificationsWritable) SetRecipient(v string) {
o.Recipient.Set(&v)
}
// SetRecipientNil sets the value for Recipient to be an explicit nil
func (o *UsVerificationsWritable) SetRecipientNil() {
o.Recipient.Set(nil)
}
// UnsetRecipient ensures that no value is present for Recipient, not even an explicit nil
func (o *UsVerificationsWritable) UnsetRecipient() {
o.Recipient.Unset()
}
// GetPrimaryLine returns the PrimaryLine field value if set, zero value otherwise.
func (o *UsVerificationsWritable) GetPrimaryLine() string {
if o == nil || o.PrimaryLine == nil {
var ret string
return ret
}
return *o.PrimaryLine
}
// GetPrimaryLineOk returns a tuple with the PrimaryLine field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsVerificationsWritable) GetPrimaryLineOk() (*string, bool) {
if o == nil || o.PrimaryLine == nil {
return nil, false
}
return o.PrimaryLine, true
}
// HasPrimaryLine returns a boolean if a field has been set.
func (o *UsVerificationsWritable) HasPrimaryLine() bool {
if o != nil && o.PrimaryLine != nil {
return true
}
return false
}
// SetPrimaryLine gets a reference to the given string and assigns it to the PrimaryLine field.
func (o *UsVerificationsWritable) SetPrimaryLine(v string) {
o.PrimaryLine = &v
}
// GetSecondaryLine returns the SecondaryLine field value if set, zero value otherwise.
func (o *UsVerificationsWritable) GetSecondaryLine() string {
if o == nil || o.SecondaryLine == nil {
var ret string
return ret
}
return *o.SecondaryLine
}
// GetSecondaryLineOk returns a tuple with the SecondaryLine field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsVerificationsWritable) GetSecondaryLineOk() (*string, bool) {
if o == nil || o.SecondaryLine == nil {
return nil, false
}
return o.SecondaryLine, true
}
// HasSecondaryLine returns a boolean if a field has been set.
func (o *UsVerificationsWritable) HasSecondaryLine() bool {
if o != nil && o.SecondaryLine != nil {
return true
}
return false
}
// SetSecondaryLine gets a reference to the given string and assigns it to the SecondaryLine field.
func (o *UsVerificationsWritable) SetSecondaryLine(v string) {
o.SecondaryLine = &v
}
// GetUrbanization returns the Urbanization field value if set, zero value otherwise.
func (o *UsVerificationsWritable) GetUrbanization() string {
if o == nil || o.Urbanization == nil {
var ret string
return ret
}
return *o.Urbanization
}
// GetUrbanizationOk returns a tuple with the Urbanization field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsVerificationsWritable) GetUrbanizationOk() (*string, bool) {
if o == nil || o.Urbanization == nil {
return nil, false
}
return o.Urbanization, true
}
// HasUrbanization returns a boolean if a field has been set.
func (o *UsVerificationsWritable) HasUrbanization() bool {
if o != nil && o.Urbanization != nil {
return true
}
return false
}
// SetUrbanization gets a reference to the given string and assigns it to the Urbanization field.
func (o *UsVerificationsWritable) SetUrbanization(v string) {
o.Urbanization = &v
}
// GetCity returns the City field value if set, zero value otherwise.
func (o *UsVerificationsWritable) GetCity() string {
if o == nil || o.City == nil {
var ret string
return ret
}
return *o.City
}
// GetCityOk returns a tuple with the City field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsVerificationsWritable) GetCityOk() (*string, bool) {
if o == nil || o.City == nil {
return nil, false
}
return o.City, true
}
// HasCity returns a boolean if a field has been set.
func (o *UsVerificationsWritable) HasCity() bool {
if o != nil && o.City != nil {
return true
}
return false
}
// SetCity gets a reference to the given string and assigns it to the City field.
func (o *UsVerificationsWritable) SetCity(v string) {
o.City = &v
}
// GetState returns the State field value if set, zero value otherwise.
func (o *UsVerificationsWritable) GetState() string {
if o == nil || o.State == nil {
var ret string
return ret
}
return *o.State
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsVerificationsWritable) GetStateOk() (*string, bool) {
if o == nil || o.State == nil {
return nil, false
}
return o.State, true
}
// HasState returns a boolean if a field has been set.
func (o *UsVerificationsWritable) HasState() bool {
if o != nil && o.State != nil {
return true
}
return false
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *UsVerificationsWritable) SetState(v string) {
o.State = &v
}
// GetZipCode returns the ZipCode field value if set, zero value otherwise.
func (o *UsVerificationsWritable) GetZipCode() string {
if o == nil || o.ZipCode == nil {
var ret string
return ret
}
return *o.ZipCode
}
// GetZipCodeOk returns a tuple with the ZipCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsVerificationsWritable) GetZipCodeOk() (*string, bool) {
if o == nil || o.ZipCode == nil {
return nil, false
}
return o.ZipCode, true
}
// HasZipCode returns a boolean if a field has been set.
func (o *UsVerificationsWritable) HasZipCode() bool {
if o != nil && o.ZipCode != nil {
return true
}
return false
}
// SetZipCode gets a reference to the given string and assigns it to the ZipCode field.
func (o *UsVerificationsWritable) SetZipCode(v string) {
o.ZipCode = &v
}
// GetTransientId returns the TransientId field value if set, zero value otherwise.
func (o *UsVerificationsWritable) GetTransientId() string {
if o == nil || o.TransientId == nil {
var ret string
return ret
}
return *o.TransientId
}
// GetTransientIdOk returns a tuple with the TransientId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsVerificationsWritable) GetTransientIdOk() (*string, bool) {
if o == nil || o.TransientId == nil {
return nil, false
}
return o.TransientId, true
}
// HasTransientId returns a boolean if a field has been set.
func (o *UsVerificationsWritable) HasTransientId() bool {
if o != nil && o.TransientId != nil {
return true
}
return false
}
// SetTransientId gets a reference to the given string and assigns it to the TransientId field.
func (o *UsVerificationsWritable) SetTransientId(v string) {
o.TransientId = &v
}
func (o UsVerificationsWritable) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Address != nil {
toSerialize["address"] = o.Address
}
if o.Recipient.IsSet() {
toSerialize["recipient"] = o.Recipient.Get()
}
if o.PrimaryLine != nil {
toSerialize["primary_line"] = o.PrimaryLine
}
if o.SecondaryLine != nil {
toSerialize["secondary_line"] = o.SecondaryLine
}
if o.Urbanization != nil {
toSerialize["urbanization"] = o.Urbanization
}
if o.City != nil {
toSerialize["city"] = o.City
}
if o.State != nil {
toSerialize["state"] = o.State
}
if o.ZipCode != nil {
toSerialize["zip_code"] = o.ZipCode
}
if o.TransientId != nil {
toSerialize["transient_id"] = o.TransientId
}
return json.Marshal(toSerialize)
}
type NullableUsVerificationsWritable struct {
value *UsVerificationsWritable
isSet bool
}
func (v NullableUsVerificationsWritable) Get() *UsVerificationsWritable {
return v.value
}
func (v *NullableUsVerificationsWritable) Set(val *UsVerificationsWritable) {
v.value = val
v.isSet = true
}
func (v NullableUsVerificationsWritable) IsSet() bool {
return v.isSet
}
func (v *NullableUsVerificationsWritable) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUsVerificationsWritable(val *UsVerificationsWritable) *NullableUsVerificationsWritable {
return &NullableUsVerificationsWritable{value: val, isSet: true}
}
func (v NullableUsVerificationsWritable) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUsVerificationsWritable) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}