-
Notifications
You must be signed in to change notification settings - Fork 0
/
auth.044.001.02.xsd.go
202 lines (169 loc) · 8.14 KB
/
auth.044.001.02.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
// Code generated by download. DO NOT EDIT.
package iso20022_auth_044_001_02
import (
"bytes"
"encoding/xml"
"time"
)
type ActiveCurrencyAndAmount struct {
Value float64 `xml:",chardata"`
Ccy ActiveCurrencyCode `xml:"Ccy,attr"`
}
// Must match the pattern [A-Z]{3,3}
type ActiveCurrencyCode string
// Must match the pattern [A-Z]{2,2}
type CountryCode string
type Document struct {
FinInstrmRptgEqtyTradgActvtyRslt FinancialInstrumentReportingEquityTradingActivityResultV02 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 FinInstrmRptgEqtyTradgActvtyRslt"`
}
// May be one of SHRS, OTHR, ETFS, DPRS, CRFT
type EquityInstrumentReportingClassification1Code string
type FinancialInstrumentReportingEquityTradingActivityResultV02 struct {
RptHdr SecuritiesMarketReportHeader1 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 RptHdr"`
EqtyTrnsprncyData []TransparencyDataReport17 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 EqtyTrnsprncyData"`
SplmtryData []SupplementaryData1 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 SplmtryData,omitempty"`
}
// Must match the pattern [A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}
type ISINOct2015Identifier string
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()
}
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]{4,4}
type MICIdentifier string
type MarketDetail2 struct {
Id MICIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Id"`
AvrgDalyNbOfTxs float64 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 AvrgDalyNbOfTxs,omitempty"`
}
// 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 50 items long
type Max50Text string
type Period2 struct {
FrDt ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 FrDt"`
ToDt ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 ToDt"`
}
type Period4Choice struct {
Dt ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Dt,omitempty"`
FrDt ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 FrDt,omitempty"`
ToDt ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 ToDt,omitempty"`
FrDtToDt Period2 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 FrDtToDt,omitempty"`
}
type SecuritiesMarketReportHeader1 struct {
RptgNtty TradingVenueIdentification1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 RptgNtty"`
RptgPrd Period4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 RptgPrd"`
SubmissnDtTm ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 SubmissnDtTm,omitempty"`
}
type StatisticsTransparency3 struct {
AvrgDalyTrnvr ActiveCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 AvrgDalyTrnvr,omitempty"`
AvrgTxVal ActiveCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 AvrgTxVal,omitempty"`
LrgInScale float64 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 LrgInScale,omitempty"`
StdMktSz float64 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 StdMktSz,omitempty"`
AvrgDalyNbOfTxs float64 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 AvrgDalyNbOfTxs,omitempty"`
TtlNbOfTxsExctd float64 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 TtlNbOfTxsExctd,omitempty"`
TtlVolOfTxsExctd float64 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 TtlVolOfTxsExctd,omitempty"`
TtlNbOfTradgDays float64 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 TtlNbOfTradgDays,omitempty"`
}
type SupplementaryData1 struct {
PlcAndNm Max350Text `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 PlcAndNm,omitempty"`
Envlp SupplementaryDataEnvelope1 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Envlp"`
}
type SupplementaryDataEnvelope1 struct {
Item string `xml:",any"`
}
// May be one of APPA, CTPS
type TradingVenue2Code string
type TradingVenueIdentification1Choice struct {
MktIdCd MICIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 MktIdCd,omitempty"`
NtlCmptntAuthrty CountryCode `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 NtlCmptntAuthrty,omitempty"`
Othr TradingVenueIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Othr,omitempty"`
}
type TradingVenueIdentification2 struct {
Id Max50Text `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Id"`
Tp TradingVenue2Code `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Tp"`
}
type TransparencyDataReport17 struct {
TechRcrdId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 TechRcrdId,omitempty"`
Id ISINOct2015Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Id"`
FinInstrmClssfctn EquityInstrumentReportingClassification1Code `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 FinInstrmClssfctn,omitempty"`
FullNm Max350Text `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 FullNm,omitempty"`
TradgVn MICIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 TradgVn,omitempty"`
RptgPrd Period4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 RptgPrd,omitempty"`
Lqdty bool `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Lqdty,omitempty"`
Mthdlgy TransparencyMethodology2Code `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Mthdlgy,omitempty"`
Sttstcs StatisticsTransparency3 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 Sttstcs,omitempty"`
RlvntMkt MarketDetail2 `xml:"urn:iso:std:iso:20022:tech:xsd:auth.044.001.02 RlvntMkt,omitempty"`
}
// May be one of YEAR, SINT, FFWK, ESTM
type TransparencyMethodology2Code string
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
}
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
}