-
Notifications
You must be signed in to change notification settings - Fork 10
/
model_consent.go
164 lines (135 loc) · 3.79 KB
/
model_consent.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
/*
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package godaddy
import (
"encoding/json"
)
// Consent struct for Consent
type Consent struct {
// Timestamp indicating when the end-user consented to these legal agreements
AgreedAt string `json:"agreedAt"`
// Originating client IP address of the end-user's computer when they consented to these legal agreements
AgreedBy string `json:"agreedBy"`
// Unique identifiers of the legal agreements to which the end-user has agreed, as returned from the/domains/agreements endpoint
AgreementKeys []string `json:"agreementKeys"`
}
// NewConsent instantiates a new Consent 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 NewConsent(agreedAt string, agreedBy string, agreementKeys []string, ) *Consent {
this := Consent{}
this.AgreedAt = agreedAt
this.AgreedBy = agreedBy
this.AgreementKeys = agreementKeys
return &this
}
// NewConsentWithDefaults instantiates a new Consent 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 NewConsentWithDefaults() *Consent {
this := Consent{}
return &this
}
// GetAgreedAt returns the AgreedAt field value
func (o *Consent) GetAgreedAt() string {
if o == nil {
var ret string
return ret
}
return o.AgreedAt
}
// GetAgreedAtOk returns a tuple with the AgreedAt field value
// and a boolean to check if the value has been set.
func (o *Consent) GetAgreedAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AgreedAt, true
}
// SetAgreedAt sets field value
func (o *Consent) SetAgreedAt(v string) {
o.AgreedAt = v
}
// GetAgreedBy returns the AgreedBy field value
func (o *Consent) GetAgreedBy() string {
if o == nil {
var ret string
return ret
}
return o.AgreedBy
}
// GetAgreedByOk returns a tuple with the AgreedBy field value
// and a boolean to check if the value has been set.
func (o *Consent) GetAgreedByOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AgreedBy, true
}
// SetAgreedBy sets field value
func (o *Consent) SetAgreedBy(v string) {
o.AgreedBy = v
}
// GetAgreementKeys returns the AgreementKeys field value
func (o *Consent) GetAgreementKeys() []string {
if o == nil {
var ret []string
return ret
}
return o.AgreementKeys
}
// GetAgreementKeysOk returns a tuple with the AgreementKeys field value
// and a boolean to check if the value has been set.
func (o *Consent) GetAgreementKeysOk() (*[]string, bool) {
if o == nil {
return nil, false
}
return &o.AgreementKeys, true
}
// SetAgreementKeys sets field value
func (o *Consent) SetAgreementKeys(v []string) {
o.AgreementKeys = v
}
func (o Consent) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["agreedAt"] = o.AgreedAt
}
if true {
toSerialize["agreedBy"] = o.AgreedBy
}
if true {
toSerialize["agreementKeys"] = o.AgreementKeys
}
return json.Marshal(toSerialize)
}
type NullableConsent struct {
value *Consent
isSet bool
}
func (v NullableConsent) Get() *Consent {
return v.value
}
func (v *NullableConsent) Set(val *Consent) {
v.value = val
v.isSet = true
}
func (v NullableConsent) IsSet() bool {
return v.isSet
}
func (v *NullableConsent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableConsent(val *Consent) *NullableConsent {
return &NullableConsent{value: val, isSet: true}
}
func (v NullableConsent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableConsent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}