/
model_w2_state_and_local_wages.go
439 lines (372 loc) · 14.1 KB
/
model_w2_state_and_local_wages.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
/*
* The Plaid API
*
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* API version: 2020-09-14_1.61.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package plaid
import (
"encoding/json"
)
// W2StateAndLocalWages struct for W2StateAndLocalWages
type W2StateAndLocalWages struct {
// State associated with the wage.
State NullableString `json:"state,omitempty"`
// State identification number of the employer.
EmployerStateIdNumber NullableString `json:"employer_state_id_number,omitempty"`
// Wages and tips from the specified state.
StateWagesTips NullableString `json:"state_wages_tips,omitempty"`
// Income tax from the specified state.
StateIncomeTax NullableString `json:"state_income_tax,omitempty"`
// Wages and tips from the locality.
LocalWagesTips NullableString `json:"local_wages_tips,omitempty"`
// Income tax from the locality.
LocalIncomeTax NullableString `json:"local_income_tax,omitempty"`
// Name of the locality.
LocalityName NullableString `json:"locality_name,omitempty"`
AdditionalProperties map[string]interface{}
}
type _W2StateAndLocalWages W2StateAndLocalWages
// NewW2StateAndLocalWages instantiates a new W2StateAndLocalWages 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 NewW2StateAndLocalWages() *W2StateAndLocalWages {
this := W2StateAndLocalWages{}
return &this
}
// NewW2StateAndLocalWagesWithDefaults instantiates a new W2StateAndLocalWages 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 NewW2StateAndLocalWagesWithDefaults() *W2StateAndLocalWages {
this := W2StateAndLocalWages{}
return &this
}
// GetState returns the State field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *W2StateAndLocalWages) GetState() string {
if o == nil || o.State.Get() == nil {
var ret string
return ret
}
return *o.State.Get()
}
// GetStateOk returns a tuple with the State 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 *W2StateAndLocalWages) GetStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.State.Get(), o.State.IsSet()
}
// HasState returns a boolean if a field has been set.
func (o *W2StateAndLocalWages) HasState() bool {
if o != nil && o.State.IsSet() {
return true
}
return false
}
// SetState gets a reference to the given NullableString and assigns it to the State field.
func (o *W2StateAndLocalWages) SetState(v string) {
o.State.Set(&v)
}
// SetStateNil sets the value for State to be an explicit nil
func (o *W2StateAndLocalWages) SetStateNil() {
o.State.Set(nil)
}
// UnsetState ensures that no value is present for State, not even an explicit nil
func (o *W2StateAndLocalWages) UnsetState() {
o.State.Unset()
}
// GetEmployerStateIdNumber returns the EmployerStateIdNumber field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *W2StateAndLocalWages) GetEmployerStateIdNumber() string {
if o == nil || o.EmployerStateIdNumber.Get() == nil {
var ret string
return ret
}
return *o.EmployerStateIdNumber.Get()
}
// GetEmployerStateIdNumberOk returns a tuple with the EmployerStateIdNumber 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 *W2StateAndLocalWages) GetEmployerStateIdNumberOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.EmployerStateIdNumber.Get(), o.EmployerStateIdNumber.IsSet()
}
// HasEmployerStateIdNumber returns a boolean if a field has been set.
func (o *W2StateAndLocalWages) HasEmployerStateIdNumber() bool {
if o != nil && o.EmployerStateIdNumber.IsSet() {
return true
}
return false
}
// SetEmployerStateIdNumber gets a reference to the given NullableString and assigns it to the EmployerStateIdNumber field.
func (o *W2StateAndLocalWages) SetEmployerStateIdNumber(v string) {
o.EmployerStateIdNumber.Set(&v)
}
// SetEmployerStateIdNumberNil sets the value for EmployerStateIdNumber to be an explicit nil
func (o *W2StateAndLocalWages) SetEmployerStateIdNumberNil() {
o.EmployerStateIdNumber.Set(nil)
}
// UnsetEmployerStateIdNumber ensures that no value is present for EmployerStateIdNumber, not even an explicit nil
func (o *W2StateAndLocalWages) UnsetEmployerStateIdNumber() {
o.EmployerStateIdNumber.Unset()
}
// GetStateWagesTips returns the StateWagesTips field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *W2StateAndLocalWages) GetStateWagesTips() string {
if o == nil || o.StateWagesTips.Get() == nil {
var ret string
return ret
}
return *o.StateWagesTips.Get()
}
// GetStateWagesTipsOk returns a tuple with the StateWagesTips 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 *W2StateAndLocalWages) GetStateWagesTipsOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.StateWagesTips.Get(), o.StateWagesTips.IsSet()
}
// HasStateWagesTips returns a boolean if a field has been set.
func (o *W2StateAndLocalWages) HasStateWagesTips() bool {
if o != nil && o.StateWagesTips.IsSet() {
return true
}
return false
}
// SetStateWagesTips gets a reference to the given NullableString and assigns it to the StateWagesTips field.
func (o *W2StateAndLocalWages) SetStateWagesTips(v string) {
o.StateWagesTips.Set(&v)
}
// SetStateWagesTipsNil sets the value for StateWagesTips to be an explicit nil
func (o *W2StateAndLocalWages) SetStateWagesTipsNil() {
o.StateWagesTips.Set(nil)
}
// UnsetStateWagesTips ensures that no value is present for StateWagesTips, not even an explicit nil
func (o *W2StateAndLocalWages) UnsetStateWagesTips() {
o.StateWagesTips.Unset()
}
// GetStateIncomeTax returns the StateIncomeTax field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *W2StateAndLocalWages) GetStateIncomeTax() string {
if o == nil || o.StateIncomeTax.Get() == nil {
var ret string
return ret
}
return *o.StateIncomeTax.Get()
}
// GetStateIncomeTaxOk returns a tuple with the StateIncomeTax 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 *W2StateAndLocalWages) GetStateIncomeTaxOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.StateIncomeTax.Get(), o.StateIncomeTax.IsSet()
}
// HasStateIncomeTax returns a boolean if a field has been set.
func (o *W2StateAndLocalWages) HasStateIncomeTax() bool {
if o != nil && o.StateIncomeTax.IsSet() {
return true
}
return false
}
// SetStateIncomeTax gets a reference to the given NullableString and assigns it to the StateIncomeTax field.
func (o *W2StateAndLocalWages) SetStateIncomeTax(v string) {
o.StateIncomeTax.Set(&v)
}
// SetStateIncomeTaxNil sets the value for StateIncomeTax to be an explicit nil
func (o *W2StateAndLocalWages) SetStateIncomeTaxNil() {
o.StateIncomeTax.Set(nil)
}
// UnsetStateIncomeTax ensures that no value is present for StateIncomeTax, not even an explicit nil
func (o *W2StateAndLocalWages) UnsetStateIncomeTax() {
o.StateIncomeTax.Unset()
}
// GetLocalWagesTips returns the LocalWagesTips field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *W2StateAndLocalWages) GetLocalWagesTips() string {
if o == nil || o.LocalWagesTips.Get() == nil {
var ret string
return ret
}
return *o.LocalWagesTips.Get()
}
// GetLocalWagesTipsOk returns a tuple with the LocalWagesTips 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 *W2StateAndLocalWages) GetLocalWagesTipsOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.LocalWagesTips.Get(), o.LocalWagesTips.IsSet()
}
// HasLocalWagesTips returns a boolean if a field has been set.
func (o *W2StateAndLocalWages) HasLocalWagesTips() bool {
if o != nil && o.LocalWagesTips.IsSet() {
return true
}
return false
}
// SetLocalWagesTips gets a reference to the given NullableString and assigns it to the LocalWagesTips field.
func (o *W2StateAndLocalWages) SetLocalWagesTips(v string) {
o.LocalWagesTips.Set(&v)
}
// SetLocalWagesTipsNil sets the value for LocalWagesTips to be an explicit nil
func (o *W2StateAndLocalWages) SetLocalWagesTipsNil() {
o.LocalWagesTips.Set(nil)
}
// UnsetLocalWagesTips ensures that no value is present for LocalWagesTips, not even an explicit nil
func (o *W2StateAndLocalWages) UnsetLocalWagesTips() {
o.LocalWagesTips.Unset()
}
// GetLocalIncomeTax returns the LocalIncomeTax field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *W2StateAndLocalWages) GetLocalIncomeTax() string {
if o == nil || o.LocalIncomeTax.Get() == nil {
var ret string
return ret
}
return *o.LocalIncomeTax.Get()
}
// GetLocalIncomeTaxOk returns a tuple with the LocalIncomeTax 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 *W2StateAndLocalWages) GetLocalIncomeTaxOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.LocalIncomeTax.Get(), o.LocalIncomeTax.IsSet()
}
// HasLocalIncomeTax returns a boolean if a field has been set.
func (o *W2StateAndLocalWages) HasLocalIncomeTax() bool {
if o != nil && o.LocalIncomeTax.IsSet() {
return true
}
return false
}
// SetLocalIncomeTax gets a reference to the given NullableString and assigns it to the LocalIncomeTax field.
func (o *W2StateAndLocalWages) SetLocalIncomeTax(v string) {
o.LocalIncomeTax.Set(&v)
}
// SetLocalIncomeTaxNil sets the value for LocalIncomeTax to be an explicit nil
func (o *W2StateAndLocalWages) SetLocalIncomeTaxNil() {
o.LocalIncomeTax.Set(nil)
}
// UnsetLocalIncomeTax ensures that no value is present for LocalIncomeTax, not even an explicit nil
func (o *W2StateAndLocalWages) UnsetLocalIncomeTax() {
o.LocalIncomeTax.Unset()
}
// GetLocalityName returns the LocalityName field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *W2StateAndLocalWages) GetLocalityName() string {
if o == nil || o.LocalityName.Get() == nil {
var ret string
return ret
}
return *o.LocalityName.Get()
}
// GetLocalityNameOk returns a tuple with the LocalityName 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 *W2StateAndLocalWages) GetLocalityNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.LocalityName.Get(), o.LocalityName.IsSet()
}
// HasLocalityName returns a boolean if a field has been set.
func (o *W2StateAndLocalWages) HasLocalityName() bool {
if o != nil && o.LocalityName.IsSet() {
return true
}
return false
}
// SetLocalityName gets a reference to the given NullableString and assigns it to the LocalityName field.
func (o *W2StateAndLocalWages) SetLocalityName(v string) {
o.LocalityName.Set(&v)
}
// SetLocalityNameNil sets the value for LocalityName to be an explicit nil
func (o *W2StateAndLocalWages) SetLocalityNameNil() {
o.LocalityName.Set(nil)
}
// UnsetLocalityName ensures that no value is present for LocalityName, not even an explicit nil
func (o *W2StateAndLocalWages) UnsetLocalityName() {
o.LocalityName.Unset()
}
func (o W2StateAndLocalWages) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.State.IsSet() {
toSerialize["state"] = o.State.Get()
}
if o.EmployerStateIdNumber.IsSet() {
toSerialize["employer_state_id_number"] = o.EmployerStateIdNumber.Get()
}
if o.StateWagesTips.IsSet() {
toSerialize["state_wages_tips"] = o.StateWagesTips.Get()
}
if o.StateIncomeTax.IsSet() {
toSerialize["state_income_tax"] = o.StateIncomeTax.Get()
}
if o.LocalWagesTips.IsSet() {
toSerialize["local_wages_tips"] = o.LocalWagesTips.Get()
}
if o.LocalIncomeTax.IsSet() {
toSerialize["local_income_tax"] = o.LocalIncomeTax.Get()
}
if o.LocalityName.IsSet() {
toSerialize["locality_name"] = o.LocalityName.Get()
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *W2StateAndLocalWages) UnmarshalJSON(bytes []byte) (err error) {
varW2StateAndLocalWages := _W2StateAndLocalWages{}
if err = json.Unmarshal(bytes, &varW2StateAndLocalWages); err == nil {
*o = W2StateAndLocalWages(varW2StateAndLocalWages)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "state")
delete(additionalProperties, "employer_state_id_number")
delete(additionalProperties, "state_wages_tips")
delete(additionalProperties, "state_income_tax")
delete(additionalProperties, "local_wages_tips")
delete(additionalProperties, "local_income_tax")
delete(additionalProperties, "locality_name")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableW2StateAndLocalWages struct {
value *W2StateAndLocalWages
isSet bool
}
func (v NullableW2StateAndLocalWages) Get() *W2StateAndLocalWages {
return v.value
}
func (v *NullableW2StateAndLocalWages) Set(val *W2StateAndLocalWages) {
v.value = val
v.isSet = true
}
func (v NullableW2StateAndLocalWages) IsSet() bool {
return v.isSet
}
func (v *NullableW2StateAndLocalWages) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableW2StateAndLocalWages(val *W2StateAndLocalWages) *NullableW2StateAndLocalWages {
return &NullableW2StateAndLocalWages{value: val, isSet: true}
}
func (v NullableW2StateAndLocalWages) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableW2StateAndLocalWages) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}