-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_deliverability_analysis.go
531 lines (451 loc) · 20.1 KB
/
model_deliverability_analysis.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
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
/*
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: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package lob
import (
"encoding/json"
)
// DeliverabilityAnalysis A nested object containing a breakdown of the deliverability of an address.
type DeliverabilityAnalysis struct {
// Result of Delivery Point Validation (DPV), which determines whether or not the address is deliverable by the USPS. Possible values are: * `Y` –– The address is deliverable by the USPS. * `S` –– The address is deliverable by removing the provided secondary unit designator. This information may be incorrect or unnecessary. * `D` –– The address is deliverable to the building's default address but is missing a secondary unit designator and/or number. There is a chance the mail will not reach the intended recipient. * `N` –– The address is not deliverable according to the USPS, but parts of the address are valid (such as the street and ZIP code). * `''` –– This address is not deliverable. No matching street could be found within the city or ZIP code.
DpvConfirmation string `json:"dpv_confirmation"`
// indicates whether or not the address is [CMRA-authorized](https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency). Possible values are: * `Y` –– Address is CMRA-authorized. * `N` –– Address is not CMRA-authorized. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).
DpvCmra string `json:"dpv_cmra"`
// indicates that an address was once deliverable, but has become vacant and is no longer receiving deliveries. Possible values are: * `Y` –– Address is vacant. * `N` –– Address is not vacant. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).
DpvVacant string `json:"dpv_vacant"`
// Corresponds to the USPS field `dpv_no_stat`. Indicates that an address has been vacated in the recent past, and is no longer receiving deliveries. If it's been unoccupied for 90+ days, or temporarily vacant, this will be flagged. Possible values are: * `Y` –– Address is active. * `N` –– Address is not active. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).
DpvActive string `json:"dpv_active"`
// Indicates the reason why an address is vacant or no longer receiving deliveries. Possible values are: * `01` –– Address does not receive mail from the USPS directly, but is serviced by a drop address. * `02` –– Address not yet deliverable. * `03` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). * `04` –– Address is a College, Military Zone, or other type. * `05` –– Address no longer receives deliveries. * `06` –– Address is missing required secondary information. * `''` –– A DPV match is not made or the address is active.
DpvInactiveReason string `json:"dpv_inactive_reason"`
// Indicates a street address for which mail is delivered to a PO Box. Possible values are: * `Y` –– Address is a PO Box throwback delivery point. * `N` –– Address is not a PO Box throwback delivery point. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).
DpvThrowback string `json:"dpv_throwback"`
// Indicates whether deliveries are not performed on one or more days of the week at an address. Possible values are: * `Y` –– Mail delivery does not occur on some days of the week. * `N` –– Mail delivery occurs every day of the week. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).
DpvNonDeliveryDayFlag string `json:"dpv_non_delivery_day_flag"`
// Indicates days of the week (starting on Sunday) deliveries are not performed at an address. For example: * `YNNNNNN` –– Mail delivery does not occur on Sunday's. * `NYNNNYN` –– Mail delivery does not occur on Monday's or Friday's. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string) or address receives mail every day of the week (`deliverability_analysis[dpv_non_delivery_day_flag]` is `N` or an empty string).
DpvNonDeliveryDayValues string `json:"dpv_non_delivery_day_values"`
// Indicates packages to this address will not be left due to security concerns. Possible values are: * `Y` –– Address does not have a secure mailbox. * `N` –– Address has a secure mailbox. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).
DpvNoSecureLocation string `json:"dpv_no_secure_location"`
// Indicates the door of the address is not accessible for mail delivery. Possible values are: * `Y` –– Door is not accessible. * `N` –– Door is accessible. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).
DpvDoorNotAccessible string `json:"dpv_door_not_accessible"`
// An array of 2-character strings that gives more insight into how `deliverability_analysis[dpv_confirmation]` was determined. Will always include at least 1 string, and can include up to 3. For details, see [US Verification Details](#tag/US-Verification-Types).
DpvFootnotes []DpvFootnote `json:"dpv_footnotes"`
// indicates whether or not an address has been flagged in the [Early Warning System](https://docs.informatica.com/data-engineering/data-engineering-quality/10-4-0/address-validator-port-reference/postal-carrier-certification-data-ports/early-warning-system-return-code.html), meaning the address is under development and not yet ready to receive mail. However, it should become available in a few months.
EwsMatch bool `json:"ews_match"`
// indicates whether this address has been converted by [LACS<sup>Link</sup>](https://postalpro.usps.com/address-quality/lacslink). LACS<sup>Link</sup> corrects outdated addresses into their modern counterparts. Possible values are: * `Y` –– New address produced with a matching record in LACS<sup>Link</sup>. * `N` –– New address could not be produced with a matching record in LACS<sup>Link</sup>. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).
LacsIndicator string `json:"lacs_indicator"`
// A code indicating how `deliverability_analysis[lacs_indicator]` was determined. Possible values are: * `A` — A new address was produced because a match was found in LACS<sup>Link</sup>. * `92` — A LACS<sup>Link</sup> record was matched after dropping secondary information. * `14` — A match was found in LACS<sup>Link</sup>, but could not be converted to a deliverable address. * `00` — A match was not found in LACS<sup>Link</sup>, and no new address was produced. * `''` — LACS<sup>Link</sup> was not attempted.
LacsReturnCode string `json:"lacs_return_code"`
// A return code that indicates whether the address was matched and corrected by [Suite<sup>Link</sup>](https://postalpro.usps.com/address-quality-solutions/suitelink). Suite<sup>Link</sup> attempts to provide secondary information to business addresses. Possible values are: * `A` –– A Suite<sup>Link</sup> match was found and secondary information was added. * `00` –– A Suite<sup>Link</sup> match could not be found and no secondary information was added. * `''` –– Suite<sup>Link</sup> lookup was not attempted.
SuiteReturnCode string `json:"suite_return_code"`
}
// NewDeliverabilityAnalysis instantiates a new DeliverabilityAnalysis 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 NewDeliverabilityAnalysis(dpvConfirmation string, dpvCmra string, dpvVacant string, dpvActive string, dpvInactiveReason string, dpvThrowback string, dpvNonDeliveryDayFlag string, dpvNonDeliveryDayValues string, dpvNoSecureLocation string, dpvDoorNotAccessible string, dpvFootnotes []DpvFootnote, ewsMatch bool, lacsIndicator string, lacsReturnCode string, suiteReturnCode string) *DeliverabilityAnalysis {
this := DeliverabilityAnalysis{}
this.DpvConfirmation = dpvConfirmation
this.DpvCmra = dpvCmra
this.DpvVacant = dpvVacant
this.DpvActive = dpvActive
this.DpvInactiveReason = dpvInactiveReason
this.DpvThrowback = dpvThrowback
this.DpvNonDeliveryDayFlag = dpvNonDeliveryDayFlag
this.DpvNonDeliveryDayValues = dpvNonDeliveryDayValues
this.DpvNoSecureLocation = dpvNoSecureLocation
this.DpvDoorNotAccessible = dpvDoorNotAccessible
this.DpvFootnotes = dpvFootnotes
this.EwsMatch = ewsMatch
this.LacsIndicator = lacsIndicator
this.LacsReturnCode = lacsReturnCode
this.SuiteReturnCode = suiteReturnCode
return &this
}
// NewDeliverabilityAnalysisWithDefaults instantiates a new DeliverabilityAnalysis 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 NewDeliverabilityAnalysisWithDefaults() *DeliverabilityAnalysis {
this := DeliverabilityAnalysis{}
return &this
}
// GetDpvConfirmation returns the DpvConfirmation field value
func (o *DeliverabilityAnalysis) GetDpvConfirmation() string {
if o == nil {
var ret string
return ret
}
return o.DpvConfirmation
}
// GetDpvConfirmationOk returns a tuple with the DpvConfirmation field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvConfirmationOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvConfirmation, true
}
// SetDpvConfirmation sets field value
func (o *DeliverabilityAnalysis) SetDpvConfirmation(v string) {
o.DpvConfirmation = v
}
// GetDpvCmra returns the DpvCmra field value
func (o *DeliverabilityAnalysis) GetDpvCmra() string {
if o == nil {
var ret string
return ret
}
return o.DpvCmra
}
// GetDpvCmraOk returns a tuple with the DpvCmra field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvCmraOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvCmra, true
}
// SetDpvCmra sets field value
func (o *DeliverabilityAnalysis) SetDpvCmra(v string) {
o.DpvCmra = v
}
// GetDpvVacant returns the DpvVacant field value
func (o *DeliverabilityAnalysis) GetDpvVacant() string {
if o == nil {
var ret string
return ret
}
return o.DpvVacant
}
// GetDpvVacantOk returns a tuple with the DpvVacant field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvVacantOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvVacant, true
}
// SetDpvVacant sets field value
func (o *DeliverabilityAnalysis) SetDpvVacant(v string) {
o.DpvVacant = v
}
// GetDpvActive returns the DpvActive field value
func (o *DeliverabilityAnalysis) GetDpvActive() string {
if o == nil {
var ret string
return ret
}
return o.DpvActive
}
// GetDpvActiveOk returns a tuple with the DpvActive field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvActiveOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvActive, true
}
// SetDpvActive sets field value
func (o *DeliverabilityAnalysis) SetDpvActive(v string) {
o.DpvActive = v
}
// GetDpvInactiveReason returns the DpvInactiveReason field value
func (o *DeliverabilityAnalysis) GetDpvInactiveReason() string {
if o == nil {
var ret string
return ret
}
return o.DpvInactiveReason
}
// GetDpvInactiveReasonOk returns a tuple with the DpvInactiveReason field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvInactiveReasonOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvInactiveReason, true
}
// SetDpvInactiveReason sets field value
func (o *DeliverabilityAnalysis) SetDpvInactiveReason(v string) {
o.DpvInactiveReason = v
}
// GetDpvThrowback returns the DpvThrowback field value
func (o *DeliverabilityAnalysis) GetDpvThrowback() string {
if o == nil {
var ret string
return ret
}
return o.DpvThrowback
}
// GetDpvThrowbackOk returns a tuple with the DpvThrowback field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvThrowbackOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvThrowback, true
}
// SetDpvThrowback sets field value
func (o *DeliverabilityAnalysis) SetDpvThrowback(v string) {
o.DpvThrowback = v
}
// GetDpvNonDeliveryDayFlag returns the DpvNonDeliveryDayFlag field value
func (o *DeliverabilityAnalysis) GetDpvNonDeliveryDayFlag() string {
if o == nil {
var ret string
return ret
}
return o.DpvNonDeliveryDayFlag
}
// GetDpvNonDeliveryDayFlagOk returns a tuple with the DpvNonDeliveryDayFlag field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvNonDeliveryDayFlagOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvNonDeliveryDayFlag, true
}
// SetDpvNonDeliveryDayFlag sets field value
func (o *DeliverabilityAnalysis) SetDpvNonDeliveryDayFlag(v string) {
o.DpvNonDeliveryDayFlag = v
}
// GetDpvNonDeliveryDayValues returns the DpvNonDeliveryDayValues field value
func (o *DeliverabilityAnalysis) GetDpvNonDeliveryDayValues() string {
if o == nil {
var ret string
return ret
}
return o.DpvNonDeliveryDayValues
}
// GetDpvNonDeliveryDayValuesOk returns a tuple with the DpvNonDeliveryDayValues field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvNonDeliveryDayValuesOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvNonDeliveryDayValues, true
}
// SetDpvNonDeliveryDayValues sets field value
func (o *DeliverabilityAnalysis) SetDpvNonDeliveryDayValues(v string) {
o.DpvNonDeliveryDayValues = v
}
// GetDpvNoSecureLocation returns the DpvNoSecureLocation field value
func (o *DeliverabilityAnalysis) GetDpvNoSecureLocation() string {
if o == nil {
var ret string
return ret
}
return o.DpvNoSecureLocation
}
// GetDpvNoSecureLocationOk returns a tuple with the DpvNoSecureLocation field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvNoSecureLocationOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvNoSecureLocation, true
}
// SetDpvNoSecureLocation sets field value
func (o *DeliverabilityAnalysis) SetDpvNoSecureLocation(v string) {
o.DpvNoSecureLocation = v
}
// GetDpvDoorNotAccessible returns the DpvDoorNotAccessible field value
func (o *DeliverabilityAnalysis) GetDpvDoorNotAccessible() string {
if o == nil {
var ret string
return ret
}
return o.DpvDoorNotAccessible
}
// GetDpvDoorNotAccessibleOk returns a tuple with the DpvDoorNotAccessible field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvDoorNotAccessibleOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DpvDoorNotAccessible, true
}
// SetDpvDoorNotAccessible sets field value
func (o *DeliverabilityAnalysis) SetDpvDoorNotAccessible(v string) {
o.DpvDoorNotAccessible = v
}
// GetDpvFootnotes returns the DpvFootnotes field value
func (o *DeliverabilityAnalysis) GetDpvFootnotes() []DpvFootnote {
if o == nil {
var ret []DpvFootnote
return ret
}
return o.DpvFootnotes
}
// GetDpvFootnotesOk returns a tuple with the DpvFootnotes field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetDpvFootnotesOk() ([]DpvFootnote, bool) {
if o == nil {
return nil, false
}
return o.DpvFootnotes, true
}
// SetDpvFootnotes sets field value
func (o *DeliverabilityAnalysis) SetDpvFootnotes(v []DpvFootnote) {
o.DpvFootnotes = v
}
// GetEwsMatch returns the EwsMatch field value
func (o *DeliverabilityAnalysis) GetEwsMatch() bool {
if o == nil {
var ret bool
return ret
}
return o.EwsMatch
}
// GetEwsMatchOk returns a tuple with the EwsMatch field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetEwsMatchOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.EwsMatch, true
}
// SetEwsMatch sets field value
func (o *DeliverabilityAnalysis) SetEwsMatch(v bool) {
o.EwsMatch = v
}
// GetLacsIndicator returns the LacsIndicator field value
func (o *DeliverabilityAnalysis) GetLacsIndicator() string {
if o == nil {
var ret string
return ret
}
return o.LacsIndicator
}
// GetLacsIndicatorOk returns a tuple with the LacsIndicator field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetLacsIndicatorOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.LacsIndicator, true
}
// SetLacsIndicator sets field value
func (o *DeliverabilityAnalysis) SetLacsIndicator(v string) {
o.LacsIndicator = v
}
// GetLacsReturnCode returns the LacsReturnCode field value
func (o *DeliverabilityAnalysis) GetLacsReturnCode() string {
if o == nil {
var ret string
return ret
}
return o.LacsReturnCode
}
// GetLacsReturnCodeOk returns a tuple with the LacsReturnCode field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetLacsReturnCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.LacsReturnCode, true
}
// SetLacsReturnCode sets field value
func (o *DeliverabilityAnalysis) SetLacsReturnCode(v string) {
o.LacsReturnCode = v
}
// GetSuiteReturnCode returns the SuiteReturnCode field value
func (o *DeliverabilityAnalysis) GetSuiteReturnCode() string {
if o == nil {
var ret string
return ret
}
return o.SuiteReturnCode
}
// GetSuiteReturnCodeOk returns a tuple with the SuiteReturnCode field value
// and a boolean to check if the value has been set.
func (o *DeliverabilityAnalysis) GetSuiteReturnCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.SuiteReturnCode, true
}
// SetSuiteReturnCode sets field value
func (o *DeliverabilityAnalysis) SetSuiteReturnCode(v string) {
o.SuiteReturnCode = v
}
func (o DeliverabilityAnalysis) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["dpv_confirmation"] = o.DpvConfirmation
}
if true {
toSerialize["dpv_cmra"] = o.DpvCmra
}
if true {
toSerialize["dpv_vacant"] = o.DpvVacant
}
if true {
toSerialize["dpv_active"] = o.DpvActive
}
if true {
toSerialize["dpv_inactive_reason"] = o.DpvInactiveReason
}
if true {
toSerialize["dpv_throwback"] = o.DpvThrowback
}
if true {
toSerialize["dpv_non_delivery_day_flag"] = o.DpvNonDeliveryDayFlag
}
if true {
toSerialize["dpv_non_delivery_day_values"] = o.DpvNonDeliveryDayValues
}
if true {
toSerialize["dpv_no_secure_location"] = o.DpvNoSecureLocation
}
if true {
toSerialize["dpv_door_not_accessible"] = o.DpvDoorNotAccessible
}
if true {
toSerialize["dpv_footnotes"] = o.DpvFootnotes
}
if true {
toSerialize["ews_match"] = o.EwsMatch
}
if true {
toSerialize["lacs_indicator"] = o.LacsIndicator
}
if true {
toSerialize["lacs_return_code"] = o.LacsReturnCode
}
if true {
toSerialize["suite_return_code"] = o.SuiteReturnCode
}
return json.Marshal(toSerialize)
}
type NullableDeliverabilityAnalysis struct {
value *DeliverabilityAnalysis
isSet bool
}
func (v NullableDeliverabilityAnalysis) Get() *DeliverabilityAnalysis {
return v.value
}
func (v *NullableDeliverabilityAnalysis) Set(val *DeliverabilityAnalysis) {
v.value = val
v.isSet = true
}
func (v NullableDeliverabilityAnalysis) IsSet() bool {
return v.isSet
}
func (v *NullableDeliverabilityAnalysis) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeliverabilityAnalysis(val *DeliverabilityAnalysis) *NullableDeliverabilityAnalysis {
return &NullableDeliverabilityAnalysis{value: val, isSet: true}
}
func (v NullableDeliverabilityAnalysis) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeliverabilityAnalysis) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}