-
Notifications
You must be signed in to change notification settings - Fork 0
/
auth.054.001.01.xsd.go
138 lines (114 loc) · 5.21 KB
/
auth.054.001.01.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
// Code generated by download. DO NOT EDIT.
package iso20022_auth_054_001_01
import (
"bytes"
"encoding/xml"
"time"
)
type CCPClearingMemberReportV01 struct {
ClrMmb []ClearingMember1 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 ClrMmb"`
SplmtryData []SupplementaryData1 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 SplmtryData,omitempty"`
}
type ClearingAccount1 struct {
AcctTp ClearingAccountType3Code `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 AcctTp"`
CollAcctOwnr []CollateralAccount5 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 CollAcctOwnr"`
}
// May be one of NOSA, ISEG, HOUS, GOSA
type ClearingAccountType3Code string
type ClearingMember1 struct {
Id PartyIdentification118Choice `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 Id"`
CdtQlty CreditQuality1Code `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 CdtQlty"`
UltmtPrntId PartyIdentification118Choice `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 UltmtPrntId,omitempty"`
FutrsComssnMrchntInd bool `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 FutrsComssnMrchntInd"`
MmbshVldFr ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 MmbshVldFr"`
MmbshVldTo ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 MmbshVldTo,omitempty"`
SpnsrgClrMmbId PartyIdentification118Choice `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 SpnsrgClrMmbId,omitempty"`
ClrAcctOwnr []ClearingAccount1 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 ClrAcctOwnr"`
}
type CollateralAccount5 struct {
Id PartyIdentification118Choice `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 Id"`
RltdMrgnAcct []MarginAccount1 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 RltdMrgnAcct"`
TitlTrfCollArrgmnt bool `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 TitlTrfCollArrgmnt,omitempty"`
CollSgrtnByVal bool `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 CollSgrtnByVal,omitempty"`
}
// May be one of DFIM, EXSP, HIGR, HISP, INDF, LMGR, NIGS, PRIM, SURI, UMGR
type CreditQuality1Code string
type Document struct {
CCPClrMmbRpt CCPClearingMemberReportV01 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 CCPClrMmbRpt"`
}
type GenericIdentification168 struct {
Id Max256Text `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 Id"`
Desc Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 Desc,omitempty"`
Issr Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 Issr,omitempty"`
SchmeNm Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 SchmeNm,omitempty"`
}
type ISODate time.Time
func (t *ISODate) UnmarshalText(text []byte) error {
return (*xsdDate)(t).UnmarshalText(text)
}
func (t ISODate) MarshalText() ([]byte, error) {
return xsdDate(t).MarshalText()
}
// Must match the pattern [A-Z0-9]{18,18}[0-9]{2,2}
type LEIIdentifier string
type MarginAccount1 struct {
Id PartyIdentification118Choice `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 Id"`
PosAcct []PositionAccount1 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 PosAcct"`
}
// May be no more than 140 items long
type Max140Text string
// May be no more than 256 items long
type Max256Text string
// May be no more than 350 items long
type Max350Text string
// May be no more than 35 items long
type Max35Text string
type PartyIdentification118Choice struct {
LEI LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 LEI,omitempty"`
Prtry GenericIdentification168 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 Prtry,omitempty"`
}
type PositionAccount1 struct {
Id PartyIdentification118Choice `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 Id"`
}
type SupplementaryData1 struct {
PlcAndNm Max350Text `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 PlcAndNm,omitempty"`
Envlp SupplementaryDataEnvelope1 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.054.001.01 Envlp"`
}
type SupplementaryDataEnvelope1 struct {
Item string `xml:",any"`
}
type xsdDate time.Time
func (t *xsdDate) UnmarshalText(text []byte) error {
return _unmarshalTime(text, (*time.Time)(t), "2006-01-02")
}
func (t xsdDate) MarshalText() ([]byte, error) {
return _marshalTime((time.Time)(t), "2006-01-02")
}
func (t xsdDate) 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 xsdDate) 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
}