-
Notifications
You must be signed in to change notification settings - Fork 15
/
bank_id_code.go
99 lines (74 loc) · 2.43 KB
/
bank_id_code.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
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
"log"
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/errors"
"github.com/go-openapi/validate"
)
// BankIDCode The type of identification provided at `bank_id` attribute. Must be ISO code as listed in the [External Code Sets spreadsheet](https://www.iso20022.org/external_code_list.page)
// swagger:model BankIdCode
type BankIDCode string
const (
// BankIDCodeSWBIC captures enum value "SWBIC"
BankIDCodeSWBIC BankIDCode = "SWBIC"
// BankIDCodeGBDSC captures enum value "GBDSC"
BankIDCodeGBDSC BankIDCode = "GBDSC"
// BankIDCodeBE captures enum value "BE"
BankIDCodeBE BankIDCode = "BE"
// BankIDCodeFR captures enum value "FR"
BankIDCodeFR BankIDCode = "FR"
// BankIDCodeDEBLZ captures enum value "DEBLZ"
BankIDCodeDEBLZ BankIDCode = "DEBLZ"
// BankIDCodeGRBIC captures enum value "GRBIC"
BankIDCodeGRBIC BankIDCode = "GRBIC"
// BankIDCodeITNCC captures enum value "ITNCC"
BankIDCodeITNCC BankIDCode = "ITNCC"
// BankIDCodePLKNR captures enum value "PLKNR"
BankIDCodePLKNR BankIDCode = "PLKNR"
// BankIDCodePTNCC captures enum value "PTNCC"
BankIDCodePTNCC BankIDCode = "PTNCC"
// BankIDCodeESNCC captures enum value "ESNCC"
BankIDCodeESNCC BankIDCode = "ESNCC"
// BankIDCodeCHBCC captures enum value "CHBCC"
BankIDCodeCHBCC BankIDCode = "CHBCC"
)
// for schema
var bankIdCodeEnum []interface{}
func init() {
var res []BankIDCode
if err := json.Unmarshal([]byte(`["SWBIC","GBDSC","BE","FR","DEBLZ","GRBIC","ITNCC","PLKNR","PTNCC","ESNCC","CHBCC"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
bankIdCodeEnum = append(bankIdCodeEnum, v)
}
}
func (m BankIDCode) validateBankIDCodeEnum(path, location string, value BankIDCode) error {
if err := validate.Enum(path, location, value, bankIdCodeEnum); err != nil {
return err
}
return nil
}
// Validate validates this bank Id code
func (m BankIDCode) Validate(formats strfmt.Registry) error {
var res []error
// value enum
if err := m.validateBankIDCodeEnum("", "body", m); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BankIDCode) Json() string {
json, err := json.MarshalIndent(m, " ", " ")
if err != nil {
log.Fatal(err)
}
return string(json)
}