/
model_paystub_details.go
342 lines (287 loc) · 10.7 KB
/
model_paystub_details.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.61.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package plaid
import (
"encoding/json"
)
// PaystubDetails An object representing details that can be found on the paystub.
type PaystubDetails struct {
// Beginning date of the pay period on the paystub in the 'YYYY-MM-DD' format.
PayPeriodStartDate NullableString `json:"pay_period_start_date,omitempty"`
// Ending date of the pay period on the paystub in the 'YYYY-MM-DD' format.
PayPeriodEndDate NullableString `json:"pay_period_end_date,omitempty"`
// Pay date on the paystub in the 'YYYY-MM-DD' format.
PayDate NullableString `json:"pay_date,omitempty"`
// The name of the payroll provider that generated the paystub, e.g. ADP
PaystubProvider NullableString `json:"paystub_provider,omitempty"`
PayFrequency NullablePaystubPayFrequency `json:"pay_frequency,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PaystubDetails PaystubDetails
// NewPaystubDetails instantiates a new PaystubDetails 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 NewPaystubDetails() *PaystubDetails {
this := PaystubDetails{}
return &this
}
// NewPaystubDetailsWithDefaults instantiates a new PaystubDetails 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 NewPaystubDetailsWithDefaults() *PaystubDetails {
this := PaystubDetails{}
return &this
}
// GetPayPeriodStartDate returns the PayPeriodStartDate field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PaystubDetails) GetPayPeriodStartDate() string {
if o == nil || o.PayPeriodStartDate.Get() == nil {
var ret string
return ret
}
return *o.PayPeriodStartDate.Get()
}
// GetPayPeriodStartDateOk returns a tuple with the PayPeriodStartDate 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 *PaystubDetails) GetPayPeriodStartDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.PayPeriodStartDate.Get(), o.PayPeriodStartDate.IsSet()
}
// HasPayPeriodStartDate returns a boolean if a field has been set.
func (o *PaystubDetails) HasPayPeriodStartDate() bool {
if o != nil && o.PayPeriodStartDate.IsSet() {
return true
}
return false
}
// SetPayPeriodStartDate gets a reference to the given NullableString and assigns it to the PayPeriodStartDate field.
func (o *PaystubDetails) SetPayPeriodStartDate(v string) {
o.PayPeriodStartDate.Set(&v)
}
// SetPayPeriodStartDateNil sets the value for PayPeriodStartDate to be an explicit nil
func (o *PaystubDetails) SetPayPeriodStartDateNil() {
o.PayPeriodStartDate.Set(nil)
}
// UnsetPayPeriodStartDate ensures that no value is present for PayPeriodStartDate, not even an explicit nil
func (o *PaystubDetails) UnsetPayPeriodStartDate() {
o.PayPeriodStartDate.Unset()
}
// GetPayPeriodEndDate returns the PayPeriodEndDate field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PaystubDetails) GetPayPeriodEndDate() string {
if o == nil || o.PayPeriodEndDate.Get() == nil {
var ret string
return ret
}
return *o.PayPeriodEndDate.Get()
}
// GetPayPeriodEndDateOk returns a tuple with the PayPeriodEndDate 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 *PaystubDetails) GetPayPeriodEndDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.PayPeriodEndDate.Get(), o.PayPeriodEndDate.IsSet()
}
// HasPayPeriodEndDate returns a boolean if a field has been set.
func (o *PaystubDetails) HasPayPeriodEndDate() bool {
if o != nil && o.PayPeriodEndDate.IsSet() {
return true
}
return false
}
// SetPayPeriodEndDate gets a reference to the given NullableString and assigns it to the PayPeriodEndDate field.
func (o *PaystubDetails) SetPayPeriodEndDate(v string) {
o.PayPeriodEndDate.Set(&v)
}
// SetPayPeriodEndDateNil sets the value for PayPeriodEndDate to be an explicit nil
func (o *PaystubDetails) SetPayPeriodEndDateNil() {
o.PayPeriodEndDate.Set(nil)
}
// UnsetPayPeriodEndDate ensures that no value is present for PayPeriodEndDate, not even an explicit nil
func (o *PaystubDetails) UnsetPayPeriodEndDate() {
o.PayPeriodEndDate.Unset()
}
// GetPayDate returns the PayDate field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PaystubDetails) GetPayDate() string {
if o == nil || o.PayDate.Get() == nil {
var ret string
return ret
}
return *o.PayDate.Get()
}
// GetPayDateOk returns a tuple with the PayDate 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 *PaystubDetails) GetPayDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.PayDate.Get(), o.PayDate.IsSet()
}
// HasPayDate returns a boolean if a field has been set.
func (o *PaystubDetails) HasPayDate() bool {
if o != nil && o.PayDate.IsSet() {
return true
}
return false
}
// SetPayDate gets a reference to the given NullableString and assigns it to the PayDate field.
func (o *PaystubDetails) SetPayDate(v string) {
o.PayDate.Set(&v)
}
// SetPayDateNil sets the value for PayDate to be an explicit nil
func (o *PaystubDetails) SetPayDateNil() {
o.PayDate.Set(nil)
}
// UnsetPayDate ensures that no value is present for PayDate, not even an explicit nil
func (o *PaystubDetails) UnsetPayDate() {
o.PayDate.Unset()
}
// GetPaystubProvider returns the PaystubProvider field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PaystubDetails) GetPaystubProvider() string {
if o == nil || o.PaystubProvider.Get() == nil {
var ret string
return ret
}
return *o.PaystubProvider.Get()
}
// GetPaystubProviderOk returns a tuple with the PaystubProvider 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 *PaystubDetails) GetPaystubProviderOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.PaystubProvider.Get(), o.PaystubProvider.IsSet()
}
// HasPaystubProvider returns a boolean if a field has been set.
func (o *PaystubDetails) HasPaystubProvider() bool {
if o != nil && o.PaystubProvider.IsSet() {
return true
}
return false
}
// SetPaystubProvider gets a reference to the given NullableString and assigns it to the PaystubProvider field.
func (o *PaystubDetails) SetPaystubProvider(v string) {
o.PaystubProvider.Set(&v)
}
// SetPaystubProviderNil sets the value for PaystubProvider to be an explicit nil
func (o *PaystubDetails) SetPaystubProviderNil() {
o.PaystubProvider.Set(nil)
}
// UnsetPaystubProvider ensures that no value is present for PaystubProvider, not even an explicit nil
func (o *PaystubDetails) UnsetPaystubProvider() {
o.PaystubProvider.Unset()
}
// GetPayFrequency returns the PayFrequency field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PaystubDetails) GetPayFrequency() PaystubPayFrequency {
if o == nil || o.PayFrequency.Get() == nil {
var ret PaystubPayFrequency
return ret
}
return *o.PayFrequency.Get()
}
// GetPayFrequencyOk returns a tuple with the PayFrequency 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 *PaystubDetails) GetPayFrequencyOk() (*PaystubPayFrequency, bool) {
if o == nil {
return nil, false
}
return o.PayFrequency.Get(), o.PayFrequency.IsSet()
}
// HasPayFrequency returns a boolean if a field has been set.
func (o *PaystubDetails) HasPayFrequency() bool {
if o != nil && o.PayFrequency.IsSet() {
return true
}
return false
}
// SetPayFrequency gets a reference to the given NullablePaystubPayFrequency and assigns it to the PayFrequency field.
func (o *PaystubDetails) SetPayFrequency(v PaystubPayFrequency) {
o.PayFrequency.Set(&v)
}
// SetPayFrequencyNil sets the value for PayFrequency to be an explicit nil
func (o *PaystubDetails) SetPayFrequencyNil() {
o.PayFrequency.Set(nil)
}
// UnsetPayFrequency ensures that no value is present for PayFrequency, not even an explicit nil
func (o *PaystubDetails) UnsetPayFrequency() {
o.PayFrequency.Unset()
}
func (o PaystubDetails) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.PayPeriodStartDate.IsSet() {
toSerialize["pay_period_start_date"] = o.PayPeriodStartDate.Get()
}
if o.PayPeriodEndDate.IsSet() {
toSerialize["pay_period_end_date"] = o.PayPeriodEndDate.Get()
}
if o.PayDate.IsSet() {
toSerialize["pay_date"] = o.PayDate.Get()
}
if o.PaystubProvider.IsSet() {
toSerialize["paystub_provider"] = o.PaystubProvider.Get()
}
if o.PayFrequency.IsSet() {
toSerialize["pay_frequency"] = o.PayFrequency.Get()
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *PaystubDetails) UnmarshalJSON(bytes []byte) (err error) {
varPaystubDetails := _PaystubDetails{}
if err = json.Unmarshal(bytes, &varPaystubDetails); err == nil {
*o = PaystubDetails(varPaystubDetails)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "pay_period_start_date")
delete(additionalProperties, "pay_period_end_date")
delete(additionalProperties, "pay_date")
delete(additionalProperties, "paystub_provider")
delete(additionalProperties, "pay_frequency")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePaystubDetails struct {
value *PaystubDetails
isSet bool
}
func (v NullablePaystubDetails) Get() *PaystubDetails {
return v.value
}
func (v *NullablePaystubDetails) Set(val *PaystubDetails) {
v.value = val
v.isSet = true
}
func (v NullablePaystubDetails) IsSet() bool {
return v.isSet
}
func (v *NullablePaystubDetails) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePaystubDetails(val *PaystubDetails) *NullablePaystubDetails {
return &NullablePaystubDetails{value: val, isSet: true}
}
func (v NullablePaystubDetails) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePaystubDetails) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}