-
Notifications
You must be signed in to change notification settings - Fork 88
/
model_form1099_type.go
109 lines (84 loc) · 2.19 KB
/
model_form1099_type.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
/*
* 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"
"fmt"
)
// Form1099Type Form 1099 Type
type Form1099Type string
var _ = fmt.Printf
// List of Form1099Type
const (
FORM1099TYPE_UNKNOWN Form1099Type = "FORM_1099_TYPE_UNKNOWN"
FORM1099TYPE_MISC Form1099Type = "FORM_1099_TYPE_MISC"
FORM1099TYPE_K Form1099Type = "FORM_1099_TYPE_K"
)
var allowedForm1099TypeEnumValues = []Form1099Type{
"FORM_1099_TYPE_UNKNOWN",
"FORM_1099_TYPE_MISC",
"FORM_1099_TYPE_K",
}
func (v *Form1099Type) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := Form1099Type(value)
*v = enumTypeValue
return nil
}
// NewForm1099TypeFromValue returns a pointer to a valid Form1099Type
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewForm1099TypeFromValue(v string) (*Form1099Type, error) {
ev := Form1099Type(v)
return &ev, nil
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v Form1099Type) IsValid() bool {
for _, existing := range allowedForm1099TypeEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to Form1099Type value
func (v Form1099Type) Ptr() *Form1099Type {
return &v
}
type NullableForm1099Type struct {
value *Form1099Type
isSet bool
}
func (v NullableForm1099Type) Get() *Form1099Type {
return v.value
}
func (v *NullableForm1099Type) Set(val *Form1099Type) {
v.value = val
v.isSet = true
}
func (v NullableForm1099Type) IsSet() bool {
return v.isSet
}
func (v *NullableForm1099Type) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableForm1099Type(val *Form1099Type) *NullableForm1099Type {
return &NullableForm1099Type{value: val, isSet: true}
}
func (v NullableForm1099Type) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableForm1099Type) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}