-
Notifications
You must be signed in to change notification settings - Fork 88
/
model_document_risk_signal.go
368 lines (311 loc) · 11.1 KB
/
model_document_risk_signal.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
/*
* 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"
)
// DocumentRiskSignal Details about a certain reason as to why a document could potentially be fraudulent.
type DocumentRiskSignal struct {
// The result from the risk signal check.
Type NullableString `json:"type"`
// The field which the risk signal was computed for
Field NullableString `json:"field"`
// A flag used to quickly identify if the signal indicates that this field is authentic or fraudulent
HasFraudRisk NullableBool `json:"has_fraud_risk"`
InstitutionMetadata NullableDocumentRiskSignalInstitutionMetadata `json:"institution_metadata"`
// The expected value of the field, as seen on the document
ExpectedValue NullableString `json:"expected_value"`
// The derived value obtained in the risk signal calculation process for this field
ActualValue NullableString `json:"actual_value"`
// A human-readable explanation providing more detail into the particular risk signal
SignalDescription NullableString `json:"signal_description"`
// The relevant page associated with the risk signal
PageNumber NullableInt32 `json:"page_number"`
AdditionalProperties map[string]interface{}
}
type _DocumentRiskSignal DocumentRiskSignal
// NewDocumentRiskSignal instantiates a new DocumentRiskSignal 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 NewDocumentRiskSignal(type_ NullableString, field NullableString, hasFraudRisk NullableBool, institutionMetadata NullableDocumentRiskSignalInstitutionMetadata, expectedValue NullableString, actualValue NullableString, signalDescription NullableString, pageNumber NullableInt32) *DocumentRiskSignal {
this := DocumentRiskSignal{}
this.Type = type_
this.Field = field
this.HasFraudRisk = hasFraudRisk
this.InstitutionMetadata = institutionMetadata
this.ExpectedValue = expectedValue
this.ActualValue = actualValue
this.SignalDescription = signalDescription
this.PageNumber = pageNumber
return &this
}
// NewDocumentRiskSignalWithDefaults instantiates a new DocumentRiskSignal 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 NewDocumentRiskSignalWithDefaults() *DocumentRiskSignal {
this := DocumentRiskSignal{}
return &this
}
// GetType returns the Type field value
// If the value is explicit nil, the zero value for string will be returned
func (o *DocumentRiskSignal) GetType() string {
if o == nil || o.Type.Get() == nil {
var ret string
return ret
}
return *o.Type.Get()
}
// GetTypeOk returns a tuple with the Type field value
// 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 *DocumentRiskSignal) GetTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Type.Get(), o.Type.IsSet()
}
// SetType sets field value
func (o *DocumentRiskSignal) SetType(v string) {
o.Type.Set(&v)
}
// GetField returns the Field field value
// If the value is explicit nil, the zero value for string will be returned
func (o *DocumentRiskSignal) GetField() string {
if o == nil || o.Field.Get() == nil {
var ret string
return ret
}
return *o.Field.Get()
}
// GetFieldOk returns a tuple with the Field field value
// 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 *DocumentRiskSignal) GetFieldOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Field.Get(), o.Field.IsSet()
}
// SetField sets field value
func (o *DocumentRiskSignal) SetField(v string) {
o.Field.Set(&v)
}
// GetHasFraudRisk returns the HasFraudRisk field value
// If the value is explicit nil, the zero value for bool will be returned
func (o *DocumentRiskSignal) GetHasFraudRisk() bool {
if o == nil || o.HasFraudRisk.Get() == nil {
var ret bool
return ret
}
return *o.HasFraudRisk.Get()
}
// GetHasFraudRiskOk returns a tuple with the HasFraudRisk field value
// 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 *DocumentRiskSignal) GetHasFraudRiskOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.HasFraudRisk.Get(), o.HasFraudRisk.IsSet()
}
// SetHasFraudRisk sets field value
func (o *DocumentRiskSignal) SetHasFraudRisk(v bool) {
o.HasFraudRisk.Set(&v)
}
// GetInstitutionMetadata returns the InstitutionMetadata field value
// If the value is explicit nil, the zero value for DocumentRiskSignalInstitutionMetadata will be returned
func (o *DocumentRiskSignal) GetInstitutionMetadata() DocumentRiskSignalInstitutionMetadata {
if o == nil || o.InstitutionMetadata.Get() == nil {
var ret DocumentRiskSignalInstitutionMetadata
return ret
}
return *o.InstitutionMetadata.Get()
}
// GetInstitutionMetadataOk returns a tuple with the InstitutionMetadata field value
// 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 *DocumentRiskSignal) GetInstitutionMetadataOk() (*DocumentRiskSignalInstitutionMetadata, bool) {
if o == nil {
return nil, false
}
return o.InstitutionMetadata.Get(), o.InstitutionMetadata.IsSet()
}
// SetInstitutionMetadata sets field value
func (o *DocumentRiskSignal) SetInstitutionMetadata(v DocumentRiskSignalInstitutionMetadata) {
o.InstitutionMetadata.Set(&v)
}
// GetExpectedValue returns the ExpectedValue field value
// If the value is explicit nil, the zero value for string will be returned
func (o *DocumentRiskSignal) GetExpectedValue() string {
if o == nil || o.ExpectedValue.Get() == nil {
var ret string
return ret
}
return *o.ExpectedValue.Get()
}
// GetExpectedValueOk returns a tuple with the ExpectedValue field value
// 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 *DocumentRiskSignal) GetExpectedValueOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ExpectedValue.Get(), o.ExpectedValue.IsSet()
}
// SetExpectedValue sets field value
func (o *DocumentRiskSignal) SetExpectedValue(v string) {
o.ExpectedValue.Set(&v)
}
// GetActualValue returns the ActualValue field value
// If the value is explicit nil, the zero value for string will be returned
func (o *DocumentRiskSignal) GetActualValue() string {
if o == nil || o.ActualValue.Get() == nil {
var ret string
return ret
}
return *o.ActualValue.Get()
}
// GetActualValueOk returns a tuple with the ActualValue field value
// 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 *DocumentRiskSignal) GetActualValueOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ActualValue.Get(), o.ActualValue.IsSet()
}
// SetActualValue sets field value
func (o *DocumentRiskSignal) SetActualValue(v string) {
o.ActualValue.Set(&v)
}
// GetSignalDescription returns the SignalDescription field value
// If the value is explicit nil, the zero value for string will be returned
func (o *DocumentRiskSignal) GetSignalDescription() string {
if o == nil || o.SignalDescription.Get() == nil {
var ret string
return ret
}
return *o.SignalDescription.Get()
}
// GetSignalDescriptionOk returns a tuple with the SignalDescription field value
// 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 *DocumentRiskSignal) GetSignalDescriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.SignalDescription.Get(), o.SignalDescription.IsSet()
}
// SetSignalDescription sets field value
func (o *DocumentRiskSignal) SetSignalDescription(v string) {
o.SignalDescription.Set(&v)
}
// GetPageNumber returns the PageNumber field value
// If the value is explicit nil, the zero value for int32 will be returned
func (o *DocumentRiskSignal) GetPageNumber() int32 {
if o == nil || o.PageNumber.Get() == nil {
var ret int32
return ret
}
return *o.PageNumber.Get()
}
// GetPageNumberOk returns a tuple with the PageNumber field value
// 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 *DocumentRiskSignal) GetPageNumberOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.PageNumber.Get(), o.PageNumber.IsSet()
}
// SetPageNumber sets field value
func (o *DocumentRiskSignal) SetPageNumber(v int32) {
o.PageNumber.Set(&v)
}
func (o DocumentRiskSignal) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["type"] = o.Type.Get()
}
if true {
toSerialize["field"] = o.Field.Get()
}
if true {
toSerialize["has_fraud_risk"] = o.HasFraudRisk.Get()
}
if true {
toSerialize["institution_metadata"] = o.InstitutionMetadata.Get()
}
if true {
toSerialize["expected_value"] = o.ExpectedValue.Get()
}
if true {
toSerialize["actual_value"] = o.ActualValue.Get()
}
if true {
toSerialize["signal_description"] = o.SignalDescription.Get()
}
if true {
toSerialize["page_number"] = o.PageNumber.Get()
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *DocumentRiskSignal) UnmarshalJSON(bytes []byte) (err error) {
varDocumentRiskSignal := _DocumentRiskSignal{}
if err = json.Unmarshal(bytes, &varDocumentRiskSignal); err == nil {
*o = DocumentRiskSignal(varDocumentRiskSignal)
} else {
return err
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "type")
delete(additionalProperties, "field")
delete(additionalProperties, "has_fraud_risk")
delete(additionalProperties, "institution_metadata")
delete(additionalProperties, "expected_value")
delete(additionalProperties, "actual_value")
delete(additionalProperties, "signal_description")
delete(additionalProperties, "page_number")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDocumentRiskSignal struct {
value *DocumentRiskSignal
isSet bool
}
func (v NullableDocumentRiskSignal) Get() *DocumentRiskSignal {
return v.value
}
func (v *NullableDocumentRiskSignal) Set(val *DocumentRiskSignal) {
v.value = val
v.isSet = true
}
func (v NullableDocumentRiskSignal) IsSet() bool {
return v.isSet
}
func (v *NullableDocumentRiskSignal) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDocumentRiskSignal(val *DocumentRiskSignal) *NullableDocumentRiskSignal {
return &NullableDocumentRiskSignal{value: val, isSet: true}
}
func (v NullableDocumentRiskSignal) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDocumentRiskSignal) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}