-
Notifications
You must be signed in to change notification settings - Fork 0
/
camt.012.001.07.xsd.go
253 lines (206 loc) · 11.7 KB
/
camt.012.001.07.xsd.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
// Code generated by download. DO NOT EDIT.
package iso20022_camt_012_001_07
import (
"bytes"
"encoding/xml"
"time"
)
type AccountIdentification4Choice struct {
IBAN IBAN2007Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 IBAN,omitempty"`
Othr GenericAccountIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Othr,omitempty"`
}
type AccountSchemeName1Choice struct {
Cd ExternalAccountIdentification1Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Cd,omitempty"`
Prtry Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Prtry,omitempty"`
}
// May be one of ADDR, PBOX, HOME, BIZZ, MLTO, DLVY
type AddressType2Code string
type AddressType3Choice struct {
Cd AddressType2Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Cd,omitempty"`
Prtry GenericIdentification30 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Prtry,omitempty"`
}
// Must match the pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}
type BICFIDec2014Identifier string
type BranchAndFinancialInstitutionIdentification6 struct {
FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 FinInstnId"`
BrnchId BranchData3 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 BrnchId,omitempty"`
}
type BranchData3 struct {
Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Id,omitempty"`
LEI LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 LEI,omitempty"`
Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Nm,omitempty"`
PstlAdr PostalAddress24 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 PstlAdr,omitempty"`
}
type ClearingSystemIdentification2Choice struct {
Cd ExternalClearingSystemIdentification1Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Cd,omitempty"`
Prtry Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Prtry,omitempty"`
}
type ClearingSystemMemberIdentification2 struct {
ClrSysId ClearingSystemIdentification2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 ClrSysId,omitempty"`
MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 MmbId"`
}
// Must match the pattern [A-Z]{2,2}
type CountryCode string
type DeleteLimitV07 struct {
MsgHdr MessageHeader1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 MsgHdr"`
LmtDtls LimitStructure2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 LmtDtls"`
SplmtryData []SupplementaryData1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 SplmtryData,omitempty"`
}
type Document struct {
DelLmt DeleteLimitV07 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 DelLmt"`
}
// Must match the pattern [a-zA-Z0-9]{4}
type Exact4AlphaNumericText string
// May be no more than 4 items long
type ExternalAccountIdentification1Code string
// May be no more than 5 items long
type ExternalClearingSystemIdentification1Code string
// May be no more than 4 items long
type ExternalFinancialInstitutionIdentification1Code string
// May be no more than 3 items long
type ExternalMarketInfrastructure1Code string
type FinancialIdentificationSchemeName1Choice struct {
Cd ExternalFinancialInstitutionIdentification1Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Cd,omitempty"`
Prtry Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Prtry,omitempty"`
}
type FinancialInstitutionIdentification18 struct {
BICFI BICFIDec2014Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 BICFI,omitempty"`
ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 ClrSysMmbId,omitempty"`
LEI LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 LEI,omitempty"`
Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Nm,omitempty"`
PstlAdr PostalAddress24 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 PstlAdr,omitempty"`
Othr GenericFinancialIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Othr,omitempty"`
}
type GenericAccountIdentification1 struct {
Id Max34Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Id"`
SchmeNm AccountSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 SchmeNm,omitempty"`
Issr Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Issr,omitempty"`
}
type GenericFinancialIdentification1 struct {
Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Id"`
SchmeNm FinancialIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 SchmeNm,omitempty"`
Issr Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Issr,omitempty"`
}
type GenericIdentification30 struct {
Id Exact4AlphaNumericText `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Id"`
Issr Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Issr"`
SchmeNm Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 SchmeNm,omitempty"`
}
// Must match the pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}
type IBAN2007Identifier string
type ISODateTime time.Time
func (t *ISODateTime) UnmarshalText(text []byte) error {
return (*xsdDateTime)(t).UnmarshalText(text)
}
func (t ISODateTime) MarshalText() ([]byte, error) {
return xsdDateTime(t).MarshalText()
}
// Must match the pattern [A-Z0-9]{18,18}[0-9]{2,2}
type LEIIdentifier string
type LimitIdentification5 struct {
SysId SystemIdentification2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 SysId,omitempty"`
BilLmtCtrPtyId BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 BilLmtCtrPtyId,omitempty"`
Tp LimitType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Tp"`
AcctOwnr BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 AcctOwnr,omitempty"`
AcctId AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 AcctId,omitempty"`
}
type LimitIdentification6 struct {
SysId SystemIdentification2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 SysId,omitempty"`
Tp LimitType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Tp"`
AcctOwnr BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 AcctOwnr,omitempty"`
AcctId AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 AcctId,omitempty"`
}
type LimitStructure2Choice struct {
CurLmtId LimitIdentification5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 CurLmtId,omitempty"`
AllCurLmts LimitIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 AllCurLmts,omitempty"`
}
type LimitType1Choice struct {
Cd LimitType3Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Cd,omitempty"`
Prtry Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Prtry,omitempty"`
}
// May be one of MULT, BILI, MAND, DISC, NELI, INBI, GLBL, DIDB, SPLC, SPLF, TDLC, TDLF, UCDT, ACOL, EXGT
type LimitType3Code string
type MarketInfrastructureIdentification1Choice struct {
Cd ExternalMarketInfrastructure1Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Cd,omitempty"`
Prtry Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Prtry,omitempty"`
}
// May be no more than 140 items long
type Max140Text string
// May be no more than 16 items long
type Max16Text string
// May be no more than 34 items long
type Max34Text string
// May be no more than 350 items long
type Max350Text string
// May be no more than 35 items long
type Max35Text string
// May be no more than 70 items long
type Max70Text string
type MessageHeader1 struct {
MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 MsgId"`
CreDtTm ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 CreDtTm,omitempty"`
}
type PostalAddress24 struct {
AdrTp AddressType3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 AdrTp,omitempty"`
Dept Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Dept,omitempty"`
SubDept Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 SubDept,omitempty"`
StrtNm Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 StrtNm,omitempty"`
BldgNb Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 BldgNb,omitempty"`
BldgNm Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 BldgNm,omitempty"`
Flr Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Flr,omitempty"`
PstBx Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 PstBx,omitempty"`
Room Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Room,omitempty"`
PstCd Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 PstCd,omitempty"`
TwnNm Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 TwnNm,omitempty"`
TwnLctnNm Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 TwnLctnNm,omitempty"`
DstrctNm Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 DstrctNm,omitempty"`
CtrySubDvsn Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 CtrySubDvsn,omitempty"`
Ctry CountryCode `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Ctry,omitempty"`
AdrLine []Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 AdrLine,omitempty"`
}
type SupplementaryData1 struct {
PlcAndNm Max350Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 PlcAndNm,omitempty"`
Envlp SupplementaryDataEnvelope1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Envlp"`
}
type SupplementaryDataEnvelope1 struct {
Item string `xml:",any"`
}
type SystemIdentification2Choice struct {
MktInfrstrctrId MarketInfrastructureIdentification1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 MktInfrstrctrId,omitempty"`
Ctry CountryCode `xml:"urn:iso:std:iso:20022:tech:xsd:camt.012.001.07 Ctry,omitempty"`
}
type xsdDateTime time.Time
func (t *xsdDateTime) UnmarshalText(text []byte) error {
return _unmarshalTime(text, (*time.Time)(t), "2006-01-02T15:04:05.999999999")
}
func (t xsdDateTime) MarshalText() ([]byte, error) {
return _marshalTime((time.Time)(t), "2006-01-02T15:04:05.999999999")
}
func (t xsdDateTime) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
if (time.Time)(t).IsZero() {
return nil
}
m, err := t.MarshalText()
if err != nil {
return err
}
return e.EncodeElement(m, start)
}
func (t xsdDateTime) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
if (time.Time)(t).IsZero() {
return xml.Attr{}, nil
}
m, err := t.MarshalText()
return xml.Attr{Name: name, Value: string(m)}, err
}
func _unmarshalTime(text []byte, t *time.Time, format string) (err error) {
s := string(bytes.TrimSpace(text))
*t, err = time.Parse(format, s)
if _, ok := err.(*time.ParseError); ok {
*t, err = time.Parse(format+"Z07:00", s)
}
return err
}
func _marshalTime(t time.Time, format string) ([]byte, error) {
return []byte(t.Format(format + "Z07:00")), nil
}