From f46489b8d07306dc92fc997a8726823576e10c64 Mon Sep 17 00:00:00 2001 From: Jason Bornstein <131717043+jasonbornsteinMOOV@users.noreply.github.com> Date: Wed, 2 Aug 2023 09:01:05 -0400 Subject: [PATCH 1/8] rename templates and generated models This allows for simplification in the generation script and helps set a standard for each package, separating the models from various helpers and support methods. --- .../{acmt_022_001_02.go => model.go} | 0 .../{admi_002_001_01.go => model.go} | 0 .../{admi_004_001_02.go => model.go} | 0 .../{admn_001_001_01.go => model.go} | 0 .../{admn_002_001_01.go => model.go} | 0 .../{admn_003_001_01.go => model.go} | 0 .../{admn_004_001_01.go => model.go} | 0 .../{admn_005_001_01.go => model.go} | 0 .../{admn_006_001_01.go => model.go} | 0 .../{admn_007_001_01.go => model.go} | 0 .../{admn_008_001_01.go => model.go} | 0 .../{camt_026_001_07.go => model.go} | 0 .../{camt_028_001_09.go => model.go} | 0 .../{camt_029_001_09.go => model.go} | 0 .../{camt_035_001_05.go => model.go} | 0 .../{camt_056_001_08.go => model.go} | 0 gen/head_001_001_01/{write.go => helper.go} | 0 .../{head_001_001_01.go => model.go} | 0 gen/messages/{write.go => helper.go} | 0 gen/messages/{messages.go => model.go} | 0 .../{pacs_002_001_10.go => model.go} | 0 .../{pacs_008_001_08.go => model.go} | 0 .../{pacs_009_001_08.go => model.go} | 0 .../{pacs_028_001_03.go => model.go} | 0 .../{pain_013_001_07.go => model.go} | 0 .../{pain_014_001_07.go => model.go} | 0 .../{remt_001_001_04.go => model.go} | 0 .../rtp20022/{messages.tmpl => model.tgo} | 0 .../rtp20022/{validate.tmpl => validate.tgo} | 0 .../rtp20022/{signature.tmpl => xmldsig.tgo} | 0 scripts/generate.sh | 38 ++----------------- 31 files changed, 3 insertions(+), 35 deletions(-) rename gen/acmt_022_001_02/{acmt_022_001_02.go => model.go} (100%) rename gen/admi_002_001_01/{admi_002_001_01.go => model.go} (100%) rename gen/admi_004_001_02/{admi_004_001_02.go => model.go} (100%) rename gen/admn_001_001_01/{admn_001_001_01.go => model.go} (100%) rename gen/admn_002_001_01/{admn_002_001_01.go => model.go} (100%) rename gen/admn_003_001_01/{admn_003_001_01.go => model.go} (100%) rename gen/admn_004_001_01/{admn_004_001_01.go => model.go} (100%) rename gen/admn_005_001_01/{admn_005_001_01.go => model.go} (100%) rename gen/admn_006_001_01/{admn_006_001_01.go => model.go} (100%) rename gen/admn_007_001_01/{admn_007_001_01.go => model.go} (100%) rename gen/admn_008_001_01/{admn_008_001_01.go => model.go} (100%) rename gen/camt_026_001_07/{camt_026_001_07.go => model.go} (100%) rename gen/camt_028_001_09/{camt_028_001_09.go => model.go} (100%) rename gen/camt_029_001_09/{camt_029_001_09.go => model.go} (100%) rename gen/camt_035_001_05/{camt_035_001_05.go => model.go} (100%) rename gen/camt_056_001_08/{camt_056_001_08.go => model.go} (100%) rename gen/head_001_001_01/{write.go => helper.go} (100%) rename gen/head_001_001_01/{head_001_001_01.go => model.go} (100%) rename gen/messages/{write.go => helper.go} (100%) rename gen/messages/{messages.go => model.go} (100%) rename gen/pacs_002_001_10/{pacs_002_001_10.go => model.go} (100%) rename gen/pacs_008_001_08/{pacs_008_001_08.go => model.go} (100%) rename gen/pacs_009_001_08/{pacs_009_001_08.go => model.go} (100%) rename gen/pacs_028_001_03/{pacs_028_001_03.go => model.go} (100%) rename gen/pain_013_001_07/{pain_013_001_07.go => model.go} (100%) rename gen/pain_014_001_07/{pain_014_001_07.go => model.go} (100%) rename gen/remt_001_001_04/{remt_001_001_04.go => model.go} (100%) rename internal/templates/rtp20022/{messages.tmpl => model.tgo} (100%) rename internal/templates/rtp20022/{validate.tmpl => validate.tgo} (100%) rename internal/templates/rtp20022/{signature.tmpl => xmldsig.tgo} (100%) diff --git a/gen/acmt_022_001_02/acmt_022_001_02.go b/gen/acmt_022_001_02/model.go similarity index 100% rename from gen/acmt_022_001_02/acmt_022_001_02.go rename to gen/acmt_022_001_02/model.go diff --git a/gen/admi_002_001_01/admi_002_001_01.go b/gen/admi_002_001_01/model.go similarity index 100% rename from gen/admi_002_001_01/admi_002_001_01.go rename to gen/admi_002_001_01/model.go diff --git a/gen/admi_004_001_02/admi_004_001_02.go b/gen/admi_004_001_02/model.go similarity index 100% rename from gen/admi_004_001_02/admi_004_001_02.go rename to gen/admi_004_001_02/model.go diff --git a/gen/admn_001_001_01/admn_001_001_01.go b/gen/admn_001_001_01/model.go similarity index 100% rename from gen/admn_001_001_01/admn_001_001_01.go rename to gen/admn_001_001_01/model.go diff --git a/gen/admn_002_001_01/admn_002_001_01.go b/gen/admn_002_001_01/model.go similarity index 100% rename from gen/admn_002_001_01/admn_002_001_01.go rename to gen/admn_002_001_01/model.go diff --git a/gen/admn_003_001_01/admn_003_001_01.go b/gen/admn_003_001_01/model.go similarity index 100% rename from gen/admn_003_001_01/admn_003_001_01.go rename to gen/admn_003_001_01/model.go diff --git a/gen/admn_004_001_01/admn_004_001_01.go b/gen/admn_004_001_01/model.go similarity index 100% rename from gen/admn_004_001_01/admn_004_001_01.go rename to gen/admn_004_001_01/model.go diff --git a/gen/admn_005_001_01/admn_005_001_01.go b/gen/admn_005_001_01/model.go similarity index 100% rename from gen/admn_005_001_01/admn_005_001_01.go rename to gen/admn_005_001_01/model.go diff --git a/gen/admn_006_001_01/admn_006_001_01.go b/gen/admn_006_001_01/model.go similarity index 100% rename from gen/admn_006_001_01/admn_006_001_01.go rename to gen/admn_006_001_01/model.go diff --git a/gen/admn_007_001_01/admn_007_001_01.go b/gen/admn_007_001_01/model.go similarity index 100% rename from gen/admn_007_001_01/admn_007_001_01.go rename to gen/admn_007_001_01/model.go diff --git a/gen/admn_008_001_01/admn_008_001_01.go b/gen/admn_008_001_01/model.go similarity index 100% rename from gen/admn_008_001_01/admn_008_001_01.go rename to gen/admn_008_001_01/model.go diff --git a/gen/camt_026_001_07/camt_026_001_07.go b/gen/camt_026_001_07/model.go similarity index 100% rename from gen/camt_026_001_07/camt_026_001_07.go rename to gen/camt_026_001_07/model.go diff --git a/gen/camt_028_001_09/camt_028_001_09.go b/gen/camt_028_001_09/model.go similarity index 100% rename from gen/camt_028_001_09/camt_028_001_09.go rename to gen/camt_028_001_09/model.go diff --git a/gen/camt_029_001_09/camt_029_001_09.go b/gen/camt_029_001_09/model.go similarity index 100% rename from gen/camt_029_001_09/camt_029_001_09.go rename to gen/camt_029_001_09/model.go diff --git a/gen/camt_035_001_05/camt_035_001_05.go b/gen/camt_035_001_05/model.go similarity index 100% rename from gen/camt_035_001_05/camt_035_001_05.go rename to gen/camt_035_001_05/model.go diff --git a/gen/camt_056_001_08/camt_056_001_08.go b/gen/camt_056_001_08/model.go similarity index 100% rename from gen/camt_056_001_08/camt_056_001_08.go rename to gen/camt_056_001_08/model.go diff --git a/gen/head_001_001_01/write.go b/gen/head_001_001_01/helper.go similarity index 100% rename from gen/head_001_001_01/write.go rename to gen/head_001_001_01/helper.go diff --git a/gen/head_001_001_01/head_001_001_01.go b/gen/head_001_001_01/model.go similarity index 100% rename from gen/head_001_001_01/head_001_001_01.go rename to gen/head_001_001_01/model.go diff --git a/gen/messages/write.go b/gen/messages/helper.go similarity index 100% rename from gen/messages/write.go rename to gen/messages/helper.go diff --git a/gen/messages/messages.go b/gen/messages/model.go similarity index 100% rename from gen/messages/messages.go rename to gen/messages/model.go diff --git a/gen/pacs_002_001_10/pacs_002_001_10.go b/gen/pacs_002_001_10/model.go similarity index 100% rename from gen/pacs_002_001_10/pacs_002_001_10.go rename to gen/pacs_002_001_10/model.go diff --git a/gen/pacs_008_001_08/pacs_008_001_08.go b/gen/pacs_008_001_08/model.go similarity index 100% rename from gen/pacs_008_001_08/pacs_008_001_08.go rename to gen/pacs_008_001_08/model.go diff --git a/gen/pacs_009_001_08/pacs_009_001_08.go b/gen/pacs_009_001_08/model.go similarity index 100% rename from gen/pacs_009_001_08/pacs_009_001_08.go rename to gen/pacs_009_001_08/model.go diff --git a/gen/pacs_028_001_03/pacs_028_001_03.go b/gen/pacs_028_001_03/model.go similarity index 100% rename from gen/pacs_028_001_03/pacs_028_001_03.go rename to gen/pacs_028_001_03/model.go diff --git a/gen/pain_013_001_07/pain_013_001_07.go b/gen/pain_013_001_07/model.go similarity index 100% rename from gen/pain_013_001_07/pain_013_001_07.go rename to gen/pain_013_001_07/model.go diff --git a/gen/pain_014_001_07/pain_014_001_07.go b/gen/pain_014_001_07/model.go similarity index 100% rename from gen/pain_014_001_07/pain_014_001_07.go rename to gen/pain_014_001_07/model.go diff --git a/gen/remt_001_001_04/remt_001_001_04.go b/gen/remt_001_001_04/model.go similarity index 100% rename from gen/remt_001_001_04/remt_001_001_04.go rename to gen/remt_001_001_04/model.go diff --git a/internal/templates/rtp20022/messages.tmpl b/internal/templates/rtp20022/model.tgo similarity index 100% rename from internal/templates/rtp20022/messages.tmpl rename to internal/templates/rtp20022/model.tgo diff --git a/internal/templates/rtp20022/validate.tmpl b/internal/templates/rtp20022/validate.tgo similarity index 100% rename from internal/templates/rtp20022/validate.tmpl rename to internal/templates/rtp20022/validate.tgo diff --git a/internal/templates/rtp20022/signature.tmpl b/internal/templates/rtp20022/xmldsig.tgo similarity index 100% rename from internal/templates/rtp20022/signature.tmpl rename to internal/templates/rtp20022/xmldsig.tgo diff --git a/scripts/generate.sh b/scripts/generate.sh index d48a4cc..6a5d3f5 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -5,45 +5,15 @@ moovio_xsd2go convert \ xsd/xmldsig-core-schema.xsd \ github.com/moov-io/rtp20022 \ gen \ - --template-name=internal/templates/rtp20022/signature.tmpl \ + --template-name=internal/templates/rtp20022/xmldsig.tgo \ --xmlns-override="http://www.w3.org/2000/09/xmldsig#=xmldsig" moovio_xsd2go convert \ xsd/messages.xsd \ github.com/moov-io/rtp20022 \ gen \ - --template-name=internal/templates/rtp20022/validate.tmpl \ - --output-file=validate.go \ - --xmlns-override="urn:iso:std:ma:20022:tech:xsd:admn.007.001.01=admn_007_001_01" \ - --xmlns-override="urn:iso:std:ma:20022:tech:xsd:admn.008.001.01=admn_008_001_01" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02=acmt_022_001_02" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:admi.002.001.01=admi_002_001_01" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:admi.004.001.02=admi_004_001_02" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:admn.001.001.01=admn_001_001_01" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:admn.002.001.01=admn_002_001_01" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:admn.003.001.01=admn_003_001_01" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:admn.004.001.01=admn_004_001_01" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:admn.005.001.01=admn_005_001_01" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:admn.006.001.01=admn_006_001_01" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:camt.026.001.07=camt_026_001_07" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:camt.028.001.09=camt_028_001_09" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:camt.029.001.09=camt_029_001_09" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:camt.035.001.05=camt_035_001_05" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:camt.056.001.08=camt_056_001_08" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:head.001.001.01=head_001_001_01" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10=pacs_002_001_10" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08=pacs_008_001_08" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08=pacs_009_001_08" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03=pacs_028_001_03" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:pain.013.001.07=pain_013_001_07" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:pain.014.001.07=pain_014_001_07" \ - --xmlns-override="urn:iso:std:iso:20022:tech:xsd:remt.001.001.04=remt_001_001_04" - -moovio_xsd2go convert \ - xsd/messages.xsd \ - github.com/moov-io/rtp20022 \ - gen \ - --template-name=internal/templates/rtp20022/messages.tmpl \ + --template-name=internal/templates/rtp20022/model.tgo \ + --template-name=internal/templates/rtp20022/validate.tgo \ --xmlns-override="urn:iso:std:ma:20022:tech:xsd:admn.007.001.01=admn_007_001_01" \ --xmlns-override="urn:iso:std:ma:20022:tech:xsd:admn.008.001.01=admn_008_001_01" \ --xmlns-override="urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02=acmt_022_001_02" \ @@ -76,5 +46,3 @@ do gofmt -w $file goimports -w $file done - -# TODO JB: need tests for the validations From dc993cd9f8619311bc55ad34e825aa25d38aedef Mon Sep 17 00:00:00 2001 From: Jason Bornstein <131717043+jasonbornsteinMOOV@users.noreply.github.com> Date: Wed, 2 Aug 2023 09:24:29 -0400 Subject: [PATCH 2/8] Separate helpers for marshaling from the models --- gen/acmt_022_001_02/model.go | 212 ------- gen/acmt_022_001_02/write.go | 219 +++++++ gen/admi_002_001_01/model.go | 60 -- gen/admi_002_001_01/write.go | 67 +++ gen/admi_004_001_02/model.go | 46 -- gen/admi_004_001_02/write.go | 53 ++ gen/admn_001_001_01/model.go | 88 --- gen/admn_001_001_01/write.go | 95 +++ gen/admn_002_001_01/model.go | 116 ---- gen/admn_002_001_01/write.go | 123 ++++ gen/admn_003_001_01/model.go | 88 --- gen/admn_003_001_01/write.go | 95 +++ gen/admn_004_001_01/model.go | 116 ---- gen/admn_004_001_01/write.go | 123 ++++ gen/admn_005_001_01/model.go | 90 --- gen/admn_005_001_01/write.go | 97 +++ gen/admn_006_001_01/model.go | 80 --- gen/admn_006_001_01/write.go | 87 +++ gen/admn_007_001_01/model.go | 90 --- gen/admn_007_001_01/write.go | 97 +++ gen/admn_008_001_01/model.go | 169 ------ gen/admn_008_001_01/write.go | 176 ++++++ gen/camt_026_001_07/model.go | 334 ----------- gen/camt_026_001_07/write.go | 343 +++++++++++ gen/camt_028_001_09/model.go | 640 -------------------- gen/camt_028_001_09/write.go | 649 ++++++++++++++++++++ gen/camt_029_001_09/model.go | 278 --------- gen/camt_029_001_09/write.go | 287 +++++++++ gen/camt_035_001_05/model.go | 216 ------- gen/camt_035_001_05/write.go | 223 +++++++ gen/camt_056_001_08/model.go | 439 -------------- gen/camt_056_001_08/write.go | 448 ++++++++++++++ gen/head_001_001_01/model.go | 106 ---- gen/head_001_001_01/write.go | 111 ++++ gen/messages/model.go | 92 --- gen/messages/write.go | 95 +++ gen/pacs_002_001_10/model.go | 199 ------- gen/pacs_002_001_10/write.go | 208 +++++++ gen/pacs_008_001_08/model.go | 740 ----------------------- gen/pacs_008_001_08/write.go | 749 +++++++++++++++++++++++ gen/pacs_009_001_08/model.go | 250 -------- gen/pacs_009_001_08/write.go | 259 ++++++++ gen/pacs_028_001_03/model.go | 164 ------ gen/pacs_028_001_03/write.go | 173 ++++++ gen/pain_013_001_07/model.go | 811 ------------------------- gen/pain_013_001_07/write.go | 820 ++++++++++++++++++++++++++ gen/pain_014_001_07/model.go | 384 ------------ gen/pain_014_001_07/write.go | 393 ++++++++++++ gen/remt_001_001_04/model.go | 766 ------------------------ gen/remt_001_001_04/write.go | 775 ++++++++++++++++++++++++ internal/templates/rtp20022/model.tgo | 79 --- internal/templates/rtp20022/write.tgo | 126 ++++ scripts/generate.sh | 1 + 53 files changed, 6892 insertions(+), 6653 deletions(-) create mode 100644 gen/acmt_022_001_02/write.go create mode 100644 gen/admi_002_001_01/write.go create mode 100644 gen/admi_004_001_02/write.go create mode 100644 gen/admn_001_001_01/write.go create mode 100644 gen/admn_002_001_01/write.go create mode 100644 gen/admn_003_001_01/write.go create mode 100644 gen/admn_004_001_01/write.go create mode 100644 gen/admn_005_001_01/write.go create mode 100644 gen/admn_006_001_01/write.go create mode 100644 gen/admn_007_001_01/write.go create mode 100644 gen/admn_008_001_01/write.go create mode 100644 gen/camt_026_001_07/write.go create mode 100644 gen/camt_028_001_09/write.go create mode 100644 gen/camt_029_001_09/write.go create mode 100644 gen/camt_035_001_05/write.go create mode 100644 gen/camt_056_001_08/write.go create mode 100644 gen/head_001_001_01/write.go create mode 100644 gen/messages/write.go create mode 100644 gen/pacs_002_001_10/write.go create mode 100644 gen/pacs_008_001_08/write.go create mode 100644 gen/pacs_009_001_08/write.go create mode 100644 gen/pacs_028_001_03/write.go create mode 100644 gen/pain_013_001_07/write.go create mode 100644 gen/pain_014_001_07/write.go create mode 100644 gen/remt_001_001_04/write.go create mode 100644 internal/templates/rtp20022/write.tgo diff --git a/gen/acmt_022_001_02/model.go b/gen/acmt_022_001_02/model.go index bcb5bb1..f13a91a 100644 --- a/gen/acmt_022_001_02/model.go +++ b/gen/acmt_022_001_02/model.go @@ -14,111 +14,39 @@ type AccountIdentification4Choice struct { Othr *GenericAccountIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "a2:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification5 struct { FinInstnId FinancialInstitutionIdentification8 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "a2:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification5TCH struct { FinInstnId FinancialInstitutionIdentification8TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "a2:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "a2:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "a2:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name IdModAdvc IdentificationModificationAdviceV02TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 IdModAdvc"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.IdModAdvc, xml.StartElement{Name: xml.Name{Local: "a2:IdModAdvc"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification8 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "a2:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification8TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "a2:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericAccountIdentification1 struct { Id Max34Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "a2:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type IdentificationAssignment2 struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 CreDtTm"` @@ -126,17 +54,6 @@ type IdentificationAssignment2 struct { Assgne Party12Choice `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Assgne"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v IdentificationAssignment2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "a2:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "a2:CreDtTm"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "a2:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "a2:Assgne"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type IdentificationAssignment2TCH struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 CreDtTm"` @@ -144,45 +61,16 @@ type IdentificationAssignment2TCH struct { Assgne Party12ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Assgne"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v IdentificationAssignment2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "a2:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "a2:CreDtTm"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "a2:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "a2:Assgne"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type IdentificationInformation2 struct { Acct AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Acct"` Agt BranchAndFinancialInstitutionIdentification5 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Agt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v IdentificationInformation2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Acct, xml.StartElement{Name: xml.Name{Local: "a2:Acct"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "a2:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type IdentificationInformation2TCH struct { Acct AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Acct"` Agt BranchAndFinancialInstitutionIdentification5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Agt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v IdentificationInformation2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Acct, xml.StartElement{Name: xml.Name{Local: "a2:Acct"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "a2:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type IdentificationModification2 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Id"` OrgnlPtyAndAcctId *IdentificationInformation2 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 OrgnlPtyAndAcctId,omitempty"` @@ -190,17 +78,6 @@ type IdentificationModification2 struct { AddtlInf *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v IdentificationModification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "a2:Id"}}) - e.EncodeElement(v.OrgnlPtyAndAcctId, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlPtyAndAcctId"}}) - e.EncodeElement(v.UpdtdPtyAndAcctId, xml.StartElement{Name: xml.Name{Local: "a2:UpdtdPtyAndAcctId"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "a2:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type IdentificationModification2TCH struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Id"` OrgnlPtyAndAcctId *IdentificationInformation2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 OrgnlPtyAndAcctId,omitempty"` @@ -208,49 +85,18 @@ type IdentificationModification2TCH struct { AddtlInf *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v IdentificationModification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "a2:Id"}}) - e.EncodeElement(v.OrgnlPtyAndAcctId, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlPtyAndAcctId"}}) - e.EncodeElement(v.UpdtdPtyAndAcctId, xml.StartElement{Name: xml.Name{Local: "a2:UpdtdPtyAndAcctId"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "a2:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type IdentificationModificationAdviceV02 struct { Assgnmt IdentificationAssignment2 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Assgnmt"` OrgnlTxRef OriginalTransactionReference18 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 OrgnlTxRef"` Mod IdentificationModification2 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Mod"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v IdentificationModificationAdviceV02) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "a2:Assgnmt"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlTxRef"}}) - e.EncodeElement(v.Mod, xml.StartElement{Name: xml.Name{Local: "a2:Mod"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type IdentificationModificationAdviceV02TCH struct { Assgnmt IdentificationAssignment2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Assgnmt"` OrgnlTxRef OriginalTransactionReference18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 OrgnlTxRef"` Mod IdentificationModification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Mod"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v IdentificationModificationAdviceV02TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "a2:Assgnmt"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlTxRef"}}) - e.EncodeElement(v.Mod, xml.StartElement{Name: xml.Name{Local: "a2:Mod"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalTransactionReference18 struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 MsgId"` MsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 MsgNmId"` @@ -258,17 +104,6 @@ type OriginalTransactionReference18 struct { OrgnlTx PaymentIdentification4 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 OrgnlTx"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalTransactionReference18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "a2:MsgId"}}) - e.EncodeElement(v.MsgNmId, xml.StartElement{Name: xml.Name{Local: "a2:MsgNmId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "a2:CreDtTm"}}) - e.EncodeElement(v.OrgnlTx, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlTx"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalTransactionReference18TCH struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 MsgId"` MsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 MsgNmId"` @@ -276,73 +111,26 @@ type OriginalTransactionReference18TCH struct { OrgnlTx PaymentIdentification4TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 OrgnlTx"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalTransactionReference18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "a2:MsgId"}}) - e.EncodeElement(v.MsgNmId, xml.StartElement{Name: xml.Name{Local: "a2:MsgNmId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "a2:CreDtTm"}}) - e.EncodeElement(v.OrgnlTx, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlTx"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party12Choice struct { Agt *BranchAndFinancialInstitutionIdentification5 `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party12Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "a2:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party12ChoiceTCH struct { Agt *BranchAndFinancialInstitutionIdentification5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party12ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "a2:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentIdentification4 struct { InstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 InstrId"` EndToEndId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 EndToEndId"` TxId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 TxId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentIdentification4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "a2:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "a2:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "a2:TxId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentIdentification4TCH struct { InstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 InstrId"` EndToEndId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 EndToEndId"` TxId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 TxId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentIdentification4TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "a2:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "a2:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "a2:TxId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max140Text string diff --git a/gen/acmt_022_001_02/write.go b/gen/acmt_022_001_02/write.go new file mode 100644 index 0000000..023c088 --- /dev/null +++ b/gen/acmt_022_001_02/write.go @@ -0,0 +1,219 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02 with prefix 'a2' +package acmt_022_001_02 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "a2:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "a2:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "a2:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "a2:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "a2:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.IdModAdvc, xml.StartElement{Name: xml.Name{Local: "a2:IdModAdvc"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "a2:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "a2:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "a2:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v IdentificationAssignment2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "a2:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "a2:CreDtTm"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "a2:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "a2:Assgne"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v IdentificationAssignment2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "a2:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "a2:CreDtTm"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "a2:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "a2:Assgne"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v IdentificationInformation2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Acct, xml.StartElement{Name: xml.Name{Local: "a2:Acct"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "a2:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v IdentificationInformation2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Acct, xml.StartElement{Name: xml.Name{Local: "a2:Acct"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "a2:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v IdentificationModification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "a2:Id"}}) + e.EncodeElement(v.OrgnlPtyAndAcctId, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlPtyAndAcctId"}}) + e.EncodeElement(v.UpdtdPtyAndAcctId, xml.StartElement{Name: xml.Name{Local: "a2:UpdtdPtyAndAcctId"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "a2:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v IdentificationModification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "a2:Id"}}) + e.EncodeElement(v.OrgnlPtyAndAcctId, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlPtyAndAcctId"}}) + e.EncodeElement(v.UpdtdPtyAndAcctId, xml.StartElement{Name: xml.Name{Local: "a2:UpdtdPtyAndAcctId"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "a2:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v IdentificationModificationAdviceV02) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "a2:Assgnmt"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlTxRef"}}) + e.EncodeElement(v.Mod, xml.StartElement{Name: xml.Name{Local: "a2:Mod"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v IdentificationModificationAdviceV02TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "a2:Assgnmt"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlTxRef"}}) + e.EncodeElement(v.Mod, xml.StartElement{Name: xml.Name{Local: "a2:Mod"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalTransactionReference18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "a2:MsgId"}}) + e.EncodeElement(v.MsgNmId, xml.StartElement{Name: xml.Name{Local: "a2:MsgNmId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "a2:CreDtTm"}}) + e.EncodeElement(v.OrgnlTx, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlTx"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalTransactionReference18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "a2:MsgId"}}) + e.EncodeElement(v.MsgNmId, xml.StartElement{Name: xml.Name{Local: "a2:MsgNmId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "a2:CreDtTm"}}) + e.EncodeElement(v.OrgnlTx, xml.StartElement{Name: xml.Name{Local: "a2:OrgnlTx"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party12Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "a2:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party12ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "a2:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentIdentification4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "a2:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "a2:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "a2:TxId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentIdentification4TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "a2:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "a2:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "a2:TxId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admi_002_001_01/model.go b/gen/admi_002_001_01/model.go index 3ff0717..781c128 100644 --- a/gen/admi_002_001_01/model.go +++ b/gen/admi_002_001_01/model.go @@ -15,94 +15,34 @@ type DocumentTCH struct { Admi00200101 MessageRejectV01TCH `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 admi.002.001.01"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Admi00200101, xml.StartElement{Name: xml.Name{Local: "mr:admi.002.001.01"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type MessageReference struct { Ref Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 Ref"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v MessageReference) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ref, xml.StartElement{Name: xml.Name{Local: "mr:Ref"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type MessageReferenceTCH struct { Ref Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 Ref"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v MessageReferenceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ref, xml.StartElement{Name: xml.Name{Local: "mr:Ref"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type MessageRejectV01 struct { RltdRef MessageReference `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 RltdRef"` Rsn RejectionReason2 `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 Rsn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v MessageRejectV01) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RltdRef, xml.StartElement{Name: xml.Name{Local: "mr:RltdRef"}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "mr:Rsn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type MessageRejectV01TCH struct { RltdRef MessageReferenceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 RltdRef"` Rsn RejectionReason2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 Rsn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v MessageRejectV01TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RltdRef, xml.StartElement{Name: xml.Name{Local: "mr:RltdRef"}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "mr:Rsn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RejectionReason2 struct { RjctgPtyRsn Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 RjctgPtyRsn"` AddtlData *rtp.Cdata `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 AddtlData,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RejectionReason2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RjctgPtyRsn, xml.StartElement{Name: xml.Name{Local: "mr:RjctgPtyRsn"}}) - e.EncodeElement(v.AddtlData, xml.StartElement{Name: xml.Name{Local: "mr:AddtlData"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RejectionReason2TCH struct { RjctgPtyRsn Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 RjctgPtyRsn"` AddtlData *rtp.Cdata `xml:"urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 AddtlData,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RejectionReason2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RjctgPtyRsn, xml.StartElement{Name: xml.Name{Local: "mr:RjctgPtyRsn"}}) - e.EncodeElement(v.AddtlData, xml.StartElement{Name: xml.Name{Local: "mr:AddtlData"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max35Text string diff --git a/gen/admi_002_001_01/write.go b/gen/admi_002_001_01/write.go new file mode 100644 index 0000000..ec2ca84 --- /dev/null +++ b/gen/admi_002_001_01/write.go @@ -0,0 +1,67 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:admi.002.001.01 with prefix 'mr' +package admi_002_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Admi00200101, xml.StartElement{Name: xml.Name{Local: "mr:admi.002.001.01"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v MessageReference) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ref, xml.StartElement{Name: xml.Name{Local: "mr:Ref"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v MessageReferenceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ref, xml.StartElement{Name: xml.Name{Local: "mr:Ref"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v MessageRejectV01) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RltdRef, xml.StartElement{Name: xml.Name{Local: "mr:RltdRef"}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "mr:Rsn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v MessageRejectV01TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RltdRef, xml.StartElement{Name: xml.Name{Local: "mr:RltdRef"}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "mr:Rsn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RejectionReason2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RjctgPtyRsn, xml.StartElement{Name: xml.Name{Local: "mr:RjctgPtyRsn"}}) + e.EncodeElement(v.AddtlData, xml.StartElement{Name: xml.Name{Local: "mr:AddtlData"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RejectionReason2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RjctgPtyRsn, xml.StartElement{Name: xml.Name{Local: "mr:RjctgPtyRsn"}}) + e.EncodeElement(v.AddtlData, xml.StartElement{Name: xml.Name{Local: "mr:AddtlData"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admi_004_001_02/model.go b/gen/admi_004_001_02/model.go index 339acd5..ae36145 100644 --- a/gen/admi_004_001_02/model.go +++ b/gen/admi_004_001_02/model.go @@ -15,14 +15,6 @@ type DocumentTCH struct { SysEvtNtfctn SystemEventNotificationV02TCH `xml:"urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 SysEvtNtfctn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SysEvtNtfctn, xml.StartElement{Name: xml.Name{Local: "ne:SysEvtNtfctn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Event2 struct { EvtCd Max4AlphaNumericText `xml:"urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 EvtCd"` EvtParam []Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 EvtParam"` @@ -30,17 +22,6 @@ type Event2 struct { EvtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 EvtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Event2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.EvtCd, xml.StartElement{Name: xml.Name{Local: "ne:EvtCd"}}) - e.EncodeElement(v.EvtParam, xml.StartElement{Name: xml.Name{Local: "ne:EvtParam"}}) - e.EncodeElement(v.EvtDesc, xml.StartElement{Name: xml.Name{Local: "ne:EvtDesc"}}) - e.EncodeElement(v.EvtTm, xml.StartElement{Name: xml.Name{Local: "ne:EvtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Event2TCH struct { EvtCd Max4AlphaNumericText `xml:"urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 EvtCd"` EvtParam []Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 EvtParam"` @@ -48,41 +29,14 @@ type Event2TCH struct { EvtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 EvtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Event2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.EvtCd, xml.StartElement{Name: xml.Name{Local: "ne:EvtCd"}}) - e.EncodeElement(v.EvtParam, xml.StartElement{Name: xml.Name{Local: "ne:EvtParam"}}) - e.EncodeElement(v.EvtDesc, xml.StartElement{Name: xml.Name{Local: "ne:EvtDesc"}}) - e.EncodeElement(v.EvtTm, xml.StartElement{Name: xml.Name{Local: "ne:EvtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SystemEventNotificationV02 struct { EvtInf Event2 `xml:"urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 EvtInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SystemEventNotificationV02) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.EvtInf, xml.StartElement{Name: xml.Name{Local: "ne:EvtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SystemEventNotificationV02TCH struct { EvtInf Event2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 EvtInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SystemEventNotificationV02TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.EvtInf, xml.StartElement{Name: xml.Name{Local: "ne:EvtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max1000Text string diff --git a/gen/admi_004_001_02/write.go b/gen/admi_004_001_02/write.go new file mode 100644 index 0000000..3857337 --- /dev/null +++ b/gen/admi_004_001_02/write.go @@ -0,0 +1,53 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:admi.004.001.02 with prefix 'ne' +package admi_004_001_02 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SysEvtNtfctn, xml.StartElement{Name: xml.Name{Local: "ne:SysEvtNtfctn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Event2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.EvtCd, xml.StartElement{Name: xml.Name{Local: "ne:EvtCd"}}) + e.EncodeElement(v.EvtParam, xml.StartElement{Name: xml.Name{Local: "ne:EvtParam"}}) + e.EncodeElement(v.EvtDesc, xml.StartElement{Name: xml.Name{Local: "ne:EvtDesc"}}) + e.EncodeElement(v.EvtTm, xml.StartElement{Name: xml.Name{Local: "ne:EvtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Event2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.EvtCd, xml.StartElement{Name: xml.Name{Local: "ne:EvtCd"}}) + e.EncodeElement(v.EvtParam, xml.StartElement{Name: xml.Name{Local: "ne:EvtParam"}}) + e.EncodeElement(v.EvtDesc, xml.StartElement{Name: xml.Name{Local: "ne:EvtDesc"}}) + e.EncodeElement(v.EvtTm, xml.StartElement{Name: xml.Name{Local: "ne:EvtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SystemEventNotificationV02) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.EvtInf, xml.StartElement{Name: xml.Name{Local: "ne:EvtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SystemEventNotificationV02TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.EvtInf, xml.StartElement{Name: xml.Name{Local: "ne:EvtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admn_001_001_01/model.go b/gen/admn_001_001_01/model.go index 77cbeb3..3036d64 100644 --- a/gen/admn_001_001_01/model.go +++ b/gen/admn_001_001_01/model.go @@ -14,139 +14,51 @@ type BranchAndFinancialInstitutionIdentification4ADMN struct { FinInstnId FinancialInstitutionIdentification7ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "sr:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2ADMN struct { MmbId Min11Max11Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "sr:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name AdmnSignOnReq SignOnRequestTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 AdmnSignOnReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AdmnSignOnReq, xml.StartElement{Name: xml.Name{Local: "sr:AdmnSignOnReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification7ADMN struct { ClrSysMmbId ClearingSystemMemberIdentification2ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "sr:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdr struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "sr:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "sr:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdrTCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "sr:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "sr:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOnReq struct { InstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 InstrId"` InstgAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 InstgAgt"` InstdAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 InstdAgt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOnReq) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "sr:InstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "sr:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "sr:InstdAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOnRequest struct { GrpHdr GrpHdr `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 GrpHdr"` SignOnReq SignOnReq `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 SignOnReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOnRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "sr:GrpHdr"}}) - e.EncodeElement(v.SignOnReq, xml.StartElement{Name: xml.Name{Local: "sr:SignOnReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOnRequestTCH struct { GrpHdr GrpHdrTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 GrpHdr"` SignOnReq SignOnReqTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 SignOnReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOnRequestTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "sr:GrpHdr"}}) - e.EncodeElement(v.SignOnReq, xml.StartElement{Name: xml.Name{Local: "sr:SignOnReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOnReqTCH struct { InstrId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 InstrId"` InstgAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 InstgAgt"` InstdAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 InstdAgt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOnReqTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "sr:InstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "sr:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "sr:InstdAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max35Text string diff --git a/gen/admn_001_001_01/write.go b/gen/admn_001_001_01/write.go new file mode 100644 index 0000000..da27770 --- /dev/null +++ b/gen/admn_001_001_01/write.go @@ -0,0 +1,95 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:admn.001.001.01 with prefix 'sr' +package admn_001_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "sr:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "sr:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AdmnSignOnReq, xml.StartElement{Name: xml.Name{Local: "sr:AdmnSignOnReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "sr:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "sr:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "sr:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "sr:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "sr:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOnReq) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "sr:InstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "sr:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "sr:InstdAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOnRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "sr:GrpHdr"}}) + e.EncodeElement(v.SignOnReq, xml.StartElement{Name: xml.Name{Local: "sr:SignOnReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOnRequestTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "sr:GrpHdr"}}) + e.EncodeElement(v.SignOnReq, xml.StartElement{Name: xml.Name{Local: "sr:SignOnReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOnReqTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "sr:InstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "sr:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "sr:InstdAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admn_002_001_01/model.go b/gen/admn_002_001_01/model.go index 690c6bb..ec11c38 100644 --- a/gen/admn_002_001_01/model.go +++ b/gen/admn_002_001_01/model.go @@ -14,79 +14,29 @@ type BranchAndFinancialInstitutionIdentification4ADMN struct { FinInstnId FinancialInstitutionIdentification7ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rs:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2ADMN struct { MmbId Min11Max11Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rs:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name AdmnSignOnResp SignOnResponseTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 AdmnSignOnResp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AdmnSignOnResp, xml.StartElement{Name: xml.Name{Local: "rs:AdmnSignOnResp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification7ADMN struct { ClrSysMmbId ClearingSystemMemberIdentification2ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rs:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdr struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rs:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rs:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdrTCH struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rs:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rs:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOnResp struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 OrgnlInstrId"` InstgAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 InstgAgt"` @@ -95,46 +45,16 @@ type SignOnResp struct { StsRsnInf *StatusReasonInformation8 `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 StsRsnInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOnResp) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rs:OrgnlInstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "rs:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "rs:InstdAgt"}}) - e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "rs:Sts"}}) - e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rs:StsRsnInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOnResponse struct { GrpHdr GrpHdr `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 GrpHdr"` SignOnResp SignOnResp `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 SignOnResp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOnResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rs:GrpHdr"}}) - e.EncodeElement(v.SignOnResp, xml.StartElement{Name: xml.Name{Local: "rs:SignOnResp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOnResponseTCH struct { GrpHdr GrpHdrTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 GrpHdr"` SignOnResp SignOnRespTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 SignOnResp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOnResponseTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rs:GrpHdr"}}) - e.EncodeElement(v.SignOnResp, xml.StartElement{Name: xml.Name{Local: "rs:SignOnResp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOnRespTCH struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 OrgnlInstrId"` InstgAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 InstgAgt"` @@ -143,54 +63,18 @@ type SignOnRespTCH struct { StsRsnInf *StatusReasonInformation8TCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 StsRsnInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOnRespTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rs:OrgnlInstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "rs:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "rs:InstdAgt"}}) - e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "rs:Sts"}}) - e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rs:StsRsnInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReason6Choice struct { Prtry *ProprietaryReasonCode `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReason6Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rs:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReasonInformation8 struct { Rsn StatusReason6Choice `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 Rsn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReasonInformation8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rs:Rsn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReasonInformation8TCH struct { Rsn StatusReason6Choice `xml:"urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 Rsn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReasonInformation8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rs:Rsn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max35Text string diff --git a/gen/admn_002_001_01/write.go b/gen/admn_002_001_01/write.go new file mode 100644 index 0000000..e4f82ea --- /dev/null +++ b/gen/admn_002_001_01/write.go @@ -0,0 +1,123 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:admn.002.001.01 with prefix 'rs' +package admn_002_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rs:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rs:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AdmnSignOnResp, xml.StartElement{Name: xml.Name{Local: "rs:AdmnSignOnResp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rs:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rs:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rs:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rs:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rs:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOnResp) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rs:OrgnlInstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "rs:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "rs:InstdAgt"}}) + e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "rs:Sts"}}) + e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rs:StsRsnInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOnResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rs:GrpHdr"}}) + e.EncodeElement(v.SignOnResp, xml.StartElement{Name: xml.Name{Local: "rs:SignOnResp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOnResponseTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rs:GrpHdr"}}) + e.EncodeElement(v.SignOnResp, xml.StartElement{Name: xml.Name{Local: "rs:SignOnResp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOnRespTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rs:OrgnlInstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "rs:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "rs:InstdAgt"}}) + e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "rs:Sts"}}) + e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rs:StsRsnInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReason6Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rs:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReasonInformation8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rs:Rsn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReasonInformation8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rs:Rsn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admn_003_001_01/model.go b/gen/admn_003_001_01/model.go index 6524d70..bdea1b6 100644 --- a/gen/admn_003_001_01/model.go +++ b/gen/admn_003_001_01/model.go @@ -14,139 +14,51 @@ type BranchAndFinancialInstitutionIdentification4ADMN struct { FinInstnId FinancialInstitutionIdentification7ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "fr:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2ADMN struct { MmbId Min11Max11Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "fr:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name AdmnSignOffReq SignOffRequestTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 AdmnSignOffReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AdmnSignOffReq, xml.StartElement{Name: xml.Name{Local: "fr:AdmnSignOffReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification7ADMN struct { ClrSysMmbId ClearingSystemMemberIdentification2ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "fr:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdr struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "fr:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "fr:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdrTCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "fr:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "fr:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOffReq struct { InstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 InstrId"` InstgAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 InstgAgt"` InstdAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 InstdAgt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOffReq) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "fr:InstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "fr:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "fr:InstdAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOffRequest struct { GrpHdr GrpHdr `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 GrpHdr"` SignOffReq SignOffReq `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 SignOffReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOffRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "fr:GrpHdr"}}) - e.EncodeElement(v.SignOffReq, xml.StartElement{Name: xml.Name{Local: "fr:SignOffReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOffRequestTCH struct { GrpHdr GrpHdrTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 GrpHdr"` SignOffReq SignOffReqTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 SignOffReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOffRequestTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "fr:GrpHdr"}}) - e.EncodeElement(v.SignOffReq, xml.StartElement{Name: xml.Name{Local: "fr:SignOffReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOffReqTCH struct { InstrId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 InstrId"` InstgAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 InstgAgt"` InstdAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 InstdAgt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOffReqTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "fr:InstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "fr:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "fr:InstdAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max35Text string diff --git a/gen/admn_003_001_01/write.go b/gen/admn_003_001_01/write.go new file mode 100644 index 0000000..f4420ed --- /dev/null +++ b/gen/admn_003_001_01/write.go @@ -0,0 +1,95 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:admn.003.001.01 with prefix 'fr' +package admn_003_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "fr:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "fr:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AdmnSignOffReq, xml.StartElement{Name: xml.Name{Local: "fr:AdmnSignOffReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "fr:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "fr:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "fr:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "fr:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "fr:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOffReq) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "fr:InstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "fr:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "fr:InstdAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOffRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "fr:GrpHdr"}}) + e.EncodeElement(v.SignOffReq, xml.StartElement{Name: xml.Name{Local: "fr:SignOffReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOffRequestTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "fr:GrpHdr"}}) + e.EncodeElement(v.SignOffReq, xml.StartElement{Name: xml.Name{Local: "fr:SignOffReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOffReqTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "fr:InstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "fr:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "fr:InstdAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admn_004_001_01/model.go b/gen/admn_004_001_01/model.go index 7c74844..4cfd1f2 100644 --- a/gen/admn_004_001_01/model.go +++ b/gen/admn_004_001_01/model.go @@ -14,79 +14,29 @@ type BranchAndFinancialInstitutionIdentification4ADMN struct { FinInstnId FinancialInstitutionIdentification7ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rf:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2ADMN struct { MmbId Min11Max11Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rf:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name AdmnSignOffResp SignOffResponseTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 AdmnSignOffResp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AdmnSignOffResp, xml.StartElement{Name: xml.Name{Local: "rf:AdmnSignOffResp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification7ADMN struct { ClrSysMmbId ClearingSystemMemberIdentification2ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rf:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdr struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rf:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rf:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdrTCH struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rf:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rf:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOffResp struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 OrgnlInstrId"` InstgAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 InstgAgt"` @@ -95,46 +45,16 @@ type SignOffResp struct { StsRsnInf *StatusReasonInformation8 `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 StsRsnInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOffResp) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rf:OrgnlInstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "rf:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "rf:InstdAgt"}}) - e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "rf:Sts"}}) - e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rf:StsRsnInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOffResponse struct { GrpHdr GrpHdr `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 GrpHdr"` SignOffResp SignOffResp `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 SignOffResp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOffResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rf:GrpHdr"}}) - e.EncodeElement(v.SignOffResp, xml.StartElement{Name: xml.Name{Local: "rf:SignOffResp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOffResponseTCH struct { GrpHdr GrpHdrTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 GrpHdr"` SignOffResp SignOffRespTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 SignOffResp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOffResponseTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rf:GrpHdr"}}) - e.EncodeElement(v.SignOffResp, xml.StartElement{Name: xml.Name{Local: "rf:SignOffResp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SignOffRespTCH struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 OrgnlInstrId"` InstgAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 InstgAgt"` @@ -143,54 +63,18 @@ type SignOffRespTCH struct { StsRsnInf *StatusReasonInformation8TCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 StsRsnInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SignOffRespTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rf:OrgnlInstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "rf:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "rf:InstdAgt"}}) - e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "rf:Sts"}}) - e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rf:StsRsnInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReason6Choice struct { Prtry *ProprietaryReasonCode `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReason6Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rf:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReasonInformation8 struct { Rsn StatusReason6Choice `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 Rsn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReasonInformation8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rf:Rsn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReasonInformation8TCH struct { Rsn StatusReason6Choice `xml:"urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 Rsn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReasonInformation8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rf:Rsn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max35Text string diff --git a/gen/admn_004_001_01/write.go b/gen/admn_004_001_01/write.go new file mode 100644 index 0000000..4c89905 --- /dev/null +++ b/gen/admn_004_001_01/write.go @@ -0,0 +1,123 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:admn.004.001.01 with prefix 'rf' +package admn_004_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rf:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rf:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AdmnSignOffResp, xml.StartElement{Name: xml.Name{Local: "rf:AdmnSignOffResp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rf:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rf:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rf:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rf:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rf:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOffResp) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rf:OrgnlInstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "rf:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "rf:InstdAgt"}}) + e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "rf:Sts"}}) + e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rf:StsRsnInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOffResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rf:GrpHdr"}}) + e.EncodeElement(v.SignOffResp, xml.StartElement{Name: xml.Name{Local: "rf:SignOffResp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOffResponseTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rf:GrpHdr"}}) + e.EncodeElement(v.SignOffResp, xml.StartElement{Name: xml.Name{Local: "rf:SignOffResp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SignOffRespTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rf:OrgnlInstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "rf:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "rf:InstdAgt"}}) + e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "rf:Sts"}}) + e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rf:StsRsnInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReason6Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rf:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReasonInformation8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rf:Rsn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReasonInformation8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rf:Rsn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admn_005_001_01/model.go b/gen/admn_005_001_01/model.go index 2061d4d..076e21b 100644 --- a/gen/admn_005_001_01/model.go +++ b/gen/admn_005_001_01/model.go @@ -14,67 +14,25 @@ type BranchAndFinancialInstitutionIdentification4ADMN struct { FinInstnId FinancialInstitutionIdentification7ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "er:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2ADMN struct { MmbId Min11Max11Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "er:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name AdmnEchoReq EchoRequestTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 AdmnEchoReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AdmnEchoReq, xml.StartElement{Name: xml.Name{Local: "er:AdmnEchoReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type EchoRequest struct { GrpHdr GrpHdr `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 GrpHdr"` EchoTxInf EchoTxInf `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 EchoTxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v EchoRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "er:GrpHdr"}}) - e.EncodeElement(v.EchoTxInf, xml.StartElement{Name: xml.Name{Local: "er:EchoTxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type EchoRequestTCH struct { GrpHdr GrpHdrTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 GrpHdr"` EchoTxInf EchoTxInfTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 EchoTxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v EchoRequestTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "er:GrpHdr"}}) - e.EncodeElement(v.EchoTxInf, xml.StartElement{Name: xml.Name{Local: "er:EchoTxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type EchoTxInf struct { FnctnCd EchoCode `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 FnctnCd"` InstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 InstrId"` @@ -82,17 +40,6 @@ type EchoTxInf struct { InstdAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 InstdAgt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v EchoTxInf) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FnctnCd, xml.StartElement{Name: xml.Name{Local: "er:FnctnCd"}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "er:InstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "er:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "er:InstdAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type EchoTxInfTCH struct { FnctnCd EchoCode `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 FnctnCd"` InstrId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 InstrId"` @@ -100,57 +47,20 @@ type EchoTxInfTCH struct { InstdAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 InstdAgt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v EchoTxInfTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FnctnCd, xml.StartElement{Name: xml.Name{Local: "er:FnctnCd"}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "er:InstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "er:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "er:InstdAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification7ADMN struct { ClrSysMmbId ClearingSystemMemberIdentification2ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "er:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdr struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "er:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "er:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdrTCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "er:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "er:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type EchoCode string diff --git a/gen/admn_005_001_01/write.go b/gen/admn_005_001_01/write.go new file mode 100644 index 0000000..33346e2 --- /dev/null +++ b/gen/admn_005_001_01/write.go @@ -0,0 +1,97 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:admn.005.001.01 with prefix 'er' +package admn_005_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "er:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "er:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AdmnEchoReq, xml.StartElement{Name: xml.Name{Local: "er:AdmnEchoReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v EchoRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "er:GrpHdr"}}) + e.EncodeElement(v.EchoTxInf, xml.StartElement{Name: xml.Name{Local: "er:EchoTxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v EchoRequestTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "er:GrpHdr"}}) + e.EncodeElement(v.EchoTxInf, xml.StartElement{Name: xml.Name{Local: "er:EchoTxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v EchoTxInf) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FnctnCd, xml.StartElement{Name: xml.Name{Local: "er:FnctnCd"}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "er:InstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "er:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "er:InstdAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v EchoTxInfTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FnctnCd, xml.StartElement{Name: xml.Name{Local: "er:FnctnCd"}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "er:InstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "er:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "er:InstdAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "er:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "er:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "er:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "er:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "er:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admn_006_001_01/model.go b/gen/admn_006_001_01/model.go index 3b8b375..1bfa45c 100644 --- a/gen/admn_006_001_01/model.go +++ b/gen/admn_006_001_01/model.go @@ -14,39 +14,15 @@ type BranchAndFinancialInstitutionIdentification4ADMN struct { FinInstnId FinancialInstitutionIdentification7ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "re:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2ADMN struct { MmbId Min11Max11Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "re:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name AdmnEchoResp EchoResponseTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 AdmnEchoResp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AdmnEchoResp, xml.StartElement{Name: xml.Name{Local: "re:AdmnEchoResp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type EchoResp struct { InstgAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 InstgAgt"` InstdAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 InstdAgt"` @@ -55,86 +31,30 @@ type EchoResp struct { TxSts TransactionIndividualStatus3CodeEcho `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 TxSts"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v EchoResp) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "re:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "re:InstdAgt"}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "re:OrgnlInstrId"}}) - e.EncodeElement(v.FnctnCd, xml.StartElement{Name: xml.Name{Local: "re:FnctnCd"}}) - e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "re:TxSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type EchoResponse struct { GrpHdr GrpHdr `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 GrpHdr"` EchoResponse EchoResp `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 EchoResponse"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v EchoResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "re:GrpHdr"}}) - e.EncodeElement(v.EchoResponse, xml.StartElement{Name: xml.Name{Local: "re:EchoResponse"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type EchoResponseTCH struct { GrpHdr GrpHdrTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 GrpHdr"` EchoResponse EchoResp `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 EchoResponse"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v EchoResponseTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "re:GrpHdr"}}) - e.EncodeElement(v.EchoResponse, xml.StartElement{Name: xml.Name{Local: "re:EchoResponse"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification7ADMN struct { ClrSysMmbId ClearingSystemMemberIdentification2ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "re:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdr struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "re:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "re:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdrTCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "re:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "re:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type EchoCode string diff --git a/gen/admn_006_001_01/write.go b/gen/admn_006_001_01/write.go new file mode 100644 index 0000000..926b3ad --- /dev/null +++ b/gen/admn_006_001_01/write.go @@ -0,0 +1,87 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:admn.006.001.01 with prefix 're' +package admn_006_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "re:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "re:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AdmnEchoResp, xml.StartElement{Name: xml.Name{Local: "re:AdmnEchoResp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v EchoResp) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "re:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "re:InstdAgt"}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "re:OrgnlInstrId"}}) + e.EncodeElement(v.FnctnCd, xml.StartElement{Name: xml.Name{Local: "re:FnctnCd"}}) + e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "re:TxSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v EchoResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "re:GrpHdr"}}) + e.EncodeElement(v.EchoResponse, xml.StartElement{Name: xml.Name{Local: "re:EchoResponse"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v EchoResponseTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "re:GrpHdr"}}) + e.EncodeElement(v.EchoResponse, xml.StartElement{Name: xml.Name{Local: "re:EchoResponse"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "re:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "re:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "re:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "re:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "re:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admn_007_001_01/model.go b/gen/admn_007_001_01/model.go index c449863..5b3402c 100644 --- a/gen/admn_007_001_01/model.go +++ b/gen/admn_007_001_01/model.go @@ -14,26 +14,10 @@ type BranchAndFinancialInstitutionIdentification4ADMN struct { FinInstnId FinancialInstitutionIdentification7ADMN `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ut:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2ADMN struct { MmbId Min11Max11Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ut:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DatabaseReportInformation struct { RptCd ReportCode `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 RptCd"` InstrId Max35Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 InstrId"` @@ -41,17 +25,6 @@ type DatabaseReportInformation struct { InstdAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 InstdAgt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DatabaseReportInformation) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RptCd, xml.StartElement{Name: xml.Name{Local: "ut:RptCd"}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ut:InstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ut:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ut:InstdAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DatabaseReportInformationTCH struct { RptCd ReportCodeTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 RptCd"` InstrId Max35TextTCH2 `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 InstrId"` @@ -59,98 +32,35 @@ type DatabaseReportInformationTCH struct { InstdAgt BranchAndFinancialInstitutionIdentification4ADMN `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 InstdAgt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DatabaseReportInformationTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RptCd, xml.StartElement{Name: xml.Name{Local: "ut:RptCd"}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ut:InstrId"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ut:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ut:InstdAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DatabaseReportRequest struct { GrpHdr GrpHdr `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 GrpHdr"` DBRptInf DatabaseReportInformation `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 DBRptInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DatabaseReportRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ut:GrpHdr"}}) - e.EncodeElement(v.DBRptInf, xml.StartElement{Name: xml.Name{Local: "ut:DBRptInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DatabaseReportRequestTCH struct { GrpHdr GrpHdrTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 GrpHdr"` DBRptInf DatabaseReportInformationTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 DBRptInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DatabaseReportRequestTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ut:GrpHdr"}}) - e.EncodeElement(v.DBRptInf, xml.StartElement{Name: xml.Name{Local: "ut:DBRptInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name DBRptReq DatabaseReportRequestTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 DBRptReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DBRptReq, xml.StartElement{Name: xml.Name{Local: "ut:DBRptReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification7ADMN struct { ClrSysMmbId ClearingSystemMemberIdentification2ADMN `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ut:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdr struct { MsgId Max35Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ut:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ut:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdrTCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ut:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ut:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max35Text string diff --git a/gen/admn_007_001_01/write.go b/gen/admn_007_001_01/write.go new file mode 100644 index 0000000..836eb32 --- /dev/null +++ b/gen/admn_007_001_01/write.go @@ -0,0 +1,97 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:ma:20022:tech:xsd:admn.007.001.01 with prefix 'ut' +package admn_007_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ut:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ut:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DatabaseReportInformation) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RptCd, xml.StartElement{Name: xml.Name{Local: "ut:RptCd"}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ut:InstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ut:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ut:InstdAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DatabaseReportInformationTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RptCd, xml.StartElement{Name: xml.Name{Local: "ut:RptCd"}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ut:InstrId"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ut:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ut:InstdAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DatabaseReportRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ut:GrpHdr"}}) + e.EncodeElement(v.DBRptInf, xml.StartElement{Name: xml.Name{Local: "ut:DBRptInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DatabaseReportRequestTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ut:GrpHdr"}}) + e.EncodeElement(v.DBRptInf, xml.StartElement{Name: xml.Name{Local: "ut:DBRptInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DBRptReq, xml.StartElement{Name: xml.Name{Local: "ut:DBRptReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ut:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ut:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ut:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdrTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ut:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ut:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/admn_008_001_01/model.go b/gen/admn_008_001_01/model.go index af080c4..2b1fe43 100644 --- a/gen/admn_008_001_01/model.go +++ b/gen/admn_008_001_01/model.go @@ -15,137 +15,49 @@ type AvailabilityParticipant struct { PtcptSspd *ParticipantSuspended `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 PtcptSspd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AvailabilityParticipant) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PtcptSgnOff, xml.StartElement{Name: xml.Name{Local: "tu:PtcptSgnOff"}}) - e.EncodeElement(v.PtcptSspd, xml.StartElement{Name: xml.Name{Local: "tu:PtcptSspd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type AvailabilityParticipantTCH struct { PtcptSgnOff *ParticipantSignOffTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 PtcptSgnOff,omitempty"` PtcptSspd *ParticipantSuspendedTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 PtcptSspd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AvailabilityParticipantTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PtcptSgnOff, xml.StartElement{Name: xml.Name{Local: "tu:PtcptSgnOff"}}) - e.EncodeElement(v.PtcptSspd, xml.StartElement{Name: xml.Name{Local: "tu:PtcptSspd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type AvailabilityReport struct { Cnnctn *Connection `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 Cnnctn,omitempty"` AvlbtyPtcpt *AvailabilityParticipant `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 AvlbtyPtcpt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AvailabilityReport) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cnnctn, xml.StartElement{Name: xml.Name{Local: "tu:Cnnctn"}}) - e.EncodeElement(v.AvlbtyPtcpt, xml.StartElement{Name: xml.Name{Local: "tu:AvlbtyPtcpt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type AvailabilityReportTCH struct { Cnnctn *ConnectionTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 Cnnctn,omitempty"` AvlbtyPtcpt *AvailabilityParticipantTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 AvlbtyPtcpt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AvailabilityReportTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cnnctn, xml.StartElement{Name: xml.Name{Local: "tu:Cnnctn"}}) - e.EncodeElement(v.AvlbtyPtcpt, xml.StartElement{Name: xml.Name{Local: "tu:AvlbtyPtcpt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification4ADMN struct { FinInstnId FinancialInstitutionIdentification7ADMN `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "tu:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2ADMN struct { MmbId Min11Max11Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "tu:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Connection struct { CnnctnId []Max20AlphaNumericText `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 CnnctnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Connection) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CnnctnId, xml.StartElement{Name: xml.Name{Local: "tu:CnnctnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ConnectionTCH struct { CnnctnId []Max20AlphaNumericText `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 CnnctnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ConnectionTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CnnctnId, xml.StartElement{Name: xml.Name{Local: "tu:CnnctnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DatabaseAvailabilityReport struct { GrpHdr GrpHdr `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 GrpHdr"` DBRptRspn DatabaseReportReponse `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 DBRptRspn"` AvlbtyRpt AvailabilityReport `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 AvlbtyRpt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DatabaseAvailabilityReport) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "tu:GrpHdr"}}) - e.EncodeElement(v.DBRptRspn, xml.StartElement{Name: xml.Name{Local: "tu:DBRptRspn"}}) - e.EncodeElement(v.AvlbtyRpt, xml.StartElement{Name: xml.Name{Local: "tu:AvlbtyRpt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DatabaseAvailabilityReportTCH struct { GrpHdr GrpHdr `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 GrpHdr"` DBRptRspn DatabaseReportReponseTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 DBRptRspn"` AvlbtyRpt AvailabilityReportTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 AvlbtyRpt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DatabaseAvailabilityReportTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "tu:GrpHdr"}}) - e.EncodeElement(v.DBRptRspn, xml.StartElement{Name: xml.Name{Local: "tu:DBRptRspn"}}) - e.EncodeElement(v.AvlbtyRpt, xml.StartElement{Name: xml.Name{Local: "tu:AvlbtyRpt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DatabaseReportReponse struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 OrgnlInstrId"` RptCd ReportCode `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 RptCd"` @@ -154,18 +66,6 @@ type DatabaseReportReponse struct { TxSts TransactionIndividualStatus3CodeEcho `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 TxSts"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DatabaseReportReponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "tu:OrgnlInstrId"}}) - e.EncodeElement(v.RptCd, xml.StartElement{Name: xml.Name{Local: "tu:RptCd"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "tu:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "tu:InstdAgt"}}) - e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "tu:TxSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DatabaseReportReponseTCH struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 OrgnlInstrId"` RptCd ReportCodeTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 RptCd"` @@ -174,105 +74,36 @@ type DatabaseReportReponseTCH struct { TxSts TransactionIndividualStatus3CodeEcho `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 TxSts"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DatabaseReportReponseTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "tu:OrgnlInstrId"}}) - e.EncodeElement(v.RptCd, xml.StartElement{Name: xml.Name{Local: "tu:RptCd"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "tu:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "tu:InstdAgt"}}) - e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "tu:TxSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name DBAvlbtyRpt DatabaseAvailabilityReportTCH `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 DBAvlbtyRpt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DBAvlbtyRpt, xml.StartElement{Name: xml.Name{Local: "tu:DBAvlbtyRpt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification7ADMN struct { ClrSysMmbId ClearingSystemMemberIdentification2ADMN `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "tu:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GrpHdr struct { MsgId Max35Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "tu:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "tu:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ParticipantSignOff struct { PtcptId []Min11Max11Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 PtcptId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ParticipantSignOff) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PtcptId, xml.StartElement{Name: xml.Name{Local: "tu:PtcptId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ParticipantSignOffTCH struct { PtcptId []Min11Max11Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 PtcptId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ParticipantSignOffTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PtcptId, xml.StartElement{Name: xml.Name{Local: "tu:PtcptId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ParticipantSuspended struct { PtcptId []Min11Max11Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 PtcptId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ParticipantSuspended) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PtcptId, xml.StartElement{Name: xml.Name{Local: "tu:PtcptId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ParticipantSuspendedTCH struct { PtcptId []Min11Max11Text `xml:"urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 PtcptId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ParticipantSuspendedTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PtcptId, xml.StartElement{Name: xml.Name{Local: "tu:PtcptId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max20AlphaNumericText string diff --git a/gen/admn_008_001_01/write.go b/gen/admn_008_001_01/write.go new file mode 100644 index 0000000..a4c4825 --- /dev/null +++ b/gen/admn_008_001_01/write.go @@ -0,0 +1,176 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:ma:20022:tech:xsd:admn.008.001.01 with prefix 'tu' +package admn_008_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AvailabilityParticipant) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PtcptSgnOff, xml.StartElement{Name: xml.Name{Local: "tu:PtcptSgnOff"}}) + e.EncodeElement(v.PtcptSspd, xml.StartElement{Name: xml.Name{Local: "tu:PtcptSspd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AvailabilityParticipantTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PtcptSgnOff, xml.StartElement{Name: xml.Name{Local: "tu:PtcptSgnOff"}}) + e.EncodeElement(v.PtcptSspd, xml.StartElement{Name: xml.Name{Local: "tu:PtcptSspd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AvailabilityReport) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cnnctn, xml.StartElement{Name: xml.Name{Local: "tu:Cnnctn"}}) + e.EncodeElement(v.AvlbtyPtcpt, xml.StartElement{Name: xml.Name{Local: "tu:AvlbtyPtcpt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AvailabilityReportTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cnnctn, xml.StartElement{Name: xml.Name{Local: "tu:Cnnctn"}}) + e.EncodeElement(v.AvlbtyPtcpt, xml.StartElement{Name: xml.Name{Local: "tu:AvlbtyPtcpt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification4ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "tu:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "tu:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Connection) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CnnctnId, xml.StartElement{Name: xml.Name{Local: "tu:CnnctnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ConnectionTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CnnctnId, xml.StartElement{Name: xml.Name{Local: "tu:CnnctnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DatabaseAvailabilityReport) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "tu:GrpHdr"}}) + e.EncodeElement(v.DBRptRspn, xml.StartElement{Name: xml.Name{Local: "tu:DBRptRspn"}}) + e.EncodeElement(v.AvlbtyRpt, xml.StartElement{Name: xml.Name{Local: "tu:AvlbtyRpt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DatabaseAvailabilityReportTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "tu:GrpHdr"}}) + e.EncodeElement(v.DBRptRspn, xml.StartElement{Name: xml.Name{Local: "tu:DBRptRspn"}}) + e.EncodeElement(v.AvlbtyRpt, xml.StartElement{Name: xml.Name{Local: "tu:AvlbtyRpt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DatabaseReportReponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "tu:OrgnlInstrId"}}) + e.EncodeElement(v.RptCd, xml.StartElement{Name: xml.Name{Local: "tu:RptCd"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "tu:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "tu:InstdAgt"}}) + e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "tu:TxSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DatabaseReportReponseTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "tu:OrgnlInstrId"}}) + e.EncodeElement(v.RptCd, xml.StartElement{Name: xml.Name{Local: "tu:RptCd"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "tu:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "tu:InstdAgt"}}) + e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "tu:TxSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DBAvlbtyRpt, xml.StartElement{Name: xml.Name{Local: "tu:DBAvlbtyRpt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification7ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "tu:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GrpHdr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "tu:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "tu:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ParticipantSignOff) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PtcptId, xml.StartElement{Name: xml.Name{Local: "tu:PtcptId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ParticipantSignOffTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PtcptId, xml.StartElement{Name: xml.Name{Local: "tu:PtcptId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ParticipantSuspended) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PtcptId, xml.StartElement{Name: xml.Name{Local: "tu:PtcptId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ParticipantSuspendedTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PtcptId, xml.StartElement{Name: xml.Name{Local: "tu:PtcptId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/camt_026_001_07/model.go b/gen/camt_026_001_07/model.go index 8cbcafd..6c70e0d 100644 --- a/gen/camt_026_001_07/model.go +++ b/gen/camt_026_001_07/model.go @@ -19,66 +19,24 @@ type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "fi:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "fi:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH2 struct { FinInstnId FinancialInstitutionIdentification18TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "fi:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Id"` Cretr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "fi:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "fi:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5TCH struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Id"` Cretr Party40ChoiceTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "fi:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "fi:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Id"` Assgnr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Assgnr"` @@ -86,17 +44,6 @@ type CaseAssignment5 struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "fi:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "fi:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "fi:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5TCH struct { Id Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Id"` Assgnr Party40ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Assgnr"` @@ -104,234 +51,81 @@ type CaseAssignment5TCH struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "fi:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "fi:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "fi:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "fi:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "fi:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH2 struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "fi:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndDateTime2Choice struct { Dt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Dt,omitempty"` DtTm *rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 DtTm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "fi:Dt"}}) - e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "fi:DtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name UblToApply UnableToApplyV07TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 UblToApply"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.UblToApply, xml.StartElement{Name: xml.Name{Local: "fi:UblToApply"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "fi:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "fi:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH2 struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "fi:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type MissingOrIncorrectInformation3 struct { MssngInf []*UnableToApplyMissing1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 MssngInf,omitempty"` IncrrctInf []*UnableToApplyIncorrect1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 IncrrctInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v MissingOrIncorrectInformation3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MssngInf, xml.StartElement{Name: xml.Name{Local: "fi:MssngInf"}}) - e.EncodeElement(v.IncrrctInf, xml.StartElement{Name: xml.Name{Local: "fi:IncrrctInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40Choice struct { Pty *PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Pty,omitempty"` Agt *BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "fi:Pty"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "fi:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH struct { Agt *BranchAndFinancialInstitutionIdentification6TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "fi:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH2 struct { Pty *PartyIdentification135TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Pty,omitempty"` Agt *BranchAndFinancialInstitutionIdentification6TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "fi:Pty"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "fi:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Nm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "fi:Nm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Nm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "fi:Nm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnableToApplyIncorrect1 struct { Cd UnableToApplyIncorrectInformation4Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Cd"` AddtlIncrrctInf *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 AddtlIncrrctInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnableToApplyIncorrect1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "fi:Cd"}}) - e.EncodeElement(v.AddtlIncrrctInf, xml.StartElement{Name: xml.Name{Local: "fi:AddtlIncrrctInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnableToApplyJustification3Choice struct { MssngOrIncrrctInf *MissingOrIncorrectInformation3 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 MssngOrIncrrctInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnableToApplyJustification3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MssngOrIncrrctInf, xml.StartElement{Name: xml.Name{Local: "fi:MssngOrIncrrctInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnableToApplyMissing1 struct { Cd UnableToApplyMissingInformation3Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Cd"` AddtlMssngInf *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 AddtlMssngInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnableToApplyMissing1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "fi:Cd"}}) - e.EncodeElement(v.AddtlMssngInf, xml.StartElement{Name: xml.Name{Local: "fi:AddtlMssngInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnableToApplyV07 struct { Assgnmt CaseAssignment5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Assgnmt"` Case Case5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Case"` @@ -339,17 +133,6 @@ type UnableToApplyV07 struct { Justfn UnableToApplyJustification3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Justfn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnableToApplyV07) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "fi:Assgnmt"}}) - e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "fi:Case"}}) - e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "fi:Undrlyg"}}) - e.EncodeElement(v.Justfn, xml.StartElement{Name: xml.Name{Local: "fi:Justfn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnableToApplyV07TCH struct { Assgnmt CaseAssignment5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Assgnmt"` Case Case5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Case"` @@ -357,65 +140,24 @@ type UnableToApplyV07TCH struct { Justfn UnableToApplyJustification3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Justfn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnableToApplyV07TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "fi:Assgnmt"}}) - e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "fi:Case"}}) - e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "fi:Undrlyg"}}) - e.EncodeElement(v.Justfn, xml.StartElement{Name: xml.Name{Local: "fi:Justfn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingGroupInformation1 struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlMsgId"` OrgnlMsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlMsgNmId"` OrgnlCreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlCreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingGroupInformation1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlCreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingGroupInformation1TCH struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlMsgId"` OrgnlMsgNmId OrigMsgNameTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlMsgNmId"` OrgnlCreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlCreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingGroupInformation1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlCreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingGroupInformation1TCH2 struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlMsgId"` OrgnlMsgNmId OrigMsgNameTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlMsgNmId"` OrgnlCreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlCreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingGroupInformation1TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlCreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingPaymentInstruction5 struct { OrgnlGrpInf UnderlyingGroupInformation1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlGrpInf"` OrgnlPmtInfId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlPmtInfId"` @@ -425,19 +167,6 @@ type UnderlyingPaymentInstruction5 struct { ReqdExctnDt DateAndDateTime2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 ReqdExctnDt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingPaymentInstruction5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlGrpInf"}}) - e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlPmtInfId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlInstdAmt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlInstdAmt"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "fi:ReqdExctnDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingPaymentInstruction5TCH struct { OrgnlGrpInf UnderlyingGroupInformation1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlGrpInf"` OrgnlPmtInfId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlPmtInfId"` @@ -447,19 +176,6 @@ type UnderlyingPaymentInstruction5TCH struct { ReqdExctnDt DateAndDateTime2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 ReqdExctnDt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingPaymentInstruction5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlGrpInf"}}) - e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlPmtInfId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlInstdAmt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlInstdAmt"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "fi:ReqdExctnDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingPaymentTransaction4 struct { OrgnlGrpInf UnderlyingGroupInformation1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlGrpInf"` OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlInstrId"` @@ -470,20 +186,6 @@ type UnderlyingPaymentTransaction4 struct { OrgnlIntrBkSttlmDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlIntrBkSttlmDt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingPaymentTransaction4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlGrpInf"}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlTxId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlIntrBkSttlmAmt"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlIntrBkSttlmDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingPaymentTransaction4TCH struct { OrgnlGrpInf UnderlyingGroupInformation1TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlGrpInf"` OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlInstrId"` @@ -494,56 +196,20 @@ type UnderlyingPaymentTransaction4TCH struct { OrgnlIntrBkSttlmDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 OrgnlIntrBkSttlmDt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingPaymentTransaction4TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlGrpInf"}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlTxId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlIntrBkSttlmAmt"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlIntrBkSttlmDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingTransaction5Choice struct { Initn *UnderlyingPaymentInstruction5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Initn,omitempty"` IntrBk *UnderlyingPaymentTransaction4 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 IntrBk,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingTransaction5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Initn, xml.StartElement{Name: xml.Name{Local: "fi:Initn"}}) - e.EncodeElement(v.IntrBk, xml.StartElement{Name: xml.Name{Local: "fi:IntrBk"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingTransaction5ChoiceTCH struct { Initn *UnderlyingPaymentInstruction5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 Initn,omitempty"` IntrBk *UnderlyingPaymentTransaction4TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 IntrBk,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingTransaction5ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Initn, xml.StartElement{Name: xml.Name{Local: "fi:Initn"}}) - e.EncodeElement(v.IntrBk, xml.StartElement{Name: xml.Name{Local: "fi:IntrBk"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/camt_026_001_07/write.go b/gen/camt_026_001_07/write.go new file mode 100644 index 0000000..1539437 --- /dev/null +++ b/gen/camt_026_001_07/write.go @@ -0,0 +1,343 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:camt.026.001.07 with prefix 'fi' +package camt_026_001_07 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "fi:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "fi:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "fi:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "fi:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "fi:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "fi:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "fi:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "fi:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "fi:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "fi:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "fi:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "fi:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "fi:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "fi:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "fi:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "fi:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "fi:Dt"}}) + e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "fi:DtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.UblToApply, xml.StartElement{Name: xml.Name{Local: "fi:UblToApply"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "fi:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "fi:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "fi:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v MissingOrIncorrectInformation3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MssngInf, xml.StartElement{Name: xml.Name{Local: "fi:MssngInf"}}) + e.EncodeElement(v.IncrrctInf, xml.StartElement{Name: xml.Name{Local: "fi:IncrrctInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "fi:Pty"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "fi:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "fi:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "fi:Pty"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "fi:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "fi:Nm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "fi:Nm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnableToApplyIncorrect1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "fi:Cd"}}) + e.EncodeElement(v.AddtlIncrrctInf, xml.StartElement{Name: xml.Name{Local: "fi:AddtlIncrrctInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnableToApplyJustification3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MssngOrIncrrctInf, xml.StartElement{Name: xml.Name{Local: "fi:MssngOrIncrrctInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnableToApplyMissing1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "fi:Cd"}}) + e.EncodeElement(v.AddtlMssngInf, xml.StartElement{Name: xml.Name{Local: "fi:AddtlMssngInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnableToApplyV07) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "fi:Assgnmt"}}) + e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "fi:Case"}}) + e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "fi:Undrlyg"}}) + e.EncodeElement(v.Justfn, xml.StartElement{Name: xml.Name{Local: "fi:Justfn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnableToApplyV07TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "fi:Assgnmt"}}) + e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "fi:Case"}}) + e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "fi:Undrlyg"}}) + e.EncodeElement(v.Justfn, xml.StartElement{Name: xml.Name{Local: "fi:Justfn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingGroupInformation1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlCreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingGroupInformation1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlCreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingGroupInformation1TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlCreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingPaymentInstruction5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlGrpInf"}}) + e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlPmtInfId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlInstdAmt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlInstdAmt"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "fi:ReqdExctnDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingPaymentInstruction5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlGrpInf"}}) + e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlPmtInfId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlInstdAmt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlInstdAmt"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "fi:ReqdExctnDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingPaymentTransaction4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlGrpInf"}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlTxId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlIntrBkSttlmAmt"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlIntrBkSttlmDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingPaymentTransaction4TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlGrpInf"}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlTxId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlIntrBkSttlmAmt"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "fi:OrgnlIntrBkSttlmDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingTransaction5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Initn, xml.StartElement{Name: xml.Name{Local: "fi:Initn"}}) + e.EncodeElement(v.IntrBk, xml.StartElement{Name: xml.Name{Local: "fi:IntrBk"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingTransaction5ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Initn, xml.StartElement{Name: xml.Name{Local: "fi:Initn"}}) + e.EncodeElement(v.IntrBk, xml.StartElement{Name: xml.Name{Local: "fi:IntrBk"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/camt_028_001_09/model.go b/gen/camt_028_001_09/model.go index a4df99c..2902a31 100644 --- a/gen/camt_028_001_09/model.go +++ b/gen/camt_028_001_09/model.go @@ -22,17 +22,6 @@ type AdditionalPaymentInformationV09 struct { Inf PaymentComplementaryInformation8 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Inf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AdditionalPaymentInformationV09) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "if:Assgnmt"}}) - e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "if:Case"}}) - e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "if:Undrlyg"}}) - e.EncodeElement(v.Inf, xml.StartElement{Name: xml.Name{Local: "if:Inf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type AdditionalPaymentInformationV09TCH struct { Assgnmt CaseAssignment5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Assgnmt"` Case Case5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Case"` @@ -40,69 +29,24 @@ type AdditionalPaymentInformationV09TCH struct { Inf PaymentComplementaryInformation8TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Inf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AdditionalPaymentInformationV09TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "if:Assgnmt"}}) - e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "if:Case"}}) - e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "if:Undrlyg"}}) - e.EncodeElement(v.Inf, xml.StartElement{Name: xml.Name{Local: "if:Inf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "if:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "if:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id"` Cretr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "if:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5TCH struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id"` Cretr Party40ChoiceTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "if:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id"` Assgnr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Assgnr"` @@ -110,17 +54,6 @@ type CaseAssignment5 struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "if:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "if:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "if:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5TCH struct { Id Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id"` Assgnr Party40ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Assgnr"` @@ -128,412 +61,144 @@ type CaseAssignment5TCH struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "if:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "if:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "if:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "if:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "if:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Contact4 struct { PhneNb *PhoneNumber `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PhneNb,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Contact4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PhneNb, xml.StartElement{Name: xml.Name{Local: "if:PhneNb"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndDateTime2Choice struct { Dt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Dt,omitempty"` DtTm *rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 DtTm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "if:Dt"}}) - e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "if:DtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndPlaceOfBirth1 struct { BirthDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 BirthDt"` CityOfBirth Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 CityOfBirth"` CtryOfBirth CountryCode `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 CtryOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "if:BirthDt"}}) - e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "if:CityOfBirth"}}) - e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "if:CtryOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountAndType1 struct { Tp DiscountAmountType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Tp"` Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Amt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "if:Tp"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "if:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountAndType1TCH struct { Tp DiscountAmountType1ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Tp"` Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Amt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountAndType1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "if:Tp"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "if:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountType1Choice struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountType1ChoiceTCH struct { Prtry *Max35TextTCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountType1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name AddtlPmtInf AdditionalPaymentInformationV09TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 AddtlPmtInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AddtlPmtInf, xml.StartElement{Name: xml.Name{Local: "if:AddtlPmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "if:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "if:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericPersonIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id"` SchmeNm *PersonIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 SchmeNm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericPersonIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "if:SchmeNm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29 struct { LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 LEI,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "if:LEI"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH struct { LEI LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 LEI"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "if:LEI"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification30 struct { LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 LEI,omitempty"` Othr []*GenericOrganisationIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification30) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "if:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification30TCH struct { LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 LEI,omitempty"` Othr []*GenericOrganisationIdentification1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification30TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "if:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id"` SchmeNm *OrganisationIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 SchmeNm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "if:SchmeNm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1TCH struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id"` SchmeNm *OrganisationIdentificationSchemeName1ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 SchmeNm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "if:SchmeNm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentificationSchemeName1Choice struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentificationSchemeName1ChoiceTCH struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentificationSchemeName1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentificationSchemeName1Choice struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38Choice struct { OrgId *OrganisationIdentification30 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgId,omitempty"` PrvtId *PersonIdentification13 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH struct { OrgId *OrganisationIdentification30TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgId,omitempty"` PrvtId *PersonIdentification13TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH2 struct { OrgId *OrganisationIdentification29TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgId,omitempty"` PrvtId *PersonIdentification13TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH3 struct { OrgId *OrganisationIdentification29TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgId,omitempty"` PrvtId *PersonIdentification13TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH4 struct { OrgId *OrganisationIdentification29TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgId,omitempty"` PrvtId *PersonIdentification13TCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40Choice struct { Pty *PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Pty,omitempty"` Agt *BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "if:Pty"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "if:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH struct { Agt *BranchAndFinancialInstitutionIdentification6TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "if:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH2 struct { Pty *PartyIdentification135TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Pty,omitempty"` Agt *BranchAndFinancialInstitutionIdentification6TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "if:Pty"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "if:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Nm,omitempty"` PstlAdr *PostalAddress24 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PstlAdr,omitempty"` @@ -541,61 +206,22 @@ type PartyIdentification135 struct { CtctDtls *Contact4 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 CtctDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "if:CtctDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Nm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH2 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Nm,omitempty"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PstlAdr,omitempty"` Id *Party38ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH3 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Nm,omitempty"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PstlAdr,omitempty"` Id *Party38ChoiceTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH4 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Nm,omitempty"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PstlAdr,omitempty"` @@ -603,33 +229,12 @@ type PartyIdentification135TCH4 struct { CtctDtls *Contact4 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 CtctDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "if:CtctDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH5 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Nm,omitempty"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 PstlAdr,omitempty"` Id *Party38ChoiceTCH4 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentComplementaryInformation8 struct { InstrId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 InstrId,omitempty"` EndToEndId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 EndToEndId,omitempty"` @@ -641,21 +246,6 @@ type PaymentComplementaryInformation8 struct { RmtInf *RemittanceInformation16 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 RmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentComplementaryInformation8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "if:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "if:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "if:TxId"}}) - e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "if:UltmtDbtr"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "if:Dbtr"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "if:Cdtr"}}) - e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "if:UltmtCdtr"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "if:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentComplementaryInformation8TCH struct { InstrId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 InstrId,omitempty"` EndToEndId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 EndToEndId,omitempty"` @@ -667,73 +257,24 @@ type PaymentComplementaryInformation8TCH struct { RmtInf *RemittanceInformation16TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 RmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentComplementaryInformation8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "if:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "if:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "if:TxId"}}) - e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "if:UltmtDbtr"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "if:Dbtr"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "if:Cdtr"}}) - e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "if:UltmtCdtr"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "if:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13 struct { DtAndPlcOfBirth *DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 DtAndPlcOfBirth,omitempty"` Othr []*GenericPersonIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "if:DtAndPlcOfBirth"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13TCH struct { DtAndPlcOfBirth *DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 DtAndPlcOfBirth,omitempty"` Othr []*GenericPersonIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "if:DtAndPlcOfBirth"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13TCH2 struct { DtAndPlcOfBirth DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 DtAndPlcOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "if:DtAndPlcOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13TCH3 struct { Othr GenericPersonIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Othr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PostalAddress24 struct { StrtNm Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 StrtNm"` BldgNb *Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 BldgNb,omitempty"` @@ -744,20 +285,6 @@ type PostalAddress24 struct { AdrLine *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 AdrLine,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "if:StrtNm"}}) - e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "if:BldgNb"}}) - e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "if:PstCd"}}) - e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "if:TwnNm"}}) - e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "if:CtrySubDvsn"}}) - e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "if:Ctry"}}) - e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "if:AdrLine"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PostalAddress24TCH struct { StrtNm Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 StrtNm"` BldgNb *Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 BldgNb,omitempty"` @@ -768,138 +295,47 @@ type PostalAddress24TCH struct { AdrLine *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 AdrLine,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PostalAddress24TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "if:StrtNm"}}) - e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "if:BldgNb"}}) - e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "if:PstCd"}}) - e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "if:TwnNm"}}) - e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "if:CtrySubDvsn"}}) - e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "if:Ctry"}}) - e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "if:AdrLine"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAmount2 struct { DscntApldAmt []*DiscountAmountAndType1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 DscntApldAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "if:DscntApldAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAmount2TCH struct { DscntApldAmt []*DiscountAmountAndType1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 DscntApldAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAmount2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "if:DscntApldAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation16 struct { Ustrd []*Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Ustrd,omitempty"` Strd *StructuredRemittanceInformation16 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Strd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "if:Ustrd"}}) - e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "if:Strd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation16TCH struct { Ustrd []*Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Ustrd,omitempty"` Strd *StructuredRemittanceInformation16TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Strd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "if:Ustrd"}}) - e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "if:Strd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StructuredRemittanceInformation16 struct { RfrdDocAmt *RemittanceAmount2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 RfrdDocAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StructuredRemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "if:RfrdDocAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StructuredRemittanceInformation16TCH struct { RfrdDocAmt *RemittanceAmount2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 RfrdDocAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StructuredRemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "if:RfrdDocAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingGroupInformation1 struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlMsgId"` OrgnlMsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlMsgNmId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingGroupInformation1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgNmId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingGroupInformation1TCH struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlMsgId"` OrgnlMsgNmId OrigMsgNameTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlMsgNmId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingGroupInformation1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgNmId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingGroupInformation1TCH2 struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlMsgId"` OrgnlMsgNmId OrigMsgNameTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlMsgNmId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingGroupInformation1TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgNmId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingPaymentInstruction5 struct { OrgnlGrpInf UnderlyingGroupInformation1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlGrpInf"` OrgnlPmtInfId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlPmtInfId"` @@ -909,19 +345,6 @@ type UnderlyingPaymentInstruction5 struct { ReqdExctnDt *DateAndDateTime2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 ReqdExctnDt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingPaymentInstruction5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "if:OrgnlGrpInf"}}) - e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlPmtInfId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "if:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlInstdAmt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlInstdAmt"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "if:ReqdExctnDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingPaymentInstruction5TCH struct { OrgnlGrpInf UnderlyingGroupInformation1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlGrpInf"` OrgnlPmtInfId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlPmtInfId"` @@ -931,19 +354,6 @@ type UnderlyingPaymentInstruction5TCH struct { ReqdExctnDt *DateAndDateTime2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 ReqdExctnDt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingPaymentInstruction5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "if:OrgnlGrpInf"}}) - e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlPmtInfId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "if:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlInstdAmt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlInstdAmt"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "if:ReqdExctnDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingPaymentTransaction4 struct { OrgnlGrpInf UnderlyingGroupInformation1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlGrpInf"` OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlInstrId"` @@ -954,20 +364,6 @@ type UnderlyingPaymentTransaction4 struct { OrgnlIntrBkSttlmDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlIntrBkSttlmDt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingPaymentTransaction4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "if:OrgnlGrpInf"}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlTxId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "if:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlIntrBkSttlmAmt"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlIntrBkSttlmDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingPaymentTransaction4TCH struct { OrgnlGrpInf UnderlyingGroupInformation1TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlGrpInf"` OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlInstrId"` @@ -978,56 +374,20 @@ type UnderlyingPaymentTransaction4TCH struct { OrgnlIntrBkSttlmDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 OrgnlIntrBkSttlmDt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingPaymentTransaction4TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "if:OrgnlGrpInf"}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlTxId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "if:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlIntrBkSttlmAmt"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlIntrBkSttlmDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingTransaction5Choice struct { Initn *UnderlyingPaymentInstruction5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Initn,omitempty"` IntrBk *UnderlyingPaymentTransaction4 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 IntrBk,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingTransaction5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Initn, xml.StartElement{Name: xml.Name{Local: "if:Initn"}}) - e.EncodeElement(v.IntrBk, xml.StartElement{Name: xml.Name{Local: "if:IntrBk"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingTransaction5ChoiceTCH struct { Initn *UnderlyingPaymentInstruction5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 Initn,omitempty"` IntrBk *UnderlyingPaymentTransaction4TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 IntrBk,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingTransaction5ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Initn, xml.StartElement{Name: xml.Name{Local: "if:Initn"}}) - e.EncodeElement(v.IntrBk, xml.StartElement{Name: xml.Name{Local: "if:IntrBk"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/camt_028_001_09/write.go b/gen/camt_028_001_09/write.go new file mode 100644 index 0000000..e1c208c --- /dev/null +++ b/gen/camt_028_001_09/write.go @@ -0,0 +1,649 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:camt.028.001.09 with prefix 'if' +package camt_028_001_09 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AdditionalPaymentInformationV09) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "if:Assgnmt"}}) + e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "if:Case"}}) + e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "if:Undrlyg"}}) + e.EncodeElement(v.Inf, xml.StartElement{Name: xml.Name{Local: "if:Inf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AdditionalPaymentInformationV09TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "if:Assgnmt"}}) + e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "if:Case"}}) + e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "if:Undrlyg"}}) + e.EncodeElement(v.Inf, xml.StartElement{Name: xml.Name{Local: "if:Inf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "if:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "if:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "if:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "if:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "if:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "if:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "if:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "if:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "if:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "if:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "if:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "if:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Contact4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PhneNb, xml.StartElement{Name: xml.Name{Local: "if:PhneNb"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "if:Dt"}}) + e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "if:DtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "if:BirthDt"}}) + e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "if:CityOfBirth"}}) + e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "if:CtryOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "if:Tp"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "if:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountAndType1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "if:Tp"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "if:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountType1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AddtlPmtInf, xml.StartElement{Name: xml.Name{Local: "if:AddtlPmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "if:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "if:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericPersonIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "if:SchmeNm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "if:LEI"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "if:LEI"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification30) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "if:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification30TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "if:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "if:SchmeNm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "if:SchmeNm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentificationSchemeName1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "if:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "if:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "if:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "if:Pty"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "if:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "if:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "if:Pty"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "if:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "if:CtctDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "if:CtctDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "if:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "if:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "if:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentComplementaryInformation8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "if:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "if:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "if:TxId"}}) + e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "if:UltmtDbtr"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "if:Dbtr"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "if:Cdtr"}}) + e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "if:UltmtCdtr"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "if:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentComplementaryInformation8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "if:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "if:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "if:TxId"}}) + e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "if:UltmtDbtr"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "if:Dbtr"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "if:Cdtr"}}) + e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "if:UltmtCdtr"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "if:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "if:DtAndPlcOfBirth"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "if:DtAndPlcOfBirth"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "if:DtAndPlcOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "if:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "if:StrtNm"}}) + e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "if:BldgNb"}}) + e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "if:PstCd"}}) + e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "if:TwnNm"}}) + e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "if:CtrySubDvsn"}}) + e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "if:Ctry"}}) + e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "if:AdrLine"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PostalAddress24TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "if:StrtNm"}}) + e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "if:BldgNb"}}) + e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "if:PstCd"}}) + e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "if:TwnNm"}}) + e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "if:CtrySubDvsn"}}) + e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "if:Ctry"}}) + e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "if:AdrLine"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "if:DscntApldAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAmount2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "if:DscntApldAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "if:Ustrd"}}) + e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "if:Strd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "if:Ustrd"}}) + e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "if:Strd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StructuredRemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "if:RfrdDocAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StructuredRemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "if:RfrdDocAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingGroupInformation1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgNmId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingGroupInformation1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgNmId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingGroupInformation1TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlMsgNmId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingPaymentInstruction5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "if:OrgnlGrpInf"}}) + e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlPmtInfId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "if:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlInstdAmt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlInstdAmt"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "if:ReqdExctnDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingPaymentInstruction5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "if:OrgnlGrpInf"}}) + e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlPmtInfId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "if:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlInstdAmt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlInstdAmt"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "if:ReqdExctnDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingPaymentTransaction4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "if:OrgnlGrpInf"}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlTxId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "if:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlIntrBkSttlmAmt"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlIntrBkSttlmDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingPaymentTransaction4TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "if:OrgnlGrpInf"}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "if:OrgnlTxId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "if:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlIntrBkSttlmAmt"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "if:OrgnlIntrBkSttlmDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingTransaction5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Initn, xml.StartElement{Name: xml.Name{Local: "if:Initn"}}) + e.EncodeElement(v.IntrBk, xml.StartElement{Name: xml.Name{Local: "if:IntrBk"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingTransaction5ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Initn, xml.StartElement{Name: xml.Name{Local: "if:Initn"}}) + e.EncodeElement(v.IntrBk, xml.StartElement{Name: xml.Name{Local: "if:IntrBk"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/camt_029_001_09/model.go b/gen/camt_029_001_09/model.go index 68c3a1f..2868d89 100644 --- a/gen/camt_029_001_09/model.go +++ b/gen/camt_029_001_09/model.go @@ -19,102 +19,36 @@ type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "tr:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "tr:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CancellationStatusReason3Choice struct { Cd *ExternalPaymentCancellationRejection1Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Cd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CancellationStatusReason3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "tr:Cd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CancellationStatusReason3ChoiceTCH struct { Cd *ExternalPaymentCancellationRejection1CodeTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Cd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CancellationStatusReason3ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "tr:Cd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CancellationStatusReason4 struct { Rsn CancellationStatusReason3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Rsn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CancellationStatusReason4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "tr:Rsn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CancellationStatusReason4TCH struct { Rsn CancellationStatusReason3ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Rsn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CancellationStatusReason4TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "tr:Rsn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Id"` Cretr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "tr:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "tr:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5TCH struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Id"` Cretr Party40ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "tr:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "tr:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Id"` Assgnr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Assgnr"` @@ -122,17 +56,6 @@ type CaseAssignment5 struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "tr:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "tr:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "tr:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "tr:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5TCH struct { Id Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Id"` Assgnr Party40ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Assgnr"` @@ -140,118 +63,41 @@ type CaseAssignment5TCH struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "tr:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "tr:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "tr:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "tr:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Charges7 struct { Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Amt"` Agt BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Agt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Charges7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "tr:Amt"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "tr:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Charges7TCH struct { Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Amt"` Agt BranchAndFinancialInstitutionIdentification6TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Agt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Charges7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "tr:Amt"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "tr:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "tr:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "tr:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name RsltnOfInvstgtn ResolutionOfInvestigationV09TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 RsltnOfInvstgtn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RsltnOfInvstgtn, xml.StartElement{Name: xml.Name{Local: "tr:RsltnOfInvstgtn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "tr:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "tr:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type InvestigationStatus5Choice struct { Conf *ExternalInvestigationExecutionConfirmation1Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Conf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v InvestigationStatus5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Conf, xml.StartElement{Name: xml.Name{Local: "tr:Conf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalGroupHeader14 struct { RslvdCase Case5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 RslvdCase"` OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 OrgnlMsgId"` @@ -260,18 +106,6 @@ type OriginalGroupHeader14 struct { CxlStsRsnInf *CancellationStatusReason4 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 CxlStsRsnInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalGroupHeader14) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RslvdCase, xml.StartElement{Name: xml.Name{Local: "tr:RslvdCase"}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlCreDtTm"}}) - e.EncodeElement(v.CxlStsRsnInf, xml.StartElement{Name: xml.Name{Local: "tr:CxlStsRsnInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalGroupHeader14TCH struct { RslvdCase Case5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 RslvdCase"` OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 OrgnlMsgId"` @@ -280,74 +114,26 @@ type OriginalGroupHeader14TCH struct { CxlStsRsnInf *CancellationStatusReason4TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 CxlStsRsnInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalGroupHeader14TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RslvdCase, xml.StartElement{Name: xml.Name{Local: "tr:RslvdCase"}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlCreDtTm"}}) - e.EncodeElement(v.CxlStsRsnInf, xml.StartElement{Name: xml.Name{Local: "tr:CxlStsRsnInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40Choice struct { Agt *BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "tr:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH struct { Agt *BranchAndFinancialInstitutionIdentification6TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "tr:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction102 struct { CxlStsId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 CxlStsId,omitempty"` OrgnlUETR *UUIDv4Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 OrgnlUETR,omitempty"` RsltnRltdInf *ResolutionData1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 RsltnRltdInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction102) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CxlStsId, xml.StartElement{Name: xml.Name{Local: "tr:CxlStsId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlUETR"}}) - e.EncodeElement(v.RsltnRltdInf, xml.StartElement{Name: xml.Name{Local: "tr:RsltnRltdInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction102TCH struct { CxlStsId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 CxlStsId,omitempty"` OrgnlUETR *UUIDv4Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 OrgnlUETR,omitempty"` RsltnRltdInf *ResolutionData1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 RsltnRltdInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction102TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CxlStsId, xml.StartElement{Name: xml.Name{Local: "tr:CxlStsId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlUETR"}}) - e.EncodeElement(v.RsltnRltdInf, xml.StartElement{Name: xml.Name{Local: "tr:RsltnRltdInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ResolutionData1 struct { IntrBkSttlmAmt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 IntrBkSttlmAmt"` IntrBkSttlmDt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 IntrBkSttlmDt,omitempty"` @@ -355,17 +141,6 @@ type ResolutionData1 struct { Chrgs *Charges7 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Chrgs,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ResolutionData1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "tr:IntrBkSttlmAmt"}}) - e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "tr:IntrBkSttlmDt"}}) - e.EncodeElement(v.ClrChanl, xml.StartElement{Name: xml.Name{Local: "tr:ClrChanl"}}) - e.EncodeElement(v.Chrgs, xml.StartElement{Name: xml.Name{Local: "tr:Chrgs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ResolutionData1TCH struct { IntrBkSttlmAmt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 IntrBkSttlmAmt"` IntrBkSttlmDt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 IntrBkSttlmDt,omitempty"` @@ -373,85 +148,32 @@ type ResolutionData1TCH struct { Chrgs *Charges7TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Chrgs,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ResolutionData1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "tr:IntrBkSttlmAmt"}}) - e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "tr:IntrBkSttlmDt"}}) - e.EncodeElement(v.ClrChanl, xml.StartElement{Name: xml.Name{Local: "tr:ClrChanl"}}) - e.EncodeElement(v.Chrgs, xml.StartElement{Name: xml.Name{Local: "tr:Chrgs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ResolutionOfInvestigationV09 struct { Assgnmt CaseAssignment5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Assgnmt"` Sts InvestigationStatus5Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Sts"` CxlDtls UnderlyingTransaction22 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 CxlDtls"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ResolutionOfInvestigationV09) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "tr:Assgnmt"}}) - e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "tr:Sts"}}) - e.EncodeElement(v.CxlDtls, xml.StartElement{Name: xml.Name{Local: "tr:CxlDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ResolutionOfInvestigationV09TCH struct { Assgnmt CaseAssignment5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Assgnmt"` Sts InvestigationStatus5Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 Sts"` CxlDtls UnderlyingTransaction22TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 CxlDtls"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ResolutionOfInvestigationV09TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "tr:Assgnmt"}}) - e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "tr:Sts"}}) - e.EncodeElement(v.CxlDtls, xml.StartElement{Name: xml.Name{Local: "tr:CxlDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingTransaction22 struct { OrgnlGrpInfAndSts OriginalGroupHeader14 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 OrgnlGrpInfAndSts"` TxInfAndSts *PaymentTransaction102 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 TxInfAndSts,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingTransaction22) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlGrpInfAndSts"}}) - e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "tr:TxInfAndSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingTransaction22TCH struct { OrgnlGrpInfAndSts OriginalGroupHeader14TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 OrgnlGrpInfAndSts"` TxInfAndSts *PaymentTransaction102TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 TxInfAndSts,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingTransaction22TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlGrpInfAndSts"}}) - e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "tr:TxInfAndSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/camt_029_001_09/write.go b/gen/camt_029_001_09/write.go new file mode 100644 index 0000000..4124155 --- /dev/null +++ b/gen/camt_029_001_09/write.go @@ -0,0 +1,287 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:camt.029.001.09 with prefix 'tr' +package camt_029_001_09 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "tr:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "tr:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CancellationStatusReason3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "tr:Cd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CancellationStatusReason3ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "tr:Cd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CancellationStatusReason4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "tr:Rsn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CancellationStatusReason4TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "tr:Rsn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "tr:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "tr:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "tr:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "tr:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "tr:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "tr:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "tr:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "tr:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "tr:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "tr:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "tr:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "tr:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Charges7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "tr:Amt"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "tr:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Charges7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "tr:Amt"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "tr:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "tr:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "tr:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RsltnOfInvstgtn, xml.StartElement{Name: xml.Name{Local: "tr:RsltnOfInvstgtn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "tr:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "tr:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v InvestigationStatus5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Conf, xml.StartElement{Name: xml.Name{Local: "tr:Conf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalGroupHeader14) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RslvdCase, xml.StartElement{Name: xml.Name{Local: "tr:RslvdCase"}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlCreDtTm"}}) + e.EncodeElement(v.CxlStsRsnInf, xml.StartElement{Name: xml.Name{Local: "tr:CxlStsRsnInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalGroupHeader14TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RslvdCase, xml.StartElement{Name: xml.Name{Local: "tr:RslvdCase"}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlCreDtTm"}}) + e.EncodeElement(v.CxlStsRsnInf, xml.StartElement{Name: xml.Name{Local: "tr:CxlStsRsnInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "tr:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "tr:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction102) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CxlStsId, xml.StartElement{Name: xml.Name{Local: "tr:CxlStsId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlUETR"}}) + e.EncodeElement(v.RsltnRltdInf, xml.StartElement{Name: xml.Name{Local: "tr:RsltnRltdInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction102TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CxlStsId, xml.StartElement{Name: xml.Name{Local: "tr:CxlStsId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlUETR"}}) + e.EncodeElement(v.RsltnRltdInf, xml.StartElement{Name: xml.Name{Local: "tr:RsltnRltdInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ResolutionData1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "tr:IntrBkSttlmAmt"}}) + e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "tr:IntrBkSttlmDt"}}) + e.EncodeElement(v.ClrChanl, xml.StartElement{Name: xml.Name{Local: "tr:ClrChanl"}}) + e.EncodeElement(v.Chrgs, xml.StartElement{Name: xml.Name{Local: "tr:Chrgs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ResolutionData1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "tr:IntrBkSttlmAmt"}}) + e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "tr:IntrBkSttlmDt"}}) + e.EncodeElement(v.ClrChanl, xml.StartElement{Name: xml.Name{Local: "tr:ClrChanl"}}) + e.EncodeElement(v.Chrgs, xml.StartElement{Name: xml.Name{Local: "tr:Chrgs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ResolutionOfInvestigationV09) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "tr:Assgnmt"}}) + e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "tr:Sts"}}) + e.EncodeElement(v.CxlDtls, xml.StartElement{Name: xml.Name{Local: "tr:CxlDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ResolutionOfInvestigationV09TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "tr:Assgnmt"}}) + e.EncodeElement(v.Sts, xml.StartElement{Name: xml.Name{Local: "tr:Sts"}}) + e.EncodeElement(v.CxlDtls, xml.StartElement{Name: xml.Name{Local: "tr:CxlDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingTransaction22) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlGrpInfAndSts"}}) + e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "tr:TxInfAndSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingTransaction22TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "tr:OrgnlGrpInfAndSts"}}) + e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "tr:TxInfAndSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/camt_035_001_05/model.go b/gen/camt_035_001_05/model.go index 1f82912..0bd2d6e 100644 --- a/gen/camt_035_001_05/model.go +++ b/gen/camt_035_001_05/model.go @@ -14,54 +14,20 @@ type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ac:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ac:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Id"` Cretr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ac:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "ac:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5TCH struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Id"` Cretr Party40ChoiceTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ac:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "ac:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Id"` Assgnr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Assgnr"` @@ -69,17 +35,6 @@ type CaseAssignment5 struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ac:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "ac:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "ac:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ac:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5TCH struct { Id Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Id"` Assgnr Party40ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Assgnr"` @@ -87,230 +42,81 @@ type CaseAssignment5TCH struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ac:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "ac:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "ac:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ac:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ac:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ac:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name PrtryFrmtInvstgtn ProprietaryFormatInvestigationV05TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 PrtryFrmtInvstgtn"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PrtryFrmtInvstgtn, xml.StartElement{Name: xml.Name{Local: "ac:PrtryFrmtInvstgtn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ac:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ac:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40Choice struct { Pty *PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Pty,omitempty"` Agt *BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "ac:Pty"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "ac:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH struct { Agt *BranchAndFinancialInstitutionIdentification6TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "ac:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH2 struct { Pty *PartyIdentification135TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Pty,omitempty"` Agt *BranchAndFinancialInstitutionIdentification6TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "ac:Pty"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "ac:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Nm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ac:Nm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Nm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ac:Nm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProprietaryData6Reduced struct { Ustrd *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Ustrd,omitempty"` OrigRefs TransactionReferences8Reduced `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 OrigRefs"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProprietaryData6Reduced) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ac:Ustrd"}}) - e.EncodeElement(v.OrigRefs, xml.StartElement{Name: xml.Name{Local: "ac:OrigRefs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProprietaryData6ReducedTCH struct { Ustrd *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Ustrd,omitempty"` OrigRefs TransactionReferences8ReducedTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 OrigRefs"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProprietaryData6ReducedTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ac:Ustrd"}}) - e.EncodeElement(v.OrigRefs, xml.StartElement{Name: xml.Name{Local: "ac:OrigRefs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProprietaryData7TCH struct { Tp Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Tp"` Data ProprietaryData6Reduced `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Data"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProprietaryData7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ac:Tp"}}) - e.EncodeElement(v.Data, xml.StartElement{Name: xml.Name{Local: "ac:Data"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProprietaryData7TCHTCH struct { Tp Max35TextTCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Tp"` Data ProprietaryData6ReducedTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Data"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProprietaryData7TCHTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ac:Tp"}}) - e.EncodeElement(v.Data, xml.StartElement{Name: xml.Name{Local: "ac:Data"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProprietaryFormatInvestigationV05 struct { Assgnmt CaseAssignment5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Assgnmt"` Case Case5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Case"` PrtryData ProprietaryData7TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 PrtryData"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProprietaryFormatInvestigationV05) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "ac:Assgnmt"}}) - e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "ac:Case"}}) - e.EncodeElement(v.PrtryData, xml.StartElement{Name: xml.Name{Local: "ac:PrtryData"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProprietaryFormatInvestigationV05TCH struct { Assgnmt CaseAssignment5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Assgnmt"` Case Case5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 Case"` PrtryData ProprietaryData7TCHTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 PrtryData"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProprietaryFormatInvestigationV05TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "ac:Assgnmt"}}) - e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "ac:Case"}}) - e.EncodeElement(v.PrtryData, xml.StartElement{Name: xml.Name{Local: "ac:PrtryData"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TransactionReferences8Reduced struct { InstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 InstrId"` EndToEndId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 EndToEndId"` @@ -318,17 +124,6 @@ type TransactionReferences8Reduced struct { UETR *UUIDv4Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 UETR,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TransactionReferences8Reduced) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ac:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ac:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ac:TxId"}}) - e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ac:UETR"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TransactionReferences8ReducedTCH struct { InstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 InstrId"` EndToEndId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 EndToEndId"` @@ -336,17 +131,6 @@ type TransactionReferences8ReducedTCH struct { UETR *UUIDv4Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 UETR,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TransactionReferences8ReducedTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ac:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ac:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ac:TxId"}}) - e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ac:UETR"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type Max140Text string diff --git a/gen/camt_035_001_05/write.go b/gen/camt_035_001_05/write.go new file mode 100644 index 0000000..6b5992b --- /dev/null +++ b/gen/camt_035_001_05/write.go @@ -0,0 +1,223 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:camt.035.001.05 with prefix 'ac' +package camt_035_001_05 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ac:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ac:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ac:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "ac:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ac:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "ac:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ac:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "ac:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "ac:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ac:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ac:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "ac:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "ac:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ac:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ac:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ac:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PrtryFrmtInvstgtn, xml.StartElement{Name: xml.Name{Local: "ac:PrtryFrmtInvstgtn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ac:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ac:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "ac:Pty"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "ac:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "ac:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "ac:Pty"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "ac:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ac:Nm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ac:Nm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProprietaryData6Reduced) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ac:Ustrd"}}) + e.EncodeElement(v.OrigRefs, xml.StartElement{Name: xml.Name{Local: "ac:OrigRefs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProprietaryData6ReducedTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ac:Ustrd"}}) + e.EncodeElement(v.OrigRefs, xml.StartElement{Name: xml.Name{Local: "ac:OrigRefs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProprietaryData7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ac:Tp"}}) + e.EncodeElement(v.Data, xml.StartElement{Name: xml.Name{Local: "ac:Data"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProprietaryData7TCHTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ac:Tp"}}) + e.EncodeElement(v.Data, xml.StartElement{Name: xml.Name{Local: "ac:Data"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProprietaryFormatInvestigationV05) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "ac:Assgnmt"}}) + e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "ac:Case"}}) + e.EncodeElement(v.PrtryData, xml.StartElement{Name: xml.Name{Local: "ac:PrtryData"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProprietaryFormatInvestigationV05TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "ac:Assgnmt"}}) + e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "ac:Case"}}) + e.EncodeElement(v.PrtryData, xml.StartElement{Name: xml.Name{Local: "ac:PrtryData"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TransactionReferences8Reduced) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ac:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ac:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ac:TxId"}}) + e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ac:UETR"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TransactionReferences8ReducedTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ac:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ac:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ac:TxId"}}) + e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ac:UETR"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/camt_056_001_08/model.go b/gen/camt_056_001_08/model.go index a158723..85950ed 100644 --- a/gen/camt_056_001_08/model.go +++ b/gen/camt_056_001_08/model.go @@ -19,82 +19,30 @@ type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rt:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rt:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CancellationReason33Choice struct { Cd *ExternalCancellationReason1Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CancellationReason33Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "rt:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rt:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CancellationReason33ChoiceTCH struct { Cd *ExternalCancellationReason1Code `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Cd,omitempty"` Prtry *Max35TextTCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CancellationReason33ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "rt:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rt:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Id"` Cretr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "rt:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Case5TCH struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Id"` Cretr Party40ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Cretr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "rt:Cretr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Id"` Assgnr Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Assgnr"` @@ -102,17 +50,6 @@ type CaseAssignment5 struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "rt:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "rt:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rt:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CaseAssignment5TCH struct { Id Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Id"` Assgnr Party40ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Assgnr"` @@ -120,334 +57,117 @@ type CaseAssignment5TCH struct { CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "rt:Assgnr"}}) - e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "rt:Assgne"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rt:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rt:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rt:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Contact4 struct { PhneNb *PhoneNumber `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 PhneNb,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Contact4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PhneNb, xml.StartElement{Name: xml.Name{Local: "rt:PhneNb"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndPlaceOfBirth1 struct { BirthDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 BirthDt"` CityOfBirth Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 CityOfBirth"` CtryOfBirth CountryCode `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 CtryOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "rt:BirthDt"}}) - e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "rt:CityOfBirth"}}) - e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "rt:CtryOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name FIToFIPmtCxlReq FIToFIPaymentCancellationRequestV08TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 FIToFIPmtCxlReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FIToFIPmtCxlReq, xml.StartElement{Name: xml.Name{Local: "rt:FIToFIPmtCxlReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rt:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rt:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FIToFIPaymentCancellationRequestV08 struct { Assgnmt CaseAssignment5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Assgnmt"` Case Case5 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Case"` Undrlyg UnderlyingTransaction23 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Undrlyg"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FIToFIPaymentCancellationRequestV08) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "rt:Assgnmt"}}) - e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "rt:Case"}}) - e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "rt:Undrlyg"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FIToFIPaymentCancellationRequestV08TCH struct { Assgnmt CaseAssignment5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Assgnmt"` Case Case5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Case"` Undrlyg UnderlyingTransaction23TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Undrlyg"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FIToFIPaymentCancellationRequestV08TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "rt:Assgnmt"}}) - e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "rt:Case"}}) - e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "rt:Undrlyg"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1TCH struct { Id Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29 struct { LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 LEI,omitempty"` Othr *GenericOrganisationIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "rt:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "rt:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH struct { Othr GenericOrganisationIdentification1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Othr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "rt:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH2 struct { LEI LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 LEI"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "rt:LEI"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalGroupHeader15 struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlMsgId"` OrgnlMsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlMsgNmId"` OrgnlCreDtTm *rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlCreDtTm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalGroupHeader15) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlCreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalTransactionReference28 struct { Dbtr *Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Dbtr,omitempty"` Cdtr *Party40Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Cdtr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalTransactionReference28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "rt:Dbtr"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "rt:Cdtr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalTransactionReference28TCH struct { Dbtr *Party40ChoiceTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Dbtr,omitempty"` Cdtr *Party40ChoiceTCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Cdtr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalTransactionReference28TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "rt:Dbtr"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "rt:Cdtr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38Choice struct { OrgId *OrganisationIdentification29 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgId,omitempty"` PrvtId *PersonIdentification13 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rt:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "rt:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH struct { OrgId *OrganisationIdentification29TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rt:OrgId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH2 struct { OrgId *OrganisationIdentification29TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgId,omitempty"` PrvtId *PersonIdentification13TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rt:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "rt:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40Choice struct { Pty *PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Pty,omitempty"` Agt *BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "rt:Pty"}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "rt:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH struct { Agt *BranchAndFinancialInstitutionIdentification6TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Agt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "rt:Agt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH2 struct { Pty *PartyIdentification135TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Pty,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "rt:Pty"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party40ChoiceTCH3 struct { Pty *PartyIdentification135TCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Pty,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party40ChoiceTCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "rt:Pty"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Nm,omitempty"` PstlAdr *PostalAddress24 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 PstlAdr,omitempty"` @@ -455,47 +175,17 @@ type PartyIdentification135 struct { CtctDtls *Contact4 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 CtctDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rt:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "rt:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "rt:CtctDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Nm,omitempty"` Id *Party38ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rt:Nm"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH2 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Nm"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 PstlAdr,omitempty"` Id *Party38ChoiceTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rt:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "rt:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH3 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Nm"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 PstlAdr,omitempty"` @@ -503,49 +193,18 @@ type PartyIdentification135TCH3 struct { CtctDtls *Contact4 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 CtctDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rt:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "rt:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) - e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "rt:CtctDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentCancellationReason5 struct { Orgtr *PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Orgtr,omitempty"` Rsn CancellationReason33Choice `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Rsn"` AddtlInf *Max105Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentCancellationReason5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Orgtr, xml.StartElement{Name: xml.Name{Local: "rt:Orgtr"}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rt:Rsn"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "rt:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentCancellationReason5TCH struct { Orgtr *PartyIdentification135TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Orgtr,omitempty"` Rsn CancellationReason33ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 Rsn"` AddtlInf *Max105Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentCancellationReason5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Orgtr, xml.StartElement{Name: xml.Name{Local: "rt:Orgtr"}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rt:Rsn"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "rt:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction106 struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlInstrId"` OrgnlEndToEndId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlEndToEndId,omitempty"` @@ -558,22 +217,6 @@ type PaymentTransaction106 struct { OrgnlTxRef *OriginalTransactionReference28 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlTxRef,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction106) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlTxId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlClrSysRef, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlClrSysRef"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlIntrBkSttlmAmt"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlIntrBkSttlmDt"}}) - e.EncodeElement(v.CxlRsnInf, xml.StartElement{Name: xml.Name{Local: "rt:CxlRsnInf"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlTxRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction106TCH struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlInstrId"` OrgnlEndToEndId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlEndToEndId,omitempty"` @@ -586,46 +229,14 @@ type PaymentTransaction106TCH struct { OrgnlTxRef *OriginalTransactionReference28TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlTxRef,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction106TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlTxId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlUETR"}}) - e.EncodeElement(v.OrgnlClrSysRef, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlClrSysRef"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlIntrBkSttlmAmt"}}) - e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlIntrBkSttlmDt"}}) - e.EncodeElement(v.CxlRsnInf, xml.StartElement{Name: xml.Name{Local: "rt:CxlRsnInf"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlTxRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13 struct { DtAndPlcOfBirth DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 DtAndPlcOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "rt:DtAndPlcOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13TCH struct { DtAndPlcOfBirth DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 DtAndPlcOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "rt:DtAndPlcOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PostalAddress24 struct { StrtNm Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 StrtNm"` BldgNb *Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 BldgNb,omitempty"` @@ -636,20 +247,6 @@ type PostalAddress24 struct { AdrLine *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 AdrLine,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "rt:StrtNm"}}) - e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "rt:BldgNb"}}) - e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "rt:PstCd"}}) - e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "rt:TwnNm"}}) - e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "rt:CtrySubDvsn"}}) - e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "rt:Ctry"}}) - e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "rt:AdrLine"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PostalAddress24TCH struct { StrtNm Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 StrtNm"` BldgNb *Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 BldgNb,omitempty"` @@ -660,56 +257,20 @@ type PostalAddress24TCH struct { AdrLine *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 AdrLine,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PostalAddress24TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "rt:StrtNm"}}) - e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "rt:BldgNb"}}) - e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "rt:PstCd"}}) - e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "rt:TwnNm"}}) - e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "rt:CtrySubDvsn"}}) - e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "rt:Ctry"}}) - e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "rt:AdrLine"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingTransaction23 struct { OrgnlGrpInfAndCxl OriginalGroupHeader15 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlGrpInfAndCxl"` TxInf PaymentTransaction106 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 TxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingTransaction23) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInfAndCxl, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlGrpInfAndCxl"}}) - e.EncodeElement(v.TxInf, xml.StartElement{Name: xml.Name{Local: "rt:TxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type UnderlyingTransaction23TCH struct { OrgnlGrpInfAndCxl OriginalGroupHeader15 `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 OrgnlGrpInfAndCxl"` TxInf PaymentTransaction106TCH `xml:"urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 TxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v UnderlyingTransaction23TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlGrpInfAndCxl, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlGrpInfAndCxl"}}) - e.EncodeElement(v.TxInf, xml.StartElement{Name: xml.Name{Local: "rt:TxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/camt_056_001_08/write.go b/gen/camt_056_001_08/write.go new file mode 100644 index 0000000..60e21b2 --- /dev/null +++ b/gen/camt_056_001_08/write.go @@ -0,0 +1,448 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:camt.056.001.08 with prefix 'rt' +package camt_056_001_08 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rt:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rt:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CancellationReason33Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "rt:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rt:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CancellationReason33ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "rt:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rt:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "rt:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Case5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeElement(v.Cretr, xml.StartElement{Name: xml.Name{Local: "rt:Cretr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "rt:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "rt:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rt:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CaseAssignment5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeElement(v.Assgnr, xml.StartElement{Name: xml.Name{Local: "rt:Assgnr"}}) + e.EncodeElement(v.Assgne, xml.StartElement{Name: xml.Name{Local: "rt:Assgne"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rt:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rt:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rt:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Contact4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PhneNb, xml.StartElement{Name: xml.Name{Local: "rt:PhneNb"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "rt:BirthDt"}}) + e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "rt:CityOfBirth"}}) + e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "rt:CtryOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FIToFIPmtCxlReq, xml.StartElement{Name: xml.Name{Local: "rt:FIToFIPmtCxlReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rt:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rt:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FIToFIPaymentCancellationRequestV08) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "rt:Assgnmt"}}) + e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "rt:Case"}}) + e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "rt:Undrlyg"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FIToFIPaymentCancellationRequestV08TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Assgnmt, xml.StartElement{Name: xml.Name{Local: "rt:Assgnmt"}}) + e.EncodeElement(v.Case, xml.StartElement{Name: xml.Name{Local: "rt:Case"}}) + e.EncodeElement(v.Undrlyg, xml.StartElement{Name: xml.Name{Local: "rt:Undrlyg"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "rt:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "rt:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "rt:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "rt:LEI"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalGroupHeader15) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlCreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalTransactionReference28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "rt:Dbtr"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "rt:Cdtr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalTransactionReference28TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "rt:Dbtr"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "rt:Cdtr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rt:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "rt:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rt:OrgId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rt:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "rt:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "rt:Pty"}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "rt:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Agt, xml.StartElement{Name: xml.Name{Local: "rt:Agt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "rt:Pty"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party40ChoiceTCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Pty, xml.StartElement{Name: xml.Name{Local: "rt:Pty"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rt:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "rt:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "rt:CtctDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rt:Nm"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rt:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "rt:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rt:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "rt:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rt:Id"}}) + e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "rt:CtctDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentCancellationReason5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Orgtr, xml.StartElement{Name: xml.Name{Local: "rt:Orgtr"}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rt:Rsn"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "rt:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentCancellationReason5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Orgtr, xml.StartElement{Name: xml.Name{Local: "rt:Orgtr"}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rt:Rsn"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "rt:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction106) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlTxId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlClrSysRef, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlClrSysRef"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlIntrBkSttlmAmt"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlIntrBkSttlmDt"}}) + e.EncodeElement(v.CxlRsnInf, xml.StartElement{Name: xml.Name{Local: "rt:CxlRsnInf"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlTxRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction106TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlTxId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlUETR"}}) + e.EncodeElement(v.OrgnlClrSysRef, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlClrSysRef"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlIntrBkSttlmAmt"}}) + e.EncodeElement(v.OrgnlIntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlIntrBkSttlmDt"}}) + e.EncodeElement(v.CxlRsnInf, xml.StartElement{Name: xml.Name{Local: "rt:CxlRsnInf"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlTxRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "rt:DtAndPlcOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "rt:DtAndPlcOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "rt:StrtNm"}}) + e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "rt:BldgNb"}}) + e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "rt:PstCd"}}) + e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "rt:TwnNm"}}) + e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "rt:CtrySubDvsn"}}) + e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "rt:Ctry"}}) + e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "rt:AdrLine"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PostalAddress24TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "rt:StrtNm"}}) + e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "rt:BldgNb"}}) + e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "rt:PstCd"}}) + e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "rt:TwnNm"}}) + e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "rt:CtrySubDvsn"}}) + e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "rt:Ctry"}}) + e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "rt:AdrLine"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingTransaction23) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInfAndCxl, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlGrpInfAndCxl"}}) + e.EncodeElement(v.TxInf, xml.StartElement{Name: xml.Name{Local: "rt:TxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v UnderlyingTransaction23TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlGrpInfAndCxl, xml.StartElement{Name: xml.Name{Local: "rt:OrgnlGrpInfAndCxl"}}) + e.EncodeElement(v.TxInf, xml.StartElement{Name: xml.Name{Local: "rt:TxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/head_001_001_01/model.go b/gen/head_001_001_01/model.go index fee3cbf..8f2bd26 100644 --- a/gen/head_001_001_01/model.go +++ b/gen/head_001_001_01/model.go @@ -3,8 +3,6 @@ package head_001_001_01 import ( - "encoding/xml" - "github.com/moov-io/rtp20022/gen/xmldsig" "github.com/moov-io/rtp20022/pkg/rtp" ) @@ -16,53 +14,19 @@ type BranchAndFinancialInstitutionIdentification5BAH struct { BrnchId *BranchData2BAH `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 BrnchId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification5BAH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "head:FinInstnId"}}) - e.EncodeElement(v.BrnchId, xml.StartElement{Name: xml.Name{Local: "head:BrnchId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification5BAHTCH struct { FinInstnId FinancialInstitutionIdentification8BAH `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 FinInstnId"` BrnchId *BranchData2BAHTCH `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 BrnchId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification5BAHTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "head:FinInstnId"}}) - e.EncodeElement(v.BrnchId, xml.StartElement{Name: xml.Name{Local: "head:BrnchId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchData2BAH struct { Id Min11Max11Text `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchData2BAH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "head:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchData2BAHTCH struct { Id Min11Max11Text `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchData2BAHTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "head:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BusinessApplicationHeaderV01 struct { Fr Party9ChoiceBAH `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 Fr"` To Party9ChoiceBAH `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 To"` @@ -74,21 +38,6 @@ type BusinessApplicationHeaderV01 struct { Sgntr *Sgntr `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 Sgntr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BusinessApplicationHeaderV01) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Fr, xml.StartElement{Name: xml.Name{Local: "head:Fr"}}) - e.EncodeElement(v.To, xml.StartElement{Name: xml.Name{Local: "head:To"}}) - e.EncodeElement(v.BizMsgIdr, xml.StartElement{Name: xml.Name{Local: "head:BizMsgIdr"}}) - e.EncodeElement(v.MsgDefIdr, xml.StartElement{Name: xml.Name{Local: "head:MsgDefIdr"}}) - e.EncodeElement(v.BizSvc, xml.StartElement{Name: xml.Name{Local: "head:BizSvc"}}) - e.EncodeElement(v.CreDt, xml.StartElement{Name: xml.Name{Local: "head:CreDt"}}) - e.EncodeElement(v.CpyDplct, xml.StartElement{Name: xml.Name{Local: "head:CpyDplct"}}) - e.EncodeElement(v.Sgntr, xml.StartElement{Name: xml.Name{Local: "head:Sgntr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BusinessApplicationHeaderV01TCH struct { Fr Party9ChoiceBAHTCH `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 Fr"` To Party9ChoiceBAHTCH `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 To"` @@ -100,81 +49,26 @@ type BusinessApplicationHeaderV01TCH struct { Sgntr *Sgntr `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 Sgntr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BusinessApplicationHeaderV01TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Fr, xml.StartElement{Name: xml.Name{Local: "head:Fr"}}) - e.EncodeElement(v.To, xml.StartElement{Name: xml.Name{Local: "head:To"}}) - e.EncodeElement(v.BizMsgIdr, xml.StartElement{Name: xml.Name{Local: "head:BizMsgIdr"}}) - e.EncodeElement(v.MsgDefIdr, xml.StartElement{Name: xml.Name{Local: "head:MsgDefIdr"}}) - e.EncodeElement(v.BizSvc, xml.StartElement{Name: xml.Name{Local: "head:BizSvc"}}) - e.EncodeElement(v.CreDt, xml.StartElement{Name: xml.Name{Local: "head:CreDt"}}) - e.EncodeElement(v.CpyDplct, xml.StartElement{Name: xml.Name{Local: "head:CpyDplct"}}) - e.EncodeElement(v.Sgntr, xml.StartElement{Name: xml.Name{Local: "head:Sgntr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2ADMN struct { MmbId Min11Max11Text `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "head:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification8BAH struct { ClrSysMmbId ClearingSystemMemberIdentification2ADMN `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification8BAH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "head:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party9ChoiceBAH struct { FIId *BranchAndFinancialInstitutionIdentification5BAH `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 FIId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party9ChoiceBAH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FIId, xml.StartElement{Name: xml.Name{Local: "head:FIId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party9ChoiceBAHTCH struct { FIId *BranchAndFinancialInstitutionIdentification5BAHTCH `xml:"urn:iso:std:iso:20022:tech:xsd:head.001.001.01 FIId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party9ChoiceBAHTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FIId, xml.StartElement{Name: xml.Name{Local: "head:FIId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Sgntr struct { Signature *xmldsig.Signature `xml:"http://www.w3.org/2000/09/xmldsig# Signature"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Sgntr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Signature, xml.StartElement{Name: xml.Name{Local: "ds:Signature"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type CopyDuplicate1Code string diff --git a/gen/head_001_001_01/write.go b/gen/head_001_001_01/write.go new file mode 100644 index 0000000..6836920 --- /dev/null +++ b/gen/head_001_001_01/write.go @@ -0,0 +1,111 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:head.001.001.01 with prefix 'head' +package head_001_001_01 + +import ( + "encoding/xml" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification5BAH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "head:FinInstnId"}}) + e.EncodeElement(v.BrnchId, xml.StartElement{Name: xml.Name{Local: "head:BrnchId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification5BAHTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "head:FinInstnId"}}) + e.EncodeElement(v.BrnchId, xml.StartElement{Name: xml.Name{Local: "head:BrnchId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchData2BAH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "head:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchData2BAHTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "head:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BusinessApplicationHeaderV01) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Fr, xml.StartElement{Name: xml.Name{Local: "head:Fr"}}) + e.EncodeElement(v.To, xml.StartElement{Name: xml.Name{Local: "head:To"}}) + e.EncodeElement(v.BizMsgIdr, xml.StartElement{Name: xml.Name{Local: "head:BizMsgIdr"}}) + e.EncodeElement(v.MsgDefIdr, xml.StartElement{Name: xml.Name{Local: "head:MsgDefIdr"}}) + e.EncodeElement(v.BizSvc, xml.StartElement{Name: xml.Name{Local: "head:BizSvc"}}) + e.EncodeElement(v.CreDt, xml.StartElement{Name: xml.Name{Local: "head:CreDt"}}) + e.EncodeElement(v.CpyDplct, xml.StartElement{Name: xml.Name{Local: "head:CpyDplct"}}) + e.EncodeElement(v.Sgntr, xml.StartElement{Name: xml.Name{Local: "head:Sgntr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BusinessApplicationHeaderV01TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Fr, xml.StartElement{Name: xml.Name{Local: "head:Fr"}}) + e.EncodeElement(v.To, xml.StartElement{Name: xml.Name{Local: "head:To"}}) + e.EncodeElement(v.BizMsgIdr, xml.StartElement{Name: xml.Name{Local: "head:BizMsgIdr"}}) + e.EncodeElement(v.MsgDefIdr, xml.StartElement{Name: xml.Name{Local: "head:MsgDefIdr"}}) + e.EncodeElement(v.BizSvc, xml.StartElement{Name: xml.Name{Local: "head:BizSvc"}}) + e.EncodeElement(v.CreDt, xml.StartElement{Name: xml.Name{Local: "head:CreDt"}}) + e.EncodeElement(v.CpyDplct, xml.StartElement{Name: xml.Name{Local: "head:CpyDplct"}}) + e.EncodeElement(v.Sgntr, xml.StartElement{Name: xml.Name{Local: "head:Sgntr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2ADMN) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "head:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification8BAH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "head:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party9ChoiceBAH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FIId, xml.StartElement{Name: xml.Name{Local: "head:FIId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party9ChoiceBAHTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FIId, xml.StartElement{Name: xml.Name{Local: "head:FIId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Sgntr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Signature, xml.StartElement{Name: xml.Name{Local: "ds:Signature"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} diff --git a/gen/messages/model.go b/gen/messages/model.go index aa51304..3432247 100644 --- a/gen/messages/model.go +++ b/gen/messages/model.go @@ -90,98 +90,6 @@ var NamespacePrefixMap = map[string]string{ "urn:iso:std:iso:20022:tech:xsd:remt.001.001.04": "ar", } -func NewAdmn007Message() *Message { - return newMessageForNS("urn:iso:std:ma:20022:tech:xsd:admn.007.001.01") -} - -func NewAdmn008Message() *Message { - return newMessageForNS("urn:iso:std:ma:20022:tech:xsd:admn.008.001.01") -} - -func NewAcmt022Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02") -} - -func NewAdmi002Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admi.002.001.01") -} - -func NewAdmi004Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admi.004.001.02") -} - -func NewAdmn001Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.001.001.01") -} - -func NewAdmn002Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.002.001.01") -} - -func NewAdmn003Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.003.001.01") -} - -func NewAdmn004Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.004.001.01") -} - -func NewAdmn005Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.005.001.01") -} - -func NewAdmn006Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.006.001.01") -} - -func NewCamt026Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.026.001.07") -} - -func NewCamt028Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.028.001.09") -} - -func NewCamt029Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.029.001.09") -} - -func NewCamt035Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.035.001.05") -} - -func NewCamt056Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.056.001.08") -} - -func NewPacs002Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10") -} - -func NewPacs008Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08") -} - -func NewPacs009Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08") -} - -func NewPacs028Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03") -} - -func NewPain013Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pain.013.001.07") -} - -func NewPain014Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pain.014.001.07") -} - -func NewRemt001Message() *Message { - return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:remt.001.001.04") -} - // UnmarshalXML is a custom unmarshaller that allows us to capture the xmlns attributes func (v *Message) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { for _, attr := range start.Attr { diff --git a/gen/messages/write.go b/gen/messages/write.go new file mode 100644 index 0000000..1f088a0 --- /dev/null +++ b/gen/messages/write.go @@ -0,0 +1,95 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:tch +package messages + +func NewAdmn007Message() *Message { + return newMessageForNS("urn:iso:std:ma:20022:tech:xsd:admn.007.001.01") +} + +func NewAdmn008Message() *Message { + return newMessageForNS("urn:iso:std:ma:20022:tech:xsd:admn.008.001.01") +} + +func NewAcmt022Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:acmt.022.001.02") +} + +func NewAdmi002Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admi.002.001.01") +} + +func NewAdmi004Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admi.004.001.02") +} + +func NewAdmn001Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.001.001.01") +} + +func NewAdmn002Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.002.001.01") +} + +func NewAdmn003Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.003.001.01") +} + +func NewAdmn004Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.004.001.01") +} + +func NewAdmn005Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.005.001.01") +} + +func NewAdmn006Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:admn.006.001.01") +} + +func NewCamt026Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.026.001.07") +} + +func NewCamt028Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.028.001.09") +} + +func NewCamt029Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.029.001.09") +} + +func NewCamt035Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.035.001.05") +} + +func NewCamt056Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:camt.056.001.08") +} + +func NewPacs002Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10") +} + +func NewPacs008Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08") +} + +func NewPacs009Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08") +} + +func NewPacs028Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03") +} + +func NewPain013Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pain.013.001.07") +} + +func NewPain014Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:pain.014.001.07") +} + +func NewRemt001Message() *Message { + return newMessageForNS("urn:iso:std:iso:20022:tech:xsd:remt.001.001.04") +} diff --git a/gen/pacs_002_001_10/model.go b/gen/pacs_002_001_10/model.go index 99d8b93..5db63a9 100644 --- a/gen/pacs_002_001_10/model.go +++ b/gen/pacs_002_001_10/model.go @@ -19,147 +19,53 @@ type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ps:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ps:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ps:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ps:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name FIToFIPmtStsRpt FIToFIPaymentStatusReportV10TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 FIToFIPmtStsRpt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FIToFIPmtStsRpt, xml.StartElement{Name: xml.Name{Local: "ps:FIToFIPmtStsRpt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ps:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ps:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FIToFIPaymentStatusReportV10 struct { GrpHdr GroupHeader91 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 GrpHdr"` OrgnlGrpInfAndSts OriginalGroupHeader17 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlGrpInfAndSts"` TxInfAndSts PaymentTransaction110 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 TxInfAndSts"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FIToFIPaymentStatusReportV10) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ps:GrpHdr"}}) - e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlGrpInfAndSts"}}) - e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "ps:TxInfAndSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FIToFIPaymentStatusReportV10TCH struct { GrpHdr GroupHeader91TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 GrpHdr"` OrgnlGrpInfAndSts OriginalGroupHeader17TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlGrpInfAndSts"` TxInfAndSts PaymentTransaction110TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 TxInfAndSts"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FIToFIPaymentStatusReportV10TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ps:GrpHdr"}}) - e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlGrpInfAndSts"}}) - e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "ps:TxInfAndSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader91 struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader91) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ps:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ps:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader91TCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader91TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ps:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ps:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalGroupHeader17 struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlMsgId"` OrgnlMsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlMsgNmId"` @@ -167,17 +73,6 @@ type OriginalGroupHeader17 struct { OrgnlNbOfTxs Max1NumericText `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlNbOfTxs"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalGroupHeader17) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlCreDtTm"}}) - e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlNbOfTxs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalGroupHeader17TCH struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlMsgId"` OrgnlMsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlMsgNmId"` @@ -185,31 +80,11 @@ type OriginalGroupHeader17TCH struct { OrgnlNbOfTxs Max1NumericText `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlNbOfTxs"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalGroupHeader17TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlCreDtTm"}}) - e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlNbOfTxs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalTransactionReference28 struct { IntrBkSttlmAmt *ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 IntrBkSttlmAmt,omitempty"` IntrBkSttlmDt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 IntrBkSttlmDt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalTransactionReference28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ps:IntrBkSttlmAmt"}}) - e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "ps:IntrBkSttlmDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction110 struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlInstrId"` OrgnlTxId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlTxId,omitempty"` @@ -223,23 +98,6 @@ type PaymentTransaction110 struct { OrgnlTxRef *OriginalTransactionReference28 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlTxRef,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction110) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlTxId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlUETR"}}) - e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "ps:TxSts"}}) - e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "ps:StsRsnInf"}}) - e.EncodeElement(v.AccptncDtTm, xml.StartElement{Name: xml.Name{Local: "ps:AccptncDtTm"}}) - e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "ps:ClrSysRef"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ps:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ps:InstdAgt"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlTxRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction110TCH struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlInstrId"` OrgnlTxId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlTxId,omitempty"` @@ -253,87 +111,30 @@ type PaymentTransaction110TCH struct { OrgnlTxRef *OriginalTransactionReference28 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 OrgnlTxRef,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction110TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlTxId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlUETR"}}) - e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "ps:TxSts"}}) - e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "ps:StsRsnInf"}}) - e.EncodeElement(v.AccptncDtTm, xml.StartElement{Name: xml.Name{Local: "ps:AccptncDtTm"}}) - e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "ps:ClrSysRef"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ps:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ps:InstdAgt"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlTxRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReason6Choice struct { Cd *ExternalStatusReason1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 Cd,omitempty"` Prtry *ProprietaryReasonCode `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReason6Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ps:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ps:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReason6ChoiceTCH struct { Cd *ExternalStatusReason1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 Cd,omitempty"` Prtry *ProprietaryReasonCode `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReason6ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ps:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ps:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReasonInformation12 struct { Rsn *StatusReason6Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 Rsn,omitempty"` AddtlInf *Max105Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReasonInformation12) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "ps:Rsn"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "ps:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReasonInformation12TCH struct { Rsn *StatusReason6ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 Rsn,omitempty"` AddtlInf *Max105Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReasonInformation12TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "ps:Rsn"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "ps:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/pacs_002_001_10/write.go b/gen/pacs_002_001_10/write.go new file mode 100644 index 0000000..9aad352 --- /dev/null +++ b/gen/pacs_002_001_10/write.go @@ -0,0 +1,208 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10 with prefix 'ps' +package pacs_002_001_10 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ps:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ps:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ps:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ps:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FIToFIPmtStsRpt, xml.StartElement{Name: xml.Name{Local: "ps:FIToFIPmtStsRpt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ps:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ps:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FIToFIPaymentStatusReportV10) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ps:GrpHdr"}}) + e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlGrpInfAndSts"}}) + e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "ps:TxInfAndSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FIToFIPaymentStatusReportV10TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ps:GrpHdr"}}) + e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlGrpInfAndSts"}}) + e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "ps:TxInfAndSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader91) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ps:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ps:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader91TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ps:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ps:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalGroupHeader17) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlCreDtTm"}}) + e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlNbOfTxs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalGroupHeader17TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlCreDtTm"}}) + e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlNbOfTxs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalTransactionReference28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ps:IntrBkSttlmAmt"}}) + e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "ps:IntrBkSttlmDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction110) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlTxId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlUETR"}}) + e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "ps:TxSts"}}) + e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "ps:StsRsnInf"}}) + e.EncodeElement(v.AccptncDtTm, xml.StartElement{Name: xml.Name{Local: "ps:AccptncDtTm"}}) + e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "ps:ClrSysRef"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ps:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ps:InstdAgt"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlTxRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction110TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlTxId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlUETR"}}) + e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "ps:TxSts"}}) + e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "ps:StsRsnInf"}}) + e.EncodeElement(v.AccptncDtTm, xml.StartElement{Name: xml.Name{Local: "ps:AccptncDtTm"}}) + e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "ps:ClrSysRef"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ps:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ps:InstdAgt"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "ps:OrgnlTxRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReason6Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ps:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ps:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReason6ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ps:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ps:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReasonInformation12) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "ps:Rsn"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "ps:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReasonInformation12TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "ps:Rsn"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "ps:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/pacs_008_001_08/model.go b/gen/pacs_008_001_08/model.go index 8e44b9a..493b00e 100644 --- a/gen/pacs_008_001_08/model.go +++ b/gen/pacs_008_001_08/model.go @@ -14,14 +14,6 @@ type AccountIdentification4Choice struct { Othr *GenericAccountIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ActiveCurrencyAndAmount struct { Value ActiveCurrencyAndAmountSimpleType `xml:",chardata"` Ccy ActiveCurrencyCode `xml:"Ccy,attr"` @@ -36,120 +28,43 @@ type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ct:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ct:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CashAccount38 struct { Id AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` Nm *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Nm,omitempty"` Prxy *ProxyAccountIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prxy,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CashAccount38) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) - e.EncodeElement(v.Prxy, xml.StartElement{Name: xml.Name{Local: "ct:Prxy"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CashAccount38TCH struct { Id AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` Nm *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Nm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CashAccount38TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CashAccount38TCH2 struct { Id AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` Nm *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Nm,omitempty"` Prxy *ProxyAccountIdentification1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prxy,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CashAccount38TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) - e.EncodeElement(v.Prxy, xml.StartElement{Name: xml.Name{Local: "ct:Prxy"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CategoryPurpose1Choice struct { Prtry *CatePurpProp `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CategoryPurpose1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemIdentification3Choice struct { Cd *ExternalCashClearingSystem1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Cd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemIdentification3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ct:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ct:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditTransferTransaction39 struct { PmtId PaymentIdentification7 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PmtId"` PmtTpInf PaymentTypeInformation28 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PmtTpInf"` @@ -171,31 +86,6 @@ type CreditTransferTransaction39 struct { RmtInf *RemittanceInformation16 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditTransferTransaction39) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "ct:PmtId"}}) - e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "ct:PmtTpInf"}}) - e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ct:IntrBkSttlmAmt"}}) - e.EncodeElement(v.ChrgBr, xml.StartElement{Name: xml.Name{Local: "ct:ChrgBr"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstdAgt"}}) - e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "ct:UltmtDbtr"}}) - e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "ct:InitgPty"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ct:Dbtr"}}) - e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "ct:DbtrAcct"}}) - e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:DbtrAgt"}}) - e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:CdtrAgt"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ct:Cdtr"}}) - e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "ct:CdtrAcct"}}) - e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "ct:UltmtCdtr"}}) - e.EncodeElement(v.InstrForCdtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstrForCdtrAgt"}}) - e.EncodeElement(v.RltdRmtInf, xml.StartElement{Name: xml.Name{Local: "ct:RltdRmtInf"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "ct:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditTransferTransaction39TCH struct { PmtId PaymentIdentification7TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PmtId"` PmtTpInf PaymentTypeInformation28TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PmtTpInf"` @@ -217,190 +107,62 @@ type CreditTransferTransaction39TCH struct { RmtInf *RemittanceInformation16TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditTransferTransaction39TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "ct:PmtId"}}) - e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "ct:PmtTpInf"}}) - e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ct:IntrBkSttlmAmt"}}) - e.EncodeElement(v.ChrgBr, xml.StartElement{Name: xml.Name{Local: "ct:ChrgBr"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstdAgt"}}) - e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "ct:UltmtDbtr"}}) - e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "ct:InitgPty"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ct:Dbtr"}}) - e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "ct:DbtrAcct"}}) - e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:DbtrAgt"}}) - e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:CdtrAgt"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ct:Cdtr"}}) - e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "ct:CdtrAcct"}}) - e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "ct:UltmtCdtr"}}) - e.EncodeElement(v.InstrForCdtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstrForCdtrAgt"}}) - e.EncodeElement(v.RltdRmtInf, xml.StartElement{Name: xml.Name{Local: "ct:RltdRmtInf"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "ct:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndPlaceOfBirth1 struct { BirthDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 BirthDt"` CityOfBirth Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CityOfBirth"` CtryOfBirth CountryCode `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CtryOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "ct:BirthDt"}}) - e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:CityOfBirth"}}) - e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:CtryOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountAndType1 struct { Tp DiscountAmountType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Tp"` Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Amt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ct:Tp"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ct:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountAndType1TCH struct { Tp DiscountAmountType1ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Tp"` Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Amt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountAndType1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ct:Tp"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ct:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountType1Choice struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountType1ChoiceTCH struct { Prtry *Max35TextTCH4 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountType1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name FIToFICstmrCdtTrf FIToFICustomerCreditTransferV08TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 FIToFICstmrCdtTrf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FIToFICstmrCdtTrf, xml.StartElement{Name: xml.Name{Local: "ct:FIToFICstmrCdtTrf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ct:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ct:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FIToFICustomerCreditTransferV08 struct { GrpHdr GroupHeader93 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 GrpHdr"` CdtTrfTxInf CreditTransferTransaction39 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CdtTrfTxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FIToFICustomerCreditTransferV08) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ct:GrpHdr"}}) - e.EncodeElement(v.CdtTrfTxInf, xml.StartElement{Name: xml.Name{Local: "ct:CdtTrfTxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FIToFICustomerCreditTransferV08TCH struct { GrpHdr GroupHeader93TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 GrpHdr"` CdtTrfTxInf CreditTransferTransaction39TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CdtTrfTxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FIToFICustomerCreditTransferV08TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ct:GrpHdr"}}) - e.EncodeElement(v.CdtTrfTxInf, xml.StartElement{Name: xml.Name{Local: "ct:CdtTrfTxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericAccountIdentification1 struct { Id Max34Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericPersonIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` SchmeNm *PersonIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 SchmeNm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericPersonIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ct:SchmeNm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader93 struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CreDtTm"` @@ -410,19 +172,6 @@ type GroupHeader93 struct { SttlmInf SettlementInstruction7 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 SttlmInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader93) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ct:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ct:CreDtTm"}}) - e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "ct:NbOfTxs"}}) - e.EncodeElement(v.TtlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ct:TtlIntrBkSttlmAmt"}}) - e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "ct:IntrBkSttlmDt"}}) - e.EncodeElement(v.SttlmInf, xml.StartElement{Name: xml.Name{Local: "ct:SttlmInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader93TCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CreDtTm"` @@ -432,187 +181,66 @@ type GroupHeader93TCH struct { SttlmInf SettlementInstruction7TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 SttlmInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader93TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ct:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ct:CreDtTm"}}) - e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "ct:NbOfTxs"}}) - e.EncodeElement(v.TtlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ct:TtlIntrBkSttlmAmt"}}) - e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "ct:IntrBkSttlmDt"}}) - e.EncodeElement(v.SttlmInf, xml.StartElement{Name: xml.Name{Local: "ct:SttlmInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type InstructionForCreditorAgent1 struct { Cd Instruction3CodeTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Cd"` InstrInf Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 InstrInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v InstructionForCreditorAgent1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) - e.EncodeElement(v.InstrInf, xml.StartElement{Name: xml.Name{Local: "ct:InstrInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type InstructionForCreditorAgent1TCH struct { Cd Instruction3CodeTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Cd"` InstrInf Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 InstrInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v InstructionForCreditorAgent1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) - e.EncodeElement(v.InstrInf, xml.StartElement{Name: xml.Name{Local: "ct:InstrInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type LocalInstrument2Choice struct { Prtry *LocalProp `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v LocalInstrument2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29 struct { LEI LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 LEI"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ct:LEI"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH struct { LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 LEI,omitempty"` Othr []*GenericOrganisationIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ct:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38Choice struct { OrgId *OrganisationIdentification29TCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 OrgId,omitempty"` PrvtId *PersonIdentification13 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ct:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH struct { OrgId *OrganisationIdentification29TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 OrgId,omitempty"` PrvtId *PersonIdentification13TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ct:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH2 struct { OrgId *OrganisationIdentification29TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 OrgId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Nm,omitempty"` PstlAdr *PostalAddress24 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PstlAdr,omitempty"` Id *Party38Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ct:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Nm"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PstlAdr,omitempty"` Id *Party38ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ct:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH2 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Nm"` Id *Party38ChoiceTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH3 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Nm"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PstlAdr,omitempty"` Id *Party38ChoiceTCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ct:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentIdentification7 struct { InstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 InstrId"` EndToEndId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 EndToEndId"` @@ -621,18 +249,6 @@ type PaymentIdentification7 struct { ClrSysRef *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 ClrSysRef,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentIdentification7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ct:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ct:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ct:TxId"}}) - e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ct:UETR"}}) - e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "ct:ClrSysRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentIdentification7TCH struct { InstrId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 InstrId"` EndToEndId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 EndToEndId"` @@ -641,90 +257,32 @@ type PaymentIdentification7TCH struct { ClrSysRef *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 ClrSysRef,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentIdentification7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ct:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ct:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ct:TxId"}}) - e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ct:UETR"}}) - e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "ct:ClrSysRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTypeInformation28 struct { SvcLvl ServiceLevel8Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 SvcLvl"` LclInstrm LocalInstrument2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 LclInstrm"` CtgyPurp CategoryPurpose1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CtgyPurp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTypeInformation28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "ct:SvcLvl"}}) - e.EncodeElement(v.LclInstrm, xml.StartElement{Name: xml.Name{Local: "ct:LclInstrm"}}) - e.EncodeElement(v.CtgyPurp, xml.StartElement{Name: xml.Name{Local: "ct:CtgyPurp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTypeInformation28TCH struct { SvcLvl ServiceLevel8Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 SvcLvl"` LclInstrm LocalInstrument2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 LclInstrm"` CtgyPurp CategoryPurpose1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CtgyPurp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTypeInformation28TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "ct:SvcLvl"}}) - e.EncodeElement(v.LclInstrm, xml.StartElement{Name: xml.Name{Local: "ct:LclInstrm"}}) - e.EncodeElement(v.CtgyPurp, xml.StartElement{Name: xml.Name{Local: "ct:CtgyPurp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13 struct { DtAndPlcOfBirth *DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 DtAndPlcOfBirth,omitempty"` Othr []*GenericPersonIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:DtAndPlcOfBirth"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13TCH struct { DtAndPlcOfBirth *DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 DtAndPlcOfBirth,omitempty"` Othr []*GenericPersonIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:DtAndPlcOfBirth"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13TCH2 struct { DtAndPlcOfBirth DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 DtAndPlcOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:DtAndPlcOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PostalAddress24 struct { StrtNm Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 StrtNm"` BldgNb *Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 BldgNb,omitempty"` @@ -735,20 +293,6 @@ type PostalAddress24 struct { AdrLine *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 AdrLine,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "ct:StrtNm"}}) - e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "ct:BldgNb"}}) - e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "ct:PstCd"}}) - e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "ct:TwnNm"}}) - e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "ct:CtrySubDvsn"}}) - e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "ct:Ctry"}}) - e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "ct:AdrLine"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PostalAddress24TCH struct { StrtNm Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 StrtNm"` BldgNb *Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 BldgNb,omitempty"` @@ -759,210 +303,73 @@ type PostalAddress24TCH struct { AdrLine *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 AdrLine,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PostalAddress24TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "ct:StrtNm"}}) - e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "ct:BldgNb"}}) - e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "ct:PstCd"}}) - e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "ct:TwnNm"}}) - e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "ct:CtrySubDvsn"}}) - e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "ct:Ctry"}}) - e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "ct:AdrLine"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProxyAccountIdentification1 struct { Id Max2048Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProxyAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProxyAccountIdentification1TCH struct { Id Max2048TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProxyAccountIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentInformation7 struct { Tp *ReferredDocumentType5 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Tp,omitempty"` Nb Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Nb"` RltdDt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RltdDt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentInformation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ct:Tp"}}) - e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "ct:Nb"}}) - e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "ct:RltdDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentInformation7TCH struct { Tp *ReferredDocumentType5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Tp,omitempty"` Nb Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Nb"` RltdDt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RltdDt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentInformation7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ct:Tp"}}) - e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "ct:Nb"}}) - e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "ct:RltdDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAmount2 struct { DscntApldAmt []*DiscountAmountAndType1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 DscntApldAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "ct:DscntApldAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAmount2TCH struct { DscntApldAmt []*DiscountAmountAndType1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 DscntApldAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAmount2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "ct:DscntApldAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation16 struct { Ustrd *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Ustrd,omitempty"` Strd *StructuredRemittanceInformation16 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Strd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ct:Ustrd"}}) - e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "ct:Strd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation16TCH struct { Ustrd *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Ustrd,omitempty"` Strd *StructuredRemittanceInformation16TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Strd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ct:Ustrd"}}) - e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "ct:Strd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceLocation7 struct { RmtId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RmtId,omitempty"` RmtLctnDtls *RemittanceLocationData1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RmtLctnDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceLocation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "ct:RmtId"}}) - e.EncodeElement(v.RmtLctnDtls, xml.StartElement{Name: xml.Name{Local: "ct:RmtLctnDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceLocation7TCH struct { RmtId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RmtId,omitempty"` RmtLctnDtls *RemittanceLocationData1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RmtLctnDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceLocation7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "ct:RmtId"}}) - e.EncodeElement(v.RmtLctnDtls, xml.StartElement{Name: xml.Name{Local: "ct:RmtLctnDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceLocationData1 struct { Mtd RemittanceLocationMethod2Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Mtd"` ElctrncAdr *Max2048Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 ElctrncAdr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceLocationData1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Mtd, xml.StartElement{Name: xml.Name{Local: "ct:Mtd"}}) - e.EncodeElement(v.ElctrncAdr, xml.StartElement{Name: xml.Name{Local: "ct:ElctrncAdr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ServiceLevel8Choice struct { Cd *ExternalServiceLevel1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Cd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ServiceLevel8Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SettlementInstruction7 struct { SttlmMtd SettlementMethod1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 SttlmMtd"` ClrSys ClearingSystemIdentification3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 ClrSys"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SettlementInstruction7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SttlmMtd, xml.StartElement{Name: xml.Name{Local: "ct:SttlmMtd"}}) - e.EncodeElement(v.ClrSys, xml.StartElement{Name: xml.Name{Local: "ct:ClrSys"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SettlementInstruction7TCH struct { SttlmMtd SettlementMethod1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 SttlmMtd"` ClrSys ClearingSystemIdentification3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 ClrSys"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SettlementInstruction7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SttlmMtd, xml.StartElement{Name: xml.Name{Local: "ct:SttlmMtd"}}) - e.EncodeElement(v.ClrSys, xml.StartElement{Name: xml.Name{Local: "ct:ClrSys"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StructuredRemittanceInformation16 struct { RfrdDocInf []*ReferredDocumentInformation7 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RfrdDocInf,omitempty"` RfrdDocAmt *RemittanceAmount2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RfrdDocAmt,omitempty"` @@ -970,17 +377,6 @@ type StructuredRemittanceInformation16 struct { Invcee *PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Invcee,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StructuredRemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "ct:RfrdDocInf"}}) - e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "ct:RfrdDocAmt"}}) - e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "ct:Invcr"}}) - e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "ct:Invcee"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StructuredRemittanceInformation16TCH struct { RfrdDocInf []*ReferredDocumentInformation7TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RfrdDocInf,omitempty"` RfrdDocAmt *RemittanceAmount2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 RfrdDocAmt,omitempty"` @@ -988,213 +384,77 @@ type StructuredRemittanceInformation16TCH struct { Invcee *PartyIdentification135TCH4 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Invcee,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StructuredRemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "ct:RfrdDocInf"}}) - e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "ct:RfrdDocAmt"}}) - e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "ct:Invcr"}}) - e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "ct:Invcee"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` SchmeNm *OrganisationIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 SchmeNm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ct:SchmeNm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1TCH3 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH2 struct { Othr []GenericOrganisationIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Othr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH3 struct { LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 LEI,omitempty"` Othr []*GenericOrganisationIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ct:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH4 struct { Othr GenericOrganisationIdentification1TCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Othr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentificationSchemeName1Choice struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH3 struct { OrgId *OrganisationIdentification29 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 OrgId,omitempty"` PrvtId *PersonIdentification13TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ct:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH4 struct { OrgId *OrganisationIdentification29TCH4 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 OrgId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentificationSchemeName1Choice struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH4 struct { Id Party38ChoiceTCH4 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType5 struct { CdOrPrtry ReferredDocumentType5Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CdOrPrtry"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ct:CdOrPrtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType5TCH struct { CdOrPrtry ReferredDocumentType5ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 CdOrPrtry"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ct:CdOrPrtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType5Choice struct { Cd *DocumentType6Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType5ChoiceTCH struct { Cd *DocumentType6CodeTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Cd,omitempty"` Prtry *Max35TextTCH5 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType5ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveCurrencyCode string const ActiveCurrencyCodeUsd ActiveCurrencyCode = "USD" type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/pacs_008_001_08/write.go b/gen/pacs_008_001_08/write.go new file mode 100644 index 0000000..49a5f3c --- /dev/null +++ b/gen/pacs_008_001_08/write.go @@ -0,0 +1,749 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08 with prefix 'ct' +package pacs_008_001_08 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ct:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ct:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CashAccount38) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) + e.EncodeElement(v.Prxy, xml.StartElement{Name: xml.Name{Local: "ct:Prxy"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CashAccount38TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CashAccount38TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) + e.EncodeElement(v.Prxy, xml.StartElement{Name: xml.Name{Local: "ct:Prxy"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CategoryPurpose1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemIdentification3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ct:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ct:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditTransferTransaction39) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "ct:PmtId"}}) + e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "ct:PmtTpInf"}}) + e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ct:IntrBkSttlmAmt"}}) + e.EncodeElement(v.ChrgBr, xml.StartElement{Name: xml.Name{Local: "ct:ChrgBr"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstdAgt"}}) + e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "ct:UltmtDbtr"}}) + e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "ct:InitgPty"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ct:Dbtr"}}) + e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "ct:DbtrAcct"}}) + e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:DbtrAgt"}}) + e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:CdtrAgt"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ct:Cdtr"}}) + e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "ct:CdtrAcct"}}) + e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "ct:UltmtCdtr"}}) + e.EncodeElement(v.InstrForCdtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstrForCdtrAgt"}}) + e.EncodeElement(v.RltdRmtInf, xml.StartElement{Name: xml.Name{Local: "ct:RltdRmtInf"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "ct:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditTransferTransaction39TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "ct:PmtId"}}) + e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "ct:PmtTpInf"}}) + e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ct:IntrBkSttlmAmt"}}) + e.EncodeElement(v.ChrgBr, xml.StartElement{Name: xml.Name{Local: "ct:ChrgBr"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstdAgt"}}) + e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "ct:UltmtDbtr"}}) + e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "ct:InitgPty"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ct:Dbtr"}}) + e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "ct:DbtrAcct"}}) + e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:DbtrAgt"}}) + e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:CdtrAgt"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ct:Cdtr"}}) + e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "ct:CdtrAcct"}}) + e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "ct:UltmtCdtr"}}) + e.EncodeElement(v.InstrForCdtrAgt, xml.StartElement{Name: xml.Name{Local: "ct:InstrForCdtrAgt"}}) + e.EncodeElement(v.RltdRmtInf, xml.StartElement{Name: xml.Name{Local: "ct:RltdRmtInf"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "ct:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "ct:BirthDt"}}) + e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:CityOfBirth"}}) + e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:CtryOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ct:Tp"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ct:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountAndType1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ct:Tp"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ct:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountType1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FIToFICstmrCdtTrf, xml.StartElement{Name: xml.Name{Local: "ct:FIToFICstmrCdtTrf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ct:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ct:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FIToFICustomerCreditTransferV08) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ct:GrpHdr"}}) + e.EncodeElement(v.CdtTrfTxInf, xml.StartElement{Name: xml.Name{Local: "ct:CdtTrfTxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FIToFICustomerCreditTransferV08TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ct:GrpHdr"}}) + e.EncodeElement(v.CdtTrfTxInf, xml.StartElement{Name: xml.Name{Local: "ct:CdtTrfTxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericPersonIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ct:SchmeNm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader93) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ct:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ct:CreDtTm"}}) + e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "ct:NbOfTxs"}}) + e.EncodeElement(v.TtlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ct:TtlIntrBkSttlmAmt"}}) + e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "ct:IntrBkSttlmDt"}}) + e.EncodeElement(v.SttlmInf, xml.StartElement{Name: xml.Name{Local: "ct:SttlmInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader93TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ct:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ct:CreDtTm"}}) + e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "ct:NbOfTxs"}}) + e.EncodeElement(v.TtlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "ct:TtlIntrBkSttlmAmt"}}) + e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "ct:IntrBkSttlmDt"}}) + e.EncodeElement(v.SttlmInf, xml.StartElement{Name: xml.Name{Local: "ct:SttlmInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v InstructionForCreditorAgent1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) + e.EncodeElement(v.InstrInf, xml.StartElement{Name: xml.Name{Local: "ct:InstrInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v InstructionForCreditorAgent1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) + e.EncodeElement(v.InstrInf, xml.StartElement{Name: xml.Name{Local: "ct:InstrInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v LocalInstrument2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ct:LEI"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ct:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ct:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ct:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ct:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ct:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ct:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ct:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentIdentification7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ct:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ct:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ct:TxId"}}) + e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ct:UETR"}}) + e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "ct:ClrSysRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentIdentification7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ct:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ct:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ct:TxId"}}) + e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ct:UETR"}}) + e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "ct:ClrSysRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTypeInformation28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "ct:SvcLvl"}}) + e.EncodeElement(v.LclInstrm, xml.StartElement{Name: xml.Name{Local: "ct:LclInstrm"}}) + e.EncodeElement(v.CtgyPurp, xml.StartElement{Name: xml.Name{Local: "ct:CtgyPurp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTypeInformation28TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "ct:SvcLvl"}}) + e.EncodeElement(v.LclInstrm, xml.StartElement{Name: xml.Name{Local: "ct:LclInstrm"}}) + e.EncodeElement(v.CtgyPurp, xml.StartElement{Name: xml.Name{Local: "ct:CtgyPurp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:DtAndPlcOfBirth"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:DtAndPlcOfBirth"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "ct:DtAndPlcOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "ct:StrtNm"}}) + e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "ct:BldgNb"}}) + e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "ct:PstCd"}}) + e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "ct:TwnNm"}}) + e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "ct:CtrySubDvsn"}}) + e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "ct:Ctry"}}) + e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "ct:AdrLine"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PostalAddress24TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "ct:StrtNm"}}) + e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "ct:BldgNb"}}) + e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "ct:PstCd"}}) + e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "ct:TwnNm"}}) + e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "ct:CtrySubDvsn"}}) + e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "ct:Ctry"}}) + e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "ct:AdrLine"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProxyAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProxyAccountIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentInformation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ct:Tp"}}) + e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "ct:Nb"}}) + e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "ct:RltdDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentInformation7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ct:Tp"}}) + e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "ct:Nb"}}) + e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "ct:RltdDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "ct:DscntApldAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAmount2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "ct:DscntApldAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ct:Ustrd"}}) + e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "ct:Strd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ct:Ustrd"}}) + e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "ct:Strd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceLocation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "ct:RmtId"}}) + e.EncodeElement(v.RmtLctnDtls, xml.StartElement{Name: xml.Name{Local: "ct:RmtLctnDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceLocation7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "ct:RmtId"}}) + e.EncodeElement(v.RmtLctnDtls, xml.StartElement{Name: xml.Name{Local: "ct:RmtLctnDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceLocationData1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Mtd, xml.StartElement{Name: xml.Name{Local: "ct:Mtd"}}) + e.EncodeElement(v.ElctrncAdr, xml.StartElement{Name: xml.Name{Local: "ct:ElctrncAdr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ServiceLevel8Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SettlementInstruction7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SttlmMtd, xml.StartElement{Name: xml.Name{Local: "ct:SttlmMtd"}}) + e.EncodeElement(v.ClrSys, xml.StartElement{Name: xml.Name{Local: "ct:ClrSys"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SettlementInstruction7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SttlmMtd, xml.StartElement{Name: xml.Name{Local: "ct:SttlmMtd"}}) + e.EncodeElement(v.ClrSys, xml.StartElement{Name: xml.Name{Local: "ct:ClrSys"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StructuredRemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "ct:RfrdDocInf"}}) + e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "ct:RfrdDocAmt"}}) + e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "ct:Invcr"}}) + e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "ct:Invcee"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StructuredRemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "ct:RfrdDocInf"}}) + e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "ct:RfrdDocAmt"}}) + e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "ct:Invcr"}}) + e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "ct:Invcee"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ct:SchmeNm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ct:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ct:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ct:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ct:OrgId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ct:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ct:CdOrPrtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ct:CdOrPrtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType5ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ct:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ct:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/pacs_009_001_08/model.go b/gen/pacs_009_001_08/model.go index 783ead7..e245ef8 100644 --- a/gen/pacs_009_001_08/model.go +++ b/gen/pacs_009_001_08/model.go @@ -14,14 +14,6 @@ type AccountIdentification4Choice struct { Othr *GenericAccountIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "c9:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ActiveCurrencyAndAmount struct { Value ActiveCurrencyAndAmountSimpleType `xml:",chardata"` Ccy ActiveCurrencyCode `xml:"Ccy,attr"` @@ -31,74 +23,26 @@ type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "c9:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "c9:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CashAccount38 struct { Id AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CashAccount38) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "c9:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemIdentification3Choice struct { Cd *ExternalCashClearingSystem1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 Cd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemIdentification3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "c9:Cd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "c9:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "c9:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditTransferTransaction36 struct { PmtId PaymentIdentification7 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 PmtId"` PmtTpInf PaymentTypeInformation28 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 PmtTpInf"` @@ -112,23 +56,6 @@ type CreditTransferTransaction36 struct { RmtInf *RemittanceInformation2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 RmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditTransferTransaction36) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "c9:PmtId"}}) - e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "c9:PmtTpInf"}}) - e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "c9:IntrBkSttlmAmt"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "c9:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "c9:InstdAgt"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "c9:Dbtr"}}) - e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "c9:DbtrAcct"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "c9:Cdtr"}}) - e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "c9:CdtrAcct"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "c9:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditTransferTransaction36TCH struct { PmtId PaymentIdentification7TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 PmtId"` PmtTpInf PaymentTypeInformation28TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 PmtTpInf"` @@ -142,100 +69,33 @@ type CreditTransferTransaction36TCH struct { RmtInf *RemittanceInformation2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 RmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditTransferTransaction36TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "c9:PmtId"}}) - e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "c9:PmtTpInf"}}) - e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "c9:IntrBkSttlmAmt"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "c9:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "c9:InstdAgt"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "c9:Dbtr"}}) - e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "c9:DbtrAcct"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "c9:Cdtr"}}) - e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "c9:CdtrAcct"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "c9:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name FICdtTrf FinancialInstitutionCreditTransferV08TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 FICdtTrf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FICdtTrf, xml.StartElement{Name: xml.Name{Local: "c9:FICdtTrf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionCreditTransferV08 struct { GrpHdr GroupHeader93 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 GrpHdr"` CdtTrfTxInf CreditTransferTransaction36 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 CdtTrfTxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionCreditTransferV08) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "c9:GrpHdr"}}) - e.EncodeElement(v.CdtTrfTxInf, xml.StartElement{Name: xml.Name{Local: "c9:CdtTrfTxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionCreditTransferV08TCH struct { GrpHdr GroupHeader93TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 GrpHdr"` CdtTrfTxInf CreditTransferTransaction36TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 CdtTrfTxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionCreditTransferV08TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "c9:GrpHdr"}}) - e.EncodeElement(v.CdtTrfTxInf, xml.StartElement{Name: xml.Name{Local: "c9:CdtTrfTxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "c9:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "c9:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericAccountIdentification1 struct { Id Max34Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "c9:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader93 struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 CreDtTm"` @@ -245,19 +105,6 @@ type GroupHeader93 struct { SttlmInf SettlementInstruction7 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 SttlmInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader93) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "c9:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "c9:CreDtTm"}}) - e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "c9:NbOfTxs"}}) - e.EncodeElement(v.TtlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "c9:TtlIntrBkSttlmAmt"}}) - e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "c9:IntrBkSttlmDt"}}) - e.EncodeElement(v.SttlmInf, xml.StartElement{Name: xml.Name{Local: "c9:SttlmInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader93TCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 CreDtTm"` @@ -267,19 +114,6 @@ type GroupHeader93TCH struct { SttlmInf SettlementInstruction7TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 SttlmInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader93TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "c9:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "c9:CreDtTm"}}) - e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "c9:NbOfTxs"}}) - e.EncodeElement(v.TtlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "c9:TtlIntrBkSttlmAmt"}}) - e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "c9:IntrBkSttlmDt"}}) - e.EncodeElement(v.SttlmInf, xml.StartElement{Name: xml.Name{Local: "c9:SttlmInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentIdentification7 struct { InstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 InstrId"` EndToEndId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 EndToEndId"` @@ -287,17 +121,6 @@ type PaymentIdentification7 struct { ClrSysRef *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 ClrSysRef,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentIdentification7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "c9:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "c9:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "c9:TxId"}}) - e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "c9:ClrSysRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentIdentification7TCH struct { InstrId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 InstrId"` EndToEndId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 EndToEndId"` @@ -305,113 +128,40 @@ type PaymentIdentification7TCH struct { ClrSysRef *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 ClrSysRef,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentIdentification7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "c9:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "c9:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "c9:TxId"}}) - e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "c9:ClrSysRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTypeInformation28 struct { SvcLvl ServiceLevel8Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 SvcLvl"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTypeInformation28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "c9:SvcLvl"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTypeInformation28TCH struct { SvcLvl ServiceLevel8Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 SvcLvl"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTypeInformation28TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "c9:SvcLvl"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation2 struct { Ustrd *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 Ustrd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "c9:Ustrd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation2TCH struct { Ustrd *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 Ustrd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "c9:Ustrd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ServiceLevel8Choice struct { Cd *ExternalServiceLevel1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 Cd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ServiceLevel8Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "c9:Cd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SettlementInstruction7 struct { SttlmMtd SettlementMethod1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 SttlmMtd"` ClrSys ClearingSystemIdentification3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 ClrSys"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SettlementInstruction7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SttlmMtd, xml.StartElement{Name: xml.Name{Local: "c9:SttlmMtd"}}) - e.EncodeElement(v.ClrSys, xml.StartElement{Name: xml.Name{Local: "c9:ClrSys"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type SettlementInstruction7TCH struct { SttlmMtd SettlementMethod1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 SttlmMtd"` ClrSys ClearingSystemIdentification3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 ClrSys"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v SettlementInstruction7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SttlmMtd, xml.StartElement{Name: xml.Name{Local: "c9:SttlmMtd"}}) - e.EncodeElement(v.ClrSys, xml.StartElement{Name: xml.Name{Local: "c9:ClrSys"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveCurrencyCode string const ActiveCurrencyCodeUsd ActiveCurrencyCode = "USD" diff --git a/gen/pacs_009_001_08/write.go b/gen/pacs_009_001_08/write.go new file mode 100644 index 0000000..bdcddd3 --- /dev/null +++ b/gen/pacs_009_001_08/write.go @@ -0,0 +1,259 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08 with prefix 'c9' +package pacs_009_001_08 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "c9:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "c9:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "c9:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CashAccount38) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "c9:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemIdentification3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "c9:Cd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "c9:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "c9:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditTransferTransaction36) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "c9:PmtId"}}) + e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "c9:PmtTpInf"}}) + e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "c9:IntrBkSttlmAmt"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "c9:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "c9:InstdAgt"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "c9:Dbtr"}}) + e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "c9:DbtrAcct"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "c9:Cdtr"}}) + e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "c9:CdtrAcct"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "c9:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditTransferTransaction36TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "c9:PmtId"}}) + e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "c9:PmtTpInf"}}) + e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "c9:IntrBkSttlmAmt"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "c9:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "c9:InstdAgt"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "c9:Dbtr"}}) + e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "c9:DbtrAcct"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "c9:Cdtr"}}) + e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "c9:CdtrAcct"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "c9:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FICdtTrf, xml.StartElement{Name: xml.Name{Local: "c9:FICdtTrf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionCreditTransferV08) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "c9:GrpHdr"}}) + e.EncodeElement(v.CdtTrfTxInf, xml.StartElement{Name: xml.Name{Local: "c9:CdtTrfTxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionCreditTransferV08TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "c9:GrpHdr"}}) + e.EncodeElement(v.CdtTrfTxInf, xml.StartElement{Name: xml.Name{Local: "c9:CdtTrfTxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "c9:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "c9:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "c9:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader93) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "c9:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "c9:CreDtTm"}}) + e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "c9:NbOfTxs"}}) + e.EncodeElement(v.TtlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "c9:TtlIntrBkSttlmAmt"}}) + e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "c9:IntrBkSttlmDt"}}) + e.EncodeElement(v.SttlmInf, xml.StartElement{Name: xml.Name{Local: "c9:SttlmInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader93TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "c9:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "c9:CreDtTm"}}) + e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "c9:NbOfTxs"}}) + e.EncodeElement(v.TtlIntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "c9:TtlIntrBkSttlmAmt"}}) + e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "c9:IntrBkSttlmDt"}}) + e.EncodeElement(v.SttlmInf, xml.StartElement{Name: xml.Name{Local: "c9:SttlmInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentIdentification7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "c9:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "c9:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "c9:TxId"}}) + e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "c9:ClrSysRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentIdentification7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "c9:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "c9:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "c9:TxId"}}) + e.EncodeElement(v.ClrSysRef, xml.StartElement{Name: xml.Name{Local: "c9:ClrSysRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTypeInformation28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "c9:SvcLvl"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTypeInformation28TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "c9:SvcLvl"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "c9:Ustrd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "c9:Ustrd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ServiceLevel8Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "c9:Cd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SettlementInstruction7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SttlmMtd, xml.StartElement{Name: xml.Name{Local: "c9:SttlmMtd"}}) + e.EncodeElement(v.ClrSys, xml.StartElement{Name: xml.Name{Local: "c9:ClrSys"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v SettlementInstruction7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SttlmMtd, xml.StartElement{Name: xml.Name{Local: "c9:SttlmMtd"}}) + e.EncodeElement(v.ClrSys, xml.StartElement{Name: xml.Name{Local: "c9:ClrSys"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/pacs_028_001_03/model.go b/gen/pacs_028_001_03/model.go index 504b7d4..85ea680 100644 --- a/gen/pacs_028_001_03/model.go +++ b/gen/pacs_028_001_03/model.go @@ -19,147 +19,53 @@ type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "s8:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "s8:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "s8:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "s8:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name FIToFIPmtStsReq FIToFIPaymentStatusRequestV03TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 FIToFIPmtStsReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FIToFIPmtStsReq, xml.StartElement{Name: xml.Name{Local: "s8:FIToFIPmtStsReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "s8:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "s8:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FIToFIPaymentStatusRequestV03 struct { GrpHdr GroupHeader91 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 GrpHdr"` OrgnlGrpInf OriginalGroupInformation27 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlGrpInf"` TxInf PaymentTransaction113 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 TxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FIToFIPaymentStatusRequestV03) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "s8:GrpHdr"}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlGrpInf"}}) - e.EncodeElement(v.TxInf, xml.StartElement{Name: xml.Name{Local: "s8:TxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FIToFIPaymentStatusRequestV03TCH struct { GrpHdr GroupHeader91TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 GrpHdr"` OrgnlGrpInf OriginalGroupInformation27TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlGrpInf"` TxInf PaymentTransaction113TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 TxInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FIToFIPaymentStatusRequestV03TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "s8:GrpHdr"}}) - e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlGrpInf"}}) - e.EncodeElement(v.TxInf, xml.StartElement{Name: xml.Name{Local: "s8:TxInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader91 struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader91) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "s8:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "s8:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader91TCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 CreDtTm"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader91TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "s8:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "s8:CreDtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalGroupInformation27 struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlMsgId"` OrgnlMsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlMsgNmId"` @@ -167,17 +73,6 @@ type OriginalGroupInformation27 struct { OrgnlNbOfTxs Max1NumericText `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlNbOfTxs"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalGroupInformation27) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlCreDtTm"}}) - e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlNbOfTxs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalGroupInformation27TCH struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlMsgId"` OrgnlMsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlMsgNmId"` @@ -185,45 +80,16 @@ type OriginalGroupInformation27TCH struct { OrgnlNbOfTxs Max1NumericText `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlNbOfTxs"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalGroupInformation27TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlCreDtTm"}}) - e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlNbOfTxs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalTransactionReference28 struct { IntrBkSttlmAmt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 IntrBkSttlmAmt"` IntrBkSttlmDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 IntrBkSttlmDt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalTransactionReference28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "s8:IntrBkSttlmAmt"}}) - e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "s8:IntrBkSttlmDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalTransactionReference28TCH struct { IntrBkSttlmAmt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 IntrBkSttlmAmt"` IntrBkSttlmDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 IntrBkSttlmDt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalTransactionReference28TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "s8:IntrBkSttlmAmt"}}) - e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "s8:IntrBkSttlmDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction113 struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlInstrId"` OrgnlTxId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlTxId"` @@ -233,19 +99,6 @@ type PaymentTransaction113 struct { OrgnlTxRef OriginalTransactionReference28 `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlTxRef"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction113) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlTxId"}}) - e.EncodeElement(v.AccptncDtTm, xml.StartElement{Name: xml.Name{Local: "s8:AccptncDtTm"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "s8:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "s8:InstdAgt"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlTxRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction113TCH struct { OrgnlInstrId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlInstrId"` OrgnlTxId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlTxId"` @@ -255,27 +108,10 @@ type PaymentTransaction113TCH struct { OrgnlTxRef OriginalTransactionReference28TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 OrgnlTxRef"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction113TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlInstrId"}}) - e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlTxId"}}) - e.EncodeElement(v.AccptncDtTm, xml.StartElement{Name: xml.Name{Local: "s8:AccptncDtTm"}}) - e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "s8:InstgAgt"}}) - e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "s8:InstdAgt"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlTxRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/pacs_028_001_03/write.go b/gen/pacs_028_001_03/write.go new file mode 100644 index 0000000..68583b4 --- /dev/null +++ b/gen/pacs_028_001_03/write.go @@ -0,0 +1,173 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:pacs.028.001.03 with prefix 's8' +package pacs_028_001_03 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "s8:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "s8:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "s8:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "s8:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FIToFIPmtStsReq, xml.StartElement{Name: xml.Name{Local: "s8:FIToFIPmtStsReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "s8:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "s8:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FIToFIPaymentStatusRequestV03) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "s8:GrpHdr"}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlGrpInf"}}) + e.EncodeElement(v.TxInf, xml.StartElement{Name: xml.Name{Local: "s8:TxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FIToFIPaymentStatusRequestV03TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "s8:GrpHdr"}}) + e.EncodeElement(v.OrgnlGrpInf, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlGrpInf"}}) + e.EncodeElement(v.TxInf, xml.StartElement{Name: xml.Name{Local: "s8:TxInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader91) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "s8:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "s8:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader91TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "s8:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "s8:CreDtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalGroupInformation27) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlCreDtTm"}}) + e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlNbOfTxs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalGroupInformation27TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlCreDtTm"}}) + e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlNbOfTxs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalTransactionReference28) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "s8:IntrBkSttlmAmt"}}) + e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "s8:IntrBkSttlmDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalTransactionReference28TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.IntrBkSttlmAmt, xml.StartElement{Name: xml.Name{Local: "s8:IntrBkSttlmAmt"}}) + e.EncodeElement(v.IntrBkSttlmDt, xml.StartElement{Name: xml.Name{Local: "s8:IntrBkSttlmDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction113) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlTxId"}}) + e.EncodeElement(v.AccptncDtTm, xml.StartElement{Name: xml.Name{Local: "s8:AccptncDtTm"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "s8:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "s8:InstdAgt"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlTxRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction113TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlInstrId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlInstrId"}}) + e.EncodeElement(v.OrgnlTxId, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlTxId"}}) + e.EncodeElement(v.AccptncDtTm, xml.StartElement{Name: xml.Name{Local: "s8:AccptncDtTm"}}) + e.EncodeElement(v.InstgAgt, xml.StartElement{Name: xml.Name{Local: "s8:InstgAgt"}}) + e.EncodeElement(v.InstdAgt, xml.StartElement{Name: xml.Name{Local: "s8:InstdAgt"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "s8:OrgnlTxRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/pain_013_001_07/model.go b/gen/pain_013_001_07/model.go index aede4db..9f172af 100644 --- a/gen/pain_013_001_07/model.go +++ b/gen/pain_013_001_07/model.go @@ -14,14 +14,6 @@ type AccountIdentification4Choice struct { Othr *GenericAccountIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ActiveOrHistoricCurrencyAndAmount struct { Value ActiveOrHistoricCurrencyAndAmountSimpleType `xml:",chardata"` Ccy ActiveOrHistoricCurrencyCode `xml:"Ccy,attr"` @@ -31,160 +23,57 @@ type AmountType4Choice struct { InstdAmt *ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 InstdAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AmountType4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstdAmt, xml.StartElement{Name: xml.Name{Local: "pr:InstdAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "pr:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "pr:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CashAccount38 struct { Id AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` Nm *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Nm,omitempty"` Prxy *ProxyAccountIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prxy,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CashAccount38) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) - e.EncodeElement(v.Prxy, xml.StartElement{Name: xml.Name{Local: "pr:Prxy"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CashAccount38TCH struct { Id AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` Nm *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Nm,omitempty"` Prxy *ProxyAccountIdentification1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prxy,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CashAccount38TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) - e.EncodeElement(v.Prxy, xml.StartElement{Name: xml.Name{Local: "pr:Prxy"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CashAccount38TCH2 struct { Id AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` Nm *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Nm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CashAccount38TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CategoryPurpose1Choice struct { Prtry *CatePurpProp `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CategoryPurpose1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "pr:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "pr:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Contact4 struct { PhneNb *PhoneNumber `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PhneNb,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Contact4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PhneNb, xml.StartElement{Name: xml.Name{Local: "pr:PhneNb"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditorPaymentActivationRequestV07 struct { GrpHdr GroupHeader78 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 GrpHdr"` PmtInf PaymentInstruction31 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditorPaymentActivationRequestV07) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "pr:GrpHdr"}}) - e.EncodeElement(v.PmtInf, xml.StartElement{Name: xml.Name{Local: "pr:PmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditorPaymentActivationRequestV07TCH struct { GrpHdr GroupHeader78TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 GrpHdr"` PmtInf PaymentInstruction31TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditorPaymentActivationRequestV07TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "pr:GrpHdr"}}) - e.EncodeElement(v.PmtInf, xml.StartElement{Name: xml.Name{Local: "pr:PmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditTransferTransaction35 struct { PmtId PaymentIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtId"` PmtTpInf PaymentTypeInformation26 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtTpInf"` @@ -200,25 +89,6 @@ type CreditTransferTransaction35 struct { RmtInf *RemittanceInformation16 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditTransferTransaction35) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "pr:PmtId"}}) - e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "pr:PmtTpInf"}}) - e.EncodeElement(v.PmtCond, xml.StartElement{Name: xml.Name{Local: "pr:PmtCond"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "pr:Amt"}}) - e.EncodeElement(v.ChrgBr, xml.StartElement{Name: xml.Name{Local: "pr:ChrgBr"}}) - e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:CdtrAgt"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "pr:Cdtr"}}) - e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "pr:CdtrAcct"}}) - e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "pr:UltmtCdtr"}}) - e.EncodeElement(v.InstrForCdtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:InstrForCdtrAgt"}}) - e.EncodeElement(v.RltdRmtInf, xml.StartElement{Name: xml.Name{Local: "pr:RltdRmtInf"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "pr:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditTransferTransaction35TCH struct { PmtId PaymentIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtId"` PmtTpInf PaymentTypeInformation26TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtTpInf"` @@ -234,224 +104,76 @@ type CreditTransferTransaction35TCH struct { RmtInf *RemittanceInformation16TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditTransferTransaction35TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "pr:PmtId"}}) - e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "pr:PmtTpInf"}}) - e.EncodeElement(v.PmtCond, xml.StartElement{Name: xml.Name{Local: "pr:PmtCond"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "pr:Amt"}}) - e.EncodeElement(v.ChrgBr, xml.StartElement{Name: xml.Name{Local: "pr:ChrgBr"}}) - e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:CdtrAgt"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "pr:Cdtr"}}) - e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "pr:CdtrAcct"}}) - e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "pr:UltmtCdtr"}}) - e.EncodeElement(v.InstrForCdtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:InstrForCdtrAgt"}}) - e.EncodeElement(v.RltdRmtInf, xml.StartElement{Name: xml.Name{Local: "pr:RltdRmtInf"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "pr:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndDateTime2Choice struct { Dt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Dt,omitempty"` DtTm *rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 DtTm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "pr:Dt"}}) - e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "pr:DtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndDateTime2ChoiceTCH struct { Dt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Dt,omitempty"` DtTm *rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 DtTm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndDateTime2ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "pr:Dt"}}) - e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "pr:DtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndPlaceOfBirth1 struct { BirthDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 BirthDt"` CityOfBirth Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CityOfBirth"` CtryOfBirth CountryCode `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CtryOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "pr:BirthDt"}}) - e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:CityOfBirth"}}) - e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:CtryOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountAndType1 struct { Tp DiscountAmountType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Tp"` Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Amt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "pr:Tp"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "pr:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountAndType1TCH struct { Tp DiscountAmountType1ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Tp"` Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Amt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountAndType1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "pr:Tp"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "pr:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountType1Choice struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountType1ChoiceTCH struct { Prtry *Max35TextTCH4 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountType1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name CdtrPmtActvtnReq CreditorPaymentActivationRequestV07TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CdtrPmtActvtnReq"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdtrPmtActvtnReq, xml.StartElement{Name: xml.Name{Local: "pr:CdtrPmtActvtnReq"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "pr:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "pr:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericAccountIdentification1 struct { Id Max34Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` SchmeNm *OrganisationIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 SchmeNm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "pr:SchmeNm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1TCH struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` SchmeNm *OrganisationIdentificationSchemeName1ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 SchmeNm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "pr:SchmeNm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1TCH2 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericPersonIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` SchmeNm *PersonIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 SchmeNm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericPersonIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "pr:SchmeNm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader78 struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CreDtTm"` @@ -459,17 +181,6 @@ type GroupHeader78 struct { InitgPty PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 InitgPty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader78) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "pr:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "pr:CreDtTm"}}) - e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "pr:NbOfTxs"}}) - e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "pr:InitgPty"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader78TCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CreDtTm"` @@ -477,223 +188,77 @@ type GroupHeader78TCH struct { InitgPty PartyIdentification135TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 InitgPty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader78TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "pr:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "pr:CreDtTm"}}) - e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "pr:NbOfTxs"}}) - e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "pr:InitgPty"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type InstructionForCreditorAgent1 struct { Cd Instruction3CodeTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Cd"` InstrInf Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 InstrInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v InstructionForCreditorAgent1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) - e.EncodeElement(v.InstrInf, xml.StartElement{Name: xml.Name{Local: "pr:InstrInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type InstructionForCreditorAgent1TCH struct { Cd Instruction3CodeTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Cd"` InstrInf Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 InstrInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v InstructionForCreditorAgent1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) - e.EncodeElement(v.InstrInf, xml.StartElement{Name: xml.Name{Local: "pr:InstrInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type LocalInstrument2Choice struct { Prtry *LocalProp `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v LocalInstrument2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type LocalInstrument2ChoiceTCH struct { Prtry *LocalPropTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v LocalInstrument2ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29 struct { LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 LEI,omitempty"` Othr []*GenericOrganisationIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "pr:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH struct { Othr []GenericOrganisationIdentification1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Othr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH2 struct { LEI LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 LEI"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "pr:LEI"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH3 struct { LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 LEI,omitempty"` Othr []*GenericOrganisationIdentification1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "pr:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH4 struct { Othr GenericOrganisationIdentification1TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Othr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentificationSchemeName1Choice struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentificationSchemeName1ChoiceTCH struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentificationSchemeName1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38Choice struct { OrgId *OrganisationIdentification29 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 OrgId,omitempty"` PrvtId *PersonIdentification13 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "pr:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH struct { OrgId *OrganisationIdentification29TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 OrgId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH2 struct { OrgId *OrganisationIdentification29TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 OrgId,omitempty"` PrvtId *PersonIdentification13TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "pr:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH3 struct { OrgId *OrganisationIdentification29TCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 OrgId,omitempty"` PrvtId *PersonIdentification13TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "pr:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH4 struct { OrgId *OrganisationIdentification29TCH4 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 OrgId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Nm,omitempty"` PstlAdr *PostalAddress24 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PstlAdr,omitempty"` @@ -701,61 +266,22 @@ type PartyIdentification135 struct { CtctDtls *Contact4 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CtctDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "pr:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "pr:CtctDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH struct { Id Party38ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH2 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Nm"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PstlAdr,omitempty"` Id *Party38ChoiceTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "pr:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH3 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Nm"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PstlAdr,omitempty"` Id *Party38ChoiceTCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "pr:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH4 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Nm"` PstlAdr *PostalAddress24TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PstlAdr,omitempty"` @@ -763,77 +289,28 @@ type PartyIdentification135TCH4 struct { CtctDtls *Contact4 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CtctDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "pr:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "pr:CtctDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH5 struct { Id Party38ChoiceTCH4 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentCondition1 struct { AmtModAllwd TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 AmtModAllwd"` EarlyPmtAllwd TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 EarlyPmtAllwd"` GrntedPmtReqd TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 GrntedPmtReqd"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentCondition1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AmtModAllwd, xml.StartElement{Name: xml.Name{Local: "pr:AmtModAllwd"}}) - e.EncodeElement(v.EarlyPmtAllwd, xml.StartElement{Name: xml.Name{Local: "pr:EarlyPmtAllwd"}}) - e.EncodeElement(v.GrntedPmtReqd, xml.StartElement{Name: xml.Name{Local: "pr:GrntedPmtReqd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentIdentification6 struct { InstrId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 InstrId,omitempty"` EndToEndId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 EndToEndId"` UETR *UUIDv4Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 UETR,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "pr:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "pr:EndToEndId"}}) - e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "pr:UETR"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentCondition1TCH struct { AmtModAllwd TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 AmtModAllwd"` EarlyPmtAllwd TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 EarlyPmtAllwd"` GrntedPmtReqd TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 GrntedPmtReqd"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentCondition1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AmtModAllwd, xml.StartElement{Name: xml.Name{Local: "pr:AmtModAllwd"}}) - e.EncodeElement(v.EarlyPmtAllwd, xml.StartElement{Name: xml.Name{Local: "pr:EarlyPmtAllwd"}}) - e.EncodeElement(v.GrntedPmtReqd, xml.StartElement{Name: xml.Name{Local: "pr:GrntedPmtReqd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentInstruction31 struct { PmtInfId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtInfId"` PmtMtd PaymentMethod7Code `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtMtd"` @@ -846,22 +323,6 @@ type PaymentInstruction31 struct { CdtTrfTx CreditTransferTransaction35 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CdtTrfTx"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentInstruction31) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PmtInfId, xml.StartElement{Name: xml.Name{Local: "pr:PmtInfId"}}) - e.EncodeElement(v.PmtMtd, xml.StartElement{Name: xml.Name{Local: "pr:PmtMtd"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "pr:ReqdExctnDt"}}) - e.EncodeElement(v.XpryDt, xml.StartElement{Name: xml.Name{Local: "pr:XpryDt"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "pr:Dbtr"}}) - e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "pr:DbtrAcct"}}) - e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:DbtrAgt"}}) - e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "pr:UltmtDbtr"}}) - e.EncodeElement(v.CdtTrfTx, xml.StartElement{Name: xml.Name{Local: "pr:CdtTrfTx"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentInstruction31TCH struct { PmtInfId Max35TextTCH3 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtInfId"` PmtMtd PaymentMethod7Code `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 PmtMtd"` @@ -874,106 +335,36 @@ type PaymentInstruction31TCH struct { CdtTrfTx CreditTransferTransaction35TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CdtTrfTx"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentInstruction31TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PmtInfId, xml.StartElement{Name: xml.Name{Local: "pr:PmtInfId"}}) - e.EncodeElement(v.PmtMtd, xml.StartElement{Name: xml.Name{Local: "pr:PmtMtd"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "pr:ReqdExctnDt"}}) - e.EncodeElement(v.XpryDt, xml.StartElement{Name: xml.Name{Local: "pr:XpryDt"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "pr:Dbtr"}}) - e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "pr:DbtrAcct"}}) - e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:DbtrAgt"}}) - e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "pr:UltmtDbtr"}}) - e.EncodeElement(v.CdtTrfTx, xml.StartElement{Name: xml.Name{Local: "pr:CdtTrfTx"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTypeInformation26 struct { SvcLvl ServiceLevel8Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 SvcLvl"` LclInstrm LocalInstrument2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 LclInstrm"` CtgyPurp CategoryPurpose1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CtgyPurp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTypeInformation26) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "pr:SvcLvl"}}) - e.EncodeElement(v.LclInstrm, xml.StartElement{Name: xml.Name{Local: "pr:LclInstrm"}}) - e.EncodeElement(v.CtgyPurp, xml.StartElement{Name: xml.Name{Local: "pr:CtgyPurp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTypeInformation26TCH struct { SvcLvl ServiceLevel8Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 SvcLvl"` LclInstrm LocalInstrument2ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 LclInstrm"` CtgyPurp CategoryPurpose1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CtgyPurp"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTypeInformation26TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "pr:SvcLvl"}}) - e.EncodeElement(v.LclInstrm, xml.StartElement{Name: xml.Name{Local: "pr:LclInstrm"}}) - e.EncodeElement(v.CtgyPurp, xml.StartElement{Name: xml.Name{Local: "pr:CtgyPurp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13 struct { DtAndPlcOfBirth *DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 DtAndPlcOfBirth,omitempty"` Othr []*GenericPersonIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:DtAndPlcOfBirth"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13TCH struct { DtAndPlcOfBirth DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 DtAndPlcOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:DtAndPlcOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13TCH2 struct { DtAndPlcOfBirth *DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 DtAndPlcOfBirth,omitempty"` Othr []*GenericPersonIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:DtAndPlcOfBirth"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentificationSchemeName1Choice struct { Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PostalAddress24 struct { StrtNm Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 StrtNm"` BldgNb *Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 BldgNb,omitempty"` @@ -984,20 +375,6 @@ type PostalAddress24 struct { AdrLine *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 AdrLine,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "pr:StrtNm"}}) - e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "pr:BldgNb"}}) - e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "pr:PstCd"}}) - e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "pr:TwnNm"}}) - e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "pr:CtrySubDvsn"}}) - e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "pr:Ctry"}}) - e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "pr:AdrLine"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PostalAddress24TCH struct { StrtNm Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 StrtNm"` BldgNb *Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 BldgNb,omitempty"` @@ -1008,248 +385,86 @@ type PostalAddress24TCH struct { AdrLine *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 AdrLine,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PostalAddress24TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "pr:StrtNm"}}) - e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "pr:BldgNb"}}) - e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "pr:PstCd"}}) - e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "pr:TwnNm"}}) - e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "pr:CtrySubDvsn"}}) - e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "pr:Ctry"}}) - e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "pr:AdrLine"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProxyAccountIdentification1 struct { Id Max2048Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProxyAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ProxyAccountIdentification1TCH struct { Id Max2048TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ProxyAccountIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentInformation7 struct { Tp *ReferredDocumentType5 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Tp,omitempty"` Nb Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Nb"` RltdDt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RltdDt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentInformation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "pr:Tp"}}) - e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "pr:Nb"}}) - e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "pr:RltdDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentInformation7TCH struct { Tp *ReferredDocumentType5TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Tp,omitempty"` Nb Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Nb"` RltdDt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RltdDt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentInformation7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "pr:Tp"}}) - e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "pr:Nb"}}) - e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "pr:RltdDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType5 struct { CdOrPrtry ReferredDocumentType5Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CdOrPrtry"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "pr:CdOrPrtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType5Choice struct { Cd *DocumentType6Code `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType5ChoiceTCH struct { Cd *DocumentType6CodeTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Cd,omitempty"` Prtry *Max35TextTCH5 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType5ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType5TCH struct { CdOrPrtry ReferredDocumentType5ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 CdOrPrtry"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "pr:CdOrPrtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAmount2 struct { DscntApldAmt []*DiscountAmountAndType1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 DscntApldAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "pr:DscntApldAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAmount2TCH struct { DscntApldAmt []*DiscountAmountAndType1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 DscntApldAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAmount2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "pr:DscntApldAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation16 struct { Ustrd *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Ustrd,omitempty"` Strd *StructuredRemittanceInformation16 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Strd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "pr:Ustrd"}}) - e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "pr:Strd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation16TCH struct { Ustrd *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Ustrd,omitempty"` Strd *StructuredRemittanceInformation16TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Strd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "pr:Ustrd"}}) - e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "pr:Strd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceLocation7 struct { RmtId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RmtId,omitempty"` RmtLctnDtls *RemittanceLocationData1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RmtLctnDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceLocation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "pr:RmtId"}}) - e.EncodeElement(v.RmtLctnDtls, xml.StartElement{Name: xml.Name{Local: "pr:RmtLctnDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceLocation7TCH struct { RmtId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RmtId,omitempty"` RmtLctnDtls *RemittanceLocationData1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RmtLctnDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceLocation7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "pr:RmtId"}}) - e.EncodeElement(v.RmtLctnDtls, xml.StartElement{Name: xml.Name{Local: "pr:RmtLctnDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceLocationData1 struct { Mtd RemittanceLocationMethod2Code `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Mtd"` ElctrncAdr Max2048Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 ElctrncAdr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceLocationData1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Mtd, xml.StartElement{Name: xml.Name{Local: "pr:Mtd"}}) - e.EncodeElement(v.ElctrncAdr, xml.StartElement{Name: xml.Name{Local: "pr:ElctrncAdr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceLocationData1TCH struct { Mtd RemittanceLocationMethod2Code `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Mtd"` ElctrncAdr Max2048Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 ElctrncAdr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceLocationData1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Mtd, xml.StartElement{Name: xml.Name{Local: "pr:Mtd"}}) - e.EncodeElement(v.ElctrncAdr, xml.StartElement{Name: xml.Name{Local: "pr:ElctrncAdr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ServiceLevel8Choice struct { Cd *ExternalServiceLevel1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Cd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ServiceLevel8Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StructuredRemittanceInformation16 struct { RfrdDocInf []*ReferredDocumentInformation7 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RfrdDocInf,omitempty"` RfrdDocAmt *RemittanceAmount2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RfrdDocAmt,omitempty"` @@ -1257,17 +472,6 @@ type StructuredRemittanceInformation16 struct { Invcee *PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Invcee,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StructuredRemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "pr:RfrdDocInf"}}) - e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "pr:RfrdDocAmt"}}) - e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "pr:Invcr"}}) - e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "pr:Invcee"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StructuredRemittanceInformation16TCH struct { RfrdDocInf []*ReferredDocumentInformation7TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RfrdDocInf,omitempty"` RfrdDocAmt *RemittanceAmount2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 RfrdDocAmt,omitempty"` @@ -1275,25 +479,10 @@ type StructuredRemittanceInformation16TCH struct { Invcee *PartyIdentification135TCH5 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 Invcee,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StructuredRemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "pr:RfrdDocInf"}}) - e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "pr:RfrdDocAmt"}}) - e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "pr:Invcr"}}) - e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "pr:Invcee"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/pain_013_001_07/write.go b/gen/pain_013_001_07/write.go new file mode 100644 index 0000000..4e0a4a1 --- /dev/null +++ b/gen/pain_013_001_07/write.go @@ -0,0 +1,820 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:pain.013.001.07 with prefix 'pr' +package pain_013_001_07 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AmountType4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstdAmt, xml.StartElement{Name: xml.Name{Local: "pr:InstdAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "pr:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "pr:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CashAccount38) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) + e.EncodeElement(v.Prxy, xml.StartElement{Name: xml.Name{Local: "pr:Prxy"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CashAccount38TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) + e.EncodeElement(v.Prxy, xml.StartElement{Name: xml.Name{Local: "pr:Prxy"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CashAccount38TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CategoryPurpose1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "pr:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "pr:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Contact4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PhneNb, xml.StartElement{Name: xml.Name{Local: "pr:PhneNb"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditorPaymentActivationRequestV07) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "pr:GrpHdr"}}) + e.EncodeElement(v.PmtInf, xml.StartElement{Name: xml.Name{Local: "pr:PmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditorPaymentActivationRequestV07TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "pr:GrpHdr"}}) + e.EncodeElement(v.PmtInf, xml.StartElement{Name: xml.Name{Local: "pr:PmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditTransferTransaction35) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "pr:PmtId"}}) + e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "pr:PmtTpInf"}}) + e.EncodeElement(v.PmtCond, xml.StartElement{Name: xml.Name{Local: "pr:PmtCond"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "pr:Amt"}}) + e.EncodeElement(v.ChrgBr, xml.StartElement{Name: xml.Name{Local: "pr:ChrgBr"}}) + e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:CdtrAgt"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "pr:Cdtr"}}) + e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "pr:CdtrAcct"}}) + e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "pr:UltmtCdtr"}}) + e.EncodeElement(v.InstrForCdtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:InstrForCdtrAgt"}}) + e.EncodeElement(v.RltdRmtInf, xml.StartElement{Name: xml.Name{Local: "pr:RltdRmtInf"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "pr:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditTransferTransaction35TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PmtId, xml.StartElement{Name: xml.Name{Local: "pr:PmtId"}}) + e.EncodeElement(v.PmtTpInf, xml.StartElement{Name: xml.Name{Local: "pr:PmtTpInf"}}) + e.EncodeElement(v.PmtCond, xml.StartElement{Name: xml.Name{Local: "pr:PmtCond"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "pr:Amt"}}) + e.EncodeElement(v.ChrgBr, xml.StartElement{Name: xml.Name{Local: "pr:ChrgBr"}}) + e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:CdtrAgt"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "pr:Cdtr"}}) + e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "pr:CdtrAcct"}}) + e.EncodeElement(v.UltmtCdtr, xml.StartElement{Name: xml.Name{Local: "pr:UltmtCdtr"}}) + e.EncodeElement(v.InstrForCdtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:InstrForCdtrAgt"}}) + e.EncodeElement(v.RltdRmtInf, xml.StartElement{Name: xml.Name{Local: "pr:RltdRmtInf"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "pr:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "pr:Dt"}}) + e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "pr:DtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndDateTime2ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "pr:Dt"}}) + e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "pr:DtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "pr:BirthDt"}}) + e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:CityOfBirth"}}) + e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:CtryOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "pr:Tp"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "pr:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountAndType1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "pr:Tp"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "pr:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountType1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdtrPmtActvtnReq, xml.StartElement{Name: xml.Name{Local: "pr:CdtrPmtActvtnReq"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "pr:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "pr:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "pr:SchmeNm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "pr:SchmeNm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericPersonIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "pr:SchmeNm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader78) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "pr:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "pr:CreDtTm"}}) + e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "pr:NbOfTxs"}}) + e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "pr:InitgPty"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader78TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "pr:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "pr:CreDtTm"}}) + e.EncodeElement(v.NbOfTxs, xml.StartElement{Name: xml.Name{Local: "pr:NbOfTxs"}}) + e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "pr:InitgPty"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v InstructionForCreditorAgent1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) + e.EncodeElement(v.InstrInf, xml.StartElement{Name: xml.Name{Local: "pr:InstrInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v InstructionForCreditorAgent1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) + e.EncodeElement(v.InstrInf, xml.StartElement{Name: xml.Name{Local: "pr:InstrInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v LocalInstrument2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v LocalInstrument2ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "pr:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "pr:LEI"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "pr:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentificationSchemeName1ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "pr:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "pr:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "pr:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "pr:OrgId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "pr:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "pr:CtctDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "pr:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "pr:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "pr:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "pr:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "pr:CtctDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentCondition1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AmtModAllwd, xml.StartElement{Name: xml.Name{Local: "pr:AmtModAllwd"}}) + e.EncodeElement(v.EarlyPmtAllwd, xml.StartElement{Name: xml.Name{Local: "pr:EarlyPmtAllwd"}}) + e.EncodeElement(v.GrntedPmtReqd, xml.StartElement{Name: xml.Name{Local: "pr:GrntedPmtReqd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "pr:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "pr:EndToEndId"}}) + e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "pr:UETR"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentCondition1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AmtModAllwd, xml.StartElement{Name: xml.Name{Local: "pr:AmtModAllwd"}}) + e.EncodeElement(v.EarlyPmtAllwd, xml.StartElement{Name: xml.Name{Local: "pr:EarlyPmtAllwd"}}) + e.EncodeElement(v.GrntedPmtReqd, xml.StartElement{Name: xml.Name{Local: "pr:GrntedPmtReqd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentInstruction31) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PmtInfId, xml.StartElement{Name: xml.Name{Local: "pr:PmtInfId"}}) + e.EncodeElement(v.PmtMtd, xml.StartElement{Name: xml.Name{Local: "pr:PmtMtd"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "pr:ReqdExctnDt"}}) + e.EncodeElement(v.XpryDt, xml.StartElement{Name: xml.Name{Local: "pr:XpryDt"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "pr:Dbtr"}}) + e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "pr:DbtrAcct"}}) + e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:DbtrAgt"}}) + e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "pr:UltmtDbtr"}}) + e.EncodeElement(v.CdtTrfTx, xml.StartElement{Name: xml.Name{Local: "pr:CdtTrfTx"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentInstruction31TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PmtInfId, xml.StartElement{Name: xml.Name{Local: "pr:PmtInfId"}}) + e.EncodeElement(v.PmtMtd, xml.StartElement{Name: xml.Name{Local: "pr:PmtMtd"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "pr:ReqdExctnDt"}}) + e.EncodeElement(v.XpryDt, xml.StartElement{Name: xml.Name{Local: "pr:XpryDt"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "pr:Dbtr"}}) + e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "pr:DbtrAcct"}}) + e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "pr:DbtrAgt"}}) + e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "pr:UltmtDbtr"}}) + e.EncodeElement(v.CdtTrfTx, xml.StartElement{Name: xml.Name{Local: "pr:CdtTrfTx"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTypeInformation26) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "pr:SvcLvl"}}) + e.EncodeElement(v.LclInstrm, xml.StartElement{Name: xml.Name{Local: "pr:LclInstrm"}}) + e.EncodeElement(v.CtgyPurp, xml.StartElement{Name: xml.Name{Local: "pr:CtgyPurp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTypeInformation26TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.SvcLvl, xml.StartElement{Name: xml.Name{Local: "pr:SvcLvl"}}) + e.EncodeElement(v.LclInstrm, xml.StartElement{Name: xml.Name{Local: "pr:LclInstrm"}}) + e.EncodeElement(v.CtgyPurp, xml.StartElement{Name: xml.Name{Local: "pr:CtgyPurp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:DtAndPlcOfBirth"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:DtAndPlcOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "pr:DtAndPlcOfBirth"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "pr:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "pr:StrtNm"}}) + e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "pr:BldgNb"}}) + e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "pr:PstCd"}}) + e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "pr:TwnNm"}}) + e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "pr:CtrySubDvsn"}}) + e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "pr:Ctry"}}) + e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "pr:AdrLine"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PostalAddress24TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "pr:StrtNm"}}) + e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "pr:BldgNb"}}) + e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "pr:PstCd"}}) + e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "pr:TwnNm"}}) + e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "pr:CtrySubDvsn"}}) + e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "pr:Ctry"}}) + e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "pr:AdrLine"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProxyAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ProxyAccountIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "pr:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentInformation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "pr:Tp"}}) + e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "pr:Nb"}}) + e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "pr:RltdDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentInformation7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "pr:Tp"}}) + e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "pr:Nb"}}) + e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "pr:RltdDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "pr:CdOrPrtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType5Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType5ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "pr:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType5TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "pr:CdOrPrtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "pr:DscntApldAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAmount2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "pr:DscntApldAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "pr:Ustrd"}}) + e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "pr:Strd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "pr:Ustrd"}}) + e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "pr:Strd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceLocation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "pr:RmtId"}}) + e.EncodeElement(v.RmtLctnDtls, xml.StartElement{Name: xml.Name{Local: "pr:RmtLctnDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceLocation7TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "pr:RmtId"}}) + e.EncodeElement(v.RmtLctnDtls, xml.StartElement{Name: xml.Name{Local: "pr:RmtLctnDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceLocationData1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Mtd, xml.StartElement{Name: xml.Name{Local: "pr:Mtd"}}) + e.EncodeElement(v.ElctrncAdr, xml.StartElement{Name: xml.Name{Local: "pr:ElctrncAdr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceLocationData1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Mtd, xml.StartElement{Name: xml.Name{Local: "pr:Mtd"}}) + e.EncodeElement(v.ElctrncAdr, xml.StartElement{Name: xml.Name{Local: "pr:ElctrncAdr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ServiceLevel8Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "pr:Cd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StructuredRemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "pr:RfrdDocInf"}}) + e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "pr:RfrdDocAmt"}}) + e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "pr:Invcr"}}) + e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "pr:Invcee"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StructuredRemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "pr:RfrdDocInf"}}) + e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "pr:RfrdDocAmt"}}) + e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "pr:Invcr"}}) + e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "pr:Invcee"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/pain_014_001_07/model.go b/gen/pain_014_001_07/model.go index 44833d6..63bdd03 100644 --- a/gen/pain_014_001_07/model.go +++ b/gen/pain_014_001_07/model.go @@ -24,255 +24,91 @@ type AmountType4Choice struct { InstdAmt *ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 InstdAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AmountType4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstdAmt, xml.StartElement{Name: xml.Name{Local: "rp:InstdAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rp:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rp:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rp:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rp:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditorPaymentActivationRequestStatusReportV07 struct { GrpHdr GroupHeader87 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 GrpHdr"` OrgnlGrpInfAndSts OriginalGroupInformation30 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlGrpInfAndSts"` OrgnlPmtInfAndSts OriginalPaymentInstruction31 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlPmtInfAndSts"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditorPaymentActivationRequestStatusReportV07) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rp:GrpHdr"}}) - e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlGrpInfAndSts"}}) - e.EncodeElement(v.OrgnlPmtInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlPmtInfAndSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditorPaymentActivationRequestStatusReportV07TCH struct { GrpHdr GroupHeader87TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 GrpHdr"` OrgnlGrpInfAndSts OriginalGroupInformation30TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlGrpInfAndSts"` OrgnlPmtInfAndSts OriginalPaymentInstruction31TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlPmtInfAndSts"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditorPaymentActivationRequestStatusReportV07TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rp:GrpHdr"}}) - e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlGrpInfAndSts"}}) - e.EncodeElement(v.OrgnlPmtInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlPmtInfAndSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndDateTime2Choice struct { Dt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Dt,omitempty"` DtTm *rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 DtTm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "rp:Dt"}}) - e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "rp:DtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndPlaceOfBirth1 struct { BirthDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 BirthDt"` CityOfBirth Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 CityOfBirth"` CtryOfBirth CountryCode `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 CtryOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "rp:BirthDt"}}) - e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "rp:CityOfBirth"}}) - e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "rp:CtryOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name CdtrPmtActvtnReqStsRpt CreditorPaymentActivationRequestStatusReportV07TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 CdtrPmtActvtnReqStsRpt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdtrPmtActvtnReqStsRpt, xml.StartElement{Name: xml.Name{Local: "rp:CdtrPmtActvtnReqStsRpt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rp:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rp:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1TCH struct { Id Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader87 struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 CreDtTm"` InitgPty PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 InitgPty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader87) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rp:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rp:CreDtTm"}}) - e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "rp:InitgPty"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader87TCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 CreDtTm"` InitgPty PartyIdentification135TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 InitgPty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader87TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rp:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rp:CreDtTm"}}) - e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "rp:InitgPty"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29 struct { LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 LEI,omitempty"` Othr *GenericOrganisationIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "rp:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "rp:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH struct { Othr GenericOrganisationIdentification1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Othr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "rp:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH2 struct { LEI LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 LEI"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "rp:LEI"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalGroupInformation30 struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlMsgId"` OrgnlMsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlMsgNmId"` @@ -280,17 +116,6 @@ type OriginalGroupInformation30 struct { OrgnlNbOfTxs Max1NumericText `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlNbOfTxs"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalGroupInformation30) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlCreDtTm"}}) - e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlNbOfTxs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalGroupInformation30TCH struct { OrgnlMsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlMsgId"` OrgnlMsgNmId OrigMsgName `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlMsgNmId"` @@ -298,45 +123,16 @@ type OriginalGroupInformation30TCH struct { OrgnlNbOfTxs Max1NumericText `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlNbOfTxs"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalGroupInformation30TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlMsgId"}}) - e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlMsgNmId"}}) - e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlCreDtTm"}}) - e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlNbOfTxs"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalPaymentInstruction31 struct { OrgnlPmtInfId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlPmtInfId"` TxInfAndSts PaymentTransaction104 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 TxInfAndSts"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalPaymentInstruction31) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlPmtInfId"}}) - e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:TxInfAndSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalPaymentInstruction31TCH struct { OrgnlPmtInfId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlPmtInfId"` TxInfAndSts PaymentTransaction104TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 TxInfAndSts"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalPaymentInstruction31TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlPmtInfId"}}) - e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:TxInfAndSts"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalTransactionReference29 struct { Amt *AmountType4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Amt,omitempty"` ReqdExctnDt DateAndDateTime2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 ReqdExctnDt"` @@ -344,17 +140,6 @@ type OriginalTransactionReference29 struct { Cdtr PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Cdtr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalTransactionReference29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "rp:Amt"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "rp:ReqdExctnDt"}}) - e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "rp:CdtrAgt"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "rp:Cdtr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalTransactionReference29TCH struct { Amt *AmountType4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Amt,omitempty"` ReqdExctnDt DateAndDateTime2Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 ReqdExctnDt"` @@ -362,129 +147,46 @@ type OriginalTransactionReference29TCH struct { Cdtr PartyIdentification135TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Cdtr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalTransactionReference29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "rp:Amt"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "rp:ReqdExctnDt"}}) - e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "rp:CdtrAgt"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "rp:Cdtr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38Choice struct { OrgId *OrganisationIdentification29 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgId,omitempty"` PrvtId *PersonIdentification13 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "rp:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH struct { OrgId *OrganisationIdentification29TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH2 struct { OrgId *OrganisationIdentification29TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgId,omitempty"` PrvtId *PersonIdentification13TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "rp:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Nm,omitempty"` Id *Party38Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rp:Nm"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH struct { Id Party38ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH2 struct { Nm Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Nm"` Id *Party38ChoiceTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rp:Nm"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentConditionStatus1 struct { AccptdAmt ActiveCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 AccptdAmt"` GrntedPmt TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 GrntedPmt"` EarlyPmt TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 EarlyPmt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentConditionStatus1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AccptdAmt, xml.StartElement{Name: xml.Name{Local: "rp:AccptdAmt"}}) - e.EncodeElement(v.GrntedPmt, xml.StartElement{Name: xml.Name{Local: "rp:GrntedPmt"}}) - e.EncodeElement(v.EarlyPmt, xml.StartElement{Name: xml.Name{Local: "rp:EarlyPmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentConditionStatus1TCH struct { AccptdAmt ActiveCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 AccptdAmt"` GrntedPmt TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 GrntedPmt"` EarlyPmt TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 EarlyPmt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentConditionStatus1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AccptdAmt, xml.StartElement{Name: xml.Name{Local: "rp:AccptdAmt"}}) - e.EncodeElement(v.GrntedPmt, xml.StartElement{Name: xml.Name{Local: "rp:GrntedPmt"}}) - e.EncodeElement(v.EarlyPmt, xml.StartElement{Name: xml.Name{Local: "rp:EarlyPmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction104 struct { OrgnlEndToEndId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlEndToEndId,omitempty"` OrgnlUETR *UUIDv4Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlUETR,omitempty"` @@ -494,19 +196,6 @@ type PaymentTransaction104 struct { OrgnlTxRef OriginalTransactionReference29 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlTxRef"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction104) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlUETR"}}) - e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "rp:TxSts"}}) - e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rp:StsRsnInf"}}) - e.EncodeElement(v.PmtCondSts, xml.StartElement{Name: xml.Name{Local: "rp:PmtCondSts"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlTxRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PaymentTransaction104TCH struct { OrgnlEndToEndId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlEndToEndId,omitempty"` OrgnlUETR *UUIDv4Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlUETR,omitempty"` @@ -516,117 +205,44 @@ type PaymentTransaction104TCH struct { OrgnlTxRef OriginalTransactionReference29TCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 OrgnlTxRef"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PaymentTransaction104TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlEndToEndId"}}) - e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlUETR"}}) - e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "rp:TxSts"}}) - e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rp:StsRsnInf"}}) - e.EncodeElement(v.PmtCondSts, xml.StartElement{Name: xml.Name{Local: "rp:PmtCondSts"}}) - e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlTxRef"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13 struct { DtAndPlcOfBirth DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 DtAndPlcOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "rp:DtAndPlcOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13TCH struct { DtAndPlcOfBirth DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 DtAndPlcOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "rp:DtAndPlcOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReason6Choice struct { Cd *ExternalStatusReason1Code `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Cd,omitempty"` Prtry *ProprietaryReasonCode `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReason6Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "rp:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rp:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReason6ChoiceTCH struct { Cd *ExternalStatusReason1CodeTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Cd,omitempty"` Prtry *ProprietaryReasonCode `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReason6ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "rp:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rp:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReasonInformation12 struct { Rsn StatusReason6Choice `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Rsn"` AddtlInf *Max105Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReasonInformation12) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rp:Rsn"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "rp:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StatusReasonInformation12TCH struct { Rsn StatusReason6ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 Rsn"` AddtlInf *Max105Text `xml:"urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StatusReasonInformation12TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rp:Rsn"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "rp:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveCurrencyCode string const ActiveCurrencyCodeUsd ActiveCurrencyCode = "USD" type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/pain_014_001_07/write.go b/gen/pain_014_001_07/write.go new file mode 100644 index 0000000..be65531 --- /dev/null +++ b/gen/pain_014_001_07/write.go @@ -0,0 +1,393 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:pain.014.001.07 with prefix 'rp' +package pain_014_001_07 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AmountType4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstdAmt, xml.StartElement{Name: xml.Name{Local: "rp:InstdAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rp:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "rp:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rp:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "rp:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditorPaymentActivationRequestStatusReportV07) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rp:GrpHdr"}}) + e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlGrpInfAndSts"}}) + e.EncodeElement(v.OrgnlPmtInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlPmtInfAndSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditorPaymentActivationRequestStatusReportV07TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "rp:GrpHdr"}}) + e.EncodeElement(v.OrgnlGrpInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlGrpInfAndSts"}}) + e.EncodeElement(v.OrgnlPmtInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlPmtInfAndSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "rp:Dt"}}) + e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "rp:DtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "rp:BirthDt"}}) + e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "rp:CityOfBirth"}}) + e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "rp:CtryOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdtrPmtActvtnReqStsRpt, xml.StartElement{Name: xml.Name{Local: "rp:CdtrPmtActvtnReqStsRpt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rp:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "rp:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader87) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rp:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rp:CreDtTm"}}) + e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "rp:InitgPty"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader87TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "rp:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "rp:CreDtTm"}}) + e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "rp:InitgPty"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "rp:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "rp:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "rp:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "rp:LEI"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalGroupInformation30) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlCreDtTm"}}) + e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlNbOfTxs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalGroupInformation30TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlMsgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlMsgId"}}) + e.EncodeElement(v.OrgnlMsgNmId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlMsgNmId"}}) + e.EncodeElement(v.OrgnlCreDtTm, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlCreDtTm"}}) + e.EncodeElement(v.OrgnlNbOfTxs, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlNbOfTxs"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalPaymentInstruction31) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlPmtInfId"}}) + e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:TxInfAndSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalPaymentInstruction31TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlPmtInfId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlPmtInfId"}}) + e.EncodeElement(v.TxInfAndSts, xml.StartElement{Name: xml.Name{Local: "rp:TxInfAndSts"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalTransactionReference29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "rp:Amt"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "rp:ReqdExctnDt"}}) + e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "rp:CdtrAgt"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "rp:Cdtr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalTransactionReference29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "rp:Amt"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "rp:ReqdExctnDt"}}) + e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "rp:CdtrAgt"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "rp:Cdtr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "rp:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "rp:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "rp:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rp:Nm"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "rp:Nm"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "rp:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentConditionStatus1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AccptdAmt, xml.StartElement{Name: xml.Name{Local: "rp:AccptdAmt"}}) + e.EncodeElement(v.GrntedPmt, xml.StartElement{Name: xml.Name{Local: "rp:GrntedPmt"}}) + e.EncodeElement(v.EarlyPmt, xml.StartElement{Name: xml.Name{Local: "rp:EarlyPmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentConditionStatus1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AccptdAmt, xml.StartElement{Name: xml.Name{Local: "rp:AccptdAmt"}}) + e.EncodeElement(v.GrntedPmt, xml.StartElement{Name: xml.Name{Local: "rp:GrntedPmt"}}) + e.EncodeElement(v.EarlyPmt, xml.StartElement{Name: xml.Name{Local: "rp:EarlyPmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction104) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlUETR"}}) + e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "rp:TxSts"}}) + e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rp:StsRsnInf"}}) + e.EncodeElement(v.PmtCondSts, xml.StartElement{Name: xml.Name{Local: "rp:PmtCondSts"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlTxRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PaymentTransaction104TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgnlEndToEndId, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlEndToEndId"}}) + e.EncodeElement(v.OrgnlUETR, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlUETR"}}) + e.EncodeElement(v.TxSts, xml.StartElement{Name: xml.Name{Local: "rp:TxSts"}}) + e.EncodeElement(v.StsRsnInf, xml.StartElement{Name: xml.Name{Local: "rp:StsRsnInf"}}) + e.EncodeElement(v.PmtCondSts, xml.StartElement{Name: xml.Name{Local: "rp:PmtCondSts"}}) + e.EncodeElement(v.OrgnlTxRef, xml.StartElement{Name: xml.Name{Local: "rp:OrgnlTxRef"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "rp:DtAndPlcOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "rp:DtAndPlcOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReason6Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "rp:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rp:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReason6ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "rp:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "rp:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReasonInformation12) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rp:Rsn"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "rp:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StatusReasonInformation12TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "rp:Rsn"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "rp:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/gen/remt_001_001_04/model.go b/gen/remt_001_001_04/model.go index 80c9d27..0d6ab16 100644 --- a/gen/remt_001_001_04/model.go +++ b/gen/remt_001_001_04/model.go @@ -14,14 +14,6 @@ type AccountIdentification4Choice struct { Othr *GenericAccountIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ActiveOrHistoricCurrencyAndAmount struct { Value ActiveOrHistoricCurrencyAndAmountSimpleType `xml:",chardata"` Ccy ActiveOrHistoricCurrencyCode `xml:"Ccy,attr"` @@ -31,74 +23,26 @@ type AmountType3Choice struct { InstdAmt *ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 InstdAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v AmountType3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.InstdAmt, xml.StartElement{Name: xml.Name{Local: "ar:InstdAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6 struct { FinInstnId FinancialInstitutionIdentification18 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ar:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type BranchAndFinancialInstitutionIdentification6TCH struct { FinInstnId FinancialInstitutionIdentification18TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 FinInstnId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ar:FinInstnId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CashAccount38 struct { Id AccountIdentification4Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CashAccount38) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2 struct { MmbId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ar:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ClearingSystemMemberIdentification2TCH struct { MmbId Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 MmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ar:MmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Contact4 struct { NmPrfx *NamePrefix2Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 NmPrfx,omitempty"` Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Nm,omitempty"` @@ -114,139 +58,47 @@ type Contact4 struct { PrefrdMtd *PreferredContactMethod1Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 PrefrdMtd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Contact4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.NmPrfx, xml.StartElement{Name: xml.Name{Local: "ar:NmPrfx"}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) - e.EncodeElement(v.PhneNb, xml.StartElement{Name: xml.Name{Local: "ar:PhneNb"}}) - e.EncodeElement(v.MobNb, xml.StartElement{Name: xml.Name{Local: "ar:MobNb"}}) - e.EncodeElement(v.FaxNb, xml.StartElement{Name: xml.Name{Local: "ar:FaxNb"}}) - e.EncodeElement(v.EmailAdr, xml.StartElement{Name: xml.Name{Local: "ar:EmailAdr"}}) - e.EncodeElement(v.EmailPurp, xml.StartElement{Name: xml.Name{Local: "ar:EmailPurp"}}) - e.EncodeElement(v.JobTitl, xml.StartElement{Name: xml.Name{Local: "ar:JobTitl"}}) - e.EncodeElement(v.Rspnsblty, xml.StartElement{Name: xml.Name{Local: "ar:Rspnsblty"}}) - e.EncodeElement(v.Dept, xml.StartElement{Name: xml.Name{Local: "ar:Dept"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) - e.EncodeElement(v.PrefrdMtd, xml.StartElement{Name: xml.Name{Local: "ar:PrefrdMtd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditorReferenceInformation2 struct { Tp *CreditorReferenceType2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Tp,omitempty"` Ref *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Ref,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditorReferenceInformation2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) - e.EncodeElement(v.Ref, xml.StartElement{Name: xml.Name{Local: "ar:Ref"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditorReferenceType1Choice struct { Cd *DocumentType3Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditorReferenceType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type CreditorReferenceType2 struct { CdOrPrtry CreditorReferenceType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CdOrPrtry"` Issr *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Issr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v CreditorReferenceType2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ar:CdOrPrtry"}}) - e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndDateTime2Choice struct { Dt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Dt,omitempty"` DtTm *rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 DtTm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "ar:Dt"}}) - e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "ar:DtTm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DateAndPlaceOfBirth1 struct { BirthDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 BirthDt"` CityOfBirth Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CityOfBirth"` CtryOfBirth CountryCode `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CtryOfBirth"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "ar:BirthDt"}}) - e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "ar:CityOfBirth"}}) - e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "ar:CtryOfBirth"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DatePeriod2 struct { FrDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 FrDt"` ToDt rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 ToDt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DatePeriod2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.FrDt, xml.StartElement{Name: xml.Name{Local: "ar:FrDt"}}) - e.EncodeElement(v.ToDt, xml.StartElement{Name: xml.Name{Local: "ar:ToDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountAndType1 struct { Tp *DiscountAmountType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Tp,omitempty"` Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Amt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DiscountAmountType1Choice struct { Cd *ExternalDiscountAmountType1Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DiscountAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentAdjustment1 struct { Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Amt"` CdtDbtInd *CreditDebitCode `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CdtDbtInd,omitempty"` @@ -254,114 +106,41 @@ type DocumentAdjustment1 struct { AddtlInf *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentAdjustment1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) - e.EncodeElement(v.CdtDbtInd, xml.StartElement{Name: xml.Name{Local: "ar:CdtDbtInd"}}) - e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "ar:Rsn"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "ar:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentLineIdentification1 struct { Tp *DocumentLineType1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Tp,omitempty"` Nb *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Nb,omitempty"` RltdDt *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RltdDt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentLineIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) - e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "ar:Nb"}}) - e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "ar:RltdDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentLineInformation1 struct { Id []DocumentLineIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Id"` Desc *Max2048Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Desc,omitempty"` Amt *RemittanceAmount3 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Amt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentLineInformation1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeElement(v.Desc, xml.StartElement{Name: xml.Name{Local: "ar:Desc"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentLineType1 struct { CdOrPrtry DocumentLineType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CdOrPrtry"` Issr *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Issr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentLineType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ar:CdOrPrtry"}}) - e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentLineType1Choice struct { Cd *ExternalDocumentLineType1Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentLineType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type DocumentTCH struct { XMLName xml.Name RmtAdvc RemittanceAdviceV04TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RmtAdvc"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RmtAdvc, xml.StartElement{Name: xml.Name{Local: "ar:RmtAdvc"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18 struct { ClrSysMmbId ClearingSystemMemberIdentification2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ar:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type FinancialInstitutionIdentification18TCH struct { ClrSysMmbId ClearingSystemMemberIdentification2TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 ClrSysMmbId"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ar:ClrSysMmbId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Garnishment3 struct { Tp GarnishmentType1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Tp"` Grnshee *PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Grnshee,omitempty"` @@ -373,21 +152,6 @@ type Garnishment3 struct { MplyeeTermntnInd *TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 MplyeeTermntnInd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Garnishment3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) - e.EncodeElement(v.Grnshee, xml.StartElement{Name: xml.Name{Local: "ar:Grnshee"}}) - e.EncodeElement(v.GrnshmtAdmstr, xml.StartElement{Name: xml.Name{Local: "ar:GrnshmtAdmstr"}}) - e.EncodeElement(v.RefNb, xml.StartElement{Name: xml.Name{Local: "ar:RefNb"}}) - e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "ar:Dt"}}) - e.EncodeElement(v.RmtdAmt, xml.StartElement{Name: xml.Name{Local: "ar:RmtdAmt"}}) - e.EncodeElement(v.FmlyMdclInsrncInd, xml.StartElement{Name: xml.Name{Local: "ar:FmlyMdclInsrncInd"}}) - e.EncodeElement(v.MplyeeTermntnInd, xml.StartElement{Name: xml.Name{Local: "ar:MplyeeTermntnInd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Garnishment3TCH struct { Tp GarnishmentType1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Tp"` Grnshee *PartyIdentification135TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Grnshee,omitempty"` @@ -399,121 +163,42 @@ type Garnishment3TCH struct { MplyeeTermntnInd *TrueFalseIndicator `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 MplyeeTermntnInd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Garnishment3TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) - e.EncodeElement(v.Grnshee, xml.StartElement{Name: xml.Name{Local: "ar:Grnshee"}}) - e.EncodeElement(v.GrnshmtAdmstr, xml.StartElement{Name: xml.Name{Local: "ar:GrnshmtAdmstr"}}) - e.EncodeElement(v.RefNb, xml.StartElement{Name: xml.Name{Local: "ar:RefNb"}}) - e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "ar:Dt"}}) - e.EncodeElement(v.RmtdAmt, xml.StartElement{Name: xml.Name{Local: "ar:RmtdAmt"}}) - e.EncodeElement(v.FmlyMdclInsrncInd, xml.StartElement{Name: xml.Name{Local: "ar:FmlyMdclInsrncInd"}}) - e.EncodeElement(v.MplyeeTermntnInd, xml.StartElement{Name: xml.Name{Local: "ar:MplyeeTermntnInd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GarnishmentType1 struct { CdOrPrtry GarnishmentType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CdOrPrtry"` Issr *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Issr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GarnishmentType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ar:CdOrPrtry"}}) - e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GarnishmentType1Choice struct { Cd *ExternalGarnishmentType1Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GarnishmentType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericAccountIdentification1 struct { Id Max34Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Id"` SchmeNm *OrganisationIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 SchmeNm,omitempty"` Issr *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Issr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ar:SchmeNm"}}) - e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1TCH struct { Id Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericOrganisationIdentification1TCH2 struct { Id Max35TextTCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Id"` SchmeNm *OrganisationIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 SchmeNm,omitempty"` Issr *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Issr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericOrganisationIdentification1TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ar:SchmeNm"}}) - e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GenericPersonIdentification1 struct { Id Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Id"` SchmeNm *PersonIdentificationSchemeName1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 SchmeNm,omitempty"` Issr *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Issr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GenericPersonIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ar:SchmeNm"}}) - e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader79 struct { MsgId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CreDtTm"` @@ -521,17 +206,6 @@ type GroupHeader79 struct { MsgRcpt PartyIdentification135 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 MsgRcpt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader79) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ar:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ar:CreDtTm"}}) - e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "ar:InitgPty"}}) - e.EncodeElement(v.MsgRcpt, xml.StartElement{Name: xml.Name{Local: "ar:MsgRcpt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type GroupHeader79TCH struct { MsgId Max35TextTCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 MsgId"` CreDtTm rtp.ISODateTime `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CreDtTm"` @@ -539,75 +213,27 @@ type GroupHeader79TCH struct { MsgRcpt PartyIdentification135TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 MsgRcpt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v GroupHeader79TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ar:MsgId"}}) - e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ar:CreDtTm"}}) - e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "ar:InitgPty"}}) - e.EncodeElement(v.MsgRcpt, xml.StartElement{Name: xml.Name{Local: "ar:MsgRcpt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29 struct { AnyBIC *AnyBICDec2014Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 AnyBIC,omitempty"` LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 LEI,omitempty"` Othr []*GenericOrganisationIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AnyBIC, xml.StartElement{Name: xml.Name{Local: "ar:AnyBIC"}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ar:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH struct { Othr GenericOrganisationIdentification1TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Othr"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentification29TCH2 struct { AnyBIC *AnyBICDec2014Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 AnyBIC,omitempty"` LEI *LEIIdentifier `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 LEI,omitempty"` Othr []*GenericOrganisationIdentification1TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.AnyBIC, xml.StartElement{Name: xml.Name{Local: "ar:AnyBIC"}}) - e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ar:LEI"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OrganisationIdentificationSchemeName1Choice struct { Cd *ExternalOrganisationIdentification1Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OrganisationIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalPaymentInformation8 struct { Refs TransactionReferences5 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Refs"` Amt AmountType3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Amt"` @@ -620,22 +246,6 @@ type OriginalPaymentInformation8 struct { CdtrAgt *BranchAndFinancialInstitutionIdentification6 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CdtrAgt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalPaymentInformation8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Refs, xml.StartElement{Name: xml.Name{Local: "ar:Refs"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "ar:ReqdExctnDt"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ar:Dbtr"}}) - e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "ar:DbtrAcct"}}) - e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "ar:DbtrAgt"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ar:Cdtr"}}) - e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "ar:CdtrAcct"}}) - e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "ar:CdtrAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OriginalPaymentInformation8TCH struct { Refs TransactionReferences5 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Refs"` Amt AmountType3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Amt"` @@ -648,76 +258,25 @@ type OriginalPaymentInformation8TCH struct { CdtrAgt *BranchAndFinancialInstitutionIdentification6TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CdtrAgt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OriginalPaymentInformation8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Refs, xml.StartElement{Name: xml.Name{Local: "ar:Refs"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) - e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "ar:ReqdExctnDt"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ar:Dbtr"}}) - e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "ar:DbtrAcct"}}) - e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "ar:DbtrAgt"}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ar:Cdtr"}}) - e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "ar:CdtrAcct"}}) - e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "ar:CdtrAgt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type OtherContact1 struct { ChanlTp Max4Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 ChanlTp"` Id *Max128Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Id,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v OtherContact1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.ChanlTp, xml.StartElement{Name: xml.Name{Local: "ar:ChanlTp"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38Choice struct { OrgId *OrganisationIdentification29 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 OrgId,omitempty"` PrvtId *PersonIdentification13 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ar:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ar:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH struct { OrgId *OrganisationIdentification29TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 OrgId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ar:OrgId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type Party38ChoiceTCH2 struct { OrgId *OrganisationIdentification29TCH2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 OrgId,omitempty"` PrvtId *PersonIdentification13 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 PrvtId,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ar:OrgId"}}) - e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ar:PrvtId"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Nm,omitempty"` PstlAdr *PostalAddress24 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 PstlAdr,omitempty"` @@ -726,30 +285,10 @@ type PartyIdentification135 struct { CtctDtls *Contact4 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CtctDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ar:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeElement(v.CtryOfRes, xml.StartElement{Name: xml.Name{Local: "ar:CtryOfRes"}}) - e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "ar:CtctDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH struct { Id Party38ChoiceTCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Id"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH2 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Nm,omitempty"` PstlAdr *PostalAddress24 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 PstlAdr,omitempty"` @@ -758,58 +297,20 @@ type PartyIdentification135TCH2 struct { CtctDtls *Contact4 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CtctDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) - e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ar:PstlAdr"}}) - e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) - e.EncodeElement(v.CtryOfRes, xml.StartElement{Name: xml.Name{Local: "ar:CtryOfRes"}}) - e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "ar:CtctDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PartyIdentification135TCH3 struct { Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Nm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentification13 struct { DtAndPlcOfBirth *DateAndPlaceOfBirth1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 DtAndPlcOfBirth,omitempty"` Othr []*GenericPersonIdentification1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Othr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "ar:DtAndPlcOfBirth"}}) - e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PersonIdentificationSchemeName1Choice struct { Cd *ExternalPersonIdentification1Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PersonIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type PostalAddress24 struct { StrtNm *Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 StrtNm,omitempty"` BldgNb *Max16Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 BldgNb,omitempty"` @@ -820,20 +321,6 @@ type PostalAddress24 struct { AdrLine []*Max70Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 AdrLine,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "ar:StrtNm"}}) - e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "ar:BldgNb"}}) - e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "ar:PstCd"}}) - e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "ar:TwnNm"}}) - e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "ar:CtrySubDvsn"}}) - e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "ar:Ctry"}}) - e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "ar:AdrLine"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentInformation7 struct { Tp *ReferredDocumentType4 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Tp,omitempty"` Nb *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Nb,omitempty"` @@ -841,73 +328,26 @@ type ReferredDocumentInformation7 struct { LineDtls []*DocumentLineInformation1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 LineDtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentInformation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) - e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "ar:Nb"}}) - e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "ar:RltdDt"}}) - e.EncodeElement(v.LineDtls, xml.StartElement{Name: xml.Name{Local: "ar:LineDtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType3Choice struct { Cd *DocumentType6Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type ReferredDocumentType4 struct { CdOrPrtry ReferredDocumentType3Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 CdOrPrtry"` Issr *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Issr,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v ReferredDocumentType4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ar:CdOrPrtry"}}) - e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAdviceV04 struct { GrpHdr GroupHeader79 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 GrpHdr"` RmtInf RemittanceInformation19 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RmtInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAdviceV04) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ar:GrpHdr"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "ar:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAdviceV04TCH struct { GrpHdr GroupHeader79TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 GrpHdr"` RmtInf RemittanceInformation19TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RmtInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAdviceV04TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ar:GrpHdr"}}) - e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "ar:RmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAmount2 struct { DuePyblAmt *ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 DuePyblAmt,omitempty"` DscntApldAmt []*DiscountAmountAndType1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 DscntApldAmt,omitempty"` @@ -917,19 +357,6 @@ type RemittanceAmount2 struct { RmtdAmt *ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RmtdAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DuePyblAmt, xml.StartElement{Name: xml.Name{Local: "ar:DuePyblAmt"}}) - e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "ar:DscntApldAmt"}}) - e.EncodeElement(v.CdtNoteAmt, xml.StartElement{Name: xml.Name{Local: "ar:CdtNoteAmt"}}) - e.EncodeElement(v.TaxAmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxAmt"}}) - e.EncodeElement(v.AdjstmntAmtAndRsn, xml.StartElement{Name: xml.Name{Local: "ar:AdjstmntAmtAndRsn"}}) - e.EncodeElement(v.RmtdAmt, xml.StartElement{Name: xml.Name{Local: "ar:RmtdAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceAmount3 struct { DuePyblAmt *ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 DuePyblAmt,omitempty"` DscntApldAmt []*DiscountAmountAndType1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 DscntApldAmt,omitempty"` @@ -939,19 +366,6 @@ type RemittanceAmount3 struct { RmtdAmt *ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RmtdAmt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceAmount3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.DuePyblAmt, xml.StartElement{Name: xml.Name{Local: "ar:DuePyblAmt"}}) - e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "ar:DscntApldAmt"}}) - e.EncodeElement(v.CdtNoteAmt, xml.StartElement{Name: xml.Name{Local: "ar:CdtNoteAmt"}}) - e.EncodeElement(v.TaxAmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxAmt"}}) - e.EncodeElement(v.AdjstmntAmtAndRsn, xml.StartElement{Name: xml.Name{Local: "ar:AdjstmntAmtAndRsn"}}) - e.EncodeElement(v.RmtdAmt, xml.StartElement{Name: xml.Name{Local: "ar:RmtdAmt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation19 struct { RmtId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RmtId"` Ustrd []*Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Ustrd,omitempty"` @@ -959,17 +373,6 @@ type RemittanceInformation19 struct { OrgnlPmtInf OriginalPaymentInformation8 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 OrgnlPmtInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation19) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "ar:RmtId"}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ar:Ustrd"}}) - e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "ar:Strd"}}) - e.EncodeElement(v.OrgnlPmtInf, xml.StartElement{Name: xml.Name{Local: "ar:OrgnlPmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type RemittanceInformation19TCH struct { RmtId Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RmtId"` Ustrd []*Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Ustrd,omitempty"` @@ -977,17 +380,6 @@ type RemittanceInformation19TCH struct { OrgnlPmtInf OriginalPaymentInformation8TCH `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 OrgnlPmtInf"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v RemittanceInformation19TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "ar:RmtId"}}) - e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ar:Ustrd"}}) - e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "ar:Strd"}}) - e.EncodeElement(v.OrgnlPmtInf, xml.StartElement{Name: xml.Name{Local: "ar:OrgnlPmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StructuredRemittanceInformation16 struct { RfrdDocInf []*ReferredDocumentInformation7 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RfrdDocInf,omitempty"` RfrdDocAmt *RemittanceAmount2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RfrdDocAmt,omitempty"` @@ -999,21 +391,6 @@ type StructuredRemittanceInformation16 struct { AddtlRmtInf []*Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 AddtlRmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StructuredRemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "ar:RfrdDocInf"}}) - e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "ar:RfrdDocAmt"}}) - e.EncodeElement(v.CdtrRefInf, xml.StartElement{Name: xml.Name{Local: "ar:CdtrRefInf"}}) - e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "ar:Invcr"}}) - e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "ar:Invcee"}}) - e.EncodeElement(v.TaxRmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxRmt"}}) - e.EncodeElement(v.GrnshmtRmt, xml.StartElement{Name: xml.Name{Local: "ar:GrnshmtRmt"}}) - e.EncodeElement(v.AddtlRmtInf, xml.StartElement{Name: xml.Name{Local: "ar:AddtlRmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type StructuredRemittanceInformation16TCH struct { RfrdDocInf []*ReferredDocumentInformation7 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RfrdDocInf,omitempty"` RfrdDocAmt *RemittanceAmount2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RfrdDocAmt,omitempty"` @@ -1025,21 +402,6 @@ type StructuredRemittanceInformation16TCH struct { AddtlRmtInf []*Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 AddtlRmtInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v StructuredRemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "ar:RfrdDocInf"}}) - e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "ar:RfrdDocAmt"}}) - e.EncodeElement(v.CdtrRefInf, xml.StartElement{Name: xml.Name{Local: "ar:CdtrRefInf"}}) - e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "ar:Invcr"}}) - e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "ar:Invcee"}}) - e.EncodeElement(v.TaxRmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxRmt"}}) - e.EncodeElement(v.GrnshmtRmt, xml.StartElement{Name: xml.Name{Local: "ar:GrnshmtRmt"}}) - e.EncodeElement(v.AddtlRmtInf, xml.StartElement{Name: xml.Name{Local: "ar:AddtlRmtInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxAmount2 struct { Rate *PercentageRate `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Rate,omitempty"` TaxblBaseAmt *ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 TaxblBaseAmt,omitempty"` @@ -1047,59 +409,21 @@ type TaxAmount2 struct { Dtls []*TaxRecordDetails2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Dtls,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Rate, xml.StartElement{Name: xml.Name{Local: "ar:Rate"}}) - e.EncodeElement(v.TaxblBaseAmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxblBaseAmt"}}) - e.EncodeElement(v.TtlAmt, xml.StartElement{Name: xml.Name{Local: "ar:TtlAmt"}}) - e.EncodeElement(v.Dtls, xml.StartElement{Name: xml.Name{Local: "ar:Dtls"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxAmountAndType1 struct { Tp *TaxAmountType1Choice `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Tp,omitempty"` Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Amt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxAmountType1Choice struct { Cd *ExternalTaxAmountType1Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Cd,omitempty"` Prtry *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Prtry,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) - e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxAuthorisation1 struct { Titl *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Titl,omitempty"` Nm *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Nm,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxAuthorisation1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Titl, xml.StartElement{Name: xml.Name{Local: "ar:Titl"}}) - e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxInformation7 struct { Cdtr *TaxParty1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Cdtr,omitempty"` Dbtr *TaxParty2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Dbtr,omitempty"` @@ -1114,40 +438,12 @@ type TaxInformation7 struct { Rcrd []*TaxRecord2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Rcrd,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxInformation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ar:Cdtr"}}) - e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ar:Dbtr"}}) - e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "ar:UltmtDbtr"}}) - e.EncodeElement(v.AdmstnZone, xml.StartElement{Name: xml.Name{Local: "ar:AdmstnZone"}}) - e.EncodeElement(v.RefNb, xml.StartElement{Name: xml.Name{Local: "ar:RefNb"}}) - e.EncodeElement(v.Mtd, xml.StartElement{Name: xml.Name{Local: "ar:Mtd"}}) - e.EncodeElement(v.TtlTaxblBaseAmt, xml.StartElement{Name: xml.Name{Local: "ar:TtlTaxblBaseAmt"}}) - e.EncodeElement(v.TtlTaxAmt, xml.StartElement{Name: xml.Name{Local: "ar:TtlTaxAmt"}}) - e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "ar:Dt"}}) - e.EncodeElement(v.SeqNb, xml.StartElement{Name: xml.Name{Local: "ar:SeqNb"}}) - e.EncodeElement(v.Rcrd, xml.StartElement{Name: xml.Name{Local: "ar:Rcrd"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxParty1 struct { TaxId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 TaxId,omitempty"` RegnId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RegnId,omitempty"` TaxTp *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 TaxTp,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxParty1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.TaxId, xml.StartElement{Name: xml.Name{Local: "ar:TaxId"}}) - e.EncodeElement(v.RegnId, xml.StartElement{Name: xml.Name{Local: "ar:RegnId"}}) - e.EncodeElement(v.TaxTp, xml.StartElement{Name: xml.Name{Local: "ar:TaxTp"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxParty2 struct { TaxId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 TaxId,omitempty"` RegnId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 RegnId,omitempty"` @@ -1155,33 +451,12 @@ type TaxParty2 struct { Authstn *TaxAuthorisation1 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Authstn,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxParty2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.TaxId, xml.StartElement{Name: xml.Name{Local: "ar:TaxId"}}) - e.EncodeElement(v.RegnId, xml.StartElement{Name: xml.Name{Local: "ar:RegnId"}}) - e.EncodeElement(v.TaxTp, xml.StartElement{Name: xml.Name{Local: "ar:TaxTp"}}) - e.EncodeElement(v.Authstn, xml.StartElement{Name: xml.Name{Local: "ar:Authstn"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxPeriod2 struct { Yr *rtp.ISODate `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Yr,omitempty"` Tp *TaxRecordPeriod1Code `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Tp,omitempty"` FrToDt *DatePeriod2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 FrToDt,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxPeriod2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Yr, xml.StartElement{Name: xml.Name{Local: "ar:Yr"}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) - e.EncodeElement(v.FrToDt, xml.StartElement{Name: xml.Name{Local: "ar:FrToDt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxRecord2 struct { Tp *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Tp,omitempty"` Ctgy *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Ctgy,omitempty"` @@ -1194,36 +469,11 @@ type TaxRecord2 struct { AddtlInf *Max140Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 AddtlInf,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxRecord2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) - e.EncodeElement(v.Ctgy, xml.StartElement{Name: xml.Name{Local: "ar:Ctgy"}}) - e.EncodeElement(v.CtgyDtls, xml.StartElement{Name: xml.Name{Local: "ar:CtgyDtls"}}) - e.EncodeElement(v.DbtrSts, xml.StartElement{Name: xml.Name{Local: "ar:DbtrSts"}}) - e.EncodeElement(v.CertId, xml.StartElement{Name: xml.Name{Local: "ar:CertId"}}) - e.EncodeElement(v.FrmsCd, xml.StartElement{Name: xml.Name{Local: "ar:FrmsCd"}}) - e.EncodeElement(v.Prd, xml.StartElement{Name: xml.Name{Local: "ar:Prd"}}) - e.EncodeElement(v.TaxAmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxAmt"}}) - e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "ar:AddtlInf"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TaxRecordDetails2 struct { Prd *TaxPeriod2 `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Prd,omitempty"` Amt ActiveOrHistoricCurrencyAndAmount `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 Amt"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TaxRecordDetails2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Prd, xml.StartElement{Name: xml.Name{Local: "ar:Prd"}}) - e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - type TransactionReferences5 struct { PmtInfId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 PmtInfId,omitempty"` InstrId *Max35Text `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 InstrId,omitempty"` @@ -1232,26 +482,10 @@ type TransactionReferences5 struct { UETR *UUIDv4Identifier `xml:"urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 UETR,omitempty"` } -// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix -func (v TransactionReferences5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.PmtInfId, xml.StartElement{Name: xml.Name{Local: "ar:PmtInfId"}}) - e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ar:InstrId"}}) - e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ar:EndToEndId"}}) - e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ar:TxId"}}) - e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ar:UETR"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil -} - // XSD SimpleType declarations type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount -func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() -} - type ActiveOrHistoricCurrencyCode string const ActiveOrHistoricCurrencyCodeUsd ActiveOrHistoricCurrencyCode = "USD" diff --git a/gen/remt_001_001_04/write.go b/gen/remt_001_001_04/write.go new file mode 100644 index 0000000..a4be4d9 --- /dev/null +++ b/gen/remt_001_001_04/write.go @@ -0,0 +1,775 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +// Models for urn:iso:std:iso:20022:tech:xsd:remt.001.001.04 with prefix 'ar' +package remt_001_001_04 + +import ( + "encoding/xml" + + "github.com/moov-io/rtp20022/pkg/rtp" +) + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AccountIdentification4Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v AmountType3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.InstdAmt, xml.StartElement{Name: xml.Name{Local: "ar:InstdAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ar:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v BranchAndFinancialInstitutionIdentification6TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FinInstnId, xml.StartElement{Name: xml.Name{Local: "ar:FinInstnId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CashAccount38) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ar:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ClearingSystemMemberIdentification2TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MmbId, xml.StartElement{Name: xml.Name{Local: "ar:MmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Contact4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.NmPrfx, xml.StartElement{Name: xml.Name{Local: "ar:NmPrfx"}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) + e.EncodeElement(v.PhneNb, xml.StartElement{Name: xml.Name{Local: "ar:PhneNb"}}) + e.EncodeElement(v.MobNb, xml.StartElement{Name: xml.Name{Local: "ar:MobNb"}}) + e.EncodeElement(v.FaxNb, xml.StartElement{Name: xml.Name{Local: "ar:FaxNb"}}) + e.EncodeElement(v.EmailAdr, xml.StartElement{Name: xml.Name{Local: "ar:EmailAdr"}}) + e.EncodeElement(v.EmailPurp, xml.StartElement{Name: xml.Name{Local: "ar:EmailPurp"}}) + e.EncodeElement(v.JobTitl, xml.StartElement{Name: xml.Name{Local: "ar:JobTitl"}}) + e.EncodeElement(v.Rspnsblty, xml.StartElement{Name: xml.Name{Local: "ar:Rspnsblty"}}) + e.EncodeElement(v.Dept, xml.StartElement{Name: xml.Name{Local: "ar:Dept"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) + e.EncodeElement(v.PrefrdMtd, xml.StartElement{Name: xml.Name{Local: "ar:PrefrdMtd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditorReferenceInformation2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) + e.EncodeElement(v.Ref, xml.StartElement{Name: xml.Name{Local: "ar:Ref"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditorReferenceType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v CreditorReferenceType2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ar:CdOrPrtry"}}) + e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndDateTime2Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "ar:Dt"}}) + e.EncodeElement(v.DtTm, xml.StartElement{Name: xml.Name{Local: "ar:DtTm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DateAndPlaceOfBirth1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.BirthDt, xml.StartElement{Name: xml.Name{Local: "ar:BirthDt"}}) + e.EncodeElement(v.CityOfBirth, xml.StartElement{Name: xml.Name{Local: "ar:CityOfBirth"}}) + e.EncodeElement(v.CtryOfBirth, xml.StartElement{Name: xml.Name{Local: "ar:CtryOfBirth"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DatePeriod2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.FrDt, xml.StartElement{Name: xml.Name{Local: "ar:FrDt"}}) + e.EncodeElement(v.ToDt, xml.StartElement{Name: xml.Name{Local: "ar:ToDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DiscountAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentAdjustment1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) + e.EncodeElement(v.CdtDbtInd, xml.StartElement{Name: xml.Name{Local: "ar:CdtDbtInd"}}) + e.EncodeElement(v.Rsn, xml.StartElement{Name: xml.Name{Local: "ar:Rsn"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "ar:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentLineIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) + e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "ar:Nb"}}) + e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "ar:RltdDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentLineInformation1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeElement(v.Desc, xml.StartElement{Name: xml.Name{Local: "ar:Desc"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentLineType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ar:CdOrPrtry"}}) + e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentLineType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v DocumentTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RmtAdvc, xml.StartElement{Name: xml.Name{Local: "ar:RmtAdvc"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ar:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v FinancialInstitutionIdentification18TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ClrSysMmbId, xml.StartElement{Name: xml.Name{Local: "ar:ClrSysMmbId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Garnishment3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) + e.EncodeElement(v.Grnshee, xml.StartElement{Name: xml.Name{Local: "ar:Grnshee"}}) + e.EncodeElement(v.GrnshmtAdmstr, xml.StartElement{Name: xml.Name{Local: "ar:GrnshmtAdmstr"}}) + e.EncodeElement(v.RefNb, xml.StartElement{Name: xml.Name{Local: "ar:RefNb"}}) + e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "ar:Dt"}}) + e.EncodeElement(v.RmtdAmt, xml.StartElement{Name: xml.Name{Local: "ar:RmtdAmt"}}) + e.EncodeElement(v.FmlyMdclInsrncInd, xml.StartElement{Name: xml.Name{Local: "ar:FmlyMdclInsrncInd"}}) + e.EncodeElement(v.MplyeeTermntnInd, xml.StartElement{Name: xml.Name{Local: "ar:MplyeeTermntnInd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Garnishment3TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) + e.EncodeElement(v.Grnshee, xml.StartElement{Name: xml.Name{Local: "ar:Grnshee"}}) + e.EncodeElement(v.GrnshmtAdmstr, xml.StartElement{Name: xml.Name{Local: "ar:GrnshmtAdmstr"}}) + e.EncodeElement(v.RefNb, xml.StartElement{Name: xml.Name{Local: "ar:RefNb"}}) + e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "ar:Dt"}}) + e.EncodeElement(v.RmtdAmt, xml.StartElement{Name: xml.Name{Local: "ar:RmtdAmt"}}) + e.EncodeElement(v.FmlyMdclInsrncInd, xml.StartElement{Name: xml.Name{Local: "ar:FmlyMdclInsrncInd"}}) + e.EncodeElement(v.MplyeeTermntnInd, xml.StartElement{Name: xml.Name{Local: "ar:MplyeeTermntnInd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GarnishmentType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ar:CdOrPrtry"}}) + e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GarnishmentType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericAccountIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ar:SchmeNm"}}) + e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericOrganisationIdentification1TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ar:SchmeNm"}}) + e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GenericPersonIdentification1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeElement(v.SchmeNm, xml.StartElement{Name: xml.Name{Local: "ar:SchmeNm"}}) + e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader79) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ar:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ar:CreDtTm"}}) + e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "ar:InitgPty"}}) + e.EncodeElement(v.MsgRcpt, xml.StartElement{Name: xml.Name{Local: "ar:MsgRcpt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v GroupHeader79TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.MsgId, xml.StartElement{Name: xml.Name{Local: "ar:MsgId"}}) + e.EncodeElement(v.CreDtTm, xml.StartElement{Name: xml.Name{Local: "ar:CreDtTm"}}) + e.EncodeElement(v.InitgPty, xml.StartElement{Name: xml.Name{Local: "ar:InitgPty"}}) + e.EncodeElement(v.MsgRcpt, xml.StartElement{Name: xml.Name{Local: "ar:MsgRcpt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AnyBIC, xml.StartElement{Name: xml.Name{Local: "ar:AnyBIC"}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ar:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentification29TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.AnyBIC, xml.StartElement{Name: xml.Name{Local: "ar:AnyBIC"}}) + e.EncodeElement(v.LEI, xml.StartElement{Name: xml.Name{Local: "ar:LEI"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OrganisationIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalPaymentInformation8) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Refs, xml.StartElement{Name: xml.Name{Local: "ar:Refs"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "ar:ReqdExctnDt"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ar:Dbtr"}}) + e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "ar:DbtrAcct"}}) + e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "ar:DbtrAgt"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ar:Cdtr"}}) + e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "ar:CdtrAcct"}}) + e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "ar:CdtrAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OriginalPaymentInformation8TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Refs, xml.StartElement{Name: xml.Name{Local: "ar:Refs"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) + e.EncodeElement(v.ReqdExctnDt, xml.StartElement{Name: xml.Name{Local: "ar:ReqdExctnDt"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ar:Dbtr"}}) + e.EncodeElement(v.DbtrAcct, xml.StartElement{Name: xml.Name{Local: "ar:DbtrAcct"}}) + e.EncodeElement(v.DbtrAgt, xml.StartElement{Name: xml.Name{Local: "ar:DbtrAgt"}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ar:Cdtr"}}) + e.EncodeElement(v.CdtrAcct, xml.StartElement{Name: xml.Name{Local: "ar:CdtrAcct"}}) + e.EncodeElement(v.CdtrAgt, xml.StartElement{Name: xml.Name{Local: "ar:CdtrAgt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v OtherContact1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.ChanlTp, xml.StartElement{Name: xml.Name{Local: "ar:ChanlTp"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ar:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ar:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ar:OrgId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v Party38ChoiceTCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.OrgId, xml.StartElement{Name: xml.Name{Local: "ar:OrgId"}}) + e.EncodeElement(v.PrvtId, xml.StartElement{Name: xml.Name{Local: "ar:PrvtId"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ar:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeElement(v.CtryOfRes, xml.StartElement{Name: xml.Name{Local: "ar:CtryOfRes"}}) + e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "ar:CtctDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) + e.EncodeElement(v.PstlAdr, xml.StartElement{Name: xml.Name{Local: "ar:PstlAdr"}}) + e.EncodeElement(v.Id, xml.StartElement{Name: xml.Name{Local: "ar:Id"}}) + e.EncodeElement(v.CtryOfRes, xml.StartElement{Name: xml.Name{Local: "ar:CtryOfRes"}}) + e.EncodeElement(v.CtctDtls, xml.StartElement{Name: xml.Name{Local: "ar:CtctDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PartyIdentification135TCH3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentification13) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DtAndPlcOfBirth, xml.StartElement{Name: xml.Name{Local: "ar:DtAndPlcOfBirth"}}) + e.EncodeElement(v.Othr, xml.StartElement{Name: xml.Name{Local: "ar:Othr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PersonIdentificationSchemeName1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v PostalAddress24) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.StrtNm, xml.StartElement{Name: xml.Name{Local: "ar:StrtNm"}}) + e.EncodeElement(v.BldgNb, xml.StartElement{Name: xml.Name{Local: "ar:BldgNb"}}) + e.EncodeElement(v.PstCd, xml.StartElement{Name: xml.Name{Local: "ar:PstCd"}}) + e.EncodeElement(v.TwnNm, xml.StartElement{Name: xml.Name{Local: "ar:TwnNm"}}) + e.EncodeElement(v.CtrySubDvsn, xml.StartElement{Name: xml.Name{Local: "ar:CtrySubDvsn"}}) + e.EncodeElement(v.Ctry, xml.StartElement{Name: xml.Name{Local: "ar:Ctry"}}) + e.EncodeElement(v.AdrLine, xml.StartElement{Name: xml.Name{Local: "ar:AdrLine"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentInformation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) + e.EncodeElement(v.Nb, xml.StartElement{Name: xml.Name{Local: "ar:Nb"}}) + e.EncodeElement(v.RltdDt, xml.StartElement{Name: xml.Name{Local: "ar:RltdDt"}}) + e.EncodeElement(v.LineDtls, xml.StartElement{Name: xml.Name{Local: "ar:LineDtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType3Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v ReferredDocumentType4) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.CdOrPrtry, xml.StartElement{Name: xml.Name{Local: "ar:CdOrPrtry"}}) + e.EncodeElement(v.Issr, xml.StartElement{Name: xml.Name{Local: "ar:Issr"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAdviceV04) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ar:GrpHdr"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "ar:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAdviceV04TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.GrpHdr, xml.StartElement{Name: xml.Name{Local: "ar:GrpHdr"}}) + e.EncodeElement(v.RmtInf, xml.StartElement{Name: xml.Name{Local: "ar:RmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DuePyblAmt, xml.StartElement{Name: xml.Name{Local: "ar:DuePyblAmt"}}) + e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "ar:DscntApldAmt"}}) + e.EncodeElement(v.CdtNoteAmt, xml.StartElement{Name: xml.Name{Local: "ar:CdtNoteAmt"}}) + e.EncodeElement(v.TaxAmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxAmt"}}) + e.EncodeElement(v.AdjstmntAmtAndRsn, xml.StartElement{Name: xml.Name{Local: "ar:AdjstmntAmtAndRsn"}}) + e.EncodeElement(v.RmtdAmt, xml.StartElement{Name: xml.Name{Local: "ar:RmtdAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceAmount3) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.DuePyblAmt, xml.StartElement{Name: xml.Name{Local: "ar:DuePyblAmt"}}) + e.EncodeElement(v.DscntApldAmt, xml.StartElement{Name: xml.Name{Local: "ar:DscntApldAmt"}}) + e.EncodeElement(v.CdtNoteAmt, xml.StartElement{Name: xml.Name{Local: "ar:CdtNoteAmt"}}) + e.EncodeElement(v.TaxAmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxAmt"}}) + e.EncodeElement(v.AdjstmntAmtAndRsn, xml.StartElement{Name: xml.Name{Local: "ar:AdjstmntAmtAndRsn"}}) + e.EncodeElement(v.RmtdAmt, xml.StartElement{Name: xml.Name{Local: "ar:RmtdAmt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation19) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "ar:RmtId"}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ar:Ustrd"}}) + e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "ar:Strd"}}) + e.EncodeElement(v.OrgnlPmtInf, xml.StartElement{Name: xml.Name{Local: "ar:OrgnlPmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v RemittanceInformation19TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RmtId, xml.StartElement{Name: xml.Name{Local: "ar:RmtId"}}) + e.EncodeElement(v.Ustrd, xml.StartElement{Name: xml.Name{Local: "ar:Ustrd"}}) + e.EncodeElement(v.Strd, xml.StartElement{Name: xml.Name{Local: "ar:Strd"}}) + e.EncodeElement(v.OrgnlPmtInf, xml.StartElement{Name: xml.Name{Local: "ar:OrgnlPmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StructuredRemittanceInformation16) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "ar:RfrdDocInf"}}) + e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "ar:RfrdDocAmt"}}) + e.EncodeElement(v.CdtrRefInf, xml.StartElement{Name: xml.Name{Local: "ar:CdtrRefInf"}}) + e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "ar:Invcr"}}) + e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "ar:Invcee"}}) + e.EncodeElement(v.TaxRmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxRmt"}}) + e.EncodeElement(v.GrnshmtRmt, xml.StartElement{Name: xml.Name{Local: "ar:GrnshmtRmt"}}) + e.EncodeElement(v.AddtlRmtInf, xml.StartElement{Name: xml.Name{Local: "ar:AddtlRmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v StructuredRemittanceInformation16TCH) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.RfrdDocInf, xml.StartElement{Name: xml.Name{Local: "ar:RfrdDocInf"}}) + e.EncodeElement(v.RfrdDocAmt, xml.StartElement{Name: xml.Name{Local: "ar:RfrdDocAmt"}}) + e.EncodeElement(v.CdtrRefInf, xml.StartElement{Name: xml.Name{Local: "ar:CdtrRefInf"}}) + e.EncodeElement(v.Invcr, xml.StartElement{Name: xml.Name{Local: "ar:Invcr"}}) + e.EncodeElement(v.Invcee, xml.StartElement{Name: xml.Name{Local: "ar:Invcee"}}) + e.EncodeElement(v.TaxRmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxRmt"}}) + e.EncodeElement(v.GrnshmtRmt, xml.StartElement{Name: xml.Name{Local: "ar:GrnshmtRmt"}}) + e.EncodeElement(v.AddtlRmtInf, xml.StartElement{Name: xml.Name{Local: "ar:AddtlRmtInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxAmount2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Rate, xml.StartElement{Name: xml.Name{Local: "ar:Rate"}}) + e.EncodeElement(v.TaxblBaseAmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxblBaseAmt"}}) + e.EncodeElement(v.TtlAmt, xml.StartElement{Name: xml.Name{Local: "ar:TtlAmt"}}) + e.EncodeElement(v.Dtls, xml.StartElement{Name: xml.Name{Local: "ar:Dtls"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxAmountAndType1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxAmountType1Choice) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cd, xml.StartElement{Name: xml.Name{Local: "ar:Cd"}}) + e.EncodeElement(v.Prtry, xml.StartElement{Name: xml.Name{Local: "ar:Prtry"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxAuthorisation1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Titl, xml.StartElement{Name: xml.Name{Local: "ar:Titl"}}) + e.EncodeElement(v.Nm, xml.StartElement{Name: xml.Name{Local: "ar:Nm"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxInformation7) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Cdtr, xml.StartElement{Name: xml.Name{Local: "ar:Cdtr"}}) + e.EncodeElement(v.Dbtr, xml.StartElement{Name: xml.Name{Local: "ar:Dbtr"}}) + e.EncodeElement(v.UltmtDbtr, xml.StartElement{Name: xml.Name{Local: "ar:UltmtDbtr"}}) + e.EncodeElement(v.AdmstnZone, xml.StartElement{Name: xml.Name{Local: "ar:AdmstnZone"}}) + e.EncodeElement(v.RefNb, xml.StartElement{Name: xml.Name{Local: "ar:RefNb"}}) + e.EncodeElement(v.Mtd, xml.StartElement{Name: xml.Name{Local: "ar:Mtd"}}) + e.EncodeElement(v.TtlTaxblBaseAmt, xml.StartElement{Name: xml.Name{Local: "ar:TtlTaxblBaseAmt"}}) + e.EncodeElement(v.TtlTaxAmt, xml.StartElement{Name: xml.Name{Local: "ar:TtlTaxAmt"}}) + e.EncodeElement(v.Dt, xml.StartElement{Name: xml.Name{Local: "ar:Dt"}}) + e.EncodeElement(v.SeqNb, xml.StartElement{Name: xml.Name{Local: "ar:SeqNb"}}) + e.EncodeElement(v.Rcrd, xml.StartElement{Name: xml.Name{Local: "ar:Rcrd"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxParty1) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.TaxId, xml.StartElement{Name: xml.Name{Local: "ar:TaxId"}}) + e.EncodeElement(v.RegnId, xml.StartElement{Name: xml.Name{Local: "ar:RegnId"}}) + e.EncodeElement(v.TaxTp, xml.StartElement{Name: xml.Name{Local: "ar:TaxTp"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxParty2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.TaxId, xml.StartElement{Name: xml.Name{Local: "ar:TaxId"}}) + e.EncodeElement(v.RegnId, xml.StartElement{Name: xml.Name{Local: "ar:RegnId"}}) + e.EncodeElement(v.TaxTp, xml.StartElement{Name: xml.Name{Local: "ar:TaxTp"}}) + e.EncodeElement(v.Authstn, xml.StartElement{Name: xml.Name{Local: "ar:Authstn"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxPeriod2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Yr, xml.StartElement{Name: xml.Name{Local: "ar:Yr"}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) + e.EncodeElement(v.FrToDt, xml.StartElement{Name: xml.Name{Local: "ar:FrToDt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxRecord2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Tp, xml.StartElement{Name: xml.Name{Local: "ar:Tp"}}) + e.EncodeElement(v.Ctgy, xml.StartElement{Name: xml.Name{Local: "ar:Ctgy"}}) + e.EncodeElement(v.CtgyDtls, xml.StartElement{Name: xml.Name{Local: "ar:CtgyDtls"}}) + e.EncodeElement(v.DbtrSts, xml.StartElement{Name: xml.Name{Local: "ar:DbtrSts"}}) + e.EncodeElement(v.CertId, xml.StartElement{Name: xml.Name{Local: "ar:CertId"}}) + e.EncodeElement(v.FrmsCd, xml.StartElement{Name: xml.Name{Local: "ar:FrmsCd"}}) + e.EncodeElement(v.Prd, xml.StartElement{Name: xml.Name{Local: "ar:Prd"}}) + e.EncodeElement(v.TaxAmt, xml.StartElement{Name: xml.Name{Local: "ar:TaxAmt"}}) + e.EncodeElement(v.AddtlInf, xml.StartElement{Name: xml.Name{Local: "ar:AddtlInf"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TaxRecordDetails2) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Prd, xml.StartElement{Name: xml.Name{Local: "ar:Prd"}}) + e.EncodeElement(v.Amt, xml.StartElement{Name: xml.Name{Local: "ar:Amt"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +// MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix +func (v TransactionReferences5) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.PmtInfId, xml.StartElement{Name: xml.Name{Local: "ar:PmtInfId"}}) + e.EncodeElement(v.InstrId, xml.StartElement{Name: xml.Name{Local: "ar:InstrId"}}) + e.EncodeElement(v.EndToEndId, xml.StartElement{Name: xml.Name{Local: "ar:EndToEndId"}}) + e.EncodeElement(v.TxId, xml.StartElement{Name: xml.Name{Local: "ar:TxId"}}) + e.EncodeElement(v.UETR, xml.StartElement{Name: xml.Name{Local: "ar:UETR"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil +} + +func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() +} diff --git a/internal/templates/rtp20022/model.tgo b/internal/templates/rtp20022/model.tgo index 881f3d4..edd1fae 100644 --- a/internal/templates/rtp20022/model.tgo +++ b/internal/templates/rtp20022/model.tgo @@ -35,31 +35,6 @@ import ( {{- end }} } - {{ $elemLen := len .Elements }}{{ if and (gt $elemLen 0) (ne $nsPrefix "") }} - // MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix - func (v {{ .GoName }}) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - {{- if .Attributes }} - var attr = []xml.Attr{} - {{- range .Attributes }} - {{ if eq .Use "optional" }}if v.{{ .GoName }} != nil { {{ end }} - attr = append(attr, xml.Attr{Name: xml.Name{Local: "{{ .XmlName }}"}, Value: {{ if eq .Use "optional" }}*{{ end }}v.{{ .GoName }}},) - {{ if eq .Use "optional" }} } {{ end }} - {{- end }} - e.EncodeToken(xml.StartElement{ - Name: xml.Name{Local: start.Name.Local}, - Attr: attr, - }) - {{- else }} - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - {{- end }} - {{- range .Elements }} - e.EncodeElement(v.{{ .GoFieldName }}, xml.StartElement{Name: xml.Name{Local: "{{ $nsPrefix }}:{{ .Name }}"}}) - {{- end }} - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil - } - {{ end }} - {{ if eq .GoName "Message" }} var NamespacePrefixMap = map[string]string{ {{- range $allXmlns }} @@ -69,19 +44,6 @@ import ( {{- end }} } - {{- range $allXmlns }} - {{- if and (ne .Prefix "xs") (ne .Prefix "gefeg") (ne .Prefix "head") }} - {{- $l := len .Uri }} - {{- $l1 := len (slice (printf "%*s" $l "") 15) }} - {{- $l2 := len (slice (printf "%*s" $l "") 11) }} - {{- $l3 := len (slice (printf "%*s" $l "") 10) }} - {{- $l4 := len (slice (printf "%*s" $l "") 7) }} - func New{{ title (slice .Uri $l1 $l2) }}{{ slice .Uri $l3 $l4 }}Message() *Message { - return newMessageForNS("{{ .Uri }}") - } - {{ end }} - {{- end }} - // UnmarshalXML is a custom unmarshaller that allows us to capture the xmlns attributes func (v *{{ .GoName }}) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { for _, attr := range start.Attr { @@ -159,31 +121,6 @@ import ( {{- end }} {{- end }} } - - {{ $elemLen := len .Elements }}{{ if and (gt $elemLen 0) (ne $nsPrefix "") }} - // MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix - func (v {{ .GoName }}) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - {{- if .Attributes }} - var attr = []xml.Attr{} - {{- range .Attributes }} - {{ if eq .Use "optional" }}if v.{{ .GoName }} != nil { {{ end }} - attr = append(attr, xml.Attr{Name: xml.Name{Local: "{{ .XmlName }}"}, Value: {{ if eq .Use "optional" }}*{{ end }}v.{{ .GoName }}},) - {{ if eq .Use "optional" }} } {{ end }} - {{- end }} - e.EncodeToken(xml.StartElement{ - Name: xml.Name{Local: start.Name.Local}, - Attr: attr, - }) - {{- else }} - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - {{- end }} - {{- range .Elements }} - e.EncodeElement(v.{{ .GoFieldName }}, xml.StartElement{Name: xml.Name{Local: "{{ $nsPrefix }}:{{ .Name }}"}}) - {{- end }} - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil - } - {{ end }} {{ end }} {{ end }} @@ -212,19 +149,11 @@ import ( {{ define "ActiveCurrencyAndAmountSimpleType" }} type ActiveCurrencyAndAmountSimpleType rtp.Amount - - func (a ActiveCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() - } {{ end }} {{ define "ActiveOrHistoricCurrencyAndAmountSimpleType" }} type ActiveOrHistoricCurrencyAndAmountSimpleType rtp.Amount - - func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { - return rtp.Amount(a).MarshalText() - } {{ end }} {{ define "SignatureEnvelope" }} @@ -232,12 +161,4 @@ import ( type Sgntr struct { Signature *xmldsig.Signature `xml:"http://www.w3.org/2000/09/xmldsig# Signature"` } - - // MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix - func (v Sgntr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) - e.EncodeElement(v.Signature, xml.StartElement{Name: xml.Name{Local: "ds:Signature"}}) - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) - return nil - } {{ end }} diff --git a/internal/templates/rtp20022/write.tgo b/internal/templates/rtp20022/write.tgo new file mode 100644 index 0000000..e9820bf --- /dev/null +++ b/internal/templates/rtp20022/write.tgo @@ -0,0 +1,126 @@ +// Code generated by GoComply XSD2Go for Moov; DO NOT EDIT. +{{- $targetNS := .TargetNamespace }} +{{- $nsPrefix := .Xmlns.PrefixByUri .TargetNamespace }} +{{- $allXmlns := .Xmlns }} +// Models for {{ $targetNS }}{{ if ne $nsPrefix "" }} with prefix '{{ $nsPrefix }}'{{ end }} +package {{ .GoPackageName }} + +import ( + "fmt" + "github.com/moov-io/base" + "github.com/moov-io/rtp20022/gen/xmldsig" + "github.com/moov-io/rtp20022/pkg/rtp" + {{- range .GoImportsNeeded }} + "{{ . }}" + {{- end }} +) + +{{ range .ExportableElements }} + {{ $elemLen := len .Elements }}{{ if and (gt $elemLen 0) (ne $nsPrefix "") }} + // MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix + func (v {{ .GoName }}) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + {{- if .Attributes }} + var attr = []xml.Attr{} + {{- range .Attributes }} + {{ if eq .Use "optional" }}if v.{{ .GoName }} != nil { {{ end }} + attr = append(attr, xml.Attr{Name: xml.Name{Local: "{{ .XmlName }}"}, Value: {{ if eq .Use "optional" }}*{{ end }}v.{{ .GoName }}},) + {{ if eq .Use "optional" }} } {{ end }} + {{- end }} + e.EncodeToken(xml.StartElement{ + Name: xml.Name{Local: start.Name.Local}, + Attr: attr, + }) + {{- else }} + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + {{- end }} + {{- range .Elements }} + e.EncodeElement(v.{{ .GoFieldName }}, xml.StartElement{Name: xml.Name{Local: "{{ $nsPrefix }}:{{ .Name }}"}}) + {{- end }} + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil + } + {{ end }} + + {{ if eq .GoName "Message" }} + {{- range $allXmlns }} + {{- if and (ne .Prefix "xs") (ne .Prefix "gefeg") (ne .Prefix "head") }} + {{- $l := len .Uri }} + {{- $l1 := len (slice (printf "%*s" $l "") 15) }} + {{- $l2 := len (slice (printf "%*s" $l "") 11) }} + {{- $l3 := len (slice (printf "%*s" $l "") 10) }} + {{- $l4 := len (slice (printf "%*s" $l "") 7) }} + func New{{ title (slice .Uri $l1 $l2) }}{{ slice .Uri $l3 $l4 }}Message() *Message { + return newMessageForNS("{{ .Uri }}") + } + {{ end }} + {{- end }} + {{ end }} +{{ end }} + +{{ range .ExportableComplexTypes }} + {{ if eq .GoName "SignatureEnvelope" }} + {{ template "SignatureEnvelope" . }} + {{ else if eq .GoName "HdrAndData" }} + {{ else if eq .GoName "HdrAndDataTCH" }} + {{ else if eq .GoName "Document" }} + {{ else }} + {{ $elemLen := len .Elements }}{{ if and (gt $elemLen 0) (ne $nsPrefix "") }} + // MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix + func (v {{ .GoName }}) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + {{- if .Attributes }} + var attr = []xml.Attr{} + {{- range .Attributes }} + {{ if eq .Use "optional" }}if v.{{ .GoName }} != nil { {{ end }} + attr = append(attr, xml.Attr{Name: xml.Name{Local: "{{ .XmlName }}"}, Value: {{ if eq .Use "optional" }}*{{ end }}v.{{ .GoName }}},) + {{ if eq .Use "optional" }} } {{ end }} + {{- end }} + e.EncodeToken(xml.StartElement{ + Name: xml.Name{Local: start.Name.Local}, + Attr: attr, + }) + {{- else }} + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + {{- end }} + {{- range .Elements }} + e.EncodeElement(v.{{ .GoFieldName }}, xml.StartElement{Name: xml.Name{Local: "{{ $nsPrefix }}:{{ .Name }}"}}) + {{- end }} + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil + } + {{ end }} + {{ end }} +{{ end }} + +{{ range .ExportableSimpleTypes }} + {{ if eq .GoName "ActiveCurrencyAndAmountSimpleType" }} + {{ template "ActiveCurrencyAndAmountSimpleType" . }} + {{ else if eq .GoName "ActiveOrHistoricCurrencyAndAmountSimpleType" }} + {{ template "ActiveOrHistoricCurrencyAndAmountSimpleType" . }} + {{ else if eq .GoName "ISODate" }} + {{ else if eq .GoName "ISODateTime" }} + {{ else if eq .GoName "ISONormalisedDateTime" }} + {{ else if eq .GoName "Max20000Text" }} + {{ end }} +{{ end }} + +{{ define "ActiveCurrencyAndAmountSimpleType" }} + func (a ActiveCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() + } +{{ end }} + +{{ define "ActiveOrHistoricCurrencyAndAmountSimpleType" }} + func (a ActiveOrHistoricCurrencyAndAmountSimpleType) MarshalText() ([]byte, error) { + return rtp.Amount(a).MarshalText() + } +{{ end }} + +{{ define "SignatureEnvelope" }} + // MarshalXML is a custom marshaller that allows us to manipulate the XML tag in order to use the proper namespace prefix + func (v Sgntr) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + e.EncodeToken(xml.StartElement{Name: xml.Name{Local: start.Name.Local}}) + e.EncodeElement(v.Signature, xml.StartElement{Name: xml.Name{Local: "ds:Signature"}}) + e.EncodeToken(xml.EndElement{Name: xml.Name{Local: start.Name.Local}}) + return nil + } +{{ end }} diff --git a/scripts/generate.sh b/scripts/generate.sh index 6a5d3f5..816c477 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -13,6 +13,7 @@ moovio_xsd2go convert \ github.com/moov-io/rtp20022 \ gen \ --template-name=internal/templates/rtp20022/model.tgo \ + --template-name=internal/templates/rtp20022/write.tgo \ --template-name=internal/templates/rtp20022/validate.tgo \ --xmlns-override="urn:iso:std:ma:20022:tech:xsd:admn.007.001.01=admn_007_001_01" \ --xmlns-override="urn:iso:std:ma:20022:tech:xsd:admn.008.001.01=admn_008_001_01" \ From ba105f2070192b5119aacd62feb79e4aebbfd68b Mon Sep 17 00:00:00 2001 From: Jason Bornstein <131717043+jasonbornsteinMOOV@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:44:21 -0400 Subject: [PATCH 3/8] Separate log functions into their own file --- gen/admi_002_001_01/log.go | 11 +++++++++++ gen/admi_002_001_01/read.go | 10 ---------- gen/admn_002_001_01/{read.go => log.go} | 0 gen/admn_004_001_01/{read.go => log.go} | 0 gen/admn_005_001_01/{read.go => log.go} | 0 gen/head_001_001_01/log.go | 15 +++++++++++++++ gen/head_001_001_01/read.go | 16 ---------------- gen/pacs_002_001_10/log.go | 12 ++++++++++++ gen/pacs_002_001_10/read.go | 10 ---------- 9 files changed, 38 insertions(+), 36 deletions(-) create mode 100644 gen/admi_002_001_01/log.go rename gen/admn_002_001_01/{read.go => log.go} (100%) rename gen/admn_004_001_01/{read.go => log.go} (100%) rename gen/admn_005_001_01/{read.go => log.go} (100%) create mode 100644 gen/head_001_001_01/log.go create mode 100644 gen/pacs_002_001_10/log.go diff --git a/gen/admi_002_001_01/log.go b/gen/admi_002_001_01/log.go new file mode 100644 index 0000000..49ec4da --- /dev/null +++ b/gen/admi_002_001_01/log.go @@ -0,0 +1,11 @@ +package admi_002_001_01 + +import "github.com/moov-io/base/log" + +func (d DocumentTCH) Context() map[string]log.Valuer { + return log.Fields{ + "original_identification": log.String(d.Admi00200101.Reference()), + "reject_reason": log.String(d.Admi00200101.Reason()), + "additional_data": log.String(d.Admi00200101.AdditionalData()), + } +} diff --git a/gen/admi_002_001_01/read.go b/gen/admi_002_001_01/read.go index 7f0a0fd..4d710d1 100644 --- a/gen/admi_002_001_01/read.go +++ b/gen/admi_002_001_01/read.go @@ -1,15 +1,5 @@ package admi_002_001_01 -import "github.com/moov-io/base/log" - -func (d DocumentTCH) Context() map[string]log.Valuer { - return log.Fields{ - "original_identification": log.String(d.Admi00200101.Reference()), - "reject_reason": log.String(d.Admi00200101.Reason()), - "additional_data": log.String(d.Admi00200101.AdditionalData()), - } -} - func (r MessageRejectV01TCH) Reference() string { return string(r.RltdRef.Ref) } diff --git a/gen/admn_002_001_01/read.go b/gen/admn_002_001_01/log.go similarity index 100% rename from gen/admn_002_001_01/read.go rename to gen/admn_002_001_01/log.go diff --git a/gen/admn_004_001_01/read.go b/gen/admn_004_001_01/log.go similarity index 100% rename from gen/admn_004_001_01/read.go rename to gen/admn_004_001_01/log.go diff --git a/gen/admn_005_001_01/read.go b/gen/admn_005_001_01/log.go similarity index 100% rename from gen/admn_005_001_01/read.go rename to gen/admn_005_001_01/log.go diff --git a/gen/head_001_001_01/log.go b/gen/head_001_001_01/log.go new file mode 100644 index 0000000..c9d0f88 --- /dev/null +++ b/gen/head_001_001_01/log.go @@ -0,0 +1,15 @@ +package head_001_001_01 + +import "github.com/moov-io/base/log" + +func (r BusinessApplicationHeaderV01TCH) Context() map[string]log.Valuer { + var creDt, _ = r.CreDt.MarshalText() + return log.Fields{ + "from_institution_id": log.String(r.FromMemberID()), + "to_institution_id": log.String(r.ToMemberID()), + "business_message_id": log.String(string(r.BizMsgIdr)), + "message_definition_id": log.String(string(r.MsgDefIdr)), + "creation_date": log.String(string(creDt)), + "duplicate": log.String(r.CopyDuplicateCode()), + } +} diff --git a/gen/head_001_001_01/read.go b/gen/head_001_001_01/read.go index ae3bb5c..c3177e4 100644 --- a/gen/head_001_001_01/read.go +++ b/gen/head_001_001_01/read.go @@ -1,21 +1,5 @@ package head_001_001_01 -import ( - "github.com/moov-io/base/log" -) - -func (r BusinessApplicationHeaderV01TCH) Context() map[string]log.Valuer { - var creDt, _ = r.CreDt.MarshalText() - return log.Fields{ - "from_institution_id": log.String(r.FromMemberID()), - "to_institution_id": log.String(r.ToMemberID()), - "business_message_id": log.String(string(r.BizMsgIdr)), - "message_definition_id": log.String(string(r.MsgDefIdr)), - "creation_date": log.String(string(creDt)), - "duplicate": log.String(r.CopyDuplicateCode()), - } -} - func (r BusinessApplicationHeaderV01TCH) CopyDuplicateCode() string { if r.CpyDplct != nil { return string(*r.CpyDplct) diff --git a/gen/pacs_002_001_10/log.go b/gen/pacs_002_001_10/log.go new file mode 100644 index 0000000..b4d36af --- /dev/null +++ b/gen/pacs_002_001_10/log.go @@ -0,0 +1,12 @@ +package pacs_002_001_10 + +import "github.com/moov-io/base/log" + +func (d DocumentTCH) Context() map[string]log.Valuer { + return log.Fields{ + "original_message_identification": log.String(string(d.FIToFIPmtStsRpt.OrgnlGrpInfAndSts.OrgnlMsgId)), + "original_message_name": log.String(string(d.FIToFIPmtStsRpt.OrgnlGrpInfAndSts.OrgnlMsgNmId)), + "original_instruction_identification": log.String(d.OrgnlInstrId()), + "original_transaction_identification": log.String(d.OrgnlTxId()), + } +} diff --git a/gen/pacs_002_001_10/read.go b/gen/pacs_002_001_10/read.go index 8cc40ad..e86767c 100644 --- a/gen/pacs_002_001_10/read.go +++ b/gen/pacs_002_001_10/read.go @@ -2,18 +2,8 @@ package pacs_002_001_10 import ( "cloud.google.com/go/civil" - "github.com/moov-io/base/log" ) -func (d DocumentTCH) Context() map[string]log.Valuer { - return log.Fields{ - "original_message_identification": log.String(string(d.FIToFIPmtStsRpt.OrgnlGrpInfAndSts.OrgnlMsgId)), - "original_message_name": log.String(string(d.FIToFIPmtStsRpt.OrgnlGrpInfAndSts.OrgnlMsgNmId)), - "original_instruction_identification": log.String(d.OrgnlInstrId()), - "original_transaction_identification": log.String(d.OrgnlTxId()), - } -} - func (d DocumentTCH) MsgId() string { return string(d.FIToFIPmtStsRpt.GrpHdr.MsgId) } From c1bee75f06dfb271888eae21d137d4fabcfd5e81 Mon Sep 17 00:00:00 2001 From: Jason Bornstein <131717043+jasonbornsteinMOOV@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:45:44 -0400 Subject: [PATCH 4/8] Move static code into helper.go --- gen/admi_002_001_01/{read.go => helper.go} | 0 gen/admi_004_001_02/{read.go => helper.go} | 0 gen/head_001_001_01/helper.go | 21 +++++++++++++++++++++ gen/head_001_001_01/read.go | 22 ---------------------- gen/pacs_002_001_10/{read.go => helper.go} | 0 5 files changed, 21 insertions(+), 22 deletions(-) rename gen/admi_002_001_01/{read.go => helper.go} (100%) rename gen/admi_004_001_02/{read.go => helper.go} (100%) delete mode 100644 gen/head_001_001_01/read.go rename gen/pacs_002_001_10/{read.go => helper.go} (100%) diff --git a/gen/admi_002_001_01/read.go b/gen/admi_002_001_01/helper.go similarity index 100% rename from gen/admi_002_001_01/read.go rename to gen/admi_002_001_01/helper.go diff --git a/gen/admi_004_001_02/read.go b/gen/admi_004_001_02/helper.go similarity index 100% rename from gen/admi_004_001_02/read.go rename to gen/admi_004_001_02/helper.go diff --git a/gen/head_001_001_01/helper.go b/gen/head_001_001_01/helper.go index af61de5..3530a22 100644 --- a/gen/head_001_001_01/helper.go +++ b/gen/head_001_001_01/helper.go @@ -7,6 +7,27 @@ import ( "github.com/moov-io/rtp20022/pkg/rtp" ) +func (r BusinessApplicationHeaderV01TCH) CopyDuplicateCode() string { + if r.CpyDplct != nil { + return string(*r.CpyDplct) + } + return "" +} + +func (r BusinessApplicationHeaderV01TCH) FromMemberID() string { + if r.Fr.FIId != nil { + return string(r.Fr.FIId.FinInstnId.ClrSysMmbId.MmbId) + } + return "" +} + +func (r BusinessApplicationHeaderV01TCH) ToMemberID() string { + if r.To.FIId != nil { + return string(r.To.FIId.FinInstnId.ClrSysMmbId.MmbId) + } + return "" +} + func NewSignature() *Sgntr { sgntr := &Sgntr{ Signature: &xmldsig.Signature{ diff --git a/gen/head_001_001_01/read.go b/gen/head_001_001_01/read.go deleted file mode 100644 index c3177e4..0000000 --- a/gen/head_001_001_01/read.go +++ /dev/null @@ -1,22 +0,0 @@ -package head_001_001_01 - -func (r BusinessApplicationHeaderV01TCH) CopyDuplicateCode() string { - if r.CpyDplct != nil { - return string(*r.CpyDplct) - } - return "" -} - -func (r BusinessApplicationHeaderV01TCH) FromMemberID() string { - if r.Fr.FIId != nil { - return string(r.Fr.FIId.FinInstnId.ClrSysMmbId.MmbId) - } - return "" -} - -func (r BusinessApplicationHeaderV01TCH) ToMemberID() string { - if r.To.FIId != nil { - return string(r.To.FIId.FinInstnId.ClrSysMmbId.MmbId) - } - return "" -} diff --git a/gen/pacs_002_001_10/read.go b/gen/pacs_002_001_10/helper.go similarity index 100% rename from gen/pacs_002_001_10/read.go rename to gen/pacs_002_001_10/helper.go From c3e4be2503638af60432174d03349397d4a45826 Mon Sep 17 00:00:00 2001 From: Jason Bornstein <131717043+jasonbornsteinMOOV@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:48:52 -0400 Subject: [PATCH 5/8] Move static code out of templates --- gen/messages/helper.go | 21 +++++++++++++++++++++ gen/messages/model.go | 22 ---------------------- internal/templates/rtp20022/model.tgo | 21 --------------------- 3 files changed, 21 insertions(+), 43 deletions(-) diff --git a/gen/messages/helper.go b/gen/messages/helper.go index 6d2e5d0..abe837c 100644 --- a/gen/messages/helper.go +++ b/gen/messages/helper.go @@ -5,6 +5,27 @@ import ( "fmt" ) +// UnmarshalXML is a custom unmarshaller that allows us to capture the xmlns attributes +func (v *Message) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { + for _, attr := range start.Attr { + if (attr.Name.Space == "" && attr.Name.Local == "xmlns") || (attr.Name.Space == "xmlns") { + newAttr := xml.Attr{} + newAttr.Value = attr.Value + newAttr.Name = xml.Name{} + if attr.Name.Space == "" { + newAttr.Name.Local = attr.Name.Local + } else { + newAttr.Name.Local = fmt.Sprintf("%s:%s", attr.Name.Space, attr.Name.Local) + } + v.Xmlns = append(v.Xmlns, newAttr) + } + } + + // Go on with unmarshalling. + type vv Message + return d.DecodeElement((*vv)(v), &start) +} + func newMessage() *Message { message := &Message{} message.Xmlns = append(message.Xmlns, xml.Attr{ diff --git a/gen/messages/model.go b/gen/messages/model.go index 3432247..db574eb 100644 --- a/gen/messages/model.go +++ b/gen/messages/model.go @@ -4,7 +4,6 @@ package messages import ( "encoding/xml" - "fmt" "github.com/moov-io/rtp20022/gen/acmt_022_001_02" "github.com/moov-io/rtp20022/gen/admi_002_001_01" @@ -90,27 +89,6 @@ var NamespacePrefixMap = map[string]string{ "urn:iso:std:iso:20022:tech:xsd:remt.001.001.04": "ar", } -// UnmarshalXML is a custom unmarshaller that allows us to capture the xmlns attributes -func (v *Message) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - for _, attr := range start.Attr { - if (attr.Name.Space == "" && attr.Name.Local == "xmlns") || (attr.Name.Space == "xmlns") { - newAttr := xml.Attr{} - newAttr.Value = attr.Value - newAttr.Name = xml.Name{} - if attr.Name.Space == "" { - newAttr.Name.Local = attr.Name.Local - } else { - newAttr.Name.Local = fmt.Sprintf("%s:%s", attr.Name.Space, attr.Name.Local) - } - v.Xmlns = append(v.Xmlns, newAttr) - } - } - - // Go on with unmarshalling. - type vv Message - return d.DecodeElement((*vv)(v), &start) -} - func (v *Message) Body() interface{} { if v.CreditTransfer != nil { return v.CreditTransfer diff --git a/internal/templates/rtp20022/model.tgo b/internal/templates/rtp20022/model.tgo index edd1fae..2b24660 100644 --- a/internal/templates/rtp20022/model.tgo +++ b/internal/templates/rtp20022/model.tgo @@ -44,27 +44,6 @@ import ( {{- end }} } - // UnmarshalXML is a custom unmarshaller that allows us to capture the xmlns attributes - func (v *{{ .GoName }}) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { - for _, attr := range start.Attr { - if (attr.Name.Space == "" && attr.Name.Local == "xmlns") || (attr.Name.Space == "xmlns") { - newAttr := xml.Attr{} - newAttr.Value = attr.Value - newAttr.Name = xml.Name{} - if attr.Name.Space == "" { - newAttr.Name.Local = attr.Name.Local - } else { - newAttr.Name.Local = fmt.Sprintf("%s:%s", attr.Name.Space, attr.Name.Local) - } - v.Xmlns = append(v.Xmlns, newAttr) - } - } - - // Go on with unmarshalling. - type vv {{ .GoName }} - return d.DecodeElement((*vv)(v), &start) - } - func (v *Message) Body() interface{} { {{- range .Elements }} {{- if ne .GoFieldName "AppHdr" }} From ce41b6d1471ad026d1551bbf601507a397493db2 Mon Sep 17 00:00:00 2001 From: Jason Bornstein <131717043+jasonbornsteinMOOV@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:52:09 -0400 Subject: [PATCH 6/8] Remove unused imports from templates --- internal/templates/rtp20022/model.tgo | 1 - internal/templates/rtp20022/validate.tgo | 1 - internal/templates/rtp20022/write.tgo | 2 -- internal/templates/rtp20022/xmldsig.tgo | 2 -- 4 files changed, 6 deletions(-) diff --git a/internal/templates/rtp20022/model.tgo b/internal/templates/rtp20022/model.tgo index 2b24660..648abc9 100644 --- a/internal/templates/rtp20022/model.tgo +++ b/internal/templates/rtp20022/model.tgo @@ -7,7 +7,6 @@ package {{ .GoPackageName }} import ( "fmt" - "github.com/moov-io/base" "github.com/moov-io/rtp20022/gen/xmldsig" "github.com/moov-io/rtp20022/pkg/rtp" {{- range .GoImportsNeeded }} diff --git a/internal/templates/rtp20022/validate.tgo b/internal/templates/rtp20022/validate.tgo index 40f1371..1317b52 100644 --- a/internal/templates/rtp20022/validate.tgo +++ b/internal/templates/rtp20022/validate.tgo @@ -6,7 +6,6 @@ package {{ .GoPackageName }} import ( "fmt" "github.com/moov-io/base" - "github.com/moov-io/rtp20022/gen/xmldsig" "github.com/moov-io/rtp20022/pkg/rtp" {{- range .GoImportsNeeded }} "{{ . }}" diff --git a/internal/templates/rtp20022/write.tgo b/internal/templates/rtp20022/write.tgo index e9820bf..3a3d6cd 100644 --- a/internal/templates/rtp20022/write.tgo +++ b/internal/templates/rtp20022/write.tgo @@ -7,8 +7,6 @@ package {{ .GoPackageName }} import ( "fmt" - "github.com/moov-io/base" - "github.com/moov-io/rtp20022/gen/xmldsig" "github.com/moov-io/rtp20022/pkg/rtp" {{- range .GoImportsNeeded }} "{{ . }}" diff --git a/internal/templates/rtp20022/xmldsig.tgo b/internal/templates/rtp20022/xmldsig.tgo index 2731b90..0ce6cd8 100644 --- a/internal/templates/rtp20022/xmldsig.tgo +++ b/internal/templates/rtp20022/xmldsig.tgo @@ -6,8 +6,6 @@ package {{ .GoPackageName }} import ( "fmt" - "github.com/moov-io/rtp20022/gen/xmldsig" - "github.com/moov-io/rtp20022/pkg/rtp" {{- range .GoImportsNeeded }} "{{ . }}" {{- end }} From a9a84530ed54d3dd3f5848684d731cf4ae53df3f Mon Sep 17 00:00:00 2001 From: Jason Bornstein <131717043+jasonbornsteinMOOV@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:53:37 -0400 Subject: [PATCH 7/8] Update go.mod and go.sum --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index 08995da..8b5f9ef 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -cloud.google.com/go v0.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q= -cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o= cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= From 71be3264594bf9aeda7e92a121faf6a7ae7aa7a9 Mon Sep 17 00:00:00 2001 From: Jason Bornstein <131717043+jasonbornsteinMOOV@users.noreply.github.com> Date: Thu, 3 Aug 2023 15:24:18 -0400 Subject: [PATCH 8/8] point xsd2go to latest --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index abee74c..7e463f4 100644 --- a/makefile +++ b/makefile @@ -20,7 +20,7 @@ install: install-generator: go install golang.org/x/tools/cmd/goimports@latest - go install github.com/moov-io/xsd2go/cli/moovio_xsd2go@239-moovio-xsd2go + go install github.com/moov-io/xsd2go/cli/moovio_xsd2go@latest generate: ./scripts/generate.sh