#!/usr/bin/env python
# -*- coding: utf-8 -*-

###
# Copyright 2014 Code Master Oy (http://www.codemaster.fi/)
#
# This file is part of py-finvoice.
#
# py-finvoice is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# py-finvoice is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with py-finvoice. If not, see <http://www.gnu.org/licenses/>.
##

import sys
import getopt
import re as re_
import base64
import datetime as datetime_

etree_ = None
Verbose_import_ = False
(
    XMLParser_import_none, XMLParser_import_lxml,
    XMLParser_import_elementtree
) = range(3)
XMLParser_import_library = None
try:
    # lxml
    from lxml import etree as etree_
    XMLParser_import_library = XMLParser_import_lxml
    if Verbose_import_:
        print("running with lxml.etree")
except ImportError:
    try:
        # cElementTree from Python 2.5+
        import xml.etree.cElementTree as etree_
        XMLParser_import_library = XMLParser_import_elementtree
        if Verbose_import_:
            print("running with cElementTree on Python 2.5+")
    except ImportError:
        try:
            # ElementTree from Python 2.5+
            import xml.etree.ElementTree as etree_
            XMLParser_import_library = XMLParser_import_elementtree
            if Verbose_import_:
                print("running with ElementTree on Python 2.5+")
        except ImportError:
            try:
                # normal cElementTree install
                import cElementTree as etree_
                XMLParser_import_library = XMLParser_import_elementtree
                if Verbose_import_:
                    print("running with cElementTree")
            except ImportError:
                try:
                    # normal ElementTree install
                    import elementtree.ElementTree as etree_
                    XMLParser_import_library = XMLParser_import_elementtree
                    if Verbose_import_:
                        print("running with ElementTree")
                except ImportError:
                    raise ImportError(
                        "Failed to import ElementTree from any known place")


def parsexml_(*args, **kwargs):
    if (XMLParser_import_library == XMLParser_import_lxml and
            'parser' not in kwargs):
        # Use the lxml ElementTree compatible parser so that, e.g.,
        #   we ignore comments.
        kwargs['parser'] = etree_.ETCompatXMLParser()
    doc = etree_.parse(*args, **kwargs)
    return doc

#
# User methods
#
# Calls to the methods in these classes are generated by generateDS.py.
# You can replace these methods by re-implementing the following class
#   in a module named generatedssuper.py.

try:
    from generatedssuper import GeneratedsSuper
except ImportError, exp:

    class GeneratedsSuper(object):
        tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
        class _FixedOffsetTZ(datetime_.tzinfo):
            def __init__(self, offset, name):
                self.__offset = datetime_.timedelta(minutes=offset)
                self.__name = name
            def utcoffset(self, dt):
                return self.__offset
            def tzname(self, dt):
                return self.__name
            def dst(self, dt):
                return None
        def gds_format_string(self, input_data, input_name=''):
            return input_data
        def gds_validate_string(self, input_data, node, input_name=''):
            if not input_data:
                return ''
            else:
                return input_data
        def gds_format_base64(self, input_data, input_name=''):
            return base64.b64encode(input_data)
        def gds_validate_base64(self, input_data, node, input_name=''):
            return input_data
        def gds_format_integer(self, input_data, input_name=''):
            return '%d' % input_data
        def gds_validate_integer(self, input_data, node, input_name=''):
            return input_data
        def gds_format_integer_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_integer_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    float(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of integers')
            return input_data
        def gds_format_float(self, input_data, input_name=''):
            return ('%.15f' % input_data).rstrip('0')
        def gds_validate_float(self, input_data, node, input_name=''):
            return input_data
        def gds_format_float_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_float_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    float(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of floats')
            return input_data
        def gds_format_double(self, input_data, input_name=''):
            return '%e' % input_data
        def gds_validate_double(self, input_data, node, input_name=''):
            return input_data
        def gds_format_double_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_double_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    float(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of doubles')
            return input_data
        def gds_format_boolean(self, input_data, input_name=''):
            return ('%s' % input_data).lower()
        def gds_validate_boolean(self, input_data, node, input_name=''):
            return input_data
        def gds_format_boolean_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_boolean_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                if value not in ('true', '1', 'false', '0', ):
                    raise_parse_error(
                        node,
                        'Requires sequence of booleans '
                        '("true", "1", "false", "0")')
            return input_data
        def gds_validate_datetime(self, input_data, node, input_name=''):
            return input_data
        def gds_format_datetime(self, input_data, input_name=''):
            if input_data.microsecond == 0:
                _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (
                    input_data.year,
                    input_data.month,
                    input_data.day,
                    input_data.hour,
                    input_data.minute,
                    input_data.second,
                )
            else:
                _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (
                    input_data.year,
                    input_data.month,
                    input_data.day,
                    input_data.hour,
                    input_data.minute,
                    input_data.second,
                    ('%f' % (float(input_data.microsecond) / 1000000))[2:],
                )
            if input_data.tzinfo is not None:
                tzoff = input_data.tzinfo.utcoffset(input_data)
                if tzoff is not None:
                    total_seconds = tzoff.seconds + (86400 * tzoff.days)
                    if total_seconds == 0:
                        _svalue += 'Z'
                    else:
                        if total_seconds < 0:
                            _svalue += '-'
                            total_seconds *= -1
                        else:
                            _svalue += '+'
                        hours = total_seconds // 3600
                        minutes = (total_seconds - (hours * 3600)) // 60
                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
            return _svalue
        @classmethod
        def gds_parse_datetime(cls, input_data):
            tz = None
            if input_data[-1] == 'Z':
                tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                input_data = input_data[:-1]
            else:
                results = GeneratedsSuper.tzoff_pattern.search(input_data)
                if results is not None:
                    tzoff_parts = results.group(2).split(':')
                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                    if results.group(1) == '-':
                        tzoff *= -1
                    tz = GeneratedsSuper._FixedOffsetTZ(
                        tzoff, results.group(0))
                    input_data = input_data[:-6]
            time_parts = input_data.split('.')
            if len(time_parts) > 1:
                micro_seconds = int(float('0.' + time_parts[1]) * 1000000)
                input_data = '%s.%s' % (time_parts[0], micro_seconds, )
                dt = datetime_.datetime.strptime(
                    input_data, '%Y-%m-%dT%H:%M:%S.%f')
            else:
                dt = datetime_.datetime.strptime(
                    input_data, '%Y-%m-%dT%H:%M:%S')
            dt = dt.replace(tzinfo=tz)
            return dt
        def gds_validate_date(self, input_data, node, input_name=''):
            return input_data
        def gds_format_date(self, input_data, input_name=''):
            _svalue = '%04d-%02d-%02d' % (
                input_data.year,
                input_data.month,
                input_data.day,
            )
            try:
                if input_data.tzinfo is not None:
                    tzoff = input_data.tzinfo.utcoffset(input_data)
                    if tzoff is not None:
                        total_seconds = tzoff.seconds + (86400 * tzoff.days)
                        if total_seconds == 0:
                            _svalue += 'Z'
                        else:
                            if total_seconds < 0:
                                _svalue += '-'
                                total_seconds *= -1
                            else:
                                _svalue += '+'
                            hours = total_seconds // 3600
                            minutes = (total_seconds - (hours * 3600)) // 60
                            _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
            except AttributeError:
                pass
            return _svalue
        @classmethod
        def gds_parse_date(cls, input_data):
            tz = None
            if input_data[-1] == 'Z':
                tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                input_data = input_data[:-1]
            else:
                results = GeneratedsSuper.tzoff_pattern.search(input_data)
                if results is not None:
                    tzoff_parts = results.group(2).split(':')
                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                    if results.group(1) == '-':
                        tzoff *= -1
                    tz = GeneratedsSuper._FixedOffsetTZ(
                        tzoff, results.group(0))
                    input_data = input_data[:-6]
            dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')
            dt = dt.replace(tzinfo=tz)
            return dt.date()
        def gds_validate_time(self, input_data, node, input_name=''):
            return input_data
        def gds_format_time(self, input_data, input_name=''):
            if input_data.microsecond == 0:
                _svalue = '%02d:%02d:%02d' % (
                    input_data.hour,
                    input_data.minute,
                    input_data.second,
                )
            else:
                _svalue = '%02d:%02d:%02d.%s' % (
                    input_data.hour,
                    input_data.minute,
                    input_data.second,
                    ('%f' % (float(input_data.microsecond) / 1000000))[2:],
                )
            if input_data.tzinfo is not None:
                tzoff = input_data.tzinfo.utcoffset(input_data)
                if tzoff is not None:
                    total_seconds = tzoff.seconds + (86400 * tzoff.days)
                    if total_seconds == 0:
                        _svalue += 'Z'
                    else:
                        if total_seconds < 0:
                            _svalue += '-'
                            total_seconds *= -1
                        else:
                            _svalue += '+'
                        hours = total_seconds // 3600
                        minutes = (total_seconds - (hours * 3600)) // 60
                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
            return _svalue
        @classmethod
        def gds_parse_time(cls, input_data):
            tz = None
            if input_data[-1] == 'Z':
                tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                input_data = input_data[:-1]
            else:
                results = GeneratedsSuper.tzoff_pattern.search(input_data)
                if results is not None:
                    tzoff_parts = results.group(2).split(':')
                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                    if results.group(1) == '-':
                        tzoff *= -1
                    tz = GeneratedsSuper._FixedOffsetTZ(
                        tzoff, results.group(0))
                    input_data = input_data[:-6]
            if len(input_data.split('.')) > 1:
                dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')
            else:
                dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')
            dt = dt.replace(tzinfo=tz)
            return dt.time()
        def gds_str_lower(self, instring):
            return instring.lower()
        def get_path_(self, node):
            path_list = []
            self.get_path_list_(node, path_list)
            path_list.reverse()
            path = '/'.join(path_list)
            return path
        Tag_strip_pattern_ = re_.compile(r'\{.*\}')
        def get_path_list_(self, node, path_list):
            if node is None:
                return
            tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
            if tag:
                path_list.append(tag)
            self.get_path_list_(node.getparent(), path_list)
        def get_class_obj_(self, node, default_class=None):
            class_obj1 = default_class
            if 'xsi' in node.nsmap:
                classname = node.get('{%s}type' % node.nsmap['xsi'])
                if classname is not None:
                    names = classname.split(':')
                    if len(names) == 2:
                        classname = names[1]
                    class_obj2 = globals().get(classname)
                    if class_obj2 is not None:
                        class_obj1 = class_obj2
            return class_obj1
        def gds_build_any(self, node, type_name=None):
            return None
        @classmethod
        def gds_reverse_node_mapping(cls, mapping):
            return dict(((v, k) for k, v in mapping.iteritems()))


#
# If you have installed IPython you can uncomment and use the following.
# IPython is available from http://ipython.scipy.org/.
#

## from IPython.Shell import IPShellEmbed
## args = ''
## ipshell = IPShellEmbed(args,
##     banner = 'Dropping into IPython',
##     exit_msg = 'Leaving Interpreter, back to program.')

# Then use the following line where and when you want to drop into the
# IPython shell:
#    ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')

#
# Globals
#

ExternalEncoding = 'ascii'
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')

#
# Support/utility functions.
#


def showIndent(outfile, level, pretty_print=True):
    if pretty_print:
        for idx in range(level):
            continue
            # outfile.write('    ')


def quote_xml(inStr):
    if not inStr:
        return ''
    s1 = (isinstance(inStr, basestring) and inStr or
          '%s' % inStr)
    s1 = s1.replace('&', '&amp;')
    s1 = s1.replace('<', '&lt;')
    s1 = s1.replace('>', '&gt;')
    return s1


def quote_attrib(inStr):
    s1 = (isinstance(inStr, basestring) and inStr or
          '%s' % inStr)
    s1 = s1.replace('&', '&amp;')
    s1 = s1.replace('<', '&lt;')
    s1 = s1.replace('>', '&gt;')
    if '"' in s1:
        if "'" in s1:
            s1 = '"%s"' % s1.replace('"', "&quot;")
        else:
            s1 = "'%s'" % s1
    else:
        s1 = '"%s"' % s1
    return s1


def quote_python(inStr):
    s1 = inStr
    if s1.find("'") == -1:
        if s1.find('\n') == -1:
            return "'%s'" % s1
        else:
            return "'''%s'''" % s1
    else:
        if s1.find('"') != -1:
            s1 = s1.replace('"', '\\"')
        if s1.find('\n') == -1:
            return '"%s"' % s1
        else:
            return '"""%s"""' % s1


def get_all_text_(node):
    if node.text is not None:
        text = node.text
    else:
        text = ''
    for child in node:
        if child.tail is not None:
            text += child.tail
    return text


def find_attr_value_(attr_name, node):
    attrs = node.attrib
    attr_parts = attr_name.split(':')
    value = None
    if len(attr_parts) == 1:
        value = attrs.get(attr_name)
    elif len(attr_parts) == 2:
        prefix, name = attr_parts
        namespace = node.nsmap.get(prefix)
        if namespace is not None:
            value = attrs.get('{%s}%s' % (namespace, name, ))
    return value


class GDSParseError(Exception):
    pass


def raise_parse_error(node, msg):
    if XMLParser_import_library == XMLParser_import_lxml:
        msg = '%s (element %s/line %d)' % (
            msg, node.tag, node.sourceline, )
    else:
        msg = '%s (element %s)' % (msg, node.tag, )
    raise GDSParseError(msg)


class MixedContainer:
    # Constants for category:
    CategoryNone = 0
    CategoryText = 1
    CategorySimple = 2
    CategoryComplex = 3
    # Constants for content_type:
    TypeNone = 0
    TypeText = 1
    TypeString = 2
    TypeInteger = 3
    TypeFloat = 4
    TypeDecimal = 5
    TypeDouble = 6
    TypeBoolean = 7
    TypeBase64 = 8
    def __init__(self, category, content_type, name, value):
        self.category = category
        self.content_type = content_type
        self.name = name
        self.value = value
    def getCategory(self):
        return self.category
    def getContenttype(self, content_type):
        return self.content_type
    def getValue(self):
        return self.value
    def getName(self):
        return self.name
    def export(self, outfile, level, name, namespace, pretty_print=True):
        if self.category == MixedContainer.CategoryText:
            # Prevent exporting empty content as empty lines.
            if self.value.strip():
                outfile.write(self.value)
        elif self.category == MixedContainer.CategorySimple:
            self.exportSimple(outfile, level, name)
        else:    # category == MixedContainer.CategoryComplex
            self.value.export(outfile, level, namespace, name, pretty_print)
    def exportSimple(self, outfile, level, name):
        if self.content_type == MixedContainer.TypeString:
            outfile.write('<%s>%s</%s>' % (
                self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeInteger or \
                self.content_type == MixedContainer.TypeBoolean:
            outfile.write('<%s>%d</%s>' % (
                self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeFloat or \
                self.content_type == MixedContainer.TypeDecimal:
            outfile.write('<%s>%f</%s>' % (
                self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeDouble:
            outfile.write('<%s>%g</%s>' % (
                self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeBase64:
            outfile.write('<%s>%s</%s>' % (
                self.name, base64.b64encode(self.value), self.name))
    def to_etree(self, element):
        if self.category == MixedContainer.CategoryText:
            # Prevent exporting empty content as empty lines.
            if self.value.strip():
                if len(element) > 0:
                    if element[-1].tail is None:
                        element[-1].tail = self.value
                    else:
                        element[-1].tail += self.value
                else:
                    if element.text is None:
                        element.text = self.value
                    else:
                        element.text += self.value
        elif self.category == MixedContainer.CategorySimple:
            subelement = etree_.SubElement(element, '%s' % self.name)
            subelement.text = self.to_etree_simple()
        else:    # category == MixedContainer.CategoryComplex
            self.value.to_etree(element)
    def to_etree_simple(self):
        if self.content_type == MixedContainer.TypeString:
            text = self.value
        elif (self.content_type == MixedContainer.TypeInteger or
                self.content_type == MixedContainer.TypeBoolean):
            text = '%d' % self.value
        elif (self.content_type == MixedContainer.TypeFloat or
                self.content_type == MixedContainer.TypeDecimal):
            text = '%f' % self.value
        elif self.content_type == MixedContainer.TypeDouble:
            text = '%g' % self.value
        elif self.content_type == MixedContainer.TypeBase64:
            text = '%s' % base64.b64encode(self.value)
        return text
    def exportLiteral(self, outfile, level, name):
        if self.category == MixedContainer.CategoryText:
            showIndent(outfile, level)
            outfile.write(
                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
                    self.category, self.content_type, self.name, self.value))
        elif self.category == MixedContainer.CategorySimple:
            showIndent(outfile, level)
            outfile.write(
                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
                    self.category, self.content_type, self.name, self.value))
        else:    # category == MixedContainer.CategoryComplex
            showIndent(outfile, level)
            outfile.write(
                'model_.MixedContainer(%d, %d, "%s",\n' % (
                    self.category, self.content_type, self.name,))
            self.value.exportLiteral(outfile, level + 1)
            showIndent(outfile, level)
            outfile.write(')\n')


class MemberSpec_(object):
    def __init__(self, name='', data_type='', container=0):
        self.name = name
        self.data_type = data_type
        self.container = container
    def set_name(self, name): self.name = name
    def get_name(self): return self.name
    def set_data_type(self, data_type): self.data_type = data_type
    def get_data_type_chain(self): return self.data_type
    def get_data_type(self):
        if isinstance(self.data_type, list):
            if len(self.data_type) > 0:
                return self.data_type[-1]
            else:
                return 'xs:string'
        else:
            return self.data_type
    def set_container(self, container): self.container = container
    def get_container(self): return self.container


def _cast(typ, value):
    if typ is None or value is None:
        return value
    return typ(value)

#
# Data representation classes.
#


class Finvoice(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Version=None, MessageTransmissionDetails=None, SellerPartyDetails=None, SellerOrganisationUnitNumber=None, SellerSiteCode=None, SellerContactPersonName=None, SellerContactPersonFunction=None, SellerContactPersonDepartment=None, SellerCommunicationDetails=None, SellerInformationDetails=None, InvoiceSenderPartyDetails=None, InvoiceRecipientPartyDetails=None, InvoiceRecipientOrganisationUnitNumber=None, InvoiceRecipientSiteCode=None, InvoiceRecipientContactPersonName=None, InvoiceRecipientContactPersonFunction=None, InvoiceRecipientContactPersonDepartment=None, InvoiceRecipientLanguageCode=None, InvoiceRecipientCommunicationDetails=None, BuyerPartyDetails=None, BuyerOrganisationUnitNumber=None, BuyerSiteCode=None, BuyerContactPersonName=None, BuyerContactPersonFunction=None, BuyerContactPersonDepartment=None, BuyerCommunicationDetails=None, DeliveryPartyDetails=None, DeliveryOrganisationUnitNumber=None, DeliverySiteCode=None, DeliveryContactPersonName=None, DeliveryContactPersonFunction=None, DeliveryContactPersonDepartment=None, DeliveryCommunicationDetails=None, DeliveryDetails=None, AnyPartyDetails=None, InvoiceDetails=None, PaymentStatusDetails=None, PartialPaymentDetails=None, FactoringAgreementDetails=None, VirtualBankBarcode=None, InvoiceRow=None, SpecificationDetails=None, EpiDetails=None, InvoiceUrlNameText=None, InvoiceUrlText=None, StorageUrlText=None, LayOutIdentifier=None, InvoiceSegmentIdentifier=None, ControlStampText=None, AcceptanceStampText=None, OriginalInvoiceFormat=None, AttachmentMessageDetails=None):
        self.original_tagname_ = None
        self.Version = _cast(None, Version)
        self.MessageTransmissionDetails = MessageTransmissionDetails
        self.SellerPartyDetails = SellerPartyDetails
        self.SellerOrganisationUnitNumber = SellerOrganisationUnitNumber
        self.SellerSiteCode = SellerSiteCode
        self.SellerContactPersonName = SellerContactPersonName
        if SellerContactPersonFunction is None:
            self.SellerContactPersonFunction = []
        else:
            self.SellerContactPersonFunction = SellerContactPersonFunction
        if SellerContactPersonDepartment is None:
            self.SellerContactPersonDepartment = []
        else:
            self.SellerContactPersonDepartment = SellerContactPersonDepartment
        self.SellerCommunicationDetails = SellerCommunicationDetails
        self.SellerInformationDetails = SellerInformationDetails
        self.InvoiceSenderPartyDetails = InvoiceSenderPartyDetails
        self.InvoiceRecipientPartyDetails = InvoiceRecipientPartyDetails
        self.InvoiceRecipientOrganisationUnitNumber = InvoiceRecipientOrganisationUnitNumber
        self.InvoiceRecipientSiteCode = InvoiceRecipientSiteCode
        self.InvoiceRecipientContactPersonName = InvoiceRecipientContactPersonName
        if InvoiceRecipientContactPersonFunction is None:
            self.InvoiceRecipientContactPersonFunction = []
        else:
            self.InvoiceRecipientContactPersonFunction = InvoiceRecipientContactPersonFunction
        if InvoiceRecipientContactPersonDepartment is None:
            self.InvoiceRecipientContactPersonDepartment = []
        else:
            self.InvoiceRecipientContactPersonDepartment = InvoiceRecipientContactPersonDepartment
        self.InvoiceRecipientLanguageCode = InvoiceRecipientLanguageCode
        self.InvoiceRecipientCommunicationDetails = InvoiceRecipientCommunicationDetails
        self.BuyerPartyDetails = BuyerPartyDetails
        self.BuyerOrganisationUnitNumber = BuyerOrganisationUnitNumber
        self.BuyerSiteCode = BuyerSiteCode
        self.BuyerContactPersonName = BuyerContactPersonName
        if BuyerContactPersonFunction is None:
            self.BuyerContactPersonFunction = []
        else:
            self.BuyerContactPersonFunction = BuyerContactPersonFunction
        if BuyerContactPersonDepartment is None:
            self.BuyerContactPersonDepartment = []
        else:
            self.BuyerContactPersonDepartment = BuyerContactPersonDepartment
        self.BuyerCommunicationDetails = BuyerCommunicationDetails
        self.DeliveryPartyDetails = DeliveryPartyDetails
        self.DeliveryOrganisationUnitNumber = DeliveryOrganisationUnitNumber
        self.DeliverySiteCode = DeliverySiteCode
        self.DeliveryContactPersonName = DeliveryContactPersonName
        if DeliveryContactPersonFunction is None:
            self.DeliveryContactPersonFunction = []
        else:
            self.DeliveryContactPersonFunction = DeliveryContactPersonFunction
        if DeliveryContactPersonDepartment is None:
            self.DeliveryContactPersonDepartment = []
        else:
            self.DeliveryContactPersonDepartment = DeliveryContactPersonDepartment
        self.DeliveryCommunicationDetails = DeliveryCommunicationDetails
        self.DeliveryDetails = DeliveryDetails
        if AnyPartyDetails is None:
            self.AnyPartyDetails = []
        else:
            self.AnyPartyDetails = AnyPartyDetails
        self.InvoiceDetails = InvoiceDetails
        self.PaymentStatusDetails = PaymentStatusDetails
        if PartialPaymentDetails is None:
            self.PartialPaymentDetails = []
        else:
            self.PartialPaymentDetails = PartialPaymentDetails
        self.FactoringAgreementDetails = FactoringAgreementDetails
        self.VirtualBankBarcode = VirtualBankBarcode
        if InvoiceRow is None:
            self.InvoiceRow = []
        else:
            self.InvoiceRow = InvoiceRow
        self.SpecificationDetails = SpecificationDetails
        self.EpiDetails = EpiDetails
        if InvoiceUrlNameText is None:
            self.InvoiceUrlNameText = []
        else:
            self.InvoiceUrlNameText = InvoiceUrlNameText
        if InvoiceUrlText is None:
            self.InvoiceUrlText = []
        else:
            self.InvoiceUrlText = InvoiceUrlText
        self.StorageUrlText = StorageUrlText
        self.LayOutIdentifier = LayOutIdentifier
        self.InvoiceSegmentIdentifier = InvoiceSegmentIdentifier
        self.ControlStampText = ControlStampText
        self.AcceptanceStampText = AcceptanceStampText
        self.OriginalInvoiceFormat = OriginalInvoiceFormat
        self.AttachmentMessageDetails = AttachmentMessageDetails
    def factory(*args_, **kwargs_):
        if Finvoice.subclass:
            return Finvoice.subclass(*args_, **kwargs_)
        else:
            return Finvoice(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MessageTransmissionDetails(self): return self.MessageTransmissionDetails
    def set_MessageTransmissionDetails(self, MessageTransmissionDetails): self.MessageTransmissionDetails = MessageTransmissionDetails
    def get_SellerPartyDetails(self): return self.SellerPartyDetails
    def set_SellerPartyDetails(self, SellerPartyDetails): self.SellerPartyDetails = SellerPartyDetails
    def get_SellerOrganisationUnitNumber(self): return self.SellerOrganisationUnitNumber
    def set_SellerOrganisationUnitNumber(self, SellerOrganisationUnitNumber): self.SellerOrganisationUnitNumber = SellerOrganisationUnitNumber
    def get_SellerSiteCode(self): return self.SellerSiteCode
    def set_SellerSiteCode(self, SellerSiteCode): self.SellerSiteCode = SellerSiteCode
    def get_SellerContactPersonName(self): return self.SellerContactPersonName
    def set_SellerContactPersonName(self, SellerContactPersonName): self.SellerContactPersonName = SellerContactPersonName
    def get_SellerContactPersonFunction(self): return self.SellerContactPersonFunction
    def set_SellerContactPersonFunction(self, SellerContactPersonFunction): self.SellerContactPersonFunction = SellerContactPersonFunction
    def add_SellerContactPersonFunction(self, value): self.SellerContactPersonFunction.append(value)
    def insert_SellerContactPersonFunction_at(self, index, value): self.SellerContactPersonFunction.insert(index, value)
    def replace_SellerContactPersonFunction_at(self, index, value): self.SellerContactPersonFunction[index] = value
    def get_SellerContactPersonDepartment(self): return self.SellerContactPersonDepartment
    def set_SellerContactPersonDepartment(self, SellerContactPersonDepartment): self.SellerContactPersonDepartment = SellerContactPersonDepartment
    def add_SellerContactPersonDepartment(self, value): self.SellerContactPersonDepartment.append(value)
    def insert_SellerContactPersonDepartment_at(self, index, value): self.SellerContactPersonDepartment.insert(index, value)
    def replace_SellerContactPersonDepartment_at(self, index, value): self.SellerContactPersonDepartment[index] = value
    def get_SellerCommunicationDetails(self): return self.SellerCommunicationDetails
    def set_SellerCommunicationDetails(self, SellerCommunicationDetails): self.SellerCommunicationDetails = SellerCommunicationDetails
    def get_SellerInformationDetails(self): return self.SellerInformationDetails
    def set_SellerInformationDetails(self, SellerInformationDetails): self.SellerInformationDetails = SellerInformationDetails
    def get_InvoiceSenderPartyDetails(self): return self.InvoiceSenderPartyDetails
    def set_InvoiceSenderPartyDetails(self, InvoiceSenderPartyDetails): self.InvoiceSenderPartyDetails = InvoiceSenderPartyDetails
    def get_InvoiceRecipientPartyDetails(self): return self.InvoiceRecipientPartyDetails
    def set_InvoiceRecipientPartyDetails(self, InvoiceRecipientPartyDetails): self.InvoiceRecipientPartyDetails = InvoiceRecipientPartyDetails
    def get_InvoiceRecipientOrganisationUnitNumber(self): return self.InvoiceRecipientOrganisationUnitNumber
    def set_InvoiceRecipientOrganisationUnitNumber(self, InvoiceRecipientOrganisationUnitNumber): self.InvoiceRecipientOrganisationUnitNumber = InvoiceRecipientOrganisationUnitNumber
    def get_InvoiceRecipientSiteCode(self): return self.InvoiceRecipientSiteCode
    def set_InvoiceRecipientSiteCode(self, InvoiceRecipientSiteCode): self.InvoiceRecipientSiteCode = InvoiceRecipientSiteCode
    def get_InvoiceRecipientContactPersonName(self): return self.InvoiceRecipientContactPersonName
    def set_InvoiceRecipientContactPersonName(self, InvoiceRecipientContactPersonName): self.InvoiceRecipientContactPersonName = InvoiceRecipientContactPersonName
    def get_InvoiceRecipientContactPersonFunction(self): return self.InvoiceRecipientContactPersonFunction
    def set_InvoiceRecipientContactPersonFunction(self, InvoiceRecipientContactPersonFunction): self.InvoiceRecipientContactPersonFunction = InvoiceRecipientContactPersonFunction
    def add_InvoiceRecipientContactPersonFunction(self, value): self.InvoiceRecipientContactPersonFunction.append(value)
    def insert_InvoiceRecipientContactPersonFunction_at(self, index, value): self.InvoiceRecipientContactPersonFunction.insert(index, value)
    def replace_InvoiceRecipientContactPersonFunction_at(self, index, value): self.InvoiceRecipientContactPersonFunction[index] = value
    def get_InvoiceRecipientContactPersonDepartment(self): return self.InvoiceRecipientContactPersonDepartment
    def set_InvoiceRecipientContactPersonDepartment(self, InvoiceRecipientContactPersonDepartment): self.InvoiceRecipientContactPersonDepartment = InvoiceRecipientContactPersonDepartment
    def add_InvoiceRecipientContactPersonDepartment(self, value): self.InvoiceRecipientContactPersonDepartment.append(value)
    def insert_InvoiceRecipientContactPersonDepartment_at(self, index, value): self.InvoiceRecipientContactPersonDepartment.insert(index, value)
    def replace_InvoiceRecipientContactPersonDepartment_at(self, index, value): self.InvoiceRecipientContactPersonDepartment[index] = value
    def get_InvoiceRecipientLanguageCode(self): return self.InvoiceRecipientLanguageCode
    def set_InvoiceRecipientLanguageCode(self, InvoiceRecipientLanguageCode): self.InvoiceRecipientLanguageCode = InvoiceRecipientLanguageCode
    def get_InvoiceRecipientCommunicationDetails(self): return self.InvoiceRecipientCommunicationDetails
    def set_InvoiceRecipientCommunicationDetails(self, InvoiceRecipientCommunicationDetails): self.InvoiceRecipientCommunicationDetails = InvoiceRecipientCommunicationDetails
    def get_BuyerPartyDetails(self): return self.BuyerPartyDetails
    def set_BuyerPartyDetails(self, BuyerPartyDetails): self.BuyerPartyDetails = BuyerPartyDetails
    def get_BuyerOrganisationUnitNumber(self): return self.BuyerOrganisationUnitNumber
    def set_BuyerOrganisationUnitNumber(self, BuyerOrganisationUnitNumber): self.BuyerOrganisationUnitNumber = BuyerOrganisationUnitNumber
    def get_BuyerSiteCode(self): return self.BuyerSiteCode
    def set_BuyerSiteCode(self, BuyerSiteCode): self.BuyerSiteCode = BuyerSiteCode
    def get_BuyerContactPersonName(self): return self.BuyerContactPersonName
    def set_BuyerContactPersonName(self, BuyerContactPersonName): self.BuyerContactPersonName = BuyerContactPersonName
    def get_BuyerContactPersonFunction(self): return self.BuyerContactPersonFunction
    def set_BuyerContactPersonFunction(self, BuyerContactPersonFunction): self.BuyerContactPersonFunction = BuyerContactPersonFunction
    def add_BuyerContactPersonFunction(self, value): self.BuyerContactPersonFunction.append(value)
    def insert_BuyerContactPersonFunction_at(self, index, value): self.BuyerContactPersonFunction.insert(index, value)
    def replace_BuyerContactPersonFunction_at(self, index, value): self.BuyerContactPersonFunction[index] = value
    def get_BuyerContactPersonDepartment(self): return self.BuyerContactPersonDepartment
    def set_BuyerContactPersonDepartment(self, BuyerContactPersonDepartment): self.BuyerContactPersonDepartment = BuyerContactPersonDepartment
    def add_BuyerContactPersonDepartment(self, value): self.BuyerContactPersonDepartment.append(value)
    def insert_BuyerContactPersonDepartment_at(self, index, value): self.BuyerContactPersonDepartment.insert(index, value)
    def replace_BuyerContactPersonDepartment_at(self, index, value): self.BuyerContactPersonDepartment[index] = value
    def get_BuyerCommunicationDetails(self): return self.BuyerCommunicationDetails
    def set_BuyerCommunicationDetails(self, BuyerCommunicationDetails): self.BuyerCommunicationDetails = BuyerCommunicationDetails
    def get_DeliveryPartyDetails(self): return self.DeliveryPartyDetails
    def set_DeliveryPartyDetails(self, DeliveryPartyDetails): self.DeliveryPartyDetails = DeliveryPartyDetails
    def get_DeliveryOrganisationUnitNumber(self): return self.DeliveryOrganisationUnitNumber
    def set_DeliveryOrganisationUnitNumber(self, DeliveryOrganisationUnitNumber): self.DeliveryOrganisationUnitNumber = DeliveryOrganisationUnitNumber
    def get_DeliverySiteCode(self): return self.DeliverySiteCode
    def set_DeliverySiteCode(self, DeliverySiteCode): self.DeliverySiteCode = DeliverySiteCode
    def get_DeliveryContactPersonName(self): return self.DeliveryContactPersonName
    def set_DeliveryContactPersonName(self, DeliveryContactPersonName): self.DeliveryContactPersonName = DeliveryContactPersonName
    def get_DeliveryContactPersonFunction(self): return self.DeliveryContactPersonFunction
    def set_DeliveryContactPersonFunction(self, DeliveryContactPersonFunction): self.DeliveryContactPersonFunction = DeliveryContactPersonFunction
    def add_DeliveryContactPersonFunction(self, value): self.DeliveryContactPersonFunction.append(value)
    def insert_DeliveryContactPersonFunction_at(self, index, value): self.DeliveryContactPersonFunction.insert(index, value)
    def replace_DeliveryContactPersonFunction_at(self, index, value): self.DeliveryContactPersonFunction[index] = value
    def get_DeliveryContactPersonDepartment(self): return self.DeliveryContactPersonDepartment
    def set_DeliveryContactPersonDepartment(self, DeliveryContactPersonDepartment): self.DeliveryContactPersonDepartment = DeliveryContactPersonDepartment
    def add_DeliveryContactPersonDepartment(self, value): self.DeliveryContactPersonDepartment.append(value)
    def insert_DeliveryContactPersonDepartment_at(self, index, value): self.DeliveryContactPersonDepartment.insert(index, value)
    def replace_DeliveryContactPersonDepartment_at(self, index, value): self.DeliveryContactPersonDepartment[index] = value
    def get_DeliveryCommunicationDetails(self): return self.DeliveryCommunicationDetails
    def set_DeliveryCommunicationDetails(self, DeliveryCommunicationDetails): self.DeliveryCommunicationDetails = DeliveryCommunicationDetails
    def get_DeliveryDetails(self): return self.DeliveryDetails
    def set_DeliveryDetails(self, DeliveryDetails): self.DeliveryDetails = DeliveryDetails
    def get_AnyPartyDetails(self): return self.AnyPartyDetails
    def set_AnyPartyDetails(self, AnyPartyDetails): self.AnyPartyDetails = AnyPartyDetails
    def add_AnyPartyDetails(self, value): self.AnyPartyDetails.append(value)
    def insert_AnyPartyDetails_at(self, index, value): self.AnyPartyDetails.insert(index, value)
    def replace_AnyPartyDetails_at(self, index, value): self.AnyPartyDetails[index] = value
    def get_InvoiceDetails(self): return self.InvoiceDetails
    def set_InvoiceDetails(self, InvoiceDetails): self.InvoiceDetails = InvoiceDetails
    def get_PaymentStatusDetails(self): return self.PaymentStatusDetails
    def set_PaymentStatusDetails(self, PaymentStatusDetails): self.PaymentStatusDetails = PaymentStatusDetails
    def get_PartialPaymentDetails(self): return self.PartialPaymentDetails
    def set_PartialPaymentDetails(self, PartialPaymentDetails): self.PartialPaymentDetails = PartialPaymentDetails
    def add_PartialPaymentDetails(self, value): self.PartialPaymentDetails.append(value)
    def insert_PartialPaymentDetails_at(self, index, value): self.PartialPaymentDetails.insert(index, value)
    def replace_PartialPaymentDetails_at(self, index, value): self.PartialPaymentDetails[index] = value
    def get_FactoringAgreementDetails(self): return self.FactoringAgreementDetails
    def set_FactoringAgreementDetails(self, FactoringAgreementDetails): self.FactoringAgreementDetails = FactoringAgreementDetails
    def get_VirtualBankBarcode(self): return self.VirtualBankBarcode
    def set_VirtualBankBarcode(self, VirtualBankBarcode): self.VirtualBankBarcode = VirtualBankBarcode
    def get_InvoiceRow(self): return self.InvoiceRow
    def set_InvoiceRow(self, InvoiceRow): self.InvoiceRow = InvoiceRow
    def add_InvoiceRow(self, value): self.InvoiceRow.append(value)
    def insert_InvoiceRow_at(self, index, value): self.InvoiceRow.insert(index, value)
    def replace_InvoiceRow_at(self, index, value): self.InvoiceRow[index] = value
    def get_SpecificationDetails(self): return self.SpecificationDetails
    def set_SpecificationDetails(self, SpecificationDetails): self.SpecificationDetails = SpecificationDetails
    def get_EpiDetails(self): return self.EpiDetails
    def set_EpiDetails(self, EpiDetails): self.EpiDetails = EpiDetails
    def get_InvoiceUrlNameText(self): return self.InvoiceUrlNameText
    def set_InvoiceUrlNameText(self, InvoiceUrlNameText): self.InvoiceUrlNameText = InvoiceUrlNameText
    def add_InvoiceUrlNameText(self, value): self.InvoiceUrlNameText.append(value)
    def insert_InvoiceUrlNameText_at(self, index, value): self.InvoiceUrlNameText.insert(index, value)
    def replace_InvoiceUrlNameText_at(self, index, value): self.InvoiceUrlNameText[index] = value
    def get_InvoiceUrlText(self): return self.InvoiceUrlText
    def set_InvoiceUrlText(self, InvoiceUrlText): self.InvoiceUrlText = InvoiceUrlText
    def add_InvoiceUrlText(self, value): self.InvoiceUrlText.append(value)
    def insert_InvoiceUrlText_at(self, index, value): self.InvoiceUrlText.insert(index, value)
    def replace_InvoiceUrlText_at(self, index, value): self.InvoiceUrlText[index] = value
    def get_StorageUrlText(self): return self.StorageUrlText
    def set_StorageUrlText(self, StorageUrlText): self.StorageUrlText = StorageUrlText
    def get_LayOutIdentifier(self): return self.LayOutIdentifier
    def set_LayOutIdentifier(self, LayOutIdentifier): self.LayOutIdentifier = LayOutIdentifier
    def get_InvoiceSegmentIdentifier(self): return self.InvoiceSegmentIdentifier
    def set_InvoiceSegmentIdentifier(self, InvoiceSegmentIdentifier): self.InvoiceSegmentIdentifier = InvoiceSegmentIdentifier
    def get_ControlStampText(self): return self.ControlStampText
    def set_ControlStampText(self, ControlStampText): self.ControlStampText = ControlStampText
    def get_AcceptanceStampText(self): return self.AcceptanceStampText
    def set_AcceptanceStampText(self, AcceptanceStampText): self.AcceptanceStampText = AcceptanceStampText
    def get_OriginalInvoiceFormat(self): return self.OriginalInvoiceFormat
    def set_OriginalInvoiceFormat(self, OriginalInvoiceFormat): self.OriginalInvoiceFormat = OriginalInvoiceFormat
    def get_AttachmentMessageDetails(self): return self.AttachmentMessageDetails
    def set_AttachmentMessageDetails(self, AttachmentMessageDetails): self.AttachmentMessageDetails = AttachmentMessageDetails
    def get_Version(self): return self.Version
    def set_Version(self, Version): self.Version = Version
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_LanguageCodeType(self, value):
        # Validate type LanguageCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_512(self, value):
        # Validate type genericStringType0_512, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.MessageTransmissionDetails is not None or
            self.SellerPartyDetails is not None or
            self.SellerOrganisationUnitNumber is not None or
            self.SellerSiteCode is not None or
            self.SellerContactPersonName is not None or
            self.SellerContactPersonFunction or
            self.SellerContactPersonDepartment or
            self.SellerCommunicationDetails is not None or
            self.SellerInformationDetails is not None or
            self.InvoiceSenderPartyDetails is not None or
            self.InvoiceRecipientPartyDetails is not None or
            self.InvoiceRecipientOrganisationUnitNumber is not None or
            self.InvoiceRecipientSiteCode is not None or
            self.InvoiceRecipientContactPersonName is not None or
            self.InvoiceRecipientContactPersonFunction or
            self.InvoiceRecipientContactPersonDepartment or
            self.InvoiceRecipientLanguageCode is not None or
            self.InvoiceRecipientCommunicationDetails is not None or
            self.BuyerPartyDetails is not None or
            self.BuyerOrganisationUnitNumber is not None or
            self.BuyerSiteCode is not None or
            self.BuyerContactPersonName is not None or
            self.BuyerContactPersonFunction or
            self.BuyerContactPersonDepartment or
            self.BuyerCommunicationDetails is not None or
            self.DeliveryPartyDetails is not None or
            self.DeliveryOrganisationUnitNumber is not None or
            self.DeliverySiteCode is not None or
            self.DeliveryContactPersonName is not None or
            self.DeliveryContactPersonFunction or
            self.DeliveryContactPersonDepartment or
            self.DeliveryCommunicationDetails is not None or
            self.DeliveryDetails is not None or
            self.AnyPartyDetails or
            self.InvoiceDetails is not None or
            self.PaymentStatusDetails is not None or
            self.PartialPaymentDetails or
            self.FactoringAgreementDetails is not None or
            self.VirtualBankBarcode is not None or
            self.InvoiceRow or
            self.SpecificationDetails is not None or
            self.EpiDetails is not None or
            self.InvoiceUrlNameText or
            self.InvoiceUrlText or
            self.StorageUrlText is not None or
            self.LayOutIdentifier is not None or
            self.InvoiceSegmentIdentifier is not None or
            self.ControlStampText is not None or
            self.AcceptanceStampText is not None or
            self.OriginalInvoiceFormat is not None or
            self.AttachmentMessageDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='Finvoice', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Finvoice')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='Finvoice', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='Finvoice'):
        if self.Version is not None and 'Version' not in already_processed:
            already_processed.add('Version')
            outfile.write(' Version=%s' % (self.gds_format_string(quote_attrib(self.Version).encode(ExternalEncoding), input_name='Version'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='Finvoice', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MessageTransmissionDetails is not None:
            self.MessageTransmissionDetails.export(outfile, level, namespace_, name_='MessageTransmissionDetails', pretty_print=pretty_print)
        if self.SellerPartyDetails is not None:
            self.SellerPartyDetails.export(outfile, level, namespace_, name_='SellerPartyDetails', pretty_print=pretty_print)
        if self.SellerOrganisationUnitNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerOrganisationUnitNumber>%s</%sSellerOrganisationUnitNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerOrganisationUnitNumber).encode(ExternalEncoding), input_name='SellerOrganisationUnitNumber'), namespace_, eol_))
        if self.SellerSiteCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerSiteCode>%s</%sSellerSiteCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerSiteCode).encode(ExternalEncoding), input_name='SellerSiteCode'), namespace_, eol_))
        if self.SellerContactPersonName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerContactPersonName>%s</%sSellerContactPersonName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerContactPersonName).encode(ExternalEncoding), input_name='SellerContactPersonName'), namespace_, eol_))
        for SellerContactPersonFunction_ in self.SellerContactPersonFunction:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerContactPersonFunction>%s</%sSellerContactPersonFunction>%s' % (namespace_, self.gds_format_string(quote_xml(SellerContactPersonFunction_).encode(ExternalEncoding), input_name='SellerContactPersonFunction'), namespace_, eol_))
        for SellerContactPersonDepartment_ in self.SellerContactPersonDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerContactPersonDepartment>%s</%sSellerContactPersonDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(SellerContactPersonDepartment_).encode(ExternalEncoding), input_name='SellerContactPersonDepartment'), namespace_, eol_))
        if self.SellerCommunicationDetails is not None:
            self.SellerCommunicationDetails.export(outfile, level, namespace_, name_='SellerCommunicationDetails', pretty_print=pretty_print)
        if self.SellerInformationDetails is not None:
            self.SellerInformationDetails.export(outfile, level, namespace_, name_='SellerInformationDetails', pretty_print=pretty_print)
        if self.InvoiceSenderPartyDetails is not None:
            self.InvoiceSenderPartyDetails.export(outfile, level, namespace_, name_='InvoiceSenderPartyDetails', pretty_print=pretty_print)
        if self.InvoiceRecipientPartyDetails is not None:
            self.InvoiceRecipientPartyDetails.export(outfile, level, namespace_, name_='InvoiceRecipientPartyDetails', pretty_print=pretty_print)
        if self.InvoiceRecipientOrganisationUnitNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientOrganisationUnitNumber>%s</%sInvoiceRecipientOrganisationUnitNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientOrganisationUnitNumber).encode(ExternalEncoding), input_name='InvoiceRecipientOrganisationUnitNumber'), namespace_, eol_))
        if self.InvoiceRecipientSiteCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientSiteCode>%s</%sInvoiceRecipientSiteCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientSiteCode).encode(ExternalEncoding), input_name='InvoiceRecipientSiteCode'), namespace_, eol_))
        if self.InvoiceRecipientContactPersonName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientContactPersonName>%s</%sInvoiceRecipientContactPersonName>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientContactPersonName).encode(ExternalEncoding), input_name='InvoiceRecipientContactPersonName'), namespace_, eol_))
        for InvoiceRecipientContactPersonFunction_ in self.InvoiceRecipientContactPersonFunction:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientContactPersonFunction>%s</%sInvoiceRecipientContactPersonFunction>%s' % (namespace_, self.gds_format_string(quote_xml(InvoiceRecipientContactPersonFunction_).encode(ExternalEncoding), input_name='InvoiceRecipientContactPersonFunction'), namespace_, eol_))
        for InvoiceRecipientContactPersonDepartment_ in self.InvoiceRecipientContactPersonDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientContactPersonDepartment>%s</%sInvoiceRecipientContactPersonDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(InvoiceRecipientContactPersonDepartment_).encode(ExternalEncoding), input_name='InvoiceRecipientContactPersonDepartment'), namespace_, eol_))
        if self.InvoiceRecipientLanguageCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientLanguageCode>%s</%sInvoiceRecipientLanguageCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientLanguageCode).encode(ExternalEncoding), input_name='InvoiceRecipientLanguageCode'), namespace_, eol_))
        if self.InvoiceRecipientCommunicationDetails is not None:
            self.InvoiceRecipientCommunicationDetails.export(outfile, level, namespace_, name_='InvoiceRecipientCommunicationDetails', pretty_print=pretty_print)
        if self.BuyerPartyDetails is not None:
            self.BuyerPartyDetails.export(outfile, level, namespace_, name_='BuyerPartyDetails', pretty_print=pretty_print)
        if self.BuyerOrganisationUnitNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerOrganisationUnitNumber>%s</%sBuyerOrganisationUnitNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerOrganisationUnitNumber).encode(ExternalEncoding), input_name='BuyerOrganisationUnitNumber'), namespace_, eol_))
        if self.BuyerSiteCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerSiteCode>%s</%sBuyerSiteCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerSiteCode).encode(ExternalEncoding), input_name='BuyerSiteCode'), namespace_, eol_))
        if self.BuyerContactPersonName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerContactPersonName>%s</%sBuyerContactPersonName>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerContactPersonName).encode(ExternalEncoding), input_name='BuyerContactPersonName'), namespace_, eol_))
        for BuyerContactPersonFunction_ in self.BuyerContactPersonFunction:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerContactPersonFunction>%s</%sBuyerContactPersonFunction>%s' % (namespace_, self.gds_format_string(quote_xml(BuyerContactPersonFunction_).encode(ExternalEncoding), input_name='BuyerContactPersonFunction'), namespace_, eol_))
        for BuyerContactPersonDepartment_ in self.BuyerContactPersonDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerContactPersonDepartment>%s</%sBuyerContactPersonDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(BuyerContactPersonDepartment_).encode(ExternalEncoding), input_name='BuyerContactPersonDepartment'), namespace_, eol_))
        if self.BuyerCommunicationDetails is not None:
            self.BuyerCommunicationDetails.export(outfile, level, namespace_, name_='BuyerCommunicationDetails', pretty_print=pretty_print)
        if self.DeliveryPartyDetails is not None:
            self.DeliveryPartyDetails.export(outfile, level, namespace_, name_='DeliveryPartyDetails', pretty_print=pretty_print)
        if self.DeliveryOrganisationUnitNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryOrganisationUnitNumber>%s</%sDeliveryOrganisationUnitNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryOrganisationUnitNumber).encode(ExternalEncoding), input_name='DeliveryOrganisationUnitNumber'), namespace_, eol_))
        if self.DeliverySiteCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliverySiteCode>%s</%sDeliverySiteCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliverySiteCode).encode(ExternalEncoding), input_name='DeliverySiteCode'), namespace_, eol_))
        if self.DeliveryContactPersonName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryContactPersonName>%s</%sDeliveryContactPersonName>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryContactPersonName).encode(ExternalEncoding), input_name='DeliveryContactPersonName'), namespace_, eol_))
        for DeliveryContactPersonFunction_ in self.DeliveryContactPersonFunction:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryContactPersonFunction>%s</%sDeliveryContactPersonFunction>%s' % (namespace_, self.gds_format_string(quote_xml(DeliveryContactPersonFunction_).encode(ExternalEncoding), input_name='DeliveryContactPersonFunction'), namespace_, eol_))
        for DeliveryContactPersonDepartment_ in self.DeliveryContactPersonDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryContactPersonDepartment>%s</%sDeliveryContactPersonDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(DeliveryContactPersonDepartment_).encode(ExternalEncoding), input_name='DeliveryContactPersonDepartment'), namespace_, eol_))
        if self.DeliveryCommunicationDetails is not None:
            self.DeliveryCommunicationDetails.export(outfile, level, namespace_, name_='DeliveryCommunicationDetails', pretty_print=pretty_print)
        if self.DeliveryDetails is not None:
            self.DeliveryDetails.export(outfile, level, namespace_, name_='DeliveryDetails', pretty_print=pretty_print)
        for AnyPartyDetails_ in self.AnyPartyDetails:
            AnyPartyDetails_.export(outfile, level, namespace_, name_='AnyPartyDetails', pretty_print=pretty_print)
        if self.InvoiceDetails is not None:
            self.InvoiceDetails.export(outfile, level, namespace_, name_='InvoiceDetails', pretty_print=pretty_print)
        if self.PaymentStatusDetails is not None:
            self.PaymentStatusDetails.export(outfile, level, namespace_, name_='PaymentStatusDetails', pretty_print=pretty_print)
        for PartialPaymentDetails_ in self.PartialPaymentDetails:
            PartialPaymentDetails_.export(outfile, level, namespace_, name_='PartialPaymentDetails', pretty_print=pretty_print)
        if self.FactoringAgreementDetails is not None:
            self.FactoringAgreementDetails.export(outfile, level, namespace_, name_='FactoringAgreementDetails', pretty_print=pretty_print)
        if self.VirtualBankBarcode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sVirtualBankBarcode>%s</%sVirtualBankBarcode>%s' % (namespace_, self.gds_format_string(quote_xml(self.VirtualBankBarcode).encode(ExternalEncoding), input_name='VirtualBankBarcode'), namespace_, eol_))
        for InvoiceRow_ in self.InvoiceRow:
            InvoiceRow_.export(outfile, level, namespace_, name_='InvoiceRow', pretty_print=pretty_print)
        if self.SpecificationDetails is not None:
            self.SpecificationDetails.export(outfile, level, namespace_, name_='SpecificationDetails', pretty_print=pretty_print)
        if self.EpiDetails is not None:
            self.EpiDetails.export(outfile, level, namespace_, name_='EpiDetails', pretty_print=pretty_print)
        for InvoiceUrlNameText_ in self.InvoiceUrlNameText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceUrlNameText>%s</%sInvoiceUrlNameText>%s' % (namespace_, self.gds_format_string(quote_xml(InvoiceUrlNameText_).encode(ExternalEncoding), input_name='InvoiceUrlNameText'), namespace_, eol_))
        for InvoiceUrlText_ in self.InvoiceUrlText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceUrlText>%s</%sInvoiceUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(InvoiceUrlText_).encode(ExternalEncoding), input_name='InvoiceUrlText'), namespace_, eol_))
        if self.StorageUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sStorageUrlText>%s</%sStorageUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.StorageUrlText).encode(ExternalEncoding), input_name='StorageUrlText'), namespace_, eol_))
        if self.LayOutIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLayOutIdentifier>%s</%sLayOutIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.LayOutIdentifier).encode(ExternalEncoding), input_name='LayOutIdentifier'), namespace_, eol_))
        if self.InvoiceSegmentIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceSegmentIdentifier>%s</%sInvoiceSegmentIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceSegmentIdentifier).encode(ExternalEncoding), input_name='InvoiceSegmentIdentifier'), namespace_, eol_))
        if self.ControlStampText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sControlStampText>%s</%sControlStampText>%s' % (namespace_, self.gds_format_string(quote_xml(self.ControlStampText).encode(ExternalEncoding), input_name='ControlStampText'), namespace_, eol_))
        if self.AcceptanceStampText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcceptanceStampText>%s</%sAcceptanceStampText>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcceptanceStampText).encode(ExternalEncoding), input_name='AcceptanceStampText'), namespace_, eol_))
        if self.OriginalInvoiceFormat is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOriginalInvoiceFormat>%s</%sOriginalInvoiceFormat>%s' % (namespace_, self.gds_format_string(quote_xml(self.OriginalInvoiceFormat).encode(ExternalEncoding), input_name='OriginalInvoiceFormat'), namespace_, eol_))
        if self.AttachmentMessageDetails is not None:
            self.AttachmentMessageDetails.export(outfile, level, namespace_, name_='AttachmentMessageDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Finvoice'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.Version is not None and 'Version' not in already_processed:
            already_processed.add('Version')
            showIndent(outfile, level)
            outfile.write('Version="%s",\n' % (self.Version,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MessageTransmissionDetails is not None:
            showIndent(outfile, level)
            outfile.write('MessageTransmissionDetails=model_.MessageTransmissionDetailsType(\n')
            self.MessageTransmissionDetails.exportLiteral(outfile, level, name_='MessageTransmissionDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SellerPartyDetails is not None:
            showIndent(outfile, level)
            outfile.write('SellerPartyDetails=model_.SellerPartyDetailsType(\n')
            self.SellerPartyDetails.exportLiteral(outfile, level, name_='SellerPartyDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SellerOrganisationUnitNumber is not None:
            showIndent(outfile, level)
            outfile.write('SellerOrganisationUnitNumber=%s,\n' % quote_python(self.SellerOrganisationUnitNumber).encode(ExternalEncoding))
        if self.SellerSiteCode is not None:
            showIndent(outfile, level)
            outfile.write('SellerSiteCode=%s,\n' % quote_python(self.SellerSiteCode).encode(ExternalEncoding))
        if self.SellerContactPersonName is not None:
            showIndent(outfile, level)
            outfile.write('SellerContactPersonName=%s,\n' % quote_python(self.SellerContactPersonName).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SellerContactPersonFunction=[\n')
        level += 1
        for SellerContactPersonFunction_ in self.SellerContactPersonFunction:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SellerContactPersonFunction_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('SellerContactPersonDepartment=[\n')
        level += 1
        for SellerContactPersonDepartment_ in self.SellerContactPersonDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SellerContactPersonDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SellerCommunicationDetails is not None:
            showIndent(outfile, level)
            outfile.write('SellerCommunicationDetails=model_.SellerCommunicationDetailsType(\n')
            self.SellerCommunicationDetails.exportLiteral(outfile, level, name_='SellerCommunicationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SellerInformationDetails is not None:
            showIndent(outfile, level)
            outfile.write('SellerInformationDetails=model_.SellerInformationDetailsType(\n')
            self.SellerInformationDetails.exportLiteral(outfile, level, name_='SellerInformationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InvoiceSenderPartyDetails is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceSenderPartyDetails=model_.InvoiceSenderPartyDetailsType(\n')
            self.InvoiceSenderPartyDetails.exportLiteral(outfile, level, name_='InvoiceSenderPartyDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InvoiceRecipientPartyDetails is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientPartyDetails=model_.InvoiceRecipientPartyDetailsType(\n')
            self.InvoiceRecipientPartyDetails.exportLiteral(outfile, level, name_='InvoiceRecipientPartyDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InvoiceRecipientOrganisationUnitNumber is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientOrganisationUnitNumber=%s,\n' % quote_python(self.InvoiceRecipientOrganisationUnitNumber).encode(ExternalEncoding))
        if self.InvoiceRecipientSiteCode is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientSiteCode=%s,\n' % quote_python(self.InvoiceRecipientSiteCode).encode(ExternalEncoding))
        if self.InvoiceRecipientContactPersonName is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientContactPersonName=%s,\n' % quote_python(self.InvoiceRecipientContactPersonName).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('InvoiceRecipientContactPersonFunction=[\n')
        level += 1
        for InvoiceRecipientContactPersonFunction_ in self.InvoiceRecipientContactPersonFunction:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(InvoiceRecipientContactPersonFunction_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('InvoiceRecipientContactPersonDepartment=[\n')
        level += 1
        for InvoiceRecipientContactPersonDepartment_ in self.InvoiceRecipientContactPersonDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(InvoiceRecipientContactPersonDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.InvoiceRecipientLanguageCode is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientLanguageCode=%s,\n' % quote_python(self.InvoiceRecipientLanguageCode).encode(ExternalEncoding))
        if self.InvoiceRecipientCommunicationDetails is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientCommunicationDetails=model_.InvoiceRecipientCommunicationDetailsType(\n')
            self.InvoiceRecipientCommunicationDetails.exportLiteral(outfile, level, name_='InvoiceRecipientCommunicationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.BuyerPartyDetails is not None:
            showIndent(outfile, level)
            outfile.write('BuyerPartyDetails=model_.BuyerPartyDetailsType(\n')
            self.BuyerPartyDetails.exportLiteral(outfile, level, name_='BuyerPartyDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.BuyerOrganisationUnitNumber is not None:
            showIndent(outfile, level)
            outfile.write('BuyerOrganisationUnitNumber=%s,\n' % quote_python(self.BuyerOrganisationUnitNumber).encode(ExternalEncoding))
        if self.BuyerSiteCode is not None:
            showIndent(outfile, level)
            outfile.write('BuyerSiteCode=%s,\n' % quote_python(self.BuyerSiteCode).encode(ExternalEncoding))
        if self.BuyerContactPersonName is not None:
            showIndent(outfile, level)
            outfile.write('BuyerContactPersonName=%s,\n' % quote_python(self.BuyerContactPersonName).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('BuyerContactPersonFunction=[\n')
        level += 1
        for BuyerContactPersonFunction_ in self.BuyerContactPersonFunction:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(BuyerContactPersonFunction_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('BuyerContactPersonDepartment=[\n')
        level += 1
        for BuyerContactPersonDepartment_ in self.BuyerContactPersonDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(BuyerContactPersonDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.BuyerCommunicationDetails is not None:
            showIndent(outfile, level)
            outfile.write('BuyerCommunicationDetails=model_.BuyerCommunicationDetailsType(\n')
            self.BuyerCommunicationDetails.exportLiteral(outfile, level, name_='BuyerCommunicationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DeliveryPartyDetails is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryPartyDetails=model_.DeliveryPartyDetailsType(\n')
            self.DeliveryPartyDetails.exportLiteral(outfile, level, name_='DeliveryPartyDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DeliveryOrganisationUnitNumber is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryOrganisationUnitNumber=%s,\n' % quote_python(self.DeliveryOrganisationUnitNumber).encode(ExternalEncoding))
        if self.DeliverySiteCode is not None:
            showIndent(outfile, level)
            outfile.write('DeliverySiteCode=%s,\n' % quote_python(self.DeliverySiteCode).encode(ExternalEncoding))
        if self.DeliveryContactPersonName is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryContactPersonName=%s,\n' % quote_python(self.DeliveryContactPersonName).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('DeliveryContactPersonFunction=[\n')
        level += 1
        for DeliveryContactPersonFunction_ in self.DeliveryContactPersonFunction:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(DeliveryContactPersonFunction_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('DeliveryContactPersonDepartment=[\n')
        level += 1
        for DeliveryContactPersonDepartment_ in self.DeliveryContactPersonDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(DeliveryContactPersonDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.DeliveryCommunicationDetails is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryCommunicationDetails=model_.DeliveryCommunicationDetailsType(\n')
            self.DeliveryCommunicationDetails.exportLiteral(outfile, level, name_='DeliveryCommunicationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DeliveryDetails is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryDetails=model_.DeliveryDetailsType(\n')
            self.DeliveryDetails.exportLiteral(outfile, level, name_='DeliveryDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('AnyPartyDetails=[\n')
        level += 1
        for AnyPartyDetails_ in self.AnyPartyDetails:
            showIndent(outfile, level)
            outfile.write('model_.AnyPartyDetailsType(\n')
            AnyPartyDetails_.exportLiteral(outfile, level, name_='AnyPartyDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.InvoiceDetails is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceDetails=model_.InvoiceDetailsType(\n')
            self.InvoiceDetails.exportLiteral(outfile, level, name_='InvoiceDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.PaymentStatusDetails is not None:
            showIndent(outfile, level)
            outfile.write('PaymentStatusDetails=model_.PaymentStatusDetailsType(\n')
            self.PaymentStatusDetails.exportLiteral(outfile, level, name_='PaymentStatusDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('PartialPaymentDetails=[\n')
        level += 1
        for PartialPaymentDetails_ in self.PartialPaymentDetails:
            showIndent(outfile, level)
            outfile.write('model_.PartialPaymentDetailsType(\n')
            PartialPaymentDetails_.exportLiteral(outfile, level, name_='PartialPaymentDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.FactoringAgreementDetails is not None:
            showIndent(outfile, level)
            outfile.write('FactoringAgreementDetails=model_.FactoringAgreementDetailsType(\n')
            self.FactoringAgreementDetails.exportLiteral(outfile, level, name_='FactoringAgreementDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.VirtualBankBarcode is not None:
            showIndent(outfile, level)
            outfile.write('VirtualBankBarcode=%s,\n' % quote_python(self.VirtualBankBarcode).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('InvoiceRow=[\n')
        level += 1
        for InvoiceRow_ in self.InvoiceRow:
            showIndent(outfile, level)
            outfile.write('model_.InvoiceRowType(\n')
            InvoiceRow_.exportLiteral(outfile, level, name_='InvoiceRowType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SpecificationDetails is not None:
            showIndent(outfile, level)
            outfile.write('SpecificationDetails=model_.SpecificationDetailsType(\n')
            self.SpecificationDetails.exportLiteral(outfile, level, name_='SpecificationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EpiDetails is not None:
            showIndent(outfile, level)
            outfile.write('EpiDetails=model_.EpiDetailsType(\n')
            self.EpiDetails.exportLiteral(outfile, level, name_='EpiDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('InvoiceUrlNameText=[\n')
        level += 1
        for InvoiceUrlNameText_ in self.InvoiceUrlNameText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(InvoiceUrlNameText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('InvoiceUrlText=[\n')
        level += 1
        for InvoiceUrlText_ in self.InvoiceUrlText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(InvoiceUrlText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.StorageUrlText is not None:
            showIndent(outfile, level)
            outfile.write('StorageUrlText=%s,\n' % quote_python(self.StorageUrlText).encode(ExternalEncoding))
        if self.LayOutIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('LayOutIdentifier=%s,\n' % quote_python(self.LayOutIdentifier).encode(ExternalEncoding))
        if self.InvoiceSegmentIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceSegmentIdentifier=%s,\n' % quote_python(self.InvoiceSegmentIdentifier).encode(ExternalEncoding))
        if self.ControlStampText is not None:
            showIndent(outfile, level)
            outfile.write('ControlStampText=%s,\n' % quote_python(self.ControlStampText).encode(ExternalEncoding))
        if self.AcceptanceStampText is not None:
            showIndent(outfile, level)
            outfile.write('AcceptanceStampText=%s,\n' % quote_python(self.AcceptanceStampText).encode(ExternalEncoding))
        if self.OriginalInvoiceFormat is not None:
            showIndent(outfile, level)
            outfile.write('OriginalInvoiceFormat=%s,\n' % quote_python(self.OriginalInvoiceFormat).encode(ExternalEncoding))
        if self.AttachmentMessageDetails is not None:
            showIndent(outfile, level)
            outfile.write('AttachmentMessageDetails=model_.AttachmentMessageDetailsType(\n')
            self.AttachmentMessageDetails.exportLiteral(outfile, level, name_='AttachmentMessageDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Version', node)
        if value is not None and 'Version' not in already_processed:
            already_processed.add('Version')
            self.Version = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MessageTransmissionDetails':
            obj_ = MessageTransmissionDetailsType.factory()
            obj_.build(child_)
            self.MessageTransmissionDetails = obj_
            obj_.original_tagname_ = 'MessageTransmissionDetails'
        elif nodeName_ == 'SellerPartyDetails':
            obj_ = SellerPartyDetailsType.factory()
            obj_.build(child_)
            self.SellerPartyDetails = obj_
            obj_.original_tagname_ = 'SellerPartyDetails'
        elif nodeName_ == 'SellerOrganisationUnitNumber':
            SellerOrganisationUnitNumber_ = child_.text
            SellerOrganisationUnitNumber_ = self.gds_validate_string(SellerOrganisationUnitNumber_, node, 'SellerOrganisationUnitNumber')
            self.SellerOrganisationUnitNumber = SellerOrganisationUnitNumber_
            self.validate_genericStringType0_35(self.SellerOrganisationUnitNumber)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerSiteCode':
            SellerSiteCode_ = child_.text
            SellerSiteCode_ = self.gds_validate_string(SellerSiteCode_, node, 'SellerSiteCode')
            self.SellerSiteCode = SellerSiteCode_
            self.validate_genericStringType0_35(self.SellerSiteCode)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerContactPersonName':
            SellerContactPersonName_ = child_.text
            SellerContactPersonName_ = self.gds_validate_string(SellerContactPersonName_, node, 'SellerContactPersonName')
            self.SellerContactPersonName = SellerContactPersonName_
            self.validate_genericStringType0_35(self.SellerContactPersonName)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerContactPersonFunction':
            SellerContactPersonFunction_ = child_.text
            SellerContactPersonFunction_ = self.gds_validate_string(SellerContactPersonFunction_, node, 'SellerContactPersonFunction')
            self.SellerContactPersonFunction.append(SellerContactPersonFunction_)
            self.validate_genericStringType0_35(self.SellerContactPersonFunction)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerContactPersonDepartment':
            SellerContactPersonDepartment_ = child_.text
            SellerContactPersonDepartment_ = self.gds_validate_string(SellerContactPersonDepartment_, node, 'SellerContactPersonDepartment')
            self.SellerContactPersonDepartment.append(SellerContactPersonDepartment_)
            self.validate_genericStringType0_35(self.SellerContactPersonDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerCommunicationDetails':
            obj_ = SellerCommunicationDetailsType.factory()
            obj_.build(child_)
            self.SellerCommunicationDetails = obj_
            obj_.original_tagname_ = 'SellerCommunicationDetails'
        elif nodeName_ == 'SellerInformationDetails':
            obj_ = SellerInformationDetailsType.factory()
            obj_.build(child_)
            self.SellerInformationDetails = obj_
            obj_.original_tagname_ = 'SellerInformationDetails'
        elif nodeName_ == 'InvoiceSenderPartyDetails':
            obj_ = InvoiceSenderPartyDetailsType.factory()
            obj_.build(child_)
            self.InvoiceSenderPartyDetails = obj_
            obj_.original_tagname_ = 'InvoiceSenderPartyDetails'
        elif nodeName_ == 'InvoiceRecipientPartyDetails':
            obj_ = InvoiceRecipientPartyDetailsType.factory()
            obj_.build(child_)
            self.InvoiceRecipientPartyDetails = obj_
            obj_.original_tagname_ = 'InvoiceRecipientPartyDetails'
        elif nodeName_ == 'InvoiceRecipientOrganisationUnitNumber':
            InvoiceRecipientOrganisationUnitNumber_ = child_.text
            InvoiceRecipientOrganisationUnitNumber_ = self.gds_validate_string(InvoiceRecipientOrganisationUnitNumber_, node, 'InvoiceRecipientOrganisationUnitNumber')
            self.InvoiceRecipientOrganisationUnitNumber = InvoiceRecipientOrganisationUnitNumber_
            self.validate_genericStringType0_35(self.InvoiceRecipientOrganisationUnitNumber)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceRecipientSiteCode':
            InvoiceRecipientSiteCode_ = child_.text
            InvoiceRecipientSiteCode_ = self.gds_validate_string(InvoiceRecipientSiteCode_, node, 'InvoiceRecipientSiteCode')
            self.InvoiceRecipientSiteCode = InvoiceRecipientSiteCode_
            self.validate_genericStringType0_35(self.InvoiceRecipientSiteCode)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceRecipientContactPersonName':
            InvoiceRecipientContactPersonName_ = child_.text
            InvoiceRecipientContactPersonName_ = self.gds_validate_string(InvoiceRecipientContactPersonName_, node, 'InvoiceRecipientContactPersonName')
            self.InvoiceRecipientContactPersonName = InvoiceRecipientContactPersonName_
            self.validate_genericStringType0_35(self.InvoiceRecipientContactPersonName)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceRecipientContactPersonFunction':
            InvoiceRecipientContactPersonFunction_ = child_.text
            InvoiceRecipientContactPersonFunction_ = self.gds_validate_string(InvoiceRecipientContactPersonFunction_, node, 'InvoiceRecipientContactPersonFunction')
            self.InvoiceRecipientContactPersonFunction.append(InvoiceRecipientContactPersonFunction_)
            self.validate_genericStringType0_35(self.InvoiceRecipientContactPersonFunction)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceRecipientContactPersonDepartment':
            InvoiceRecipientContactPersonDepartment_ = child_.text
            InvoiceRecipientContactPersonDepartment_ = self.gds_validate_string(InvoiceRecipientContactPersonDepartment_, node, 'InvoiceRecipientContactPersonDepartment')
            self.InvoiceRecipientContactPersonDepartment.append(InvoiceRecipientContactPersonDepartment_)
            self.validate_genericStringType0_35(self.InvoiceRecipientContactPersonDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceRecipientLanguageCode':
            InvoiceRecipientLanguageCode_ = child_.text
            InvoiceRecipientLanguageCode_ = self.gds_validate_string(InvoiceRecipientLanguageCode_, node, 'InvoiceRecipientLanguageCode')
            self.InvoiceRecipientLanguageCode = InvoiceRecipientLanguageCode_
            self.validate_LanguageCodeType(self.InvoiceRecipientLanguageCode)    # validate type LanguageCodeType
        elif nodeName_ == 'InvoiceRecipientCommunicationDetails':
            obj_ = InvoiceRecipientCommunicationDetailsType.factory()
            obj_.build(child_)
            self.InvoiceRecipientCommunicationDetails = obj_
            obj_.original_tagname_ = 'InvoiceRecipientCommunicationDetails'
        elif nodeName_ == 'BuyerPartyDetails':
            obj_ = BuyerPartyDetailsType.factory()
            obj_.build(child_)
            self.BuyerPartyDetails = obj_
            obj_.original_tagname_ = 'BuyerPartyDetails'
        elif nodeName_ == 'BuyerOrganisationUnitNumber':
            BuyerOrganisationUnitNumber_ = child_.text
            BuyerOrganisationUnitNumber_ = self.gds_validate_string(BuyerOrganisationUnitNumber_, node, 'BuyerOrganisationUnitNumber')
            self.BuyerOrganisationUnitNumber = BuyerOrganisationUnitNumber_
            self.validate_genericStringType0_35(self.BuyerOrganisationUnitNumber)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerSiteCode':
            BuyerSiteCode_ = child_.text
            BuyerSiteCode_ = self.gds_validate_string(BuyerSiteCode_, node, 'BuyerSiteCode')
            self.BuyerSiteCode = BuyerSiteCode_
            self.validate_genericStringType0_35(self.BuyerSiteCode)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerContactPersonName':
            BuyerContactPersonName_ = child_.text
            BuyerContactPersonName_ = self.gds_validate_string(BuyerContactPersonName_, node, 'BuyerContactPersonName')
            self.BuyerContactPersonName = BuyerContactPersonName_
            self.validate_genericStringType0_35(self.BuyerContactPersonName)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerContactPersonFunction':
            BuyerContactPersonFunction_ = child_.text
            BuyerContactPersonFunction_ = self.gds_validate_string(BuyerContactPersonFunction_, node, 'BuyerContactPersonFunction')
            self.BuyerContactPersonFunction.append(BuyerContactPersonFunction_)
            self.validate_genericStringType0_35(self.BuyerContactPersonFunction)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerContactPersonDepartment':
            BuyerContactPersonDepartment_ = child_.text
            BuyerContactPersonDepartment_ = self.gds_validate_string(BuyerContactPersonDepartment_, node, 'BuyerContactPersonDepartment')
            self.BuyerContactPersonDepartment.append(BuyerContactPersonDepartment_)
            self.validate_genericStringType0_35(self.BuyerContactPersonDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerCommunicationDetails':
            obj_ = BuyerCommunicationDetailsType.factory()
            obj_.build(child_)
            self.BuyerCommunicationDetails = obj_
            obj_.original_tagname_ = 'BuyerCommunicationDetails'
        elif nodeName_ == 'DeliveryPartyDetails':
            obj_ = DeliveryPartyDetailsType.factory()
            obj_.build(child_)
            self.DeliveryPartyDetails = obj_
            obj_.original_tagname_ = 'DeliveryPartyDetails'
        elif nodeName_ == 'DeliveryOrganisationUnitNumber':
            DeliveryOrganisationUnitNumber_ = child_.text
            DeliveryOrganisationUnitNumber_ = self.gds_validate_string(DeliveryOrganisationUnitNumber_, node, 'DeliveryOrganisationUnitNumber')
            self.DeliveryOrganisationUnitNumber = DeliveryOrganisationUnitNumber_
            self.validate_genericStringType0_35(self.DeliveryOrganisationUnitNumber)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliverySiteCode':
            DeliverySiteCode_ = child_.text
            DeliverySiteCode_ = self.gds_validate_string(DeliverySiteCode_, node, 'DeliverySiteCode')
            self.DeliverySiteCode = DeliverySiteCode_
            self.validate_genericStringType0_35(self.DeliverySiteCode)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryContactPersonName':
            DeliveryContactPersonName_ = child_.text
            DeliveryContactPersonName_ = self.gds_validate_string(DeliveryContactPersonName_, node, 'DeliveryContactPersonName')
            self.DeliveryContactPersonName = DeliveryContactPersonName_
            self.validate_genericStringType0_35(self.DeliveryContactPersonName)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryContactPersonFunction':
            DeliveryContactPersonFunction_ = child_.text
            DeliveryContactPersonFunction_ = self.gds_validate_string(DeliveryContactPersonFunction_, node, 'DeliveryContactPersonFunction')
            self.DeliveryContactPersonFunction.append(DeliveryContactPersonFunction_)
            self.validate_genericStringType0_35(self.DeliveryContactPersonFunction)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryContactPersonDepartment':
            DeliveryContactPersonDepartment_ = child_.text
            DeliveryContactPersonDepartment_ = self.gds_validate_string(DeliveryContactPersonDepartment_, node, 'DeliveryContactPersonDepartment')
            self.DeliveryContactPersonDepartment.append(DeliveryContactPersonDepartment_)
            self.validate_genericStringType0_35(self.DeliveryContactPersonDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryCommunicationDetails':
            obj_ = DeliveryCommunicationDetailsType.factory()
            obj_.build(child_)
            self.DeliveryCommunicationDetails = obj_
            obj_.original_tagname_ = 'DeliveryCommunicationDetails'
        elif nodeName_ == 'DeliveryDetails':
            obj_ = DeliveryDetailsType.factory()
            obj_.build(child_)
            self.DeliveryDetails = obj_
            obj_.original_tagname_ = 'DeliveryDetails'
        elif nodeName_ == 'AnyPartyDetails':
            obj_ = AnyPartyDetailsType.factory()
            obj_.build(child_)
            self.AnyPartyDetails.append(obj_)
            obj_.original_tagname_ = 'AnyPartyDetails'
        elif nodeName_ == 'InvoiceDetails':
            obj_ = InvoiceDetailsType.factory()
            obj_.build(child_)
            self.InvoiceDetails = obj_
            obj_.original_tagname_ = 'InvoiceDetails'
        elif nodeName_ == 'PaymentStatusDetails':
            obj_ = PaymentStatusDetailsType.factory()
            obj_.build(child_)
            self.PaymentStatusDetails = obj_
            obj_.original_tagname_ = 'PaymentStatusDetails'
        elif nodeName_ == 'PartialPaymentDetails':
            obj_ = PartialPaymentDetailsType.factory()
            obj_.build(child_)
            self.PartialPaymentDetails.append(obj_)
            obj_.original_tagname_ = 'PartialPaymentDetails'
        elif nodeName_ == 'FactoringAgreementDetails':
            obj_ = FactoringAgreementDetailsType.factory()
            obj_.build(child_)
            self.FactoringAgreementDetails = obj_
            obj_.original_tagname_ = 'FactoringAgreementDetails'
        elif nodeName_ == 'VirtualBankBarcode':
            VirtualBankBarcode_ = child_.text
            VirtualBankBarcode_ = self.gds_validate_string(VirtualBankBarcode_, node, 'VirtualBankBarcode')
            self.VirtualBankBarcode = VirtualBankBarcode_
            self.validate_genericStringType0_512(self.VirtualBankBarcode)    # validate type genericStringType0_512
        elif nodeName_ == 'InvoiceRow':
            obj_ = InvoiceRowType.factory()
            obj_.build(child_)
            self.InvoiceRow.append(obj_)
            obj_.original_tagname_ = 'InvoiceRow'
        elif nodeName_ == 'SpecificationDetails':
            obj_ = SpecificationDetailsType.factory()
            obj_.build(child_)
            self.SpecificationDetails = obj_
            obj_.original_tagname_ = 'SpecificationDetails'
        elif nodeName_ == 'EpiDetails':
            obj_ = EpiDetailsType.factory()
            obj_.build(child_)
            self.EpiDetails = obj_
            obj_.original_tagname_ = 'EpiDetails'
        elif nodeName_ == 'InvoiceUrlNameText':
            InvoiceUrlNameText_ = child_.text
            InvoiceUrlNameText_ = self.gds_validate_string(InvoiceUrlNameText_, node, 'InvoiceUrlNameText')
            self.InvoiceUrlNameText.append(InvoiceUrlNameText_)
            self.validate_genericStringType0_512(self.InvoiceUrlNameText)    # validate type genericStringType0_512
        elif nodeName_ == 'InvoiceUrlText':
            InvoiceUrlText_ = child_.text
            InvoiceUrlText_ = self.gds_validate_string(InvoiceUrlText_, node, 'InvoiceUrlText')
            self.InvoiceUrlText.append(InvoiceUrlText_)
            self.validate_genericStringType0_512(self.InvoiceUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'StorageUrlText':
            StorageUrlText_ = child_.text
            StorageUrlText_ = self.gds_validate_string(StorageUrlText_, node, 'StorageUrlText')
            self.StorageUrlText = StorageUrlText_
            self.validate_genericStringType0_512(self.StorageUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'LayOutIdentifier':
            LayOutIdentifier_ = child_.text
            LayOutIdentifier_ = self.gds_validate_string(LayOutIdentifier_, node, 'LayOutIdentifier')
            self.LayOutIdentifier = LayOutIdentifier_
            self.validate_genericStringType0_35(self.LayOutIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceSegmentIdentifier':
            InvoiceSegmentIdentifier_ = child_.text
            InvoiceSegmentIdentifier_ = self.gds_validate_string(InvoiceSegmentIdentifier_, node, 'InvoiceSegmentIdentifier')
            self.InvoiceSegmentIdentifier = InvoiceSegmentIdentifier_
            self.validate_genericStringType0_35(self.InvoiceSegmentIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'ControlStampText':
            ControlStampText_ = child_.text
            ControlStampText_ = self.gds_validate_string(ControlStampText_, node, 'ControlStampText')
            self.ControlStampText = ControlStampText_
            self.validate_genericStringType0_512(self.ControlStampText)    # validate type genericStringType0_512
        elif nodeName_ == 'AcceptanceStampText':
            AcceptanceStampText_ = child_.text
            AcceptanceStampText_ = self.gds_validate_string(AcceptanceStampText_, node, 'AcceptanceStampText')
            self.AcceptanceStampText = AcceptanceStampText_
            self.validate_genericStringType0_512(self.AcceptanceStampText)    # validate type genericStringType0_512
        elif nodeName_ == 'OriginalInvoiceFormat':
            OriginalInvoiceFormat_ = child_.text
            OriginalInvoiceFormat_ = self.gds_validate_string(OriginalInvoiceFormat_, node, 'OriginalInvoiceFormat')
            self.OriginalInvoiceFormat = OriginalInvoiceFormat_
            self.validate_genericStringType0_35(self.OriginalInvoiceFormat)    # validate type genericStringType0_35
        elif nodeName_ == 'AttachmentMessageDetails':
            obj_ = AttachmentMessageDetailsType.factory()
            obj_.build(child_)
            self.AttachmentMessageDetails = obj_
            obj_.original_tagname_ = 'AttachmentMessageDetails'
# end class Finvoice


class MessageTransmissionDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, MessageSenderDetails=None, MessageReceiverDetails=None, MessageDetails=None):
        self.original_tagname_ = None
        self.MessageSenderDetails = MessageSenderDetails
        self.MessageReceiverDetails = MessageReceiverDetails
        self.MessageDetails = MessageDetails
    def factory(*args_, **kwargs_):
        if MessageTransmissionDetailsType.subclass:
            return MessageTransmissionDetailsType.subclass(*args_, **kwargs_)
        else:
            return MessageTransmissionDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MessageSenderDetails(self): return self.MessageSenderDetails
    def set_MessageSenderDetails(self, MessageSenderDetails): self.MessageSenderDetails = MessageSenderDetails
    def get_MessageReceiverDetails(self): return self.MessageReceiverDetails
    def set_MessageReceiverDetails(self, MessageReceiverDetails): self.MessageReceiverDetails = MessageReceiverDetails
    def get_MessageDetails(self): return self.MessageDetails
    def set_MessageDetails(self, MessageDetails): self.MessageDetails = MessageDetails
    def hasContent_(self):
        if (
            self.MessageSenderDetails is not None or
            self.MessageReceiverDetails is not None or
            self.MessageDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='MessageTransmissionDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MessageTransmissionDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='MessageTransmissionDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MessageTransmissionDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='MessageTransmissionDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MessageSenderDetails is not None:
            self.MessageSenderDetails.export(outfile, level, namespace_, name_='MessageSenderDetails', pretty_print=pretty_print)
        if self.MessageReceiverDetails is not None:
            self.MessageReceiverDetails.export(outfile, level, namespace_, name_='MessageReceiverDetails', pretty_print=pretty_print)
        if self.MessageDetails is not None:
            self.MessageDetails.export(outfile, level, namespace_, name_='MessageDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MessageTransmissionDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MessageSenderDetails is not None:
            showIndent(outfile, level)
            outfile.write('MessageSenderDetails=model_.MessageSenderDetailsType(\n')
            self.MessageSenderDetails.exportLiteral(outfile, level, name_='MessageSenderDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.MessageReceiverDetails is not None:
            showIndent(outfile, level)
            outfile.write('MessageReceiverDetails=model_.MessageReceiverDetailsType(\n')
            self.MessageReceiverDetails.exportLiteral(outfile, level, name_='MessageReceiverDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.MessageDetails is not None:
            showIndent(outfile, level)
            outfile.write('MessageDetails=model_.MessageDetailsType(\n')
            self.MessageDetails.exportLiteral(outfile, level, name_='MessageDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MessageSenderDetails':
            obj_ = MessageSenderDetailsType.factory()
            obj_.build(child_)
            self.MessageSenderDetails = obj_
            obj_.original_tagname_ = 'MessageSenderDetails'
        elif nodeName_ == 'MessageReceiverDetails':
            obj_ = MessageReceiverDetailsType.factory()
            obj_.build(child_)
            self.MessageReceiverDetails = obj_
            obj_.original_tagname_ = 'MessageReceiverDetails'
        elif nodeName_ == 'MessageDetails':
            obj_ = MessageDetailsType.factory()
            obj_.build(child_)
            self.MessageDetails = obj_
            obj_.original_tagname_ = 'MessageDetails'
# end class MessageTransmissionDetailsType


class AnyPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AnyPartyText=None, AnyPartyIdentifier=None, AnyPartyOrganisationName=None, AnyPartyOrganisationDepartment=None, AnyPartyOrganisationTaxCode=None, AnyPartyCode=None, AnyPartyContactPersonName=None, AnyPartyContactPersonFunction=None, AnyPartyContactPersonDepartment=None, AnyPartyCommunicationDetails=None, AnyPartyPostalAddressDetails=None, AnyPartyOrganisationUnitNumber=None, AnyPartySiteCode=None):
        self.original_tagname_ = None
        self.AnyPartyText = AnyPartyText
        self.AnyPartyIdentifier = AnyPartyIdentifier
        if AnyPartyOrganisationName is None:
            self.AnyPartyOrganisationName = []
        else:
            self.AnyPartyOrganisationName = AnyPartyOrganisationName
        if AnyPartyOrganisationDepartment is None:
            self.AnyPartyOrganisationDepartment = []
        else:
            self.AnyPartyOrganisationDepartment = AnyPartyOrganisationDepartment
        self.AnyPartyOrganisationTaxCode = AnyPartyOrganisationTaxCode
        self.AnyPartyCode = AnyPartyCode
        self.AnyPartyContactPersonName = AnyPartyContactPersonName
        if AnyPartyContactPersonFunction is None:
            self.AnyPartyContactPersonFunction = []
        else:
            self.AnyPartyContactPersonFunction = AnyPartyContactPersonFunction
        if AnyPartyContactPersonDepartment is None:
            self.AnyPartyContactPersonDepartment = []
        else:
            self.AnyPartyContactPersonDepartment = AnyPartyContactPersonDepartment
        self.AnyPartyCommunicationDetails = AnyPartyCommunicationDetails
        self.AnyPartyPostalAddressDetails = AnyPartyPostalAddressDetails
        self.AnyPartyOrganisationUnitNumber = AnyPartyOrganisationUnitNumber
        self.AnyPartySiteCode = AnyPartySiteCode
    def factory(*args_, **kwargs_):
        if AnyPartyDetailsType.subclass:
            return AnyPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return AnyPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AnyPartyText(self): return self.AnyPartyText
    def set_AnyPartyText(self, AnyPartyText): self.AnyPartyText = AnyPartyText
    def get_AnyPartyIdentifier(self): return self.AnyPartyIdentifier
    def set_AnyPartyIdentifier(self, AnyPartyIdentifier): self.AnyPartyIdentifier = AnyPartyIdentifier
    def get_AnyPartyOrganisationName(self): return self.AnyPartyOrganisationName
    def set_AnyPartyOrganisationName(self, AnyPartyOrganisationName): self.AnyPartyOrganisationName = AnyPartyOrganisationName
    def add_AnyPartyOrganisationName(self, value): self.AnyPartyOrganisationName.append(value)
    def insert_AnyPartyOrganisationName_at(self, index, value): self.AnyPartyOrganisationName.insert(index, value)
    def replace_AnyPartyOrganisationName_at(self, index, value): self.AnyPartyOrganisationName[index] = value
    def get_AnyPartyOrganisationDepartment(self): return self.AnyPartyOrganisationDepartment
    def set_AnyPartyOrganisationDepartment(self, AnyPartyOrganisationDepartment): self.AnyPartyOrganisationDepartment = AnyPartyOrganisationDepartment
    def add_AnyPartyOrganisationDepartment(self, value): self.AnyPartyOrganisationDepartment.append(value)
    def insert_AnyPartyOrganisationDepartment_at(self, index, value): self.AnyPartyOrganisationDepartment.insert(index, value)
    def replace_AnyPartyOrganisationDepartment_at(self, index, value): self.AnyPartyOrganisationDepartment[index] = value
    def get_AnyPartyOrganisationTaxCode(self): return self.AnyPartyOrganisationTaxCode
    def set_AnyPartyOrganisationTaxCode(self, AnyPartyOrganisationTaxCode): self.AnyPartyOrganisationTaxCode = AnyPartyOrganisationTaxCode
    def get_AnyPartyCode(self): return self.AnyPartyCode
    def set_AnyPartyCode(self, AnyPartyCode): self.AnyPartyCode = AnyPartyCode
    def get_AnyPartyContactPersonName(self): return self.AnyPartyContactPersonName
    def set_AnyPartyContactPersonName(self, AnyPartyContactPersonName): self.AnyPartyContactPersonName = AnyPartyContactPersonName
    def get_AnyPartyContactPersonFunction(self): return self.AnyPartyContactPersonFunction
    def set_AnyPartyContactPersonFunction(self, AnyPartyContactPersonFunction): self.AnyPartyContactPersonFunction = AnyPartyContactPersonFunction
    def add_AnyPartyContactPersonFunction(self, value): self.AnyPartyContactPersonFunction.append(value)
    def insert_AnyPartyContactPersonFunction_at(self, index, value): self.AnyPartyContactPersonFunction.insert(index, value)
    def replace_AnyPartyContactPersonFunction_at(self, index, value): self.AnyPartyContactPersonFunction[index] = value
    def get_AnyPartyContactPersonDepartment(self): return self.AnyPartyContactPersonDepartment
    def set_AnyPartyContactPersonDepartment(self, AnyPartyContactPersonDepartment): self.AnyPartyContactPersonDepartment = AnyPartyContactPersonDepartment
    def add_AnyPartyContactPersonDepartment(self, value): self.AnyPartyContactPersonDepartment.append(value)
    def insert_AnyPartyContactPersonDepartment_at(self, index, value): self.AnyPartyContactPersonDepartment.insert(index, value)
    def replace_AnyPartyContactPersonDepartment_at(self, index, value): self.AnyPartyContactPersonDepartment[index] = value
    def get_AnyPartyCommunicationDetails(self): return self.AnyPartyCommunicationDetails
    def set_AnyPartyCommunicationDetails(self, AnyPartyCommunicationDetails): self.AnyPartyCommunicationDetails = AnyPartyCommunicationDetails
    def get_AnyPartyPostalAddressDetails(self): return self.AnyPartyPostalAddressDetails
    def set_AnyPartyPostalAddressDetails(self, AnyPartyPostalAddressDetails): self.AnyPartyPostalAddressDetails = AnyPartyPostalAddressDetails
    def get_AnyPartyOrganisationUnitNumber(self): return self.AnyPartyOrganisationUnitNumber
    def set_AnyPartyOrganisationUnitNumber(self, AnyPartyOrganisationUnitNumber): self.AnyPartyOrganisationUnitNumber = AnyPartyOrganisationUnitNumber
    def get_AnyPartySiteCode(self): return self.AnyPartySiteCode
    def set_AnyPartySiteCode(self, AnyPartySiteCode): self.AnyPartySiteCode = AnyPartySiteCode
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.AnyPartyText is not None or
            self.AnyPartyIdentifier is not None or
            self.AnyPartyOrganisationName or
            self.AnyPartyOrganisationDepartment or
            self.AnyPartyOrganisationTaxCode is not None or
            self.AnyPartyCode is not None or
            self.AnyPartyContactPersonName is not None or
            self.AnyPartyContactPersonFunction or
            self.AnyPartyContactPersonDepartment or
            self.AnyPartyCommunicationDetails is not None or
            self.AnyPartyPostalAddressDetails is not None or
            self.AnyPartyOrganisationUnitNumber is not None or
            self.AnyPartySiteCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='AnyPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AnyPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='AnyPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AnyPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='AnyPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AnyPartyText is not None:
            self.AnyPartyText.export(outfile, level, namespace_, name_='AnyPartyText', pretty_print=pretty_print)
        if self.AnyPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyIdentifier>%s</%sAnyPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartyIdentifier).encode(ExternalEncoding), input_name='AnyPartyIdentifier'), namespace_, eol_))
        for AnyPartyOrganisationName_ in self.AnyPartyOrganisationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyOrganisationName>%s</%sAnyPartyOrganisationName>%s' % (namespace_, self.gds_format_string(quote_xml(AnyPartyOrganisationName_).encode(ExternalEncoding), input_name='AnyPartyOrganisationName'), namespace_, eol_))
        for AnyPartyOrganisationDepartment_ in self.AnyPartyOrganisationDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyOrganisationDepartment>%s</%sAnyPartyOrganisationDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(AnyPartyOrganisationDepartment_).encode(ExternalEncoding), input_name='AnyPartyOrganisationDepartment'), namespace_, eol_))
        if self.AnyPartyOrganisationTaxCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyOrganisationTaxCode>%s</%sAnyPartyOrganisationTaxCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartyOrganisationTaxCode).encode(ExternalEncoding), input_name='AnyPartyOrganisationTaxCode'), namespace_, eol_))
        if self.AnyPartyCode is not None:
            self.AnyPartyCode.export(outfile, level, namespace_, name_='AnyPartyCode', pretty_print=pretty_print)
        if self.AnyPartyContactPersonName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyContactPersonName>%s</%sAnyPartyContactPersonName>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartyContactPersonName).encode(ExternalEncoding), input_name='AnyPartyContactPersonName'), namespace_, eol_))
        for AnyPartyContactPersonFunction_ in self.AnyPartyContactPersonFunction:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyContactPersonFunction>%s</%sAnyPartyContactPersonFunction>%s' % (namespace_, self.gds_format_string(quote_xml(AnyPartyContactPersonFunction_).encode(ExternalEncoding), input_name='AnyPartyContactPersonFunction'), namespace_, eol_))
        for AnyPartyContactPersonDepartment_ in self.AnyPartyContactPersonDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyContactPersonDepartment>%s</%sAnyPartyContactPersonDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(AnyPartyContactPersonDepartment_).encode(ExternalEncoding), input_name='AnyPartyContactPersonDepartment'), namespace_, eol_))
        if self.AnyPartyCommunicationDetails is not None:
            self.AnyPartyCommunicationDetails.export(outfile, level, namespace_, name_='AnyPartyCommunicationDetails', pretty_print=pretty_print)
        if self.AnyPartyPostalAddressDetails is not None:
            self.AnyPartyPostalAddressDetails.export(outfile, level, namespace_, name_='AnyPartyPostalAddressDetails', pretty_print=pretty_print)
        if self.AnyPartyOrganisationUnitNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyOrganisationUnitNumber>%s</%sAnyPartyOrganisationUnitNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartyOrganisationUnitNumber).encode(ExternalEncoding), input_name='AnyPartyOrganisationUnitNumber'), namespace_, eol_))
        if self.AnyPartySiteCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartySiteCode>%s</%sAnyPartySiteCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartySiteCode).encode(ExternalEncoding), input_name='AnyPartySiteCode'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='AnyPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AnyPartyText is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyText=model_.anypartytexttype0_35(\n')
            self.AnyPartyText.exportLiteral(outfile, level, name_='AnyPartyText')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.AnyPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyIdentifier=%s,\n' % quote_python(self.AnyPartyIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('AnyPartyOrganisationName=[\n')
        level += 1
        for AnyPartyOrganisationName_ in self.AnyPartyOrganisationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(AnyPartyOrganisationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('AnyPartyOrganisationDepartment=[\n')
        level += 1
        for AnyPartyOrganisationDepartment_ in self.AnyPartyOrganisationDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(AnyPartyOrganisationDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.AnyPartyOrganisationTaxCode is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyOrganisationTaxCode=%s,\n' % quote_python(self.AnyPartyOrganisationTaxCode).encode(ExternalEncoding))
        if self.AnyPartyCode is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyCode=model_.PartyIdentifierType(\n')
            self.AnyPartyCode.exportLiteral(outfile, level, name_='AnyPartyCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.AnyPartyContactPersonName is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyContactPersonName=%s,\n' % quote_python(self.AnyPartyContactPersonName).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('AnyPartyContactPersonFunction=[\n')
        level += 1
        for AnyPartyContactPersonFunction_ in self.AnyPartyContactPersonFunction:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(AnyPartyContactPersonFunction_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('AnyPartyContactPersonDepartment=[\n')
        level += 1
        for AnyPartyContactPersonDepartment_ in self.AnyPartyContactPersonDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(AnyPartyContactPersonDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.AnyPartyCommunicationDetails is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyCommunicationDetails=model_.AnyPartyCommunicationDetailsType(\n')
            self.AnyPartyCommunicationDetails.exportLiteral(outfile, level, name_='AnyPartyCommunicationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.AnyPartyPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyPostalAddressDetails=model_.AnyPartyPostalAddressDetailsType(\n')
            self.AnyPartyPostalAddressDetails.exportLiteral(outfile, level, name_='AnyPartyPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.AnyPartyOrganisationUnitNumber is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyOrganisationUnitNumber=%s,\n' % quote_python(self.AnyPartyOrganisationUnitNumber).encode(ExternalEncoding))
        if self.AnyPartySiteCode is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartySiteCode=%s,\n' % quote_python(self.AnyPartySiteCode).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AnyPartyText':
            obj_ = anypartytexttype0_35.factory()
            obj_.build(child_)
            self.AnyPartyText = obj_
            obj_.original_tagname_ = 'AnyPartyText'
        elif nodeName_ == 'AnyPartyIdentifier':
            AnyPartyIdentifier_ = child_.text
            AnyPartyIdentifier_ = self.gds_validate_string(AnyPartyIdentifier_, node, 'AnyPartyIdentifier')
            self.AnyPartyIdentifier = AnyPartyIdentifier_
            self.validate_genericStringType0_35(self.AnyPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'AnyPartyOrganisationName':
            AnyPartyOrganisationName_ = child_.text
            AnyPartyOrganisationName_ = self.gds_validate_string(AnyPartyOrganisationName_, node, 'AnyPartyOrganisationName')
            self.AnyPartyOrganisationName.append(AnyPartyOrganisationName_)
            self.validate_genericStringType2_35(self.AnyPartyOrganisationName)    # validate type genericStringType2_35
        elif nodeName_ == 'AnyPartyOrganisationDepartment':
            AnyPartyOrganisationDepartment_ = child_.text
            AnyPartyOrganisationDepartment_ = self.gds_validate_string(AnyPartyOrganisationDepartment_, node, 'AnyPartyOrganisationDepartment')
            self.AnyPartyOrganisationDepartment.append(AnyPartyOrganisationDepartment_)
            self.validate_genericStringType0_35(self.AnyPartyOrganisationDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'AnyPartyOrganisationTaxCode':
            AnyPartyOrganisationTaxCode_ = child_.text
            AnyPartyOrganisationTaxCode_ = self.gds_validate_string(AnyPartyOrganisationTaxCode_, node, 'AnyPartyOrganisationTaxCode')
            self.AnyPartyOrganisationTaxCode = AnyPartyOrganisationTaxCode_
            self.validate_genericStringType0_35(self.AnyPartyOrganisationTaxCode)    # validate type genericStringType0_35
        elif nodeName_ == 'AnyPartyCode':
            obj_ = PartyIdentifierType.factory()
            obj_.build(child_)
            self.AnyPartyCode = obj_
            obj_.original_tagname_ = 'AnyPartyCode'
        elif nodeName_ == 'AnyPartyContactPersonName':
            AnyPartyContactPersonName_ = child_.text
            AnyPartyContactPersonName_ = self.gds_validate_string(AnyPartyContactPersonName_, node, 'AnyPartyContactPersonName')
            self.AnyPartyContactPersonName = AnyPartyContactPersonName_
            self.validate_genericStringType0_35(self.AnyPartyContactPersonName)    # validate type genericStringType0_35
        elif nodeName_ == 'AnyPartyContactPersonFunction':
            AnyPartyContactPersonFunction_ = child_.text
            AnyPartyContactPersonFunction_ = self.gds_validate_string(AnyPartyContactPersonFunction_, node, 'AnyPartyContactPersonFunction')
            self.AnyPartyContactPersonFunction.append(AnyPartyContactPersonFunction_)
            self.validate_genericStringType0_35(self.AnyPartyContactPersonFunction)    # validate type genericStringType0_35
        elif nodeName_ == 'AnyPartyContactPersonDepartment':
            AnyPartyContactPersonDepartment_ = child_.text
            AnyPartyContactPersonDepartment_ = self.gds_validate_string(AnyPartyContactPersonDepartment_, node, 'AnyPartyContactPersonDepartment')
            self.AnyPartyContactPersonDepartment.append(AnyPartyContactPersonDepartment_)
            self.validate_genericStringType0_35(self.AnyPartyContactPersonDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'AnyPartyCommunicationDetails':
            obj_ = AnyPartyCommunicationDetailsType.factory()
            obj_.build(child_)
            self.AnyPartyCommunicationDetails = obj_
            obj_.original_tagname_ = 'AnyPartyCommunicationDetails'
        elif nodeName_ == 'AnyPartyPostalAddressDetails':
            obj_ = AnyPartyPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.AnyPartyPostalAddressDetails = obj_
            obj_.original_tagname_ = 'AnyPartyPostalAddressDetails'
        elif nodeName_ == 'AnyPartyOrganisationUnitNumber':
            AnyPartyOrganisationUnitNumber_ = child_.text
            AnyPartyOrganisationUnitNumber_ = self.gds_validate_string(AnyPartyOrganisationUnitNumber_, node, 'AnyPartyOrganisationUnitNumber')
            self.AnyPartyOrganisationUnitNumber = AnyPartyOrganisationUnitNumber_
            self.validate_genericStringType0_35(self.AnyPartyOrganisationUnitNumber)    # validate type genericStringType0_35
        elif nodeName_ == 'AnyPartySiteCode':
            AnyPartySiteCode_ = child_.text
            AnyPartySiteCode_ = self.gds_validate_string(AnyPartySiteCode_, node, 'AnyPartySiteCode')
            self.AnyPartySiteCode = AnyPartySiteCode_
            self.validate_genericStringType0_35(self.AnyPartySiteCode)    # validate type genericStringType0_35
# end class AnyPartyDetailsType


class FactoringAgreementDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, FactoringAgreementIdentifier=None, TransmissionListIdentifier=None, EndorsementClauseCode=None, FactoringTypeCode=None, FactoringFreeText=None, FactoringPartyIdentifier=None, FactoringPartyName=None, FactoringPartyPostalAddressDetails=None):
        self.original_tagname_ = None
        self.FactoringAgreementIdentifier = FactoringAgreementIdentifier
        self.TransmissionListIdentifier = TransmissionListIdentifier
        self.EndorsementClauseCode = EndorsementClauseCode
        self.FactoringTypeCode = FactoringTypeCode
        if FactoringFreeText is None:
            self.FactoringFreeText = []
        else:
            self.FactoringFreeText = FactoringFreeText
        self.FactoringPartyIdentifier = FactoringPartyIdentifier
        self.FactoringPartyName = FactoringPartyName
        self.FactoringPartyPostalAddressDetails = FactoringPartyPostalAddressDetails
    def factory(*args_, **kwargs_):
        if FactoringAgreementDetailsType.subclass:
            return FactoringAgreementDetailsType.subclass(*args_, **kwargs_)
        else:
            return FactoringAgreementDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_FactoringAgreementIdentifier(self): return self.FactoringAgreementIdentifier
    def set_FactoringAgreementIdentifier(self, FactoringAgreementIdentifier): self.FactoringAgreementIdentifier = FactoringAgreementIdentifier
    def get_TransmissionListIdentifier(self): return self.TransmissionListIdentifier
    def set_TransmissionListIdentifier(self, TransmissionListIdentifier): self.TransmissionListIdentifier = TransmissionListIdentifier
    def get_EndorsementClauseCode(self): return self.EndorsementClauseCode
    def set_EndorsementClauseCode(self, EndorsementClauseCode): self.EndorsementClauseCode = EndorsementClauseCode
    def get_FactoringTypeCode(self): return self.FactoringTypeCode
    def set_FactoringTypeCode(self, FactoringTypeCode): self.FactoringTypeCode = FactoringTypeCode
    def get_FactoringFreeText(self): return self.FactoringFreeText
    def set_FactoringFreeText(self, FactoringFreeText): self.FactoringFreeText = FactoringFreeText
    def add_FactoringFreeText(self, value): self.FactoringFreeText.append(value)
    def insert_FactoringFreeText_at(self, index, value): self.FactoringFreeText.insert(index, value)
    def replace_FactoringFreeText_at(self, index, value): self.FactoringFreeText[index] = value
    def get_FactoringPartyIdentifier(self): return self.FactoringPartyIdentifier
    def set_FactoringPartyIdentifier(self, FactoringPartyIdentifier): self.FactoringPartyIdentifier = FactoringPartyIdentifier
    def get_FactoringPartyName(self): return self.FactoringPartyName
    def set_FactoringPartyName(self, FactoringPartyName): self.FactoringPartyName = FactoringPartyName
    def get_FactoringPartyPostalAddressDetails(self): return self.FactoringPartyPostalAddressDetails
    def set_FactoringPartyPostalAddressDetails(self, FactoringPartyPostalAddressDetails): self.FactoringPartyPostalAddressDetails = FactoringPartyPostalAddressDetails
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.FactoringAgreementIdentifier is not None or
            self.TransmissionListIdentifier is not None or
            self.EndorsementClauseCode is not None or
            self.FactoringTypeCode is not None or
            self.FactoringFreeText or
            self.FactoringPartyIdentifier is not None or
            self.FactoringPartyName is not None or
            self.FactoringPartyPostalAddressDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='FactoringAgreementDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FactoringAgreementDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='FactoringAgreementDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='FactoringAgreementDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='FactoringAgreementDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.FactoringAgreementIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFactoringAgreementIdentifier>%s</%sFactoringAgreementIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.FactoringAgreementIdentifier).encode(ExternalEncoding), input_name='FactoringAgreementIdentifier'), namespace_, eol_))
        if self.TransmissionListIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sTransmissionListIdentifier>%s</%sTransmissionListIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.TransmissionListIdentifier).encode(ExternalEncoding), input_name='TransmissionListIdentifier'), namespace_, eol_))
        if self.EndorsementClauseCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEndorsementClauseCode>%s</%sEndorsementClauseCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.EndorsementClauseCode).encode(ExternalEncoding), input_name='EndorsementClauseCode'), namespace_, eol_))
        if self.FactoringTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFactoringTypeCode>%s</%sFactoringTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.FactoringTypeCode).encode(ExternalEncoding), input_name='FactoringTypeCode'), namespace_, eol_))
        for FactoringFreeText_ in self.FactoringFreeText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFactoringFreeText>%s</%sFactoringFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(FactoringFreeText_).encode(ExternalEncoding), input_name='FactoringFreeText'), namespace_, eol_))
        if self.FactoringPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFactoringPartyIdentifier>%s</%sFactoringPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.FactoringPartyIdentifier).encode(ExternalEncoding), input_name='FactoringPartyIdentifier'), namespace_, eol_))
        if self.FactoringPartyName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFactoringPartyName>%s</%sFactoringPartyName>%s' % (namespace_, self.gds_format_string(quote_xml(self.FactoringPartyName).encode(ExternalEncoding), input_name='FactoringPartyName'), namespace_, eol_))
        if self.FactoringPartyPostalAddressDetails is not None:
            self.FactoringPartyPostalAddressDetails.export(outfile, level, namespace_, name_='FactoringPartyPostalAddressDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='FactoringAgreementDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.FactoringAgreementIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('FactoringAgreementIdentifier=%s,\n' % quote_python(self.FactoringAgreementIdentifier).encode(ExternalEncoding))
        if self.TransmissionListIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('TransmissionListIdentifier=%s,\n' % quote_python(self.TransmissionListIdentifier).encode(ExternalEncoding))
        if self.EndorsementClauseCode is not None:
            showIndent(outfile, level)
            outfile.write('EndorsementClauseCode=%s,\n' % quote_python(self.EndorsementClauseCode).encode(ExternalEncoding))
        if self.FactoringTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('FactoringTypeCode=%s,\n' % quote_python(self.FactoringTypeCode).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('FactoringFreeText=[\n')
        level += 1
        for FactoringFreeText_ in self.FactoringFreeText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(FactoringFreeText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.FactoringPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('FactoringPartyIdentifier=%s,\n' % quote_python(self.FactoringPartyIdentifier).encode(ExternalEncoding))
        if self.FactoringPartyName is not None:
            showIndent(outfile, level)
            outfile.write('FactoringPartyName=%s,\n' % quote_python(self.FactoringPartyName).encode(ExternalEncoding))
        if self.FactoringPartyPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('FactoringPartyPostalAddressDetails=model_.FactoringPartyPostalAddressDetailsType(\n')
            self.FactoringPartyPostalAddressDetails.exportLiteral(outfile, level, name_='FactoringPartyPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'FactoringAgreementIdentifier':
            FactoringAgreementIdentifier_ = child_.text
            FactoringAgreementIdentifier_ = self.gds_validate_string(FactoringAgreementIdentifier_, node, 'FactoringAgreementIdentifier')
            self.FactoringAgreementIdentifier = FactoringAgreementIdentifier_
            self.validate_genericStringType0_35(self.FactoringAgreementIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'TransmissionListIdentifier':
            TransmissionListIdentifier_ = child_.text
            TransmissionListIdentifier_ = self.gds_validate_string(TransmissionListIdentifier_, node, 'TransmissionListIdentifier')
            self.TransmissionListIdentifier = TransmissionListIdentifier_
            self.validate_genericStringType0_35(self.TransmissionListIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'EndorsementClauseCode':
            EndorsementClauseCode_ = child_.text
            EndorsementClauseCode_ = self.gds_validate_string(EndorsementClauseCode_, node, 'EndorsementClauseCode')
            self.EndorsementClauseCode = EndorsementClauseCode_
            self.validate_genericStringType0_35(self.EndorsementClauseCode)    # validate type genericStringType0_35
        elif nodeName_ == 'FactoringTypeCode':
            FactoringTypeCode_ = child_.text
            FactoringTypeCode_ = self.gds_validate_string(FactoringTypeCode_, node, 'FactoringTypeCode')
            self.FactoringTypeCode = FactoringTypeCode_
            self.validate_genericStringType0_35(self.FactoringTypeCode)    # validate type genericStringType0_35
        elif nodeName_ == 'FactoringFreeText':
            FactoringFreeText_ = child_.text
            FactoringFreeText_ = self.gds_validate_string(FactoringFreeText_, node, 'FactoringFreeText')
            self.FactoringFreeText.append(FactoringFreeText_)
            self.validate_genericStringType0_70(self.FactoringFreeText)    # validate type genericStringType0_70
        elif nodeName_ == 'FactoringPartyIdentifier':
            FactoringPartyIdentifier_ = child_.text
            FactoringPartyIdentifier_ = self.gds_validate_string(FactoringPartyIdentifier_, node, 'FactoringPartyIdentifier')
            self.FactoringPartyIdentifier = FactoringPartyIdentifier_
            self.validate_genericStringType0_35(self.FactoringPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'FactoringPartyName':
            FactoringPartyName_ = child_.text
            FactoringPartyName_ = self.gds_validate_string(FactoringPartyName_, node, 'FactoringPartyName')
            self.FactoringPartyName = FactoringPartyName_
            self.validate_genericStringType0_35(self.FactoringPartyName)    # validate type genericStringType0_35
        elif nodeName_ == 'FactoringPartyPostalAddressDetails':
            obj_ = FactoringPartyPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.FactoringPartyPostalAddressDetails = obj_
            obj_.original_tagname_ = 'FactoringPartyPostalAddressDetails'
# end class FactoringAgreementDetailsType


class BuyerCommunicationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, BuyerPhoneNumberIdentifier=None, BuyerEmailaddressIdentifier=None):
        self.original_tagname_ = None
        self.BuyerPhoneNumberIdentifier = BuyerPhoneNumberIdentifier
        self.BuyerEmailaddressIdentifier = BuyerEmailaddressIdentifier
    def factory(*args_, **kwargs_):
        if BuyerCommunicationDetailsType.subclass:
            return BuyerCommunicationDetailsType.subclass(*args_, **kwargs_)
        else:
            return BuyerCommunicationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_BuyerPhoneNumberIdentifier(self): return self.BuyerPhoneNumberIdentifier
    def set_BuyerPhoneNumberIdentifier(self, BuyerPhoneNumberIdentifier): self.BuyerPhoneNumberIdentifier = BuyerPhoneNumberIdentifier
    def get_BuyerEmailaddressIdentifier(self): return self.BuyerEmailaddressIdentifier
    def set_BuyerEmailaddressIdentifier(self, BuyerEmailaddressIdentifier): self.BuyerEmailaddressIdentifier = BuyerEmailaddressIdentifier
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.BuyerPhoneNumberIdentifier is not None or
            self.BuyerEmailaddressIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='BuyerCommunicationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BuyerCommunicationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='BuyerCommunicationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='BuyerCommunicationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='BuyerCommunicationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.BuyerPhoneNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerPhoneNumberIdentifier>%s</%sBuyerPhoneNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerPhoneNumberIdentifier).encode(ExternalEncoding), input_name='BuyerPhoneNumberIdentifier'), namespace_, eol_))
        if self.BuyerEmailaddressIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerEmailaddressIdentifier>%s</%sBuyerEmailaddressIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerEmailaddressIdentifier).encode(ExternalEncoding), input_name='BuyerEmailaddressIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='BuyerCommunicationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.BuyerPhoneNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('BuyerPhoneNumberIdentifier=%s,\n' % quote_python(self.BuyerPhoneNumberIdentifier).encode(ExternalEncoding))
        if self.BuyerEmailaddressIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('BuyerEmailaddressIdentifier=%s,\n' % quote_python(self.BuyerEmailaddressIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'BuyerPhoneNumberIdentifier':
            BuyerPhoneNumberIdentifier_ = child_.text
            BuyerPhoneNumberIdentifier_ = self.gds_validate_string(BuyerPhoneNumberIdentifier_, node, 'BuyerPhoneNumberIdentifier')
            self.BuyerPhoneNumberIdentifier = BuyerPhoneNumberIdentifier_
            self.validate_genericStringType0_35(self.BuyerPhoneNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerEmailaddressIdentifier':
            BuyerEmailaddressIdentifier_ = child_.text
            BuyerEmailaddressIdentifier_ = self.gds_validate_string(BuyerEmailaddressIdentifier_, node, 'BuyerEmailaddressIdentifier')
            self.BuyerEmailaddressIdentifier = BuyerEmailaddressIdentifier_
            self.validate_genericStringType0_70(self.BuyerEmailaddressIdentifier)    # validate type genericStringType0_70
# end class BuyerCommunicationDetailsType


class BuyerPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, BuyerPartyIdentifier=None, BuyerOrganisationName=None, BuyerOrganisationDepartment=None, BuyerOrganisationTaxCode=None, BuyerCode=None, BuyerPostalAddressDetails=None):
        self.original_tagname_ = None
        self.BuyerPartyIdentifier = BuyerPartyIdentifier
        if BuyerOrganisationName is None:
            self.BuyerOrganisationName = []
        else:
            self.BuyerOrganisationName = BuyerOrganisationName
        if BuyerOrganisationDepartment is None:
            self.BuyerOrganisationDepartment = []
        else:
            self.BuyerOrganisationDepartment = BuyerOrganisationDepartment
        self.BuyerOrganisationTaxCode = BuyerOrganisationTaxCode
        self.BuyerCode = BuyerCode
        self.BuyerPostalAddressDetails = BuyerPostalAddressDetails
    def factory(*args_, **kwargs_):
        if BuyerPartyDetailsType.subclass:
            return BuyerPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return BuyerPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_BuyerPartyIdentifier(self): return self.BuyerPartyIdentifier
    def set_BuyerPartyIdentifier(self, BuyerPartyIdentifier): self.BuyerPartyIdentifier = BuyerPartyIdentifier
    def get_BuyerOrganisationName(self): return self.BuyerOrganisationName
    def set_BuyerOrganisationName(self, BuyerOrganisationName): self.BuyerOrganisationName = BuyerOrganisationName
    def add_BuyerOrganisationName(self, value): self.BuyerOrganisationName.append(value)
    def insert_BuyerOrganisationName_at(self, index, value): self.BuyerOrganisationName.insert(index, value)
    def replace_BuyerOrganisationName_at(self, index, value): self.BuyerOrganisationName[index] = value
    def get_BuyerOrganisationDepartment(self): return self.BuyerOrganisationDepartment
    def set_BuyerOrganisationDepartment(self, BuyerOrganisationDepartment): self.BuyerOrganisationDepartment = BuyerOrganisationDepartment
    def add_BuyerOrganisationDepartment(self, value): self.BuyerOrganisationDepartment.append(value)
    def insert_BuyerOrganisationDepartment_at(self, index, value): self.BuyerOrganisationDepartment.insert(index, value)
    def replace_BuyerOrganisationDepartment_at(self, index, value): self.BuyerOrganisationDepartment[index] = value
    def get_BuyerOrganisationTaxCode(self): return self.BuyerOrganisationTaxCode
    def set_BuyerOrganisationTaxCode(self, BuyerOrganisationTaxCode): self.BuyerOrganisationTaxCode = BuyerOrganisationTaxCode
    def get_BuyerCode(self): return self.BuyerCode
    def set_BuyerCode(self, BuyerCode): self.BuyerCode = BuyerCode
    def get_BuyerPostalAddressDetails(self): return self.BuyerPostalAddressDetails
    def set_BuyerPostalAddressDetails(self, BuyerPostalAddressDetails): self.BuyerPostalAddressDetails = BuyerPostalAddressDetails
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType2_70(self, value):
        # Validate type genericStringType2_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.BuyerPartyIdentifier is not None or
            self.BuyerOrganisationName or
            self.BuyerOrganisationDepartment or
            self.BuyerOrganisationTaxCode is not None or
            self.BuyerCode is not None or
            self.BuyerPostalAddressDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='BuyerPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BuyerPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='BuyerPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='BuyerPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='BuyerPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.BuyerPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerPartyIdentifier>%s</%sBuyerPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerPartyIdentifier).encode(ExternalEncoding), input_name='BuyerPartyIdentifier'), namespace_, eol_))
        for BuyerOrganisationName_ in self.BuyerOrganisationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerOrganisationName>%s</%sBuyerOrganisationName>%s' % (namespace_, self.gds_format_string(quote_xml(BuyerOrganisationName_).encode(ExternalEncoding), input_name='BuyerOrganisationName'), namespace_, eol_))
        for BuyerOrganisationDepartment_ in self.BuyerOrganisationDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerOrganisationDepartment>%s</%sBuyerOrganisationDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(BuyerOrganisationDepartment_).encode(ExternalEncoding), input_name='BuyerOrganisationDepartment'), namespace_, eol_))
        if self.BuyerOrganisationTaxCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerOrganisationTaxCode>%s</%sBuyerOrganisationTaxCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerOrganisationTaxCode).encode(ExternalEncoding), input_name='BuyerOrganisationTaxCode'), namespace_, eol_))
        if self.BuyerCode is not None:
            self.BuyerCode.export(outfile, level, namespace_, name_='BuyerCode', pretty_print=pretty_print)
        if self.BuyerPostalAddressDetails is not None:
            self.BuyerPostalAddressDetails.export(outfile, level, namespace_, name_='BuyerPostalAddressDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='BuyerPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.BuyerPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('BuyerPartyIdentifier=%s,\n' % quote_python(self.BuyerPartyIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('BuyerOrganisationName=[\n')
        level += 1
        for BuyerOrganisationName_ in self.BuyerOrganisationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(BuyerOrganisationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('BuyerOrganisationDepartment=[\n')
        level += 1
        for BuyerOrganisationDepartment_ in self.BuyerOrganisationDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(BuyerOrganisationDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.BuyerOrganisationTaxCode is not None:
            showIndent(outfile, level)
            outfile.write('BuyerOrganisationTaxCode=%s,\n' % quote_python(self.BuyerOrganisationTaxCode).encode(ExternalEncoding))
        if self.BuyerCode is not None:
            showIndent(outfile, level)
            outfile.write('BuyerCode=model_.PartyIdentifierType(\n')
            self.BuyerCode.exportLiteral(outfile, level, name_='BuyerCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.BuyerPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('BuyerPostalAddressDetails=model_.BuyerPostalAddressDetailsType(\n')
            self.BuyerPostalAddressDetails.exportLiteral(outfile, level, name_='BuyerPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'BuyerPartyIdentifier':
            BuyerPartyIdentifier_ = child_.text
            BuyerPartyIdentifier_ = self.gds_validate_string(BuyerPartyIdentifier_, node, 'BuyerPartyIdentifier')
            self.BuyerPartyIdentifier = BuyerPartyIdentifier_
            self.validate_genericStringType0_35(self.BuyerPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerOrganisationName':
            BuyerOrganisationName_ = child_.text
            BuyerOrganisationName_ = self.gds_validate_string(BuyerOrganisationName_, node, 'BuyerOrganisationName')
            self.BuyerOrganisationName.append(BuyerOrganisationName_)
            self.validate_genericStringType2_70(self.BuyerOrganisationName)    # validate type genericStringType2_70
        elif nodeName_ == 'BuyerOrganisationDepartment':
            BuyerOrganisationDepartment_ = child_.text
            BuyerOrganisationDepartment_ = self.gds_validate_string(BuyerOrganisationDepartment_, node, 'BuyerOrganisationDepartment')
            self.BuyerOrganisationDepartment.append(BuyerOrganisationDepartment_)
            self.validate_genericStringType0_35(self.BuyerOrganisationDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerOrganisationTaxCode':
            BuyerOrganisationTaxCode_ = child_.text
            BuyerOrganisationTaxCode_ = self.gds_validate_string(BuyerOrganisationTaxCode_, node, 'BuyerOrganisationTaxCode')
            self.BuyerOrganisationTaxCode = BuyerOrganisationTaxCode_
            self.validate_genericStringType0_35(self.BuyerOrganisationTaxCode)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerCode':
            obj_ = PartyIdentifierType.factory()
            obj_.build(child_)
            self.BuyerCode = obj_
            obj_.original_tagname_ = 'BuyerCode'
        elif nodeName_ == 'BuyerPostalAddressDetails':
            obj_ = BuyerPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.BuyerPostalAddressDetails = obj_
            obj_.original_tagname_ = 'BuyerPostalAddressDetails'
# end class BuyerPartyDetailsType


class BuyerPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, BuyerStreetName=None, BuyerTownName=None, BuyerPostCodeIdentifier=None, CountryCode=None, CountryName=None, BuyerPostOfficeBoxIdentifier=None):
        self.original_tagname_ = None
        if BuyerStreetName is None:
            self.BuyerStreetName = []
        else:
            self.BuyerStreetName = BuyerStreetName
        self.BuyerTownName = BuyerTownName
        self.BuyerPostCodeIdentifier = BuyerPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
        self.BuyerPostOfficeBoxIdentifier = BuyerPostOfficeBoxIdentifier
    def factory(*args_, **kwargs_):
        if BuyerPostalAddressDetailsType.subclass:
            return BuyerPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return BuyerPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_BuyerStreetName(self): return self.BuyerStreetName
    def set_BuyerStreetName(self, BuyerStreetName): self.BuyerStreetName = BuyerStreetName
    def add_BuyerStreetName(self, value): self.BuyerStreetName.append(value)
    def insert_BuyerStreetName_at(self, index, value): self.BuyerStreetName.insert(index, value)
    def replace_BuyerStreetName_at(self, index, value): self.BuyerStreetName[index] = value
    def get_BuyerTownName(self): return self.BuyerTownName
    def set_BuyerTownName(self, BuyerTownName): self.BuyerTownName = BuyerTownName
    def get_BuyerPostCodeIdentifier(self): return self.BuyerPostCodeIdentifier
    def set_BuyerPostCodeIdentifier(self, BuyerPostCodeIdentifier): self.BuyerPostCodeIdentifier = BuyerPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def get_BuyerPostOfficeBoxIdentifier(self): return self.BuyerPostOfficeBoxIdentifier
    def set_BuyerPostOfficeBoxIdentifier(self, BuyerPostOfficeBoxIdentifier): self.BuyerPostOfficeBoxIdentifier = BuyerPostOfficeBoxIdentifier
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.BuyerStreetName or
            self.BuyerTownName is not None or
            self.BuyerPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None or
            self.BuyerPostOfficeBoxIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='BuyerPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BuyerPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='BuyerPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='BuyerPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='BuyerPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for BuyerStreetName_ in self.BuyerStreetName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerStreetName>%s</%sBuyerStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(BuyerStreetName_).encode(ExternalEncoding), input_name='BuyerStreetName'), namespace_, eol_))
        if self.BuyerTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerTownName>%s</%sBuyerTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerTownName).encode(ExternalEncoding), input_name='BuyerTownName'), namespace_, eol_))
        if self.BuyerPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerPostCodeIdentifier>%s</%sBuyerPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerPostCodeIdentifier).encode(ExternalEncoding), input_name='BuyerPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
        if self.BuyerPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerPostOfficeBoxIdentifier>%s</%sBuyerPostOfficeBoxIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerPostOfficeBoxIdentifier).encode(ExternalEncoding), input_name='BuyerPostOfficeBoxIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='BuyerPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('BuyerStreetName=[\n')
        level += 1
        for BuyerStreetName_ in self.BuyerStreetName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(BuyerStreetName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.BuyerTownName is not None:
            showIndent(outfile, level)
            outfile.write('BuyerTownName=%s,\n' % quote_python(self.BuyerTownName).encode(ExternalEncoding))
        if self.BuyerPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('BuyerPostCodeIdentifier=%s,\n' % quote_python(self.BuyerPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
        if self.BuyerPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('BuyerPostOfficeBoxIdentifier=%s,\n' % quote_python(self.BuyerPostOfficeBoxIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'BuyerStreetName':
            BuyerStreetName_ = child_.text
            BuyerStreetName_ = self.gds_validate_string(BuyerStreetName_, node, 'BuyerStreetName')
            self.BuyerStreetName.append(BuyerStreetName_)
            self.validate_genericStringType2_35(self.BuyerStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'BuyerTownName':
            BuyerTownName_ = child_.text
            BuyerTownName_ = self.gds_validate_string(BuyerTownName_, node, 'BuyerTownName')
            self.BuyerTownName = BuyerTownName_
            self.validate_genericStringType2_35(self.BuyerTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'BuyerPostCodeIdentifier':
            BuyerPostCodeIdentifier_ = child_.text
            BuyerPostCodeIdentifier_ = self.gds_validate_string(BuyerPostCodeIdentifier_, node, 'BuyerPostCodeIdentifier')
            self.BuyerPostCodeIdentifier = BuyerPostCodeIdentifier_
            self.validate_genericStringType2_35(self.BuyerPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'BuyerPostOfficeBoxIdentifier':
            BuyerPostOfficeBoxIdentifier_ = child_.text
            BuyerPostOfficeBoxIdentifier_ = self.gds_validate_string(BuyerPostOfficeBoxIdentifier_, node, 'BuyerPostOfficeBoxIdentifier')
            self.BuyerPostOfficeBoxIdentifier = BuyerPostOfficeBoxIdentifier_
            self.validate_genericStringType0_35(self.BuyerPostOfficeBoxIdentifier)    # validate type genericStringType0_35
# end class BuyerPostalAddressDetailsType


class DeliveryCommunicationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DeliveryPhoneNumberIdentifier=None, DeliveryEmailaddressIdentifier=None):
        self.original_tagname_ = None
        self.DeliveryPhoneNumberIdentifier = DeliveryPhoneNumberIdentifier
        self.DeliveryEmailaddressIdentifier = DeliveryEmailaddressIdentifier
    def factory(*args_, **kwargs_):
        if DeliveryCommunicationDetailsType.subclass:
            return DeliveryCommunicationDetailsType.subclass(*args_, **kwargs_)
        else:
            return DeliveryCommunicationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DeliveryPhoneNumberIdentifier(self): return self.DeliveryPhoneNumberIdentifier
    def set_DeliveryPhoneNumberIdentifier(self, DeliveryPhoneNumberIdentifier): self.DeliveryPhoneNumberIdentifier = DeliveryPhoneNumberIdentifier
    def get_DeliveryEmailaddressIdentifier(self): return self.DeliveryEmailaddressIdentifier
    def set_DeliveryEmailaddressIdentifier(self, DeliveryEmailaddressIdentifier): self.DeliveryEmailaddressIdentifier = DeliveryEmailaddressIdentifier
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.DeliveryPhoneNumberIdentifier is not None or
            self.DeliveryEmailaddressIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='DeliveryCommunicationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DeliveryCommunicationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='DeliveryCommunicationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DeliveryCommunicationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='DeliveryCommunicationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DeliveryPhoneNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryPhoneNumberIdentifier>%s</%sDeliveryPhoneNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryPhoneNumberIdentifier).encode(ExternalEncoding), input_name='DeliveryPhoneNumberIdentifier'), namespace_, eol_))
        if self.DeliveryEmailaddressIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryEmailaddressIdentifier>%s</%sDeliveryEmailaddressIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryEmailaddressIdentifier).encode(ExternalEncoding), input_name='DeliveryEmailaddressIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='DeliveryCommunicationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DeliveryPhoneNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryPhoneNumberIdentifier=%s,\n' % quote_python(self.DeliveryPhoneNumberIdentifier).encode(ExternalEncoding))
        if self.DeliveryEmailaddressIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryEmailaddressIdentifier=%s,\n' % quote_python(self.DeliveryEmailaddressIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DeliveryPhoneNumberIdentifier':
            DeliveryPhoneNumberIdentifier_ = child_.text
            DeliveryPhoneNumberIdentifier_ = self.gds_validate_string(DeliveryPhoneNumberIdentifier_, node, 'DeliveryPhoneNumberIdentifier')
            self.DeliveryPhoneNumberIdentifier = DeliveryPhoneNumberIdentifier_
            self.validate_genericStringType0_35(self.DeliveryPhoneNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryEmailaddressIdentifier':
            DeliveryEmailaddressIdentifier_ = child_.text
            DeliveryEmailaddressIdentifier_ = self.gds_validate_string(DeliveryEmailaddressIdentifier_, node, 'DeliveryEmailaddressIdentifier')
            self.DeliveryEmailaddressIdentifier = DeliveryEmailaddressIdentifier_
            self.validate_genericStringType0_70(self.DeliveryEmailaddressIdentifier)    # validate type genericStringType0_70
# end class DeliveryCommunicationDetailsType


class DeliveryDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DeliveryDate=None, DeliveryPeriodDetails=None, ShipmentPartyDetails=None, DeliveryMethodText=None, DeliveryTermsText=None, DeliveryTermsCode=None, TerminalAddressText=None, WaybillIdentifier=None, WaybillTypeCode=None, ClearanceIdentifier=None, DeliveryNoteIdentifier=None, DelivererIdentifier=None, DelivererName=None, DelivererCountryCode=None, DelivererCountryName=None, ModeOfTransportIdentifier=None, CarrierName=None, VesselName=None, LocationIdentifier=None, TransportInformationDate=None, CountryOfOrigin=None, CountryOfDestinationName=None, DestinationCountryCode=None, PlaceOfDischarge=None, FinalDestinationName=None, ManufacturerIdentifier=None, ManufacturerName=None, ManufacturerCountryCode=None, ManufacturerCountryName=None, ManufacturerOrderIdentifier=None, PackageDetails=None):
        self.original_tagname_ = None
        self.DeliveryDate = DeliveryDate
        self.DeliveryPeriodDetails = DeliveryPeriodDetails
        self.ShipmentPartyDetails = ShipmentPartyDetails
        self.DeliveryMethodText = DeliveryMethodText
        self.DeliveryTermsText = DeliveryTermsText
        self.DeliveryTermsCode = DeliveryTermsCode
        self.TerminalAddressText = TerminalAddressText
        self.WaybillIdentifier = WaybillIdentifier
        self.WaybillTypeCode = WaybillTypeCode
        self.ClearanceIdentifier = ClearanceIdentifier
        self.DeliveryNoteIdentifier = DeliveryNoteIdentifier
        self.DelivererIdentifier = DelivererIdentifier
        if DelivererName is None:
            self.DelivererName = []
        else:
            self.DelivererName = DelivererName
        self.DelivererCountryCode = DelivererCountryCode
        self.DelivererCountryName = DelivererCountryName
        self.ModeOfTransportIdentifier = ModeOfTransportIdentifier
        self.CarrierName = CarrierName
        self.VesselName = VesselName
        self.LocationIdentifier = LocationIdentifier
        self.TransportInformationDate = TransportInformationDate
        self.CountryOfOrigin = CountryOfOrigin
        self.CountryOfDestinationName = CountryOfDestinationName
        self.DestinationCountryCode = DestinationCountryCode
        if PlaceOfDischarge is None:
            self.PlaceOfDischarge = []
        else:
            self.PlaceOfDischarge = PlaceOfDischarge
        if FinalDestinationName is None:
            self.FinalDestinationName = []
        else:
            self.FinalDestinationName = FinalDestinationName
        self.ManufacturerIdentifier = ManufacturerIdentifier
        if ManufacturerName is None:
            self.ManufacturerName = []
        else:
            self.ManufacturerName = ManufacturerName
        self.ManufacturerCountryCode = ManufacturerCountryCode
        self.ManufacturerCountryName = ManufacturerCountryName
        self.ManufacturerOrderIdentifier = ManufacturerOrderIdentifier
        self.PackageDetails = PackageDetails
    def factory(*args_, **kwargs_):
        if DeliveryDetailsType.subclass:
            return DeliveryDetailsType.subclass(*args_, **kwargs_)
        else:
            return DeliveryDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DeliveryDate(self): return self.DeliveryDate
    def set_DeliveryDate(self, DeliveryDate): self.DeliveryDate = DeliveryDate
    def get_DeliveryPeriodDetails(self): return self.DeliveryPeriodDetails
    def set_DeliveryPeriodDetails(self, DeliveryPeriodDetails): self.DeliveryPeriodDetails = DeliveryPeriodDetails
    def get_ShipmentPartyDetails(self): return self.ShipmentPartyDetails
    def set_ShipmentPartyDetails(self, ShipmentPartyDetails): self.ShipmentPartyDetails = ShipmentPartyDetails
    def get_DeliveryMethodText(self): return self.DeliveryMethodText
    def set_DeliveryMethodText(self, DeliveryMethodText): self.DeliveryMethodText = DeliveryMethodText
    def get_DeliveryTermsText(self): return self.DeliveryTermsText
    def set_DeliveryTermsText(self, DeliveryTermsText): self.DeliveryTermsText = DeliveryTermsText
    def get_DeliveryTermsCode(self): return self.DeliveryTermsCode
    def set_DeliveryTermsCode(self, DeliveryTermsCode): self.DeliveryTermsCode = DeliveryTermsCode
    def get_TerminalAddressText(self): return self.TerminalAddressText
    def set_TerminalAddressText(self, TerminalAddressText): self.TerminalAddressText = TerminalAddressText
    def get_WaybillIdentifier(self): return self.WaybillIdentifier
    def set_WaybillIdentifier(self, WaybillIdentifier): self.WaybillIdentifier = WaybillIdentifier
    def get_WaybillTypeCode(self): return self.WaybillTypeCode
    def set_WaybillTypeCode(self, WaybillTypeCode): self.WaybillTypeCode = WaybillTypeCode
    def get_ClearanceIdentifier(self): return self.ClearanceIdentifier
    def set_ClearanceIdentifier(self, ClearanceIdentifier): self.ClearanceIdentifier = ClearanceIdentifier
    def get_DeliveryNoteIdentifier(self): return self.DeliveryNoteIdentifier
    def set_DeliveryNoteIdentifier(self, DeliveryNoteIdentifier): self.DeliveryNoteIdentifier = DeliveryNoteIdentifier
    def get_DelivererIdentifier(self): return self.DelivererIdentifier
    def set_DelivererIdentifier(self, DelivererIdentifier): self.DelivererIdentifier = DelivererIdentifier
    def get_DelivererName(self): return self.DelivererName
    def set_DelivererName(self, DelivererName): self.DelivererName = DelivererName
    def add_DelivererName(self, value): self.DelivererName.append(value)
    def insert_DelivererName_at(self, index, value): self.DelivererName.insert(index, value)
    def replace_DelivererName_at(self, index, value): self.DelivererName[index] = value
    def get_DelivererCountryCode(self): return self.DelivererCountryCode
    def set_DelivererCountryCode(self, DelivererCountryCode): self.DelivererCountryCode = DelivererCountryCode
    def get_DelivererCountryName(self): return self.DelivererCountryName
    def set_DelivererCountryName(self, DelivererCountryName): self.DelivererCountryName = DelivererCountryName
    def get_ModeOfTransportIdentifier(self): return self.ModeOfTransportIdentifier
    def set_ModeOfTransportIdentifier(self, ModeOfTransportIdentifier): self.ModeOfTransportIdentifier = ModeOfTransportIdentifier
    def get_CarrierName(self): return self.CarrierName
    def set_CarrierName(self, CarrierName): self.CarrierName = CarrierName
    def get_VesselName(self): return self.VesselName
    def set_VesselName(self, VesselName): self.VesselName = VesselName
    def get_LocationIdentifier(self): return self.LocationIdentifier
    def set_LocationIdentifier(self, LocationIdentifier): self.LocationIdentifier = LocationIdentifier
    def get_TransportInformationDate(self): return self.TransportInformationDate
    def set_TransportInformationDate(self, TransportInformationDate): self.TransportInformationDate = TransportInformationDate
    def get_CountryOfOrigin(self): return self.CountryOfOrigin
    def set_CountryOfOrigin(self, CountryOfOrigin): self.CountryOfOrigin = CountryOfOrigin
    def get_CountryOfDestinationName(self): return self.CountryOfDestinationName
    def set_CountryOfDestinationName(self, CountryOfDestinationName): self.CountryOfDestinationName = CountryOfDestinationName
    def get_DestinationCountryCode(self): return self.DestinationCountryCode
    def set_DestinationCountryCode(self, DestinationCountryCode): self.DestinationCountryCode = DestinationCountryCode
    def get_PlaceOfDischarge(self): return self.PlaceOfDischarge
    def set_PlaceOfDischarge(self, PlaceOfDischarge): self.PlaceOfDischarge = PlaceOfDischarge
    def add_PlaceOfDischarge(self, value): self.PlaceOfDischarge.append(value)
    def insert_PlaceOfDischarge_at(self, index, value): self.PlaceOfDischarge.insert(index, value)
    def replace_PlaceOfDischarge_at(self, index, value): self.PlaceOfDischarge[index] = value
    def get_FinalDestinationName(self): return self.FinalDestinationName
    def set_FinalDestinationName(self, FinalDestinationName): self.FinalDestinationName = FinalDestinationName
    def add_FinalDestinationName(self, value): self.FinalDestinationName.append(value)
    def insert_FinalDestinationName_at(self, index, value): self.FinalDestinationName.insert(index, value)
    def replace_FinalDestinationName_at(self, index, value): self.FinalDestinationName[index] = value
    def get_ManufacturerIdentifier(self): return self.ManufacturerIdentifier
    def set_ManufacturerIdentifier(self, ManufacturerIdentifier): self.ManufacturerIdentifier = ManufacturerIdentifier
    def get_ManufacturerName(self): return self.ManufacturerName
    def set_ManufacturerName(self, ManufacturerName): self.ManufacturerName = ManufacturerName
    def add_ManufacturerName(self, value): self.ManufacturerName.append(value)
    def insert_ManufacturerName_at(self, index, value): self.ManufacturerName.insert(index, value)
    def replace_ManufacturerName_at(self, index, value): self.ManufacturerName[index] = value
    def get_ManufacturerCountryCode(self): return self.ManufacturerCountryCode
    def set_ManufacturerCountryCode(self, ManufacturerCountryCode): self.ManufacturerCountryCode = ManufacturerCountryCode
    def get_ManufacturerCountryName(self): return self.ManufacturerCountryName
    def set_ManufacturerCountryName(self, ManufacturerCountryName): self.ManufacturerCountryName = ManufacturerCountryName
    def get_ManufacturerOrderIdentifier(self): return self.ManufacturerOrderIdentifier
    def set_ManufacturerOrderIdentifier(self, ManufacturerOrderIdentifier): self.ManufacturerOrderIdentifier = ManufacturerOrderIdentifier
    def get_PackageDetails(self): return self.PackageDetails
    def set_PackageDetails(self, PackageDetails): self.PackageDetails = PackageDetails
    def validate_genericStringType0_512(self, value):
        # Validate type genericStringType0_512, a restriction on xs:string.
        pass
    def validate_genericStringType1_4(self, value):
        # Validate type genericStringType1_4, a restriction on xs:string.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def hasContent_(self):
        if (
            self.DeliveryDate is not None or
            self.DeliveryPeriodDetails is not None or
            self.ShipmentPartyDetails is not None or
            self.DeliveryMethodText is not None or
            self.DeliveryTermsText is not None or
            self.DeliveryTermsCode is not None or
            self.TerminalAddressText is not None or
            self.WaybillIdentifier is not None or
            self.WaybillTypeCode is not None or
            self.ClearanceIdentifier is not None or
            self.DeliveryNoteIdentifier is not None or
            self.DelivererIdentifier is not None or
            self.DelivererName or
            self.DelivererCountryCode is not None or
            self.DelivererCountryName is not None or
            self.ModeOfTransportIdentifier is not None or
            self.CarrierName is not None or
            self.VesselName is not None or
            self.LocationIdentifier is not None or
            self.TransportInformationDate is not None or
            self.CountryOfOrigin is not None or
            self.CountryOfDestinationName is not None or
            self.DestinationCountryCode is not None or
            self.PlaceOfDischarge or
            self.FinalDestinationName or
            self.ManufacturerIdentifier is not None or
            self.ManufacturerName or
            self.ManufacturerCountryCode is not None or
            self.ManufacturerCountryName is not None or
            self.ManufacturerOrderIdentifier is not None or
            self.PackageDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='DeliveryDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DeliveryDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='DeliveryDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DeliveryDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='DeliveryDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DeliveryDate is not None:
            self.DeliveryDate.export(outfile, level, namespace_, name_='DeliveryDate', pretty_print=pretty_print)
        if self.DeliveryPeriodDetails is not None:
            self.DeliveryPeriodDetails.export(outfile, level, namespace_, name_='DeliveryPeriodDetails', pretty_print=pretty_print)
        if self.ShipmentPartyDetails is not None:
            self.ShipmentPartyDetails.export(outfile, level, namespace_, name_='ShipmentPartyDetails', pretty_print=pretty_print)
        if self.DeliveryMethodText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryMethodText>%s</%sDeliveryMethodText>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryMethodText).encode(ExternalEncoding), input_name='DeliveryMethodText'), namespace_, eol_))
        if self.DeliveryTermsText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryTermsText>%s</%sDeliveryTermsText>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryTermsText).encode(ExternalEncoding), input_name='DeliveryTermsText'), namespace_, eol_))
        if self.DeliveryTermsCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryTermsCode>%s</%sDeliveryTermsCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryTermsCode).encode(ExternalEncoding), input_name='DeliveryTermsCode'), namespace_, eol_))
        if self.TerminalAddressText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sTerminalAddressText>%s</%sTerminalAddressText>%s' % (namespace_, self.gds_format_string(quote_xml(self.TerminalAddressText).encode(ExternalEncoding), input_name='TerminalAddressText'), namespace_, eol_))
        if self.WaybillIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sWaybillIdentifier>%s</%sWaybillIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.WaybillIdentifier).encode(ExternalEncoding), input_name='WaybillIdentifier'), namespace_, eol_))
        if self.WaybillTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sWaybillTypeCode>%s</%sWaybillTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.WaybillTypeCode).encode(ExternalEncoding), input_name='WaybillTypeCode'), namespace_, eol_))
        if self.ClearanceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sClearanceIdentifier>%s</%sClearanceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ClearanceIdentifier).encode(ExternalEncoding), input_name='ClearanceIdentifier'), namespace_, eol_))
        if self.DeliveryNoteIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryNoteIdentifier>%s</%sDeliveryNoteIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryNoteIdentifier).encode(ExternalEncoding), input_name='DeliveryNoteIdentifier'), namespace_, eol_))
        if self.DelivererIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDelivererIdentifier>%s</%sDelivererIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.DelivererIdentifier).encode(ExternalEncoding), input_name='DelivererIdentifier'), namespace_, eol_))
        for DelivererName_ in self.DelivererName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDelivererName>%s</%sDelivererName>%s' % (namespace_, self.gds_format_string(quote_xml(DelivererName_).encode(ExternalEncoding), input_name='DelivererName'), namespace_, eol_))
        if self.DelivererCountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDelivererCountryCode>%s</%sDelivererCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.DelivererCountryCode).encode(ExternalEncoding), input_name='DelivererCountryCode'), namespace_, eol_))
        if self.DelivererCountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDelivererCountryName>%s</%sDelivererCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.DelivererCountryName).encode(ExternalEncoding), input_name='DelivererCountryName'), namespace_, eol_))
        if self.ModeOfTransportIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sModeOfTransportIdentifier>%s</%sModeOfTransportIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ModeOfTransportIdentifier).encode(ExternalEncoding), input_name='ModeOfTransportIdentifier'), namespace_, eol_))
        if self.CarrierName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCarrierName>%s</%sCarrierName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CarrierName).encode(ExternalEncoding), input_name='CarrierName'), namespace_, eol_))
        if self.VesselName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sVesselName>%s</%sVesselName>%s' % (namespace_, self.gds_format_string(quote_xml(self.VesselName).encode(ExternalEncoding), input_name='VesselName'), namespace_, eol_))
        if self.LocationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLocationIdentifier>%s</%sLocationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.LocationIdentifier).encode(ExternalEncoding), input_name='LocationIdentifier'), namespace_, eol_))
        if self.TransportInformationDate is not None:
            self.TransportInformationDate.export(outfile, level, namespace_, name_='TransportInformationDate', pretty_print=pretty_print)
        if self.CountryOfOrigin is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryOfOrigin>%s</%sCountryOfOrigin>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryOfOrigin).encode(ExternalEncoding), input_name='CountryOfOrigin'), namespace_, eol_))
        if self.CountryOfDestinationName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryOfDestinationName>%s</%sCountryOfDestinationName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryOfDestinationName).encode(ExternalEncoding), input_name='CountryOfDestinationName'), namespace_, eol_))
        if self.DestinationCountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDestinationCountryCode>%s</%sDestinationCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.DestinationCountryCode).encode(ExternalEncoding), input_name='DestinationCountryCode'), namespace_, eol_))
        for PlaceOfDischarge_ in self.PlaceOfDischarge:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPlaceOfDischarge>%s</%sPlaceOfDischarge>%s' % (namespace_, self.gds_format_string(quote_xml(PlaceOfDischarge_).encode(ExternalEncoding), input_name='PlaceOfDischarge'), namespace_, eol_))
        for FinalDestinationName_ in self.FinalDestinationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFinalDestinationName>%s</%sFinalDestinationName>%s' % (namespace_, self.gds_format_string(quote_xml(FinalDestinationName_).encode(ExternalEncoding), input_name='FinalDestinationName'), namespace_, eol_))
        if self.ManufacturerIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sManufacturerIdentifier>%s</%sManufacturerIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ManufacturerIdentifier).encode(ExternalEncoding), input_name='ManufacturerIdentifier'), namespace_, eol_))
        for ManufacturerName_ in self.ManufacturerName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sManufacturerName>%s</%sManufacturerName>%s' % (namespace_, self.gds_format_string(quote_xml(ManufacturerName_).encode(ExternalEncoding), input_name='ManufacturerName'), namespace_, eol_))
        if self.ManufacturerCountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sManufacturerCountryCode>%s</%sManufacturerCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.ManufacturerCountryCode).encode(ExternalEncoding), input_name='ManufacturerCountryCode'), namespace_, eol_))
        if self.ManufacturerCountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sManufacturerCountryName>%s</%sManufacturerCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.ManufacturerCountryName).encode(ExternalEncoding), input_name='ManufacturerCountryName'), namespace_, eol_))
        if self.ManufacturerOrderIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sManufacturerOrderIdentifier>%s</%sManufacturerOrderIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ManufacturerOrderIdentifier).encode(ExternalEncoding), input_name='ManufacturerOrderIdentifier'), namespace_, eol_))
        if self.PackageDetails is not None:
            self.PackageDetails.export(outfile, level, namespace_, name_='PackageDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DeliveryDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DeliveryDate is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryDate=model_.date(\n')
            self.DeliveryDate.exportLiteral(outfile, level, name_='DeliveryDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DeliveryPeriodDetails is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryPeriodDetails=model_.DeliveryPeriodDetailsType(\n')
            self.DeliveryPeriodDetails.exportLiteral(outfile, level, name_='DeliveryPeriodDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ShipmentPartyDetails is not None:
            showIndent(outfile, level)
            outfile.write('ShipmentPartyDetails=model_.ShipmentPartyDetailsType(\n')
            self.ShipmentPartyDetails.exportLiteral(outfile, level, name_='ShipmentPartyDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DeliveryMethodText is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryMethodText=%s,\n' % quote_python(self.DeliveryMethodText).encode(ExternalEncoding))
        if self.DeliveryTermsText is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryTermsText=%s,\n' % quote_python(self.DeliveryTermsText).encode(ExternalEncoding))
        if self.DeliveryTermsCode is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryTermsCode=%s,\n' % quote_python(self.DeliveryTermsCode).encode(ExternalEncoding))
        if self.TerminalAddressText is not None:
            showIndent(outfile, level)
            outfile.write('TerminalAddressText=%s,\n' % quote_python(self.TerminalAddressText).encode(ExternalEncoding))
        if self.WaybillIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('WaybillIdentifier=%s,\n' % quote_python(self.WaybillIdentifier).encode(ExternalEncoding))
        if self.WaybillTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('WaybillTypeCode=%s,\n' % quote_python(self.WaybillTypeCode).encode(ExternalEncoding))
        if self.ClearanceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ClearanceIdentifier=%s,\n' % quote_python(self.ClearanceIdentifier).encode(ExternalEncoding))
        if self.DeliveryNoteIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryNoteIdentifier=%s,\n' % quote_python(self.DeliveryNoteIdentifier).encode(ExternalEncoding))
        if self.DelivererIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('DelivererIdentifier=%s,\n' % quote_python(self.DelivererIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('DelivererName=[\n')
        level += 1
        for DelivererName_ in self.DelivererName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(DelivererName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.DelivererCountryCode is not None:
            showIndent(outfile, level)
            outfile.write('DelivererCountryCode=%s,\n' % quote_python(self.DelivererCountryCode).encode(ExternalEncoding))
        if self.DelivererCountryName is not None:
            showIndent(outfile, level)
            outfile.write('DelivererCountryName=%s,\n' % quote_python(self.DelivererCountryName).encode(ExternalEncoding))
        if self.ModeOfTransportIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ModeOfTransportIdentifier=%s,\n' % quote_python(self.ModeOfTransportIdentifier).encode(ExternalEncoding))
        if self.CarrierName is not None:
            showIndent(outfile, level)
            outfile.write('CarrierName=%s,\n' % quote_python(self.CarrierName).encode(ExternalEncoding))
        if self.VesselName is not None:
            showIndent(outfile, level)
            outfile.write('VesselName=%s,\n' % quote_python(self.VesselName).encode(ExternalEncoding))
        if self.LocationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('LocationIdentifier=%s,\n' % quote_python(self.LocationIdentifier).encode(ExternalEncoding))
        if self.TransportInformationDate is not None:
            showIndent(outfile, level)
            outfile.write('TransportInformationDate=model_.date(\n')
            self.TransportInformationDate.exportLiteral(outfile, level, name_='TransportInformationDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CountryOfOrigin is not None:
            showIndent(outfile, level)
            outfile.write('CountryOfOrigin=%s,\n' % quote_python(self.CountryOfOrigin).encode(ExternalEncoding))
        if self.CountryOfDestinationName is not None:
            showIndent(outfile, level)
            outfile.write('CountryOfDestinationName=%s,\n' % quote_python(self.CountryOfDestinationName).encode(ExternalEncoding))
        if self.DestinationCountryCode is not None:
            showIndent(outfile, level)
            outfile.write('DestinationCountryCode=%s,\n' % quote_python(self.DestinationCountryCode).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('PlaceOfDischarge=[\n')
        level += 1
        for PlaceOfDischarge_ in self.PlaceOfDischarge:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(PlaceOfDischarge_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('FinalDestinationName=[\n')
        level += 1
        for FinalDestinationName_ in self.FinalDestinationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(FinalDestinationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.ManufacturerIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ManufacturerIdentifier=%s,\n' % quote_python(self.ManufacturerIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('ManufacturerName=[\n')
        level += 1
        for ManufacturerName_ in self.ManufacturerName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(ManufacturerName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.ManufacturerCountryCode is not None:
            showIndent(outfile, level)
            outfile.write('ManufacturerCountryCode=%s,\n' % quote_python(self.ManufacturerCountryCode).encode(ExternalEncoding))
        if self.ManufacturerCountryName is not None:
            showIndent(outfile, level)
            outfile.write('ManufacturerCountryName=%s,\n' % quote_python(self.ManufacturerCountryName).encode(ExternalEncoding))
        if self.ManufacturerOrderIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ManufacturerOrderIdentifier=%s,\n' % quote_python(self.ManufacturerOrderIdentifier).encode(ExternalEncoding))
        if self.PackageDetails is not None:
            showIndent(outfile, level)
            outfile.write('PackageDetails=model_.PackageDetailsType(\n')
            self.PackageDetails.exportLiteral(outfile, level, name_='PackageDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DeliveryDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.DeliveryDate = obj_
            obj_.original_tagname_ = 'DeliveryDate'
        elif nodeName_ == 'DeliveryPeriodDetails':
            obj_ = DeliveryPeriodDetailsType.factory()
            obj_.build(child_)
            self.DeliveryPeriodDetails = obj_
            obj_.original_tagname_ = 'DeliveryPeriodDetails'
        elif nodeName_ == 'ShipmentPartyDetails':
            obj_ = ShipmentPartyDetailsType.factory()
            obj_.build(child_)
            self.ShipmentPartyDetails = obj_
            obj_.original_tagname_ = 'ShipmentPartyDetails'
        elif nodeName_ == 'DeliveryMethodText':
            DeliveryMethodText_ = child_.text
            DeliveryMethodText_ = self.gds_validate_string(DeliveryMethodText_, node, 'DeliveryMethodText')
            self.DeliveryMethodText = DeliveryMethodText_
            self.validate_genericStringType0_512(self.DeliveryMethodText)    # validate type genericStringType0_512
        elif nodeName_ == 'DeliveryTermsText':
            DeliveryTermsText_ = child_.text
            DeliveryTermsText_ = self.gds_validate_string(DeliveryTermsText_, node, 'DeliveryTermsText')
            self.DeliveryTermsText = DeliveryTermsText_
            self.validate_genericStringType0_512(self.DeliveryTermsText)    # validate type genericStringType0_512
        elif nodeName_ == 'DeliveryTermsCode':
            DeliveryTermsCode_ = child_.text
            DeliveryTermsCode_ = self.gds_validate_string(DeliveryTermsCode_, node, 'DeliveryTermsCode')
            self.DeliveryTermsCode = DeliveryTermsCode_
            self.validate_genericStringType1_4(self.DeliveryTermsCode)    # validate type genericStringType1_4
        elif nodeName_ == 'TerminalAddressText':
            TerminalAddressText_ = child_.text
            TerminalAddressText_ = self.gds_validate_string(TerminalAddressText_, node, 'TerminalAddressText')
            self.TerminalAddressText = TerminalAddressText_
            self.validate_genericStringType0_512(self.TerminalAddressText)    # validate type genericStringType0_512
        elif nodeName_ == 'WaybillIdentifier':
            WaybillIdentifier_ = child_.text
            WaybillIdentifier_ = self.gds_validate_string(WaybillIdentifier_, node, 'WaybillIdentifier')
            self.WaybillIdentifier = WaybillIdentifier_
            self.validate_genericStringType0_35(self.WaybillIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'WaybillTypeCode':
            WaybillTypeCode_ = child_.text
            WaybillTypeCode_ = self.gds_validate_string(WaybillTypeCode_, node, 'WaybillTypeCode')
            self.WaybillTypeCode = WaybillTypeCode_
            self.validate_genericStringType0_35(self.WaybillTypeCode)    # validate type genericStringType0_35
        elif nodeName_ == 'ClearanceIdentifier':
            ClearanceIdentifier_ = child_.text
            ClearanceIdentifier_ = self.gds_validate_string(ClearanceIdentifier_, node, 'ClearanceIdentifier')
            self.ClearanceIdentifier = ClearanceIdentifier_
            self.validate_genericStringType0_35(self.ClearanceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryNoteIdentifier':
            DeliveryNoteIdentifier_ = child_.text
            DeliveryNoteIdentifier_ = self.gds_validate_string(DeliveryNoteIdentifier_, node, 'DeliveryNoteIdentifier')
            self.DeliveryNoteIdentifier = DeliveryNoteIdentifier_
            self.validate_genericStringType0_35(self.DeliveryNoteIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'DelivererIdentifier':
            DelivererIdentifier_ = child_.text
            DelivererIdentifier_ = self.gds_validate_string(DelivererIdentifier_, node, 'DelivererIdentifier')
            self.DelivererIdentifier = DelivererIdentifier_
            self.validate_genericStringType0_35(self.DelivererIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'DelivererName':
            DelivererName_ = child_.text
            DelivererName_ = self.gds_validate_string(DelivererName_, node, 'DelivererName')
            self.DelivererName.append(DelivererName_)
            self.validate_genericStringType0_35(self.DelivererName)    # validate type genericStringType0_35
        elif nodeName_ == 'DelivererCountryCode':
            DelivererCountryCode_ = child_.text
            DelivererCountryCode_ = self.gds_validate_string(DelivererCountryCode_, node, 'DelivererCountryCode')
            self.DelivererCountryCode = DelivererCountryCode_
            self.validate_CountryCodeType(self.DelivererCountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'DelivererCountryName':
            DelivererCountryName_ = child_.text
            DelivererCountryName_ = self.gds_validate_string(DelivererCountryName_, node, 'DelivererCountryName')
            self.DelivererCountryName = DelivererCountryName_
            self.validate_genericStringType0_35(self.DelivererCountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'ModeOfTransportIdentifier':
            ModeOfTransportIdentifier_ = child_.text
            ModeOfTransportIdentifier_ = self.gds_validate_string(ModeOfTransportIdentifier_, node, 'ModeOfTransportIdentifier')
            self.ModeOfTransportIdentifier = ModeOfTransportIdentifier_
            self.validate_genericStringType0_35(self.ModeOfTransportIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'CarrierName':
            CarrierName_ = child_.text
            CarrierName_ = self.gds_validate_string(CarrierName_, node, 'CarrierName')
            self.CarrierName = CarrierName_
            self.validate_genericStringType0_35(self.CarrierName)    # validate type genericStringType0_35
        elif nodeName_ == 'VesselName':
            VesselName_ = child_.text
            VesselName_ = self.gds_validate_string(VesselName_, node, 'VesselName')
            self.VesselName = VesselName_
            self.validate_genericStringType0_35(self.VesselName)    # validate type genericStringType0_35
        elif nodeName_ == 'LocationIdentifier':
            LocationIdentifier_ = child_.text
            LocationIdentifier_ = self.gds_validate_string(LocationIdentifier_, node, 'LocationIdentifier')
            self.LocationIdentifier = LocationIdentifier_
            self.validate_genericStringType0_35(self.LocationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'TransportInformationDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.TransportInformationDate = obj_
            obj_.original_tagname_ = 'TransportInformationDate'
        elif nodeName_ == 'CountryOfOrigin':
            CountryOfOrigin_ = child_.text
            CountryOfOrigin_ = self.gds_validate_string(CountryOfOrigin_, node, 'CountryOfOrigin')
            self.CountryOfOrigin = CountryOfOrigin_
            self.validate_genericStringType0_35(self.CountryOfOrigin)    # validate type genericStringType0_35
        elif nodeName_ == 'CountryOfDestinationName':
            CountryOfDestinationName_ = child_.text
            CountryOfDestinationName_ = self.gds_validate_string(CountryOfDestinationName_, node, 'CountryOfDestinationName')
            self.CountryOfDestinationName = CountryOfDestinationName_
            self.validate_genericStringType0_35(self.CountryOfDestinationName)    # validate type genericStringType0_35
        elif nodeName_ == 'DestinationCountryCode':
            DestinationCountryCode_ = child_.text
            DestinationCountryCode_ = self.gds_validate_string(DestinationCountryCode_, node, 'DestinationCountryCode')
            self.DestinationCountryCode = DestinationCountryCode_
            self.validate_CountryCodeType(self.DestinationCountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'PlaceOfDischarge':
            PlaceOfDischarge_ = child_.text
            PlaceOfDischarge_ = self.gds_validate_string(PlaceOfDischarge_, node, 'PlaceOfDischarge')
            self.PlaceOfDischarge.append(PlaceOfDischarge_)
            self.validate_genericStringType0_35(self.PlaceOfDischarge)    # validate type genericStringType0_35
        elif nodeName_ == 'FinalDestinationName':
            FinalDestinationName_ = child_.text
            FinalDestinationName_ = self.gds_validate_string(FinalDestinationName_, node, 'FinalDestinationName')
            self.FinalDestinationName.append(FinalDestinationName_)
            self.validate_genericStringType0_35(self.FinalDestinationName)    # validate type genericStringType0_35
        elif nodeName_ == 'ManufacturerIdentifier':
            ManufacturerIdentifier_ = child_.text
            ManufacturerIdentifier_ = self.gds_validate_string(ManufacturerIdentifier_, node, 'ManufacturerIdentifier')
            self.ManufacturerIdentifier = ManufacturerIdentifier_
            self.validate_genericStringType0_35(self.ManufacturerIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'ManufacturerName':
            ManufacturerName_ = child_.text
            ManufacturerName_ = self.gds_validate_string(ManufacturerName_, node, 'ManufacturerName')
            self.ManufacturerName.append(ManufacturerName_)
            self.validate_genericStringType0_35(self.ManufacturerName)    # validate type genericStringType0_35
        elif nodeName_ == 'ManufacturerCountryCode':
            ManufacturerCountryCode_ = child_.text
            ManufacturerCountryCode_ = self.gds_validate_string(ManufacturerCountryCode_, node, 'ManufacturerCountryCode')
            self.ManufacturerCountryCode = ManufacturerCountryCode_
            self.validate_CountryCodeType(self.ManufacturerCountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'ManufacturerCountryName':
            ManufacturerCountryName_ = child_.text
            ManufacturerCountryName_ = self.gds_validate_string(ManufacturerCountryName_, node, 'ManufacturerCountryName')
            self.ManufacturerCountryName = ManufacturerCountryName_
            self.validate_genericStringType0_35(self.ManufacturerCountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'ManufacturerOrderIdentifier':
            ManufacturerOrderIdentifier_ = child_.text
            ManufacturerOrderIdentifier_ = self.gds_validate_string(ManufacturerOrderIdentifier_, node, 'ManufacturerOrderIdentifier')
            self.ManufacturerOrderIdentifier = ManufacturerOrderIdentifier_
            self.validate_genericStringType0_35(self.ManufacturerOrderIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'PackageDetails':
            obj_ = PackageDetailsType.factory()
            obj_.build(child_)
            self.PackageDetails = obj_
            obj_.original_tagname_ = 'PackageDetails'
# end class DeliveryDetailsType


class DeliveryPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DeliveryPartyIdentifier=None, DeliveryOrganisationName=None, DeliveryOrganisationDepartment=None, DeliveryOrganisationTaxCode=None, DeliveryCode=None, DeliveryPostalAddressDetails=None):
        self.original_tagname_ = None
        self.DeliveryPartyIdentifier = DeliveryPartyIdentifier
        if DeliveryOrganisationName is None:
            self.DeliveryOrganisationName = []
        else:
            self.DeliveryOrganisationName = DeliveryOrganisationName
        if DeliveryOrganisationDepartment is None:
            self.DeliveryOrganisationDepartment = []
        else:
            self.DeliveryOrganisationDepartment = DeliveryOrganisationDepartment
        self.DeliveryOrganisationTaxCode = DeliveryOrganisationTaxCode
        self.DeliveryCode = DeliveryCode
        self.DeliveryPostalAddressDetails = DeliveryPostalAddressDetails
    def factory(*args_, **kwargs_):
        if DeliveryPartyDetailsType.subclass:
            return DeliveryPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return DeliveryPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DeliveryPartyIdentifier(self): return self.DeliveryPartyIdentifier
    def set_DeliveryPartyIdentifier(self, DeliveryPartyIdentifier): self.DeliveryPartyIdentifier = DeliveryPartyIdentifier
    def get_DeliveryOrganisationName(self): return self.DeliveryOrganisationName
    def set_DeliveryOrganisationName(self, DeliveryOrganisationName): self.DeliveryOrganisationName = DeliveryOrganisationName
    def add_DeliveryOrganisationName(self, value): self.DeliveryOrganisationName.append(value)
    def insert_DeliveryOrganisationName_at(self, index, value): self.DeliveryOrganisationName.insert(index, value)
    def replace_DeliveryOrganisationName_at(self, index, value): self.DeliveryOrganisationName[index] = value
    def get_DeliveryOrganisationDepartment(self): return self.DeliveryOrganisationDepartment
    def set_DeliveryOrganisationDepartment(self, DeliveryOrganisationDepartment): self.DeliveryOrganisationDepartment = DeliveryOrganisationDepartment
    def add_DeliveryOrganisationDepartment(self, value): self.DeliveryOrganisationDepartment.append(value)
    def insert_DeliveryOrganisationDepartment_at(self, index, value): self.DeliveryOrganisationDepartment.insert(index, value)
    def replace_DeliveryOrganisationDepartment_at(self, index, value): self.DeliveryOrganisationDepartment[index] = value
    def get_DeliveryOrganisationTaxCode(self): return self.DeliveryOrganisationTaxCode
    def set_DeliveryOrganisationTaxCode(self, DeliveryOrganisationTaxCode): self.DeliveryOrganisationTaxCode = DeliveryOrganisationTaxCode
    def get_DeliveryCode(self): return self.DeliveryCode
    def set_DeliveryCode(self, DeliveryCode): self.DeliveryCode = DeliveryCode
    def get_DeliveryPostalAddressDetails(self): return self.DeliveryPostalAddressDetails
    def set_DeliveryPostalAddressDetails(self, DeliveryPostalAddressDetails): self.DeliveryPostalAddressDetails = DeliveryPostalAddressDetails
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.DeliveryPartyIdentifier is not None or
            self.DeliveryOrganisationName or
            self.DeliveryOrganisationDepartment or
            self.DeliveryOrganisationTaxCode is not None or
            self.DeliveryCode is not None or
            self.DeliveryPostalAddressDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='DeliveryPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DeliveryPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='DeliveryPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DeliveryPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='DeliveryPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DeliveryPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryPartyIdentifier>%s</%sDeliveryPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryPartyIdentifier).encode(ExternalEncoding), input_name='DeliveryPartyIdentifier'), namespace_, eol_))
        for DeliveryOrganisationName_ in self.DeliveryOrganisationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryOrganisationName>%s</%sDeliveryOrganisationName>%s' % (namespace_, self.gds_format_string(quote_xml(DeliveryOrganisationName_).encode(ExternalEncoding), input_name='DeliveryOrganisationName'), namespace_, eol_))
        for DeliveryOrganisationDepartment_ in self.DeliveryOrganisationDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryOrganisationDepartment>%s</%sDeliveryOrganisationDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(DeliveryOrganisationDepartment_).encode(ExternalEncoding), input_name='DeliveryOrganisationDepartment'), namespace_, eol_))
        if self.DeliveryOrganisationTaxCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryOrganisationTaxCode>%s</%sDeliveryOrganisationTaxCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryOrganisationTaxCode).encode(ExternalEncoding), input_name='DeliveryOrganisationTaxCode'), namespace_, eol_))
        if self.DeliveryCode is not None:
            self.DeliveryCode.export(outfile, level, namespace_, name_='DeliveryCode', pretty_print=pretty_print)
        if self.DeliveryPostalAddressDetails is not None:
            self.DeliveryPostalAddressDetails.export(outfile, level, namespace_, name_='DeliveryPostalAddressDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DeliveryPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DeliveryPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryPartyIdentifier=%s,\n' % quote_python(self.DeliveryPartyIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('DeliveryOrganisationName=[\n')
        level += 1
        for DeliveryOrganisationName_ in self.DeliveryOrganisationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(DeliveryOrganisationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('DeliveryOrganisationDepartment=[\n')
        level += 1
        for DeliveryOrganisationDepartment_ in self.DeliveryOrganisationDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(DeliveryOrganisationDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.DeliveryOrganisationTaxCode is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryOrganisationTaxCode=%s,\n' % quote_python(self.DeliveryOrganisationTaxCode).encode(ExternalEncoding))
        if self.DeliveryCode is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryCode=model_.PartyIdentifierType(\n')
            self.DeliveryCode.exportLiteral(outfile, level, name_='DeliveryCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DeliveryPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryPostalAddressDetails=model_.DeliveryPostalAddressDetailsType(\n')
            self.DeliveryPostalAddressDetails.exportLiteral(outfile, level, name_='DeliveryPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DeliveryPartyIdentifier':
            DeliveryPartyIdentifier_ = child_.text
            DeliveryPartyIdentifier_ = self.gds_validate_string(DeliveryPartyIdentifier_, node, 'DeliveryPartyIdentifier')
            self.DeliveryPartyIdentifier = DeliveryPartyIdentifier_
            self.validate_genericStringType0_35(self.DeliveryPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryOrganisationName':
            DeliveryOrganisationName_ = child_.text
            DeliveryOrganisationName_ = self.gds_validate_string(DeliveryOrganisationName_, node, 'DeliveryOrganisationName')
            self.DeliveryOrganisationName.append(DeliveryOrganisationName_)
            self.validate_genericStringType2_35(self.DeliveryOrganisationName)    # validate type genericStringType2_35
        elif nodeName_ == 'DeliveryOrganisationDepartment':
            DeliveryOrganisationDepartment_ = child_.text
            DeliveryOrganisationDepartment_ = self.gds_validate_string(DeliveryOrganisationDepartment_, node, 'DeliveryOrganisationDepartment')
            self.DeliveryOrganisationDepartment.append(DeliveryOrganisationDepartment_)
            self.validate_genericStringType0_35(self.DeliveryOrganisationDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryOrganisationTaxCode':
            DeliveryOrganisationTaxCode_ = child_.text
            DeliveryOrganisationTaxCode_ = self.gds_validate_string(DeliveryOrganisationTaxCode_, node, 'DeliveryOrganisationTaxCode')
            self.DeliveryOrganisationTaxCode = DeliveryOrganisationTaxCode_
            self.validate_genericStringType0_35(self.DeliveryOrganisationTaxCode)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryCode':
            obj_ = PartyIdentifierType.factory()
            obj_.build(child_)
            self.DeliveryCode = obj_
            obj_.original_tagname_ = 'DeliveryCode'
        elif nodeName_ == 'DeliveryPostalAddressDetails':
            obj_ = DeliveryPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.DeliveryPostalAddressDetails = obj_
            obj_.original_tagname_ = 'DeliveryPostalAddressDetails'
# end class DeliveryPartyDetailsType


class DeliveryPeriodDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, StartDate=None, EndDate=None):
        self.original_tagname_ = None
        self.StartDate = StartDate
        self.EndDate = EndDate
    def factory(*args_, **kwargs_):
        if DeliveryPeriodDetailsType.subclass:
            return DeliveryPeriodDetailsType.subclass(*args_, **kwargs_)
        else:
            return DeliveryPeriodDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_StartDate(self): return self.StartDate
    def set_StartDate(self, StartDate): self.StartDate = StartDate
    def get_EndDate(self): return self.EndDate
    def set_EndDate(self, EndDate): self.EndDate = EndDate
    def hasContent_(self):
        if (
            self.StartDate is not None or
            self.EndDate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='DeliveryPeriodDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DeliveryPeriodDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='DeliveryPeriodDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DeliveryPeriodDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='DeliveryPeriodDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.StartDate is not None:
            self.StartDate.export(outfile, level, namespace_, name_='StartDate', pretty_print=pretty_print)
        if self.EndDate is not None:
            self.EndDate.export(outfile, level, namespace_, name_='EndDate', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DeliveryPeriodDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.StartDate is not None:
            showIndent(outfile, level)
            outfile.write('StartDate=model_.date(\n')
            self.StartDate.exportLiteral(outfile, level, name_='StartDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EndDate is not None:
            showIndent(outfile, level)
            outfile.write('EndDate=model_.date(\n')
            self.EndDate.exportLiteral(outfile, level, name_='EndDate')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'StartDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.StartDate = obj_
            obj_.original_tagname_ = 'StartDate'
        elif nodeName_ == 'EndDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.EndDate = obj_
            obj_.original_tagname_ = 'EndDate'
# end class DeliveryPeriodDetailsType


class DeliveryPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DeliveryStreetName=None, DeliveryTownName=None, DeliveryPostCodeIdentifier=None, CountryCode=None, CountryName=None, DeliveryPostofficeBoxIdentifier=None):
        self.original_tagname_ = None
        if DeliveryStreetName is None:
            self.DeliveryStreetName = []
        else:
            self.DeliveryStreetName = DeliveryStreetName
        self.DeliveryTownName = DeliveryTownName
        self.DeliveryPostCodeIdentifier = DeliveryPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
        self.DeliveryPostofficeBoxIdentifier = DeliveryPostofficeBoxIdentifier
    def factory(*args_, **kwargs_):
        if DeliveryPostalAddressDetailsType.subclass:
            return DeliveryPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return DeliveryPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DeliveryStreetName(self): return self.DeliveryStreetName
    def set_DeliveryStreetName(self, DeliveryStreetName): self.DeliveryStreetName = DeliveryStreetName
    def add_DeliveryStreetName(self, value): self.DeliveryStreetName.append(value)
    def insert_DeliveryStreetName_at(self, index, value): self.DeliveryStreetName.insert(index, value)
    def replace_DeliveryStreetName_at(self, index, value): self.DeliveryStreetName[index] = value
    def get_DeliveryTownName(self): return self.DeliveryTownName
    def set_DeliveryTownName(self, DeliveryTownName): self.DeliveryTownName = DeliveryTownName
    def get_DeliveryPostCodeIdentifier(self): return self.DeliveryPostCodeIdentifier
    def set_DeliveryPostCodeIdentifier(self, DeliveryPostCodeIdentifier): self.DeliveryPostCodeIdentifier = DeliveryPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def get_DeliveryPostofficeBoxIdentifier(self): return self.DeliveryPostofficeBoxIdentifier
    def set_DeliveryPostofficeBoxIdentifier(self, DeliveryPostofficeBoxIdentifier): self.DeliveryPostofficeBoxIdentifier = DeliveryPostofficeBoxIdentifier
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.DeliveryStreetName or
            self.DeliveryTownName is not None or
            self.DeliveryPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None or
            self.DeliveryPostofficeBoxIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='DeliveryPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DeliveryPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='DeliveryPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DeliveryPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='DeliveryPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for DeliveryStreetName_ in self.DeliveryStreetName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryStreetName>%s</%sDeliveryStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(DeliveryStreetName_).encode(ExternalEncoding), input_name='DeliveryStreetName'), namespace_, eol_))
        if self.DeliveryTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryTownName>%s</%sDeliveryTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryTownName).encode(ExternalEncoding), input_name='DeliveryTownName'), namespace_, eol_))
        if self.DeliveryPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryPostCodeIdentifier>%s</%sDeliveryPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryPostCodeIdentifier).encode(ExternalEncoding), input_name='DeliveryPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
        if self.DeliveryPostofficeBoxIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDeliveryPostofficeBoxIdentifier>%s</%sDeliveryPostofficeBoxIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.DeliveryPostofficeBoxIdentifier).encode(ExternalEncoding), input_name='DeliveryPostofficeBoxIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='DeliveryPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('DeliveryStreetName=[\n')
        level += 1
        for DeliveryStreetName_ in self.DeliveryStreetName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(DeliveryStreetName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.DeliveryTownName is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryTownName=%s,\n' % quote_python(self.DeliveryTownName).encode(ExternalEncoding))
        if self.DeliveryPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryPostCodeIdentifier=%s,\n' % quote_python(self.DeliveryPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
        if self.DeliveryPostofficeBoxIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('DeliveryPostofficeBoxIdentifier=%s,\n' % quote_python(self.DeliveryPostofficeBoxIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DeliveryStreetName':
            DeliveryStreetName_ = child_.text
            DeliveryStreetName_ = self.gds_validate_string(DeliveryStreetName_, node, 'DeliveryStreetName')
            self.DeliveryStreetName.append(DeliveryStreetName_)
            self.validate_genericStringType2_35(self.DeliveryStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'DeliveryTownName':
            DeliveryTownName_ = child_.text
            DeliveryTownName_ = self.gds_validate_string(DeliveryTownName_, node, 'DeliveryTownName')
            self.DeliveryTownName = DeliveryTownName_
            self.validate_genericStringType2_35(self.DeliveryTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'DeliveryPostCodeIdentifier':
            DeliveryPostCodeIdentifier_ = child_.text
            DeliveryPostCodeIdentifier_ = self.gds_validate_string(DeliveryPostCodeIdentifier_, node, 'DeliveryPostCodeIdentifier')
            self.DeliveryPostCodeIdentifier = DeliveryPostCodeIdentifier_
            self.validate_genericStringType2_35(self.DeliveryPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'DeliveryPostofficeBoxIdentifier':
            DeliveryPostofficeBoxIdentifier_ = child_.text
            DeliveryPostofficeBoxIdentifier_ = self.gds_validate_string(DeliveryPostofficeBoxIdentifier_, node, 'DeliveryPostofficeBoxIdentifier')
            self.DeliveryPostofficeBoxIdentifier = DeliveryPostofficeBoxIdentifier_
            self.validate_genericStringType0_35(self.DeliveryPostofficeBoxIdentifier)    # validate type genericStringType0_35
# end class DeliveryPostalAddressDetailsType


class EpiAccountIDType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, IdentificationSchemeName=None, valueOf_=None):
        self.original_tagname_ = None
        self.IdentificationSchemeName = _cast(None, IdentificationSchemeName)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if EpiAccountIDType.subclass:
            return EpiAccountIDType.subclass(*args_, **kwargs_)
        else:
            return EpiAccountIDType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_IdentificationSchemeName(self): return self.IdentificationSchemeName
    def set_IdentificationSchemeName(self, IdentificationSchemeName): self.IdentificationSchemeName = IdentificationSchemeName
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiAccountIDType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiAccountIDType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiAccountIDType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiAccountIDType'):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            outfile.write(' IdentificationSchemeName=%s' % (self.gds_format_string(quote_attrib(self.IdentificationSchemeName).encode(ExternalEncoding), input_name='IdentificationSchemeName'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='EpiAccountIDType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='EpiAccountIDType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            showIndent(outfile, level)
            outfile.write('IdentificationSchemeName="%s",\n' % (self.IdentificationSchemeName,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('IdentificationSchemeName', node)
        if value is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            self.IdentificationSchemeName = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class EpiAccountIDType


class EpiBfiIdentifierType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, IdentificationSchemeName=None, valueOf_=None):
        self.original_tagname_ = None
        self.IdentificationSchemeName = _cast(None, IdentificationSchemeName)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if EpiBfiIdentifierType.subclass:
            return EpiBfiIdentifierType.subclass(*args_, **kwargs_)
        else:
            return EpiBfiIdentifierType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_IdentificationSchemeName(self): return self.IdentificationSchemeName
    def set_IdentificationSchemeName(self, IdentificationSchemeName): self.IdentificationSchemeName = IdentificationSchemeName
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiBfiIdentifierType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiBfiIdentifierType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiBfiIdentifierType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiBfiIdentifierType'):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            outfile.write(' IdentificationSchemeName=%s' % (self.gds_format_string(quote_attrib(self.IdentificationSchemeName).encode(ExternalEncoding), input_name='IdentificationSchemeName'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='EpiBfiIdentifierType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='EpiBfiIdentifierType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            showIndent(outfile, level)
            outfile.write('IdentificationSchemeName="%s",\n' % (self.IdentificationSchemeName,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('IdentificationSchemeName', node)
        if value is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            self.IdentificationSchemeName = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class EpiBfiIdentifierType


class EpiDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, EpiIdentificationDetails=None, EpiPartyDetails=None, EpiPaymentInstructionDetails=None):
        self.original_tagname_ = None
        self.EpiIdentificationDetails = EpiIdentificationDetails
        self.EpiPartyDetails = EpiPartyDetails
        self.EpiPaymentInstructionDetails = EpiPaymentInstructionDetails
    def factory(*args_, **kwargs_):
        if EpiDetailsType.subclass:
            return EpiDetailsType.subclass(*args_, **kwargs_)
        else:
            return EpiDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EpiIdentificationDetails(self): return self.EpiIdentificationDetails
    def set_EpiIdentificationDetails(self, EpiIdentificationDetails): self.EpiIdentificationDetails = EpiIdentificationDetails
    def get_EpiPartyDetails(self): return self.EpiPartyDetails
    def set_EpiPartyDetails(self, EpiPartyDetails): self.EpiPartyDetails = EpiPartyDetails
    def get_EpiPaymentInstructionDetails(self): return self.EpiPaymentInstructionDetails
    def set_EpiPaymentInstructionDetails(self, EpiPaymentInstructionDetails): self.EpiPaymentInstructionDetails = EpiPaymentInstructionDetails
    def hasContent_(self):
        if (
            self.EpiIdentificationDetails is not None or
            self.EpiPartyDetails is not None or
            self.EpiPaymentInstructionDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='EpiDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EpiIdentificationDetails is not None:
            self.EpiIdentificationDetails.export(outfile, level, namespace_, name_='EpiIdentificationDetails', pretty_print=pretty_print)
        if self.EpiPartyDetails is not None:
            self.EpiPartyDetails.export(outfile, level, namespace_, name_='EpiPartyDetails', pretty_print=pretty_print)
        if self.EpiPaymentInstructionDetails is not None:
            self.EpiPaymentInstructionDetails.export(outfile, level, namespace_, name_='EpiPaymentInstructionDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EpiDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EpiIdentificationDetails is not None:
            showIndent(outfile, level)
            outfile.write('EpiIdentificationDetails=model_.EpiIdentificationDetailsType(\n')
            self.EpiIdentificationDetails.exportLiteral(outfile, level, name_='EpiIdentificationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EpiPartyDetails is not None:
            showIndent(outfile, level)
            outfile.write('EpiPartyDetails=model_.EpiPartyDetailsType(\n')
            self.EpiPartyDetails.exportLiteral(outfile, level, name_='EpiPartyDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EpiPaymentInstructionDetails is not None:
            showIndent(outfile, level)
            outfile.write('EpiPaymentInstructionDetails=model_.EpiPaymentInstructionDetailsType(\n')
            self.EpiPaymentInstructionDetails.exportLiteral(outfile, level, name_='EpiPaymentInstructionDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EpiIdentificationDetails':
            obj_ = EpiIdentificationDetailsType.factory()
            obj_.build(child_)
            self.EpiIdentificationDetails = obj_
            obj_.original_tagname_ = 'EpiIdentificationDetails'
        elif nodeName_ == 'EpiPartyDetails':
            obj_ = EpiPartyDetailsType.factory()
            obj_.build(child_)
            self.EpiPartyDetails = obj_
            obj_.original_tagname_ = 'EpiPartyDetails'
        elif nodeName_ == 'EpiPaymentInstructionDetails':
            obj_ = EpiPaymentInstructionDetailsType.factory()
            obj_.build(child_)
            self.EpiPaymentInstructionDetails = obj_
            obj_.original_tagname_ = 'EpiPaymentInstructionDetails'
# end class EpiDetailsType


class EpiIdentificationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, EpiDate=None, EpiReference=None, EpiUrl=None, EpiEmail=None, EpiOrderInfo=None):
        self.original_tagname_ = None
        self.EpiDate = EpiDate
        self.EpiReference = EpiReference
        self.EpiUrl = EpiUrl
        self.EpiEmail = EpiEmail
        if EpiOrderInfo is None:
            self.EpiOrderInfo = []
        else:
            self.EpiOrderInfo = EpiOrderInfo
    def factory(*args_, **kwargs_):
        if EpiIdentificationDetailsType.subclass:
            return EpiIdentificationDetailsType.subclass(*args_, **kwargs_)
        else:
            return EpiIdentificationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EpiDate(self): return self.EpiDate
    def set_EpiDate(self, EpiDate): self.EpiDate = EpiDate
    def get_EpiReference(self): return self.EpiReference
    def set_EpiReference(self, EpiReference): self.EpiReference = EpiReference
    def get_EpiUrl(self): return self.EpiUrl
    def set_EpiUrl(self, EpiUrl): self.EpiUrl = EpiUrl
    def get_EpiEmail(self): return self.EpiEmail
    def set_EpiEmail(self, EpiEmail): self.EpiEmail = EpiEmail
    def get_EpiOrderInfo(self): return self.EpiOrderInfo
    def set_EpiOrderInfo(self, EpiOrderInfo): self.EpiOrderInfo = EpiOrderInfo
    def add_EpiOrderInfo(self, value): self.EpiOrderInfo.append(value)
    def insert_EpiOrderInfo_at(self, index, value): self.EpiOrderInfo.insert(index, value)
    def replace_EpiOrderInfo_at(self, index, value): self.EpiOrderInfo[index] = value
    def validate_genericNMtokenType0_35(self, value):
        # Validate type genericNMtokenType0_35, a restriction on xs:token.
        pass
    def validate_genericNMtokenType0_512(self, value):
        # Validate type genericNMtokenType0_512, a restriction on xs:token.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def validate_genericTokenType0_70(self, value):
        # Validate type genericTokenType0_70, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.EpiDate is not None or
            self.EpiReference is not None or
            self.EpiUrl is not None or
            self.EpiEmail is not None or
            self.EpiOrderInfo
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiIdentificationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiIdentificationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiIdentificationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiIdentificationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='EpiIdentificationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EpiDate is not None:
            self.EpiDate.export(outfile, level, namespace_, name_='EpiDate', pretty_print=pretty_print)
        if self.EpiReference is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiReference>%s</%sEpiReference>%s' % (namespace_, self.gds_format_string(quote_xml(self.EpiReference).encode(ExternalEncoding), input_name='EpiReference'), namespace_, eol_))
        if self.EpiUrl is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiUrl>%s</%sEpiUrl>%s' % (namespace_, self.gds_format_string(quote_xml(self.EpiUrl).encode(ExternalEncoding), input_name='EpiUrl'), namespace_, eol_))
        if self.EpiEmail is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiEmail>%s</%sEpiEmail>%s' % (namespace_, self.gds_format_string(quote_xml(self.EpiEmail).encode(ExternalEncoding), input_name='EpiEmail'), namespace_, eol_))
        for EpiOrderInfo_ in self.EpiOrderInfo:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiOrderInfo>%s</%sEpiOrderInfo>%s' % (namespace_, self.gds_format_string(quote_xml(EpiOrderInfo_).encode(ExternalEncoding), input_name='EpiOrderInfo'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='EpiIdentificationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EpiDate is not None:
            showIndent(outfile, level)
            outfile.write('EpiDate=model_.date(\n')
            self.EpiDate.exportLiteral(outfile, level, name_='EpiDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EpiReference is not None:
            showIndent(outfile, level)
            outfile.write('EpiReference=%s,\n' % quote_python(self.EpiReference).encode(ExternalEncoding))
        if self.EpiUrl is not None:
            showIndent(outfile, level)
            outfile.write('EpiUrl=%s,\n' % quote_python(self.EpiUrl).encode(ExternalEncoding))
        if self.EpiEmail is not None:
            showIndent(outfile, level)
            outfile.write('EpiEmail=%s,\n' % quote_python(self.EpiEmail).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('EpiOrderInfo=[\n')
        level += 1
        for EpiOrderInfo_ in self.EpiOrderInfo:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(EpiOrderInfo_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EpiDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.EpiDate = obj_
            obj_.original_tagname_ = 'EpiDate'
        elif nodeName_ == 'EpiReference':
            EpiReference_ = child_.text
            EpiReference_ = re_.sub(String_cleanup_pat_, " ", EpiReference_).strip()
            EpiReference_ = self.gds_validate_string(EpiReference_, node, 'EpiReference')
            self.EpiReference = EpiReference_
            self.validate_genericNMtokenType0_35(self.EpiReference)    # validate type genericNMtokenType0_35
        elif nodeName_ == 'EpiUrl':
            EpiUrl_ = child_.text
            EpiUrl_ = re_.sub(String_cleanup_pat_, " ", EpiUrl_).strip()
            EpiUrl_ = self.gds_validate_string(EpiUrl_, node, 'EpiUrl')
            self.EpiUrl = EpiUrl_
            self.validate_genericNMtokenType0_512(self.EpiUrl)    # validate type genericNMtokenType0_512
        elif nodeName_ == 'EpiEmail':
            EpiEmail_ = child_.text
            EpiEmail_ = self.gds_validate_string(EpiEmail_, node, 'EpiEmail')
            self.EpiEmail = EpiEmail_
            self.validate_genericStringType0_70(self.EpiEmail)    # validate type genericStringType0_70
        elif nodeName_ == 'EpiOrderInfo':
            EpiOrderInfo_ = child_.text
            EpiOrderInfo_ = re_.sub(String_cleanup_pat_, " ", EpiOrderInfo_).strip()
            EpiOrderInfo_ = self.gds_validate_string(EpiOrderInfo_, node, 'EpiOrderInfo')
            self.EpiOrderInfo.append(EpiOrderInfo_)
            self.validate_genericTokenType0_70(self.EpiOrderInfo)    # validate type genericTokenType0_70
# end class EpiIdentificationDetailsType


class EpiPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, EpiBfiPartyDetails=None, EpiBeneficiaryPartyDetails=None):
        self.original_tagname_ = None
        self.EpiBfiPartyDetails = EpiBfiPartyDetails
        self.EpiBeneficiaryPartyDetails = EpiBeneficiaryPartyDetails
    def factory(*args_, **kwargs_):
        if EpiPartyDetailsType.subclass:
            return EpiPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return EpiPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EpiBfiPartyDetails(self): return self.EpiBfiPartyDetails
    def set_EpiBfiPartyDetails(self, EpiBfiPartyDetails): self.EpiBfiPartyDetails = EpiBfiPartyDetails
    def get_EpiBeneficiaryPartyDetails(self): return self.EpiBeneficiaryPartyDetails
    def set_EpiBeneficiaryPartyDetails(self, EpiBeneficiaryPartyDetails): self.EpiBeneficiaryPartyDetails = EpiBeneficiaryPartyDetails
    def hasContent_(self):
        if (
            self.EpiBfiPartyDetails is not None or
            self.EpiBeneficiaryPartyDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='EpiPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EpiBfiPartyDetails is not None:
            self.EpiBfiPartyDetails.export(outfile, level, namespace_, name_='EpiBfiPartyDetails', pretty_print=pretty_print)
        if self.EpiBeneficiaryPartyDetails is not None:
            self.EpiBeneficiaryPartyDetails.export(outfile, level, namespace_, name_='EpiBeneficiaryPartyDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EpiPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EpiBfiPartyDetails is not None:
            showIndent(outfile, level)
            outfile.write('EpiBfiPartyDetails=model_.EpiBfiPartyDetailsType(\n')
            self.EpiBfiPartyDetails.exportLiteral(outfile, level, name_='EpiBfiPartyDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EpiBeneficiaryPartyDetails is not None:
            showIndent(outfile, level)
            outfile.write('EpiBeneficiaryPartyDetails=model_.EpiBeneficiaryPartyDetailsType(\n')
            self.EpiBeneficiaryPartyDetails.exportLiteral(outfile, level, name_='EpiBeneficiaryPartyDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EpiBfiPartyDetails':
            obj_ = EpiBfiPartyDetailsType.factory()
            obj_.build(child_)
            self.EpiBfiPartyDetails = obj_
            obj_.original_tagname_ = 'EpiBfiPartyDetails'
        elif nodeName_ == 'EpiBeneficiaryPartyDetails':
            obj_ = EpiBeneficiaryPartyDetailsType.factory()
            obj_.build(child_)
            self.EpiBeneficiaryPartyDetails = obj_
            obj_.original_tagname_ = 'EpiBeneficiaryPartyDetails'
# end class EpiPartyDetailsType


class EpiBfiPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, EpiBfiIdentifier=None, EpiBfiName=None):
        self.original_tagname_ = None
        self.EpiBfiIdentifier = EpiBfiIdentifier
        self.EpiBfiName = EpiBfiName
    def factory(*args_, **kwargs_):
        if EpiBfiPartyDetailsType.subclass:
            return EpiBfiPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return EpiBfiPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EpiBfiIdentifier(self): return self.EpiBfiIdentifier
    def set_EpiBfiIdentifier(self, EpiBfiIdentifier): self.EpiBfiIdentifier = EpiBfiIdentifier
    def get_EpiBfiName(self): return self.EpiBfiName
    def set_EpiBfiName(self, EpiBfiName): self.EpiBfiName = EpiBfiName
    def validate_genericStringType1_35(self, value):
        # Validate type genericStringType1_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.EpiBfiIdentifier is not None or
            self.EpiBfiName is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiBfiPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiBfiPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiBfiPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiBfiPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='EpiBfiPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EpiBfiIdentifier is not None:
            self.EpiBfiIdentifier.export(outfile, level, namespace_, name_='EpiBfiIdentifier', pretty_print=pretty_print)
        if self.EpiBfiName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiBfiName>%s</%sEpiBfiName>%s' % (namespace_, self.gds_format_string(quote_xml(self.EpiBfiName).encode(ExternalEncoding), input_name='EpiBfiName'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='EpiBfiPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EpiBfiIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('EpiBfiIdentifier=model_.EpiBfiIdentifierType(\n')
            self.EpiBfiIdentifier.exportLiteral(outfile, level, name_='EpiBfiIdentifier')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EpiBfiName is not None:
            showIndent(outfile, level)
            outfile.write('EpiBfiName=%s,\n' % quote_python(self.EpiBfiName).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EpiBfiIdentifier':
            obj_ = EpiBfiIdentifierType.factory()
            obj_.build(child_)
            self.EpiBfiIdentifier = obj_
            obj_.original_tagname_ = 'EpiBfiIdentifier'
        elif nodeName_ == 'EpiBfiName':
            EpiBfiName_ = child_.text
            EpiBfiName_ = self.gds_validate_string(EpiBfiName_, node, 'EpiBfiName')
            self.EpiBfiName = EpiBfiName_
            self.validate_genericStringType1_35(self.EpiBfiName)    # validate type genericStringType1_35
# end class EpiBfiPartyDetailsType


class EpiBeneficiaryPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, EpiNameAddressDetails=None, EpiBei=None, EpiAccountID=None):
        self.original_tagname_ = None
        self.EpiNameAddressDetails = EpiNameAddressDetails
        self.EpiBei = EpiBei
        self.EpiAccountID = EpiAccountID
    def factory(*args_, **kwargs_):
        if EpiBeneficiaryPartyDetailsType.subclass:
            return EpiBeneficiaryPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return EpiBeneficiaryPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EpiNameAddressDetails(self): return self.EpiNameAddressDetails
    def set_EpiNameAddressDetails(self, EpiNameAddressDetails): self.EpiNameAddressDetails = EpiNameAddressDetails
    def get_EpiBei(self): return self.EpiBei
    def set_EpiBei(self, EpiBei): self.EpiBei = EpiBei
    def get_EpiAccountID(self): return self.EpiAccountID
    def set_EpiAccountID(self, EpiAccountID): self.EpiAccountID = EpiAccountID
    def validate_genericTokenType2_35(self, value):
        # Validate type genericTokenType2_35, a restriction on xs:token.
        pass
    def validate_genericNMtokenType8_11(self, value):
        # Validate type genericNMtokenType8_11, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.EpiNameAddressDetails is not None or
            self.EpiBei is not None or
            self.EpiAccountID is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiBeneficiaryPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiBeneficiaryPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiBeneficiaryPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiBeneficiaryPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='EpiBeneficiaryPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EpiNameAddressDetails is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiNameAddressDetails>%s</%sEpiNameAddressDetails>%s' % (namespace_, self.gds_format_string(quote_xml(self.EpiNameAddressDetails).encode(ExternalEncoding), input_name='EpiNameAddressDetails'), namespace_, eol_))
        if self.EpiBei is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiBei>%s</%sEpiBei>%s' % (namespace_, self.gds_format_string(quote_xml(self.EpiBei).encode(ExternalEncoding), input_name='EpiBei'), namespace_, eol_))
        if self.EpiAccountID is not None:
            self.EpiAccountID.export(outfile, level, namespace_, name_='EpiAccountID', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EpiBeneficiaryPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EpiNameAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('EpiNameAddressDetails=%s,\n' % quote_python(self.EpiNameAddressDetails).encode(ExternalEncoding))
        if self.EpiBei is not None:
            showIndent(outfile, level)
            outfile.write('EpiBei=%s,\n' % quote_python(self.EpiBei).encode(ExternalEncoding))
        if self.EpiAccountID is not None:
            showIndent(outfile, level)
            outfile.write('EpiAccountID=model_.EpiAccountIDType(\n')
            self.EpiAccountID.exportLiteral(outfile, level, name_='EpiAccountID')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EpiNameAddressDetails':
            EpiNameAddressDetails_ = child_.text
            EpiNameAddressDetails_ = re_.sub(String_cleanup_pat_, " ", EpiNameAddressDetails_).strip()
            EpiNameAddressDetails_ = self.gds_validate_string(EpiNameAddressDetails_, node, 'EpiNameAddressDetails')
            self.EpiNameAddressDetails = EpiNameAddressDetails_
            self.validate_genericTokenType2_35(self.EpiNameAddressDetails)    # validate type genericTokenType2_35
        elif nodeName_ == 'EpiBei':
            EpiBei_ = child_.text
            EpiBei_ = re_.sub(String_cleanup_pat_, " ", EpiBei_).strip()
            EpiBei_ = self.gds_validate_string(EpiBei_, node, 'EpiBei')
            self.EpiBei = EpiBei_
            self.validate_genericNMtokenType8_11(self.EpiBei)    # validate type genericNMtokenType8_11
        elif nodeName_ == 'EpiAccountID':
            obj_ = EpiAccountIDType.factory()
            obj_.build(child_)
            self.EpiAccountID = obj_
            obj_.original_tagname_ = 'EpiAccountID'
# end class EpiBeneficiaryPartyDetailsType


class EpiPaymentInstructionDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, EpiPaymentInstructionId=None, EpiTransactionTypeCode=None, EpiInstructionCode=None, EpiRemittanceInfoIdentifier=None, EpiInstructedAmount=None, EpiCharge=None, EpiDateOptionDate=None):
        self.original_tagname_ = None
        self.EpiPaymentInstructionId = EpiPaymentInstructionId
        self.EpiTransactionTypeCode = EpiTransactionTypeCode
        self.EpiInstructionCode = EpiInstructionCode
        self.EpiRemittanceInfoIdentifier = EpiRemittanceInfoIdentifier
        self.EpiInstructedAmount = EpiInstructedAmount
        self.EpiCharge = EpiCharge
        self.EpiDateOptionDate = EpiDateOptionDate
    def factory(*args_, **kwargs_):
        if EpiPaymentInstructionDetailsType.subclass:
            return EpiPaymentInstructionDetailsType.subclass(*args_, **kwargs_)
        else:
            return EpiPaymentInstructionDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EpiPaymentInstructionId(self): return self.EpiPaymentInstructionId
    def set_EpiPaymentInstructionId(self, EpiPaymentInstructionId): self.EpiPaymentInstructionId = EpiPaymentInstructionId
    def get_EpiTransactionTypeCode(self): return self.EpiTransactionTypeCode
    def set_EpiTransactionTypeCode(self, EpiTransactionTypeCode): self.EpiTransactionTypeCode = EpiTransactionTypeCode
    def get_EpiInstructionCode(self): return self.EpiInstructionCode
    def set_EpiInstructionCode(self, EpiInstructionCode): self.EpiInstructionCode = EpiInstructionCode
    def get_EpiRemittanceInfoIdentifier(self): return self.EpiRemittanceInfoIdentifier
    def set_EpiRemittanceInfoIdentifier(self, EpiRemittanceInfoIdentifier): self.EpiRemittanceInfoIdentifier = EpiRemittanceInfoIdentifier
    def get_EpiInstructedAmount(self): return self.EpiInstructedAmount
    def set_EpiInstructedAmount(self, EpiInstructedAmount): self.EpiInstructedAmount = EpiInstructedAmount
    def get_EpiCharge(self): return self.EpiCharge
    def set_EpiCharge(self, EpiCharge): self.EpiCharge = EpiCharge
    def get_EpiDateOptionDate(self): return self.EpiDateOptionDate
    def set_EpiDateOptionDate(self, EpiDateOptionDate): self.EpiDateOptionDate = EpiDateOptionDate
    def validate_genericNMtokenType0_35(self, value):
        # Validate type genericNMtokenType0_35, a restriction on xs:token.
        pass
    def validate_genericTokenType3(self, value):
        # Validate type genericTokenType3, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.EpiPaymentInstructionId is not None or
            self.EpiTransactionTypeCode is not None or
            self.EpiInstructionCode is not None or
            self.EpiRemittanceInfoIdentifier is not None or
            self.EpiInstructedAmount is not None or
            self.EpiCharge is not None or
            self.EpiDateOptionDate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiPaymentInstructionDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiPaymentInstructionDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiPaymentInstructionDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiPaymentInstructionDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='EpiPaymentInstructionDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EpiPaymentInstructionId is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiPaymentInstructionId>%s</%sEpiPaymentInstructionId>%s' % (namespace_, self.gds_format_string(quote_xml(self.EpiPaymentInstructionId).encode(ExternalEncoding), input_name='EpiPaymentInstructionId'), namespace_, eol_))
        if self.EpiTransactionTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiTransactionTypeCode>%s</%sEpiTransactionTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.EpiTransactionTypeCode).encode(ExternalEncoding), input_name='EpiTransactionTypeCode'), namespace_, eol_))
        if self.EpiInstructionCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEpiInstructionCode>%s</%sEpiInstructionCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.EpiInstructionCode).encode(ExternalEncoding), input_name='EpiInstructionCode'), namespace_, eol_))
        if self.EpiRemittanceInfoIdentifier is not None:
            self.EpiRemittanceInfoIdentifier.export(outfile, level, namespace_, name_='EpiRemittanceInfoIdentifier', pretty_print=pretty_print)
        if self.EpiInstructedAmount is not None:
            self.EpiInstructedAmount.export(outfile, level, namespace_, name_='EpiInstructedAmount', pretty_print=pretty_print)
        if self.EpiCharge is not None:
            self.EpiCharge.export(outfile, level, namespace_, name_='EpiCharge', pretty_print=pretty_print)
        if self.EpiDateOptionDate is not None:
            self.EpiDateOptionDate.export(outfile, level, namespace_, name_='EpiDateOptionDate', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EpiPaymentInstructionDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EpiPaymentInstructionId is not None:
            showIndent(outfile, level)
            outfile.write('EpiPaymentInstructionId=%s,\n' % quote_python(self.EpiPaymentInstructionId).encode(ExternalEncoding))
        if self.EpiTransactionTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('EpiTransactionTypeCode=%s,\n' % quote_python(self.EpiTransactionTypeCode).encode(ExternalEncoding))
        if self.EpiInstructionCode is not None:
            showIndent(outfile, level)
            outfile.write('EpiInstructionCode=%s,\n' % quote_python(self.EpiInstructionCode).encode(ExternalEncoding))
        if self.EpiRemittanceInfoIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('EpiRemittanceInfoIdentifier=model_.EpiRemittanceInfoIdentifierType(\n')
            self.EpiRemittanceInfoIdentifier.exportLiteral(outfile, level, name_='EpiRemittanceInfoIdentifier')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EpiInstructedAmount is not None:
            showIndent(outfile, level)
            outfile.write('EpiInstructedAmount=model_.epiAmount(\n')
            self.EpiInstructedAmount.exportLiteral(outfile, level, name_='EpiInstructedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EpiCharge is not None:
            showIndent(outfile, level)
            outfile.write('EpiCharge=model_.EpiChargeType(\n')
            self.EpiCharge.exportLiteral(outfile, level, name_='EpiCharge')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EpiDateOptionDate is not None:
            showIndent(outfile, level)
            outfile.write('EpiDateOptionDate=model_.date(\n')
            self.EpiDateOptionDate.exportLiteral(outfile, level, name_='EpiDateOptionDate')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EpiPaymentInstructionId':
            EpiPaymentInstructionId_ = child_.text
            EpiPaymentInstructionId_ = re_.sub(String_cleanup_pat_, " ", EpiPaymentInstructionId_).strip()
            EpiPaymentInstructionId_ = self.gds_validate_string(EpiPaymentInstructionId_, node, 'EpiPaymentInstructionId')
            self.EpiPaymentInstructionId = EpiPaymentInstructionId_
            self.validate_genericNMtokenType0_35(self.EpiPaymentInstructionId)    # validate type genericNMtokenType0_35
        elif nodeName_ == 'EpiTransactionTypeCode':
            EpiTransactionTypeCode_ = child_.text
            EpiTransactionTypeCode_ = re_.sub(String_cleanup_pat_, " ", EpiTransactionTypeCode_).strip()
            EpiTransactionTypeCode_ = self.gds_validate_string(EpiTransactionTypeCode_, node, 'EpiTransactionTypeCode')
            self.EpiTransactionTypeCode = EpiTransactionTypeCode_
            self.validate_genericTokenType3(self.EpiTransactionTypeCode)    # validate type genericTokenType3
        elif nodeName_ == 'EpiInstructionCode':
            EpiInstructionCode_ = child_.text
            EpiInstructionCode_ = re_.sub(String_cleanup_pat_, " ", EpiInstructionCode_).strip()
            EpiInstructionCode_ = self.gds_validate_string(EpiInstructionCode_, node, 'EpiInstructionCode')
            self.EpiInstructionCode = EpiInstructionCode_
            self.validate_genericNMtokenType0_35(self.EpiInstructionCode)    # validate type genericNMtokenType0_35
        elif nodeName_ == 'EpiRemittanceInfoIdentifier':
            obj_ = EpiRemittanceInfoIdentifierType.factory()
            obj_.build(child_)
            self.EpiRemittanceInfoIdentifier = obj_
            obj_.original_tagname_ = 'EpiRemittanceInfoIdentifier'
        elif nodeName_ == 'EpiInstructedAmount':
            obj_ = epiAmount.factory()
            obj_.build(child_)
            self.EpiInstructedAmount = obj_
            obj_.original_tagname_ = 'EpiInstructedAmount'
        elif nodeName_ == 'EpiCharge':
            obj_ = EpiChargeType.factory()
            obj_.build(child_)
            self.EpiCharge = obj_
            obj_.original_tagname_ = 'EpiCharge'
        elif nodeName_ == 'EpiDateOptionDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.EpiDateOptionDate = obj_
            obj_.original_tagname_ = 'EpiDateOptionDate'
# end class EpiPaymentInstructionDetailsType


class EpiChargeType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ChargeOption=None, valueOf_=None):
        self.original_tagname_ = None
        self.ChargeOption = _cast(None, ChargeOption)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if EpiChargeType.subclass:
            return EpiChargeType.subclass(*args_, **kwargs_)
        else:
            return EpiChargeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ChargeOption(self): return self.ChargeOption
    def set_ChargeOption(self, ChargeOption): self.ChargeOption = ChargeOption
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiChargeType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiChargeType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiChargeType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiChargeType'):
        if self.ChargeOption is not None and 'ChargeOption' not in already_processed:
            already_processed.add('ChargeOption')
            outfile.write(' ChargeOption=%s' % (self.gds_format_string(quote_attrib(self.ChargeOption).encode(ExternalEncoding), input_name='ChargeOption'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='EpiChargeType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='EpiChargeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.ChargeOption is not None and 'ChargeOption' not in already_processed:
            already_processed.add('ChargeOption')
            showIndent(outfile, level)
            outfile.write('ChargeOption="%s",\n' % (self.ChargeOption,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('ChargeOption', node)
        if value is not None and 'ChargeOption' not in already_processed:
            already_processed.add('ChargeOption')
            self.ChargeOption = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class EpiChargeType


class EpiRemittanceInfoIdentifierType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, IdentificationSchemeName=None, valueOf_=None):
        self.original_tagname_ = None
        self.IdentificationSchemeName = _cast(None, IdentificationSchemeName)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if EpiRemittanceInfoIdentifierType.subclass:
            return EpiRemittanceInfoIdentifierType.subclass(*args_, **kwargs_)
        else:
            return EpiRemittanceInfoIdentifierType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_IdentificationSchemeName(self): return self.IdentificationSchemeName
    def set_IdentificationSchemeName(self, IdentificationSchemeName): self.IdentificationSchemeName = IdentificationSchemeName
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='EpiRemittanceInfoIdentifierType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EpiRemittanceInfoIdentifierType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='EpiRemittanceInfoIdentifierType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='EpiRemittanceInfoIdentifierType'):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            outfile.write(' IdentificationSchemeName=%s' % (self.gds_format_string(quote_attrib(self.IdentificationSchemeName).encode(ExternalEncoding), input_name='IdentificationSchemeName'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='EpiRemittanceInfoIdentifierType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='EpiRemittanceInfoIdentifierType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            showIndent(outfile, level)
            outfile.write('IdentificationSchemeName="%s",\n' % (self.IdentificationSchemeName,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('IdentificationSchemeName', node)
        if value is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            self.IdentificationSchemeName = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class EpiRemittanceInfoIdentifierType


class InvoiceDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, InvoiceTypeCode=None, InvoiceTypeText=None, OriginCode=None, OriginText=None, InvoiceNumber=None, InvoiceDate=None, OriginalInvoiceNumber=None, InvoicingPeriodStartDate=None, InvoicingPeriodEndDate=None, SellerReferenceIdentifier=None, SellerReferenceIdentifierUrlText=None, BuyersSellerIdentifier=None, SellersBuyerIdentifier=None, OrderIdentifier=None, OrderIdentifierUrlText=None, OrderDate=None, OrdererName=None, SalesPersonName=None, OrderConfirmationIdentifier=None, OrderConfirmationDate=None, AgreementIdentifier=None, AgreementIdentifierUrlText=None, AgreementTypeText=None, AgreementTypeCode=None, AgreementDate=None, NotificationIdentifier=None, NotificationDate=None, RegistrationNumberIdentifier=None, ControllerIdentifier=None, ControllerName=None, ControlDate=None, BuyerReferenceIdentifier=None, ProjectReferenceIdentifier=None, DefinitionDetails=None, InvoiceTotalVatExcludedAmount=None, InvoiceTotalVatAmount=None, InvoiceTotalVatIncludedAmount=None, InvoiceTotalRoundoffAmount=None, ExchangeRate=None, OtherCurrencyAmountVatExcludedAmount=None, OtherCurrencyAmountVatIncludedAmount=None, CreditLimitAmount=None, CreditInterestPercent=None, OperationLimitAmount=None, MonthlyAmount=None, ShortProposedAccountIdentifier=None, NormalProposedAccountIdentifier=None, ProposedAccountText=None, AccountDimensionText=None, SellerAccountText=None, VatSpecificationDetails=None, InvoiceFreeText=None, InvoiceVatFreeText=None, PaymentTermsDetails=None, DiscountDetails=None):
        self.original_tagname_ = None
        self.InvoiceTypeCode = InvoiceTypeCode
        self.InvoiceTypeText = InvoiceTypeText
        self.OriginCode = OriginCode
        self.OriginText = OriginText
        self.InvoiceNumber = InvoiceNumber
        self.InvoiceDate = InvoiceDate
        self.OriginalInvoiceNumber = OriginalInvoiceNumber
        self.InvoicingPeriodStartDate = InvoicingPeriodStartDate
        self.InvoicingPeriodEndDate = InvoicingPeriodEndDate
        self.SellerReferenceIdentifier = SellerReferenceIdentifier
        self.SellerReferenceIdentifierUrlText = SellerReferenceIdentifierUrlText
        self.BuyersSellerIdentifier = BuyersSellerIdentifier
        self.SellersBuyerIdentifier = SellersBuyerIdentifier
        self.OrderIdentifier = OrderIdentifier
        self.OrderIdentifierUrlText = OrderIdentifierUrlText
        self.OrderDate = OrderDate
        self.OrdererName = OrdererName
        self.SalesPersonName = SalesPersonName
        self.OrderConfirmationIdentifier = OrderConfirmationIdentifier
        self.OrderConfirmationDate = OrderConfirmationDate
        self.AgreementIdentifier = AgreementIdentifier
        self.AgreementIdentifierUrlText = AgreementIdentifierUrlText
        self.AgreementTypeText = AgreementTypeText
        self.AgreementTypeCode = AgreementTypeCode
        self.AgreementDate = AgreementDate
        self.NotificationIdentifier = NotificationIdentifier
        self.NotificationDate = NotificationDate
        self.RegistrationNumberIdentifier = RegistrationNumberIdentifier
        self.ControllerIdentifier = ControllerIdentifier
        self.ControllerName = ControllerName
        self.ControlDate = ControlDate
        self.BuyerReferenceIdentifier = BuyerReferenceIdentifier
        self.ProjectReferenceIdentifier = ProjectReferenceIdentifier
        if DefinitionDetails is None:
            self.DefinitionDetails = []
        else:
            self.DefinitionDetails = DefinitionDetails
        self.InvoiceTotalVatExcludedAmount = InvoiceTotalVatExcludedAmount
        self.InvoiceTotalVatAmount = InvoiceTotalVatAmount
        self.InvoiceTotalVatIncludedAmount = InvoiceTotalVatIncludedAmount
        self.InvoiceTotalRoundoffAmount = InvoiceTotalRoundoffAmount
        self.ExchangeRate = ExchangeRate
        self.OtherCurrencyAmountVatExcludedAmount = OtherCurrencyAmountVatExcludedAmount
        self.OtherCurrencyAmountVatIncludedAmount = OtherCurrencyAmountVatIncludedAmount
        self.CreditLimitAmount = CreditLimitAmount
        self.CreditInterestPercent = CreditInterestPercent
        self.OperationLimitAmount = OperationLimitAmount
        self.MonthlyAmount = MonthlyAmount
        self.ShortProposedAccountIdentifier = ShortProposedAccountIdentifier
        self.NormalProposedAccountIdentifier = NormalProposedAccountIdentifier
        self.ProposedAccountText = ProposedAccountText
        self.AccountDimensionText = AccountDimensionText
        self.SellerAccountText = SellerAccountText
        if VatSpecificationDetails is None:
            self.VatSpecificationDetails = []
        else:
            self.VatSpecificationDetails = VatSpecificationDetails
        if InvoiceFreeText is None:
            self.InvoiceFreeText = []
        else:
            self.InvoiceFreeText = InvoiceFreeText
        self.InvoiceVatFreeText = InvoiceVatFreeText
        if PaymentTermsDetails is None:
            self.PaymentTermsDetails = []
        else:
            self.PaymentTermsDetails = PaymentTermsDetails
        if DiscountDetails is None:
            self.DiscountDetails = []
        else:
            self.DiscountDetails = DiscountDetails
    def factory(*args_, **kwargs_):
        if InvoiceDetailsType.subclass:
            return InvoiceDetailsType.subclass(*args_, **kwargs_)
        else:
            return InvoiceDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_InvoiceTypeCode(self): return self.InvoiceTypeCode
    def set_InvoiceTypeCode(self, InvoiceTypeCode): self.InvoiceTypeCode = InvoiceTypeCode
    def get_InvoiceTypeText(self): return self.InvoiceTypeText
    def set_InvoiceTypeText(self, InvoiceTypeText): self.InvoiceTypeText = InvoiceTypeText
    def get_OriginCode(self): return self.OriginCode
    def set_OriginCode(self, OriginCode): self.OriginCode = OriginCode
    def get_OriginText(self): return self.OriginText
    def set_OriginText(self, OriginText): self.OriginText = OriginText
    def get_InvoiceNumber(self): return self.InvoiceNumber
    def set_InvoiceNumber(self, InvoiceNumber): self.InvoiceNumber = InvoiceNumber
    def get_InvoiceDate(self): return self.InvoiceDate
    def set_InvoiceDate(self, InvoiceDate): self.InvoiceDate = InvoiceDate
    def get_OriginalInvoiceNumber(self): return self.OriginalInvoiceNumber
    def set_OriginalInvoiceNumber(self, OriginalInvoiceNumber): self.OriginalInvoiceNumber = OriginalInvoiceNumber
    def get_InvoicingPeriodStartDate(self): return self.InvoicingPeriodStartDate
    def set_InvoicingPeriodStartDate(self, InvoicingPeriodStartDate): self.InvoicingPeriodStartDate = InvoicingPeriodStartDate
    def get_InvoicingPeriodEndDate(self): return self.InvoicingPeriodEndDate
    def set_InvoicingPeriodEndDate(self, InvoicingPeriodEndDate): self.InvoicingPeriodEndDate = InvoicingPeriodEndDate
    def get_SellerReferenceIdentifier(self): return self.SellerReferenceIdentifier
    def set_SellerReferenceIdentifier(self, SellerReferenceIdentifier): self.SellerReferenceIdentifier = SellerReferenceIdentifier
    def get_SellerReferenceIdentifierUrlText(self): return self.SellerReferenceIdentifierUrlText
    def set_SellerReferenceIdentifierUrlText(self, SellerReferenceIdentifierUrlText): self.SellerReferenceIdentifierUrlText = SellerReferenceIdentifierUrlText
    def get_BuyersSellerIdentifier(self): return self.BuyersSellerIdentifier
    def set_BuyersSellerIdentifier(self, BuyersSellerIdentifier): self.BuyersSellerIdentifier = BuyersSellerIdentifier
    def get_SellersBuyerIdentifier(self): return self.SellersBuyerIdentifier
    def set_SellersBuyerIdentifier(self, SellersBuyerIdentifier): self.SellersBuyerIdentifier = SellersBuyerIdentifier
    def get_OrderIdentifier(self): return self.OrderIdentifier
    def set_OrderIdentifier(self, OrderIdentifier): self.OrderIdentifier = OrderIdentifier
    def get_OrderIdentifierUrlText(self): return self.OrderIdentifierUrlText
    def set_OrderIdentifierUrlText(self, OrderIdentifierUrlText): self.OrderIdentifierUrlText = OrderIdentifierUrlText
    def get_OrderDate(self): return self.OrderDate
    def set_OrderDate(self, OrderDate): self.OrderDate = OrderDate
    def get_OrdererName(self): return self.OrdererName
    def set_OrdererName(self, OrdererName): self.OrdererName = OrdererName
    def get_SalesPersonName(self): return self.SalesPersonName
    def set_SalesPersonName(self, SalesPersonName): self.SalesPersonName = SalesPersonName
    def get_OrderConfirmationIdentifier(self): return self.OrderConfirmationIdentifier
    def set_OrderConfirmationIdentifier(self, OrderConfirmationIdentifier): self.OrderConfirmationIdentifier = OrderConfirmationIdentifier
    def get_OrderConfirmationDate(self): return self.OrderConfirmationDate
    def set_OrderConfirmationDate(self, OrderConfirmationDate): self.OrderConfirmationDate = OrderConfirmationDate
    def get_AgreementIdentifier(self): return self.AgreementIdentifier
    def set_AgreementIdentifier(self, AgreementIdentifier): self.AgreementIdentifier = AgreementIdentifier
    def get_AgreementIdentifierUrlText(self): return self.AgreementIdentifierUrlText
    def set_AgreementIdentifierUrlText(self, AgreementIdentifierUrlText): self.AgreementIdentifierUrlText = AgreementIdentifierUrlText
    def get_AgreementTypeText(self): return self.AgreementTypeText
    def set_AgreementTypeText(self, AgreementTypeText): self.AgreementTypeText = AgreementTypeText
    def get_AgreementTypeCode(self): return self.AgreementTypeCode
    def set_AgreementTypeCode(self, AgreementTypeCode): self.AgreementTypeCode = AgreementTypeCode
    def get_AgreementDate(self): return self.AgreementDate
    def set_AgreementDate(self, AgreementDate): self.AgreementDate = AgreementDate
    def get_NotificationIdentifier(self): return self.NotificationIdentifier
    def set_NotificationIdentifier(self, NotificationIdentifier): self.NotificationIdentifier = NotificationIdentifier
    def get_NotificationDate(self): return self.NotificationDate
    def set_NotificationDate(self, NotificationDate): self.NotificationDate = NotificationDate
    def get_RegistrationNumberIdentifier(self): return self.RegistrationNumberIdentifier
    def set_RegistrationNumberIdentifier(self, RegistrationNumberIdentifier): self.RegistrationNumberIdentifier = RegistrationNumberIdentifier
    def get_ControllerIdentifier(self): return self.ControllerIdentifier
    def set_ControllerIdentifier(self, ControllerIdentifier): self.ControllerIdentifier = ControllerIdentifier
    def get_ControllerName(self): return self.ControllerName
    def set_ControllerName(self, ControllerName): self.ControllerName = ControllerName
    def get_ControlDate(self): return self.ControlDate
    def set_ControlDate(self, ControlDate): self.ControlDate = ControlDate
    def get_BuyerReferenceIdentifier(self): return self.BuyerReferenceIdentifier
    def set_BuyerReferenceIdentifier(self, BuyerReferenceIdentifier): self.BuyerReferenceIdentifier = BuyerReferenceIdentifier
    def get_ProjectReferenceIdentifier(self): return self.ProjectReferenceIdentifier
    def set_ProjectReferenceIdentifier(self, ProjectReferenceIdentifier): self.ProjectReferenceIdentifier = ProjectReferenceIdentifier
    def get_DefinitionDetails(self): return self.DefinitionDetails
    def set_DefinitionDetails(self, DefinitionDetails): self.DefinitionDetails = DefinitionDetails
    def add_DefinitionDetails(self, value): self.DefinitionDetails.append(value)
    def insert_DefinitionDetails_at(self, index, value): self.DefinitionDetails.insert(index, value)
    def replace_DefinitionDetails_at(self, index, value): self.DefinitionDetails[index] = value
    def get_InvoiceTotalVatExcludedAmount(self): return self.InvoiceTotalVatExcludedAmount
    def set_InvoiceTotalVatExcludedAmount(self, InvoiceTotalVatExcludedAmount): self.InvoiceTotalVatExcludedAmount = InvoiceTotalVatExcludedAmount
    def get_InvoiceTotalVatAmount(self): return self.InvoiceTotalVatAmount
    def set_InvoiceTotalVatAmount(self, InvoiceTotalVatAmount): self.InvoiceTotalVatAmount = InvoiceTotalVatAmount
    def get_InvoiceTotalVatIncludedAmount(self): return self.InvoiceTotalVatIncludedAmount
    def set_InvoiceTotalVatIncludedAmount(self, InvoiceTotalVatIncludedAmount): self.InvoiceTotalVatIncludedAmount = InvoiceTotalVatIncludedAmount
    def get_InvoiceTotalRoundoffAmount(self): return self.InvoiceTotalRoundoffAmount
    def set_InvoiceTotalRoundoffAmount(self, InvoiceTotalRoundoffAmount): self.InvoiceTotalRoundoffAmount = InvoiceTotalRoundoffAmount
    def get_ExchangeRate(self): return self.ExchangeRate
    def set_ExchangeRate(self, ExchangeRate): self.ExchangeRate = ExchangeRate
    def get_OtherCurrencyAmountVatExcludedAmount(self): return self.OtherCurrencyAmountVatExcludedAmount
    def set_OtherCurrencyAmountVatExcludedAmount(self, OtherCurrencyAmountVatExcludedAmount): self.OtherCurrencyAmountVatExcludedAmount = OtherCurrencyAmountVatExcludedAmount
    def get_OtherCurrencyAmountVatIncludedAmount(self): return self.OtherCurrencyAmountVatIncludedAmount
    def set_OtherCurrencyAmountVatIncludedAmount(self, OtherCurrencyAmountVatIncludedAmount): self.OtherCurrencyAmountVatIncludedAmount = OtherCurrencyAmountVatIncludedAmount
    def get_CreditLimitAmount(self): return self.CreditLimitAmount
    def set_CreditLimitAmount(self, CreditLimitAmount): self.CreditLimitAmount = CreditLimitAmount
    def get_CreditInterestPercent(self): return self.CreditInterestPercent
    def set_CreditInterestPercent(self, CreditInterestPercent): self.CreditInterestPercent = CreditInterestPercent
    def get_OperationLimitAmount(self): return self.OperationLimitAmount
    def set_OperationLimitAmount(self, OperationLimitAmount): self.OperationLimitAmount = OperationLimitAmount
    def get_MonthlyAmount(self): return self.MonthlyAmount
    def set_MonthlyAmount(self, MonthlyAmount): self.MonthlyAmount = MonthlyAmount
    def get_ShortProposedAccountIdentifier(self): return self.ShortProposedAccountIdentifier
    def set_ShortProposedAccountIdentifier(self, ShortProposedAccountIdentifier): self.ShortProposedAccountIdentifier = ShortProposedAccountIdentifier
    def get_NormalProposedAccountIdentifier(self): return self.NormalProposedAccountIdentifier
    def set_NormalProposedAccountIdentifier(self, NormalProposedAccountIdentifier): self.NormalProposedAccountIdentifier = NormalProposedAccountIdentifier
    def get_ProposedAccountText(self): return self.ProposedAccountText
    def set_ProposedAccountText(self, ProposedAccountText): self.ProposedAccountText = ProposedAccountText
    def get_AccountDimensionText(self): return self.AccountDimensionText
    def set_AccountDimensionText(self, AccountDimensionText): self.AccountDimensionText = AccountDimensionText
    def get_SellerAccountText(self): return self.SellerAccountText
    def set_SellerAccountText(self, SellerAccountText): self.SellerAccountText = SellerAccountText
    def get_VatSpecificationDetails(self): return self.VatSpecificationDetails
    def set_VatSpecificationDetails(self, VatSpecificationDetails): self.VatSpecificationDetails = VatSpecificationDetails
    def add_VatSpecificationDetails(self, value): self.VatSpecificationDetails.append(value)
    def insert_VatSpecificationDetails_at(self, index, value): self.VatSpecificationDetails.insert(index, value)
    def replace_VatSpecificationDetails_at(self, index, value): self.VatSpecificationDetails[index] = value
    def get_InvoiceFreeText(self): return self.InvoiceFreeText
    def set_InvoiceFreeText(self, InvoiceFreeText): self.InvoiceFreeText = InvoiceFreeText
    def add_InvoiceFreeText(self, value): self.InvoiceFreeText.append(value)
    def insert_InvoiceFreeText_at(self, index, value): self.InvoiceFreeText.insert(index, value)
    def replace_InvoiceFreeText_at(self, index, value): self.InvoiceFreeText[index] = value
    def get_InvoiceVatFreeText(self): return self.InvoiceVatFreeText
    def set_InvoiceVatFreeText(self, InvoiceVatFreeText): self.InvoiceVatFreeText = InvoiceVatFreeText
    def get_PaymentTermsDetails(self): return self.PaymentTermsDetails
    def set_PaymentTermsDetails(self, PaymentTermsDetails): self.PaymentTermsDetails = PaymentTermsDetails
    def add_PaymentTermsDetails(self, value): self.PaymentTermsDetails.append(value)
    def insert_PaymentTermsDetails_at(self, index, value): self.PaymentTermsDetails.insert(index, value)
    def replace_PaymentTermsDetails_at(self, index, value): self.PaymentTermsDetails[index] = value
    def get_DiscountDetails(self): return self.DiscountDetails
    def set_DiscountDetails(self, DiscountDetails): self.DiscountDetails = DiscountDetails
    def add_DiscountDetails(self, value): self.DiscountDetails.append(value)
    def insert_DiscountDetails_at(self, index, value): self.DiscountDetails.insert(index, value)
    def replace_DiscountDetails_at(self, index, value): self.DiscountDetails[index] = value
    def validate_genericStringType1_35(self, value):
        # Validate type genericStringType1_35, a restriction on xs:string.
        pass
    def validate_OriginCodeType(self, value):
        # Validate type OriginCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType1_20(self, value):
        # Validate type genericStringType1_20, a restriction on xs:string.
        pass
    def validate_genericStringType0_512(self, value):
        # Validate type genericStringType0_512, a restriction on xs:string.
        pass
    def validate_exchangeRate(self, value):
        # Validate type exchangeRate, a restriction on xs:string.
        pass
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def validate_genericNMtokenType0_4(self, value):
        # Validate type genericNMtokenType0_4, a restriction on xs:token.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.InvoiceTypeCode is not None or
            self.InvoiceTypeText is not None or
            self.OriginCode is not None or
            self.OriginText is not None or
            self.InvoiceNumber is not None or
            self.InvoiceDate is not None or
            self.OriginalInvoiceNumber is not None or
            self.InvoicingPeriodStartDate is not None or
            self.InvoicingPeriodEndDate is not None or
            self.SellerReferenceIdentifier is not None or
            self.SellerReferenceIdentifierUrlText is not None or
            self.BuyersSellerIdentifier is not None or
            self.SellersBuyerIdentifier is not None or
            self.OrderIdentifier is not None or
            self.OrderIdentifierUrlText is not None or
            self.OrderDate is not None or
            self.OrdererName is not None or
            self.SalesPersonName is not None or
            self.OrderConfirmationIdentifier is not None or
            self.OrderConfirmationDate is not None or
            self.AgreementIdentifier is not None or
            self.AgreementIdentifierUrlText is not None or
            self.AgreementTypeText is not None or
            self.AgreementTypeCode is not None or
            self.AgreementDate is not None or
            self.NotificationIdentifier is not None or
            self.NotificationDate is not None or
            self.RegistrationNumberIdentifier is not None or
            self.ControllerIdentifier is not None or
            self.ControllerName is not None or
            self.ControlDate is not None or
            self.BuyerReferenceIdentifier is not None or
            self.ProjectReferenceIdentifier is not None or
            self.DefinitionDetails or
            self.InvoiceTotalVatExcludedAmount is not None or
            self.InvoiceTotalVatAmount is not None or
            self.InvoiceTotalVatIncludedAmount is not None or
            self.InvoiceTotalRoundoffAmount is not None or
            self.ExchangeRate is not None or
            self.OtherCurrencyAmountVatExcludedAmount is not None or
            self.OtherCurrencyAmountVatIncludedAmount is not None or
            self.CreditLimitAmount is not None or
            self.CreditInterestPercent is not None or
            self.OperationLimitAmount is not None or
            self.MonthlyAmount is not None or
            self.ShortProposedAccountIdentifier is not None or
            self.NormalProposedAccountIdentifier is not None or
            self.ProposedAccountText is not None or
            self.AccountDimensionText is not None or
            self.SellerAccountText is not None or
            self.VatSpecificationDetails or
            self.InvoiceFreeText or
            self.InvoiceVatFreeText is not None or
            self.PaymentTermsDetails or
            self.DiscountDetails
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='InvoiceDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='InvoiceDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='InvoiceDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='InvoiceDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='InvoiceDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.InvoiceTypeCode is not None:
            self.InvoiceTypeCode.export(outfile, level, namespace_, name_='InvoiceTypeCode', pretty_print=pretty_print)
        if self.InvoiceTypeText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceTypeText>%s</%sInvoiceTypeText>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceTypeText).encode(ExternalEncoding), input_name='InvoiceTypeText'), namespace_, eol_))
        if self.OriginCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOriginCode>%s</%sOriginCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.OriginCode).encode(ExternalEncoding), input_name='OriginCode'), namespace_, eol_))
        if self.OriginText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOriginText>%s</%sOriginText>%s' % (namespace_, self.gds_format_string(quote_xml(self.OriginText).encode(ExternalEncoding), input_name='OriginText'), namespace_, eol_))
        if self.InvoiceNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceNumber>%s</%sInvoiceNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceNumber).encode(ExternalEncoding), input_name='InvoiceNumber'), namespace_, eol_))
        if self.InvoiceDate is not None:
            self.InvoiceDate.export(outfile, level, namespace_, name_='InvoiceDate', pretty_print=pretty_print)
        if self.OriginalInvoiceNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOriginalInvoiceNumber>%s</%sOriginalInvoiceNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.OriginalInvoiceNumber).encode(ExternalEncoding), input_name='OriginalInvoiceNumber'), namespace_, eol_))
        if self.InvoicingPeriodStartDate is not None:
            self.InvoicingPeriodStartDate.export(outfile, level, namespace_, name_='InvoicingPeriodStartDate', pretty_print=pretty_print)
        if self.InvoicingPeriodEndDate is not None:
            self.InvoicingPeriodEndDate.export(outfile, level, namespace_, name_='InvoicingPeriodEndDate', pretty_print=pretty_print)
        if self.SellerReferenceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerReferenceIdentifier>%s</%sSellerReferenceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerReferenceIdentifier).encode(ExternalEncoding), input_name='SellerReferenceIdentifier'), namespace_, eol_))
        if self.SellerReferenceIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerReferenceIdentifierUrlText>%s</%sSellerReferenceIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerReferenceIdentifierUrlText).encode(ExternalEncoding), input_name='SellerReferenceIdentifierUrlText'), namespace_, eol_))
        if self.BuyersSellerIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyersSellerIdentifier>%s</%sBuyersSellerIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyersSellerIdentifier).encode(ExternalEncoding), input_name='BuyersSellerIdentifier'), namespace_, eol_))
        if self.SellersBuyerIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellersBuyerIdentifier>%s</%sSellersBuyerIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellersBuyerIdentifier).encode(ExternalEncoding), input_name='SellersBuyerIdentifier'), namespace_, eol_))
        if self.OrderIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOrderIdentifier>%s</%sOrderIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.OrderIdentifier).encode(ExternalEncoding), input_name='OrderIdentifier'), namespace_, eol_))
        if self.OrderIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOrderIdentifierUrlText>%s</%sOrderIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.OrderIdentifierUrlText).encode(ExternalEncoding), input_name='OrderIdentifierUrlText'), namespace_, eol_))
        if self.OrderDate is not None:
            self.OrderDate.export(outfile, level, namespace_, name_='OrderDate', pretty_print=pretty_print)
        if self.OrdererName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOrdererName>%s</%sOrdererName>%s' % (namespace_, self.gds_format_string(quote_xml(self.OrdererName).encode(ExternalEncoding), input_name='OrdererName'), namespace_, eol_))
        if self.SalesPersonName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSalesPersonName>%s</%sSalesPersonName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SalesPersonName).encode(ExternalEncoding), input_name='SalesPersonName'), namespace_, eol_))
        if self.OrderConfirmationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOrderConfirmationIdentifier>%s</%sOrderConfirmationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.OrderConfirmationIdentifier).encode(ExternalEncoding), input_name='OrderConfirmationIdentifier'), namespace_, eol_))
        if self.OrderConfirmationDate is not None:
            self.OrderConfirmationDate.export(outfile, level, namespace_, name_='OrderConfirmationDate', pretty_print=pretty_print)
        if self.AgreementIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAgreementIdentifier>%s</%sAgreementIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.AgreementIdentifier).encode(ExternalEncoding), input_name='AgreementIdentifier'), namespace_, eol_))
        if self.AgreementIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAgreementIdentifierUrlText>%s</%sAgreementIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.AgreementIdentifierUrlText).encode(ExternalEncoding), input_name='AgreementIdentifierUrlText'), namespace_, eol_))
        if self.AgreementTypeText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAgreementTypeText>%s</%sAgreementTypeText>%s' % (namespace_, self.gds_format_string(quote_xml(self.AgreementTypeText).encode(ExternalEncoding), input_name='AgreementTypeText'), namespace_, eol_))
        if self.AgreementTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAgreementTypeCode>%s</%sAgreementTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.AgreementTypeCode).encode(ExternalEncoding), input_name='AgreementTypeCode'), namespace_, eol_))
        if self.AgreementDate is not None:
            self.AgreementDate.export(outfile, level, namespace_, name_='AgreementDate', pretty_print=pretty_print)
        if self.NotificationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNotificationIdentifier>%s</%sNotificationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.NotificationIdentifier).encode(ExternalEncoding), input_name='NotificationIdentifier'), namespace_, eol_))
        if self.NotificationDate is not None:
            self.NotificationDate.export(outfile, level, namespace_, name_='NotificationDate', pretty_print=pretty_print)
        if self.RegistrationNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRegistrationNumberIdentifier>%s</%sRegistrationNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RegistrationNumberIdentifier).encode(ExternalEncoding), input_name='RegistrationNumberIdentifier'), namespace_, eol_))
        if self.ControllerIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sControllerIdentifier>%s</%sControllerIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ControllerIdentifier).encode(ExternalEncoding), input_name='ControllerIdentifier'), namespace_, eol_))
        if self.ControllerName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sControllerName>%s</%sControllerName>%s' % (namespace_, self.gds_format_string(quote_xml(self.ControllerName).encode(ExternalEncoding), input_name='ControllerName'), namespace_, eol_))
        if self.ControlDate is not None:
            self.ControlDate.export(outfile, level, namespace_, name_='ControlDate', pretty_print=pretty_print)
        if self.BuyerReferenceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerReferenceIdentifier>%s</%sBuyerReferenceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerReferenceIdentifier).encode(ExternalEncoding), input_name='BuyerReferenceIdentifier'), namespace_, eol_))
        if self.ProjectReferenceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sProjectReferenceIdentifier>%s</%sProjectReferenceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ProjectReferenceIdentifier).encode(ExternalEncoding), input_name='ProjectReferenceIdentifier'), namespace_, eol_))
        for DefinitionDetails_ in self.DefinitionDetails:
            DefinitionDetails_.export(outfile, level, namespace_, name_='DefinitionDetails', pretty_print=pretty_print)
        if self.InvoiceTotalVatExcludedAmount is not None:
            self.InvoiceTotalVatExcludedAmount.export(outfile, level, namespace_, name_='InvoiceTotalVatExcludedAmount', pretty_print=pretty_print)
        if self.InvoiceTotalVatAmount is not None:
            self.InvoiceTotalVatAmount.export(outfile, level, namespace_, name_='InvoiceTotalVatAmount', pretty_print=pretty_print)
        if self.InvoiceTotalVatIncludedAmount is not None:
            self.InvoiceTotalVatIncludedAmount.export(outfile, level, namespace_, name_='InvoiceTotalVatIncludedAmount', pretty_print=pretty_print)
        if self.InvoiceTotalRoundoffAmount is not None:
            self.InvoiceTotalRoundoffAmount.export(outfile, level, namespace_, name_='InvoiceTotalRoundoffAmount', pretty_print=pretty_print)
        if self.ExchangeRate is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sExchangeRate>%s</%sExchangeRate>%s' % (namespace_, self.gds_format_string(quote_xml(self.ExchangeRate).encode(ExternalEncoding), input_name='ExchangeRate'), namespace_, eol_))
        if self.OtherCurrencyAmountVatExcludedAmount is not None:
            self.OtherCurrencyAmountVatExcludedAmount.export(outfile, level, namespace_, name_='OtherCurrencyAmountVatExcludedAmount', pretty_print=pretty_print)
        if self.OtherCurrencyAmountVatIncludedAmount is not None:
            self.OtherCurrencyAmountVatIncludedAmount.export(outfile, level, namespace_, name_='OtherCurrencyAmountVatIncludedAmount', pretty_print=pretty_print)
        if self.CreditLimitAmount is not None:
            self.CreditLimitAmount.export(outfile, level, namespace_, name_='CreditLimitAmount', pretty_print=pretty_print)
        if self.CreditInterestPercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCreditInterestPercent>%s</%sCreditInterestPercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.CreditInterestPercent).encode(ExternalEncoding), input_name='CreditInterestPercent'), namespace_, eol_))
        if self.OperationLimitAmount is not None:
            self.OperationLimitAmount.export(outfile, level, namespace_, name_='OperationLimitAmount', pretty_print=pretty_print)
        if self.MonthlyAmount is not None:
            self.MonthlyAmount.export(outfile, level, namespace_, name_='MonthlyAmount', pretty_print=pretty_print)
        if self.ShortProposedAccountIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShortProposedAccountIdentifier>%s</%sShortProposedAccountIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ShortProposedAccountIdentifier).encode(ExternalEncoding), input_name='ShortProposedAccountIdentifier'), namespace_, eol_))
        if self.NormalProposedAccountIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNormalProposedAccountIdentifier>%s</%sNormalProposedAccountIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.NormalProposedAccountIdentifier).encode(ExternalEncoding), input_name='NormalProposedAccountIdentifier'), namespace_, eol_))
        if self.ProposedAccountText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sProposedAccountText>%s</%sProposedAccountText>%s' % (namespace_, self.gds_format_string(quote_xml(self.ProposedAccountText).encode(ExternalEncoding), input_name='ProposedAccountText'), namespace_, eol_))
        if self.AccountDimensionText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAccountDimensionText>%s</%sAccountDimensionText>%s' % (namespace_, self.gds_format_string(quote_xml(self.AccountDimensionText).encode(ExternalEncoding), input_name='AccountDimensionText'), namespace_, eol_))
        if self.SellerAccountText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerAccountText>%s</%sSellerAccountText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerAccountText).encode(ExternalEncoding), input_name='SellerAccountText'), namespace_, eol_))
        for VatSpecificationDetails_ in self.VatSpecificationDetails:
            VatSpecificationDetails_.export(outfile, level, namespace_, name_='VatSpecificationDetails', pretty_print=pretty_print)
        for InvoiceFreeText_ in self.InvoiceFreeText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceFreeText>%s</%sInvoiceFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(InvoiceFreeText_).encode(ExternalEncoding), input_name='InvoiceFreeText'), namespace_, eol_))
        if self.InvoiceVatFreeText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceVatFreeText>%s</%sInvoiceVatFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceVatFreeText).encode(ExternalEncoding), input_name='InvoiceVatFreeText'), namespace_, eol_))
        for PaymentTermsDetails_ in self.PaymentTermsDetails:
            PaymentTermsDetails_.export(outfile, level, namespace_, name_='PaymentTermsDetails', pretty_print=pretty_print)
        for DiscountDetails_ in self.DiscountDetails:
            DiscountDetails_.export(outfile, level, namespace_, name_='DiscountDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='InvoiceDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.InvoiceTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceTypeCode=model_.InvoiceTypeCodeType(\n')
            self.InvoiceTypeCode.exportLiteral(outfile, level, name_='InvoiceTypeCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InvoiceTypeText is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceTypeText=%s,\n' % quote_python(self.InvoiceTypeText).encode(ExternalEncoding))
        if self.OriginCode is not None:
            showIndent(outfile, level)
            outfile.write('OriginCode=%s,\n' % quote_python(self.OriginCode).encode(ExternalEncoding))
        if self.OriginText is not None:
            showIndent(outfile, level)
            outfile.write('OriginText=%s,\n' % quote_python(self.OriginText).encode(ExternalEncoding))
        if self.InvoiceNumber is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceNumber=%s,\n' % quote_python(self.InvoiceNumber).encode(ExternalEncoding))
        if self.InvoiceDate is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceDate=model_.date(\n')
            self.InvoiceDate.exportLiteral(outfile, level, name_='InvoiceDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.OriginalInvoiceNumber is not None:
            showIndent(outfile, level)
            outfile.write('OriginalInvoiceNumber=%s,\n' % quote_python(self.OriginalInvoiceNumber).encode(ExternalEncoding))
        if self.InvoicingPeriodStartDate is not None:
            showIndent(outfile, level)
            outfile.write('InvoicingPeriodStartDate=model_.date(\n')
            self.InvoicingPeriodStartDate.exportLiteral(outfile, level, name_='InvoicingPeriodStartDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InvoicingPeriodEndDate is not None:
            showIndent(outfile, level)
            outfile.write('InvoicingPeriodEndDate=model_.date(\n')
            self.InvoicingPeriodEndDate.exportLiteral(outfile, level, name_='InvoicingPeriodEndDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SellerReferenceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellerReferenceIdentifier=%s,\n' % quote_python(self.SellerReferenceIdentifier).encode(ExternalEncoding))
        if self.SellerReferenceIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SellerReferenceIdentifierUrlText=%s,\n' % quote_python(self.SellerReferenceIdentifierUrlText).encode(ExternalEncoding))
        if self.BuyersSellerIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('BuyersSellerIdentifier=%s,\n' % quote_python(self.BuyersSellerIdentifier).encode(ExternalEncoding))
        if self.SellersBuyerIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellersBuyerIdentifier=%s,\n' % quote_python(self.SellersBuyerIdentifier).encode(ExternalEncoding))
        if self.OrderIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('OrderIdentifier=%s,\n' % quote_python(self.OrderIdentifier).encode(ExternalEncoding))
        if self.OrderIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('OrderIdentifierUrlText=%s,\n' % quote_python(self.OrderIdentifierUrlText).encode(ExternalEncoding))
        if self.OrderDate is not None:
            showIndent(outfile, level)
            outfile.write('OrderDate=model_.date(\n')
            self.OrderDate.exportLiteral(outfile, level, name_='OrderDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.OrdererName is not None:
            showIndent(outfile, level)
            outfile.write('OrdererName=%s,\n' % quote_python(self.OrdererName).encode(ExternalEncoding))
        if self.SalesPersonName is not None:
            showIndent(outfile, level)
            outfile.write('SalesPersonName=%s,\n' % quote_python(self.SalesPersonName).encode(ExternalEncoding))
        if self.OrderConfirmationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('OrderConfirmationIdentifier=%s,\n' % quote_python(self.OrderConfirmationIdentifier).encode(ExternalEncoding))
        if self.OrderConfirmationDate is not None:
            showIndent(outfile, level)
            outfile.write('OrderConfirmationDate=model_.date(\n')
            self.OrderConfirmationDate.exportLiteral(outfile, level, name_='OrderConfirmationDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.AgreementIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('AgreementIdentifier=%s,\n' % quote_python(self.AgreementIdentifier).encode(ExternalEncoding))
        if self.AgreementIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('AgreementIdentifierUrlText=%s,\n' % quote_python(self.AgreementIdentifierUrlText).encode(ExternalEncoding))
        if self.AgreementTypeText is not None:
            showIndent(outfile, level)
            outfile.write('AgreementTypeText=%s,\n' % quote_python(self.AgreementTypeText).encode(ExternalEncoding))
        if self.AgreementTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('AgreementTypeCode=%s,\n' % quote_python(self.AgreementTypeCode).encode(ExternalEncoding))
        if self.AgreementDate is not None:
            showIndent(outfile, level)
            outfile.write('AgreementDate=model_.date(\n')
            self.AgreementDate.exportLiteral(outfile, level, name_='AgreementDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.NotificationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('NotificationIdentifier=%s,\n' % quote_python(self.NotificationIdentifier).encode(ExternalEncoding))
        if self.NotificationDate is not None:
            showIndent(outfile, level)
            outfile.write('NotificationDate=model_.date(\n')
            self.NotificationDate.exportLiteral(outfile, level, name_='NotificationDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RegistrationNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RegistrationNumberIdentifier=%s,\n' % quote_python(self.RegistrationNumberIdentifier).encode(ExternalEncoding))
        if self.ControllerIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ControllerIdentifier=%s,\n' % quote_python(self.ControllerIdentifier).encode(ExternalEncoding))
        if self.ControllerName is not None:
            showIndent(outfile, level)
            outfile.write('ControllerName=%s,\n' % quote_python(self.ControllerName).encode(ExternalEncoding))
        if self.ControlDate is not None:
            showIndent(outfile, level)
            outfile.write('ControlDate=model_.date(\n')
            self.ControlDate.exportLiteral(outfile, level, name_='ControlDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.BuyerReferenceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('BuyerReferenceIdentifier=%s,\n' % quote_python(self.BuyerReferenceIdentifier).encode(ExternalEncoding))
        if self.ProjectReferenceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ProjectReferenceIdentifier=%s,\n' % quote_python(self.ProjectReferenceIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('DefinitionDetails=[\n')
        level += 1
        for DefinitionDetails_ in self.DefinitionDetails:
            showIndent(outfile, level)
            outfile.write('model_.DefinitionDetailsType(\n')
            DefinitionDetails_.exportLiteral(outfile, level, name_='DefinitionDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.InvoiceTotalVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceTotalVatExcludedAmount=model_.amount(\n')
            self.InvoiceTotalVatExcludedAmount.exportLiteral(outfile, level, name_='InvoiceTotalVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InvoiceTotalVatAmount is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceTotalVatAmount=model_.amount(\n')
            self.InvoiceTotalVatAmount.exportLiteral(outfile, level, name_='InvoiceTotalVatAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InvoiceTotalVatIncludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceTotalVatIncludedAmount=model_.amount(\n')
            self.InvoiceTotalVatIncludedAmount.exportLiteral(outfile, level, name_='InvoiceTotalVatIncludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InvoiceTotalRoundoffAmount is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceTotalRoundoffAmount=model_.amount(\n')
            self.InvoiceTotalRoundoffAmount.exportLiteral(outfile, level, name_='InvoiceTotalRoundoffAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ExchangeRate is not None:
            showIndent(outfile, level)
            outfile.write('ExchangeRate=%s,\n' % quote_python(self.ExchangeRate).encode(ExternalEncoding))
        if self.OtherCurrencyAmountVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('OtherCurrencyAmountVatExcludedAmount=model_.amount(\n')
            self.OtherCurrencyAmountVatExcludedAmount.exportLiteral(outfile, level, name_='OtherCurrencyAmountVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.OtherCurrencyAmountVatIncludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('OtherCurrencyAmountVatIncludedAmount=model_.amount(\n')
            self.OtherCurrencyAmountVatIncludedAmount.exportLiteral(outfile, level, name_='OtherCurrencyAmountVatIncludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CreditLimitAmount is not None:
            showIndent(outfile, level)
            outfile.write('CreditLimitAmount=model_.amount(\n')
            self.CreditLimitAmount.exportLiteral(outfile, level, name_='CreditLimitAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CreditInterestPercent is not None:
            showIndent(outfile, level)
            outfile.write('CreditInterestPercent=%s,\n' % quote_python(self.CreditInterestPercent).encode(ExternalEncoding))
        if self.OperationLimitAmount is not None:
            showIndent(outfile, level)
            outfile.write('OperationLimitAmount=model_.amount(\n')
            self.OperationLimitAmount.exportLiteral(outfile, level, name_='OperationLimitAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.MonthlyAmount is not None:
            showIndent(outfile, level)
            outfile.write('MonthlyAmount=model_.amount(\n')
            self.MonthlyAmount.exportLiteral(outfile, level, name_='MonthlyAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ShortProposedAccountIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ShortProposedAccountIdentifier=%s,\n' % quote_python(self.ShortProposedAccountIdentifier).encode(ExternalEncoding))
        if self.NormalProposedAccountIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('NormalProposedAccountIdentifier=%s,\n' % quote_python(self.NormalProposedAccountIdentifier).encode(ExternalEncoding))
        if self.ProposedAccountText is not None:
            showIndent(outfile, level)
            outfile.write('ProposedAccountText=%s,\n' % quote_python(self.ProposedAccountText).encode(ExternalEncoding))
        if self.AccountDimensionText is not None:
            showIndent(outfile, level)
            outfile.write('AccountDimensionText=%s,\n' % quote_python(self.AccountDimensionText).encode(ExternalEncoding))
        if self.SellerAccountText is not None:
            showIndent(outfile, level)
            outfile.write('SellerAccountText=%s,\n' % quote_python(self.SellerAccountText).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('VatSpecificationDetails=[\n')
        level += 1
        for VatSpecificationDetails_ in self.VatSpecificationDetails:
            showIndent(outfile, level)
            outfile.write('model_.VatSpecificationDetailsType(\n')
            VatSpecificationDetails_.exportLiteral(outfile, level, name_='VatSpecificationDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('InvoiceFreeText=[\n')
        level += 1
        for InvoiceFreeText_ in self.InvoiceFreeText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(InvoiceFreeText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.InvoiceVatFreeText is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceVatFreeText=%s,\n' % quote_python(self.InvoiceVatFreeText).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('PaymentTermsDetails=[\n')
        level += 1
        for PaymentTermsDetails_ in self.PaymentTermsDetails:
            showIndent(outfile, level)
            outfile.write('model_.PaymentTermsDetailsType(\n')
            PaymentTermsDetails_.exportLiteral(outfile, level, name_='PaymentTermsDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('DiscountDetails=[\n')
        level += 1
        for DiscountDetails_ in self.DiscountDetails:
            showIndent(outfile, level)
            outfile.write('model_.DiscountDetailsType(\n')
            DiscountDetails_.exportLiteral(outfile, level, name_='DiscountDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'InvoiceTypeCode':
            obj_ = InvoiceTypeCodeType.factory()
            obj_.build(child_)
            self.InvoiceTypeCode = obj_
            obj_.original_tagname_ = 'InvoiceTypeCode'
        elif nodeName_ == 'InvoiceTypeText':
            InvoiceTypeText_ = child_.text
            InvoiceTypeText_ = self.gds_validate_string(InvoiceTypeText_, node, 'InvoiceTypeText')
            self.InvoiceTypeText = InvoiceTypeText_
            self.validate_genericStringType1_35(self.InvoiceTypeText)    # validate type genericStringType1_35
        elif nodeName_ == 'OriginCode':
            OriginCode_ = child_.text
            OriginCode_ = self.gds_validate_string(OriginCode_, node, 'OriginCode')
            self.OriginCode = OriginCode_
            self.validate_OriginCodeType(self.OriginCode)    # validate type OriginCodeType
        elif nodeName_ == 'OriginText':
            OriginText_ = child_.text
            OriginText_ = self.gds_validate_string(OriginText_, node, 'OriginText')
            self.OriginText = OriginText_
            self.validate_genericStringType0_35(self.OriginText)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceNumber':
            InvoiceNumber_ = child_.text
            InvoiceNumber_ = self.gds_validate_string(InvoiceNumber_, node, 'InvoiceNumber')
            self.InvoiceNumber = InvoiceNumber_
            self.validate_genericStringType1_20(self.InvoiceNumber)    # validate type genericStringType1_20
        elif nodeName_ == 'InvoiceDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.InvoiceDate = obj_
            obj_.original_tagname_ = 'InvoiceDate'
        elif nodeName_ == 'OriginalInvoiceNumber':
            OriginalInvoiceNumber_ = child_.text
            OriginalInvoiceNumber_ = self.gds_validate_string(OriginalInvoiceNumber_, node, 'OriginalInvoiceNumber')
            self.OriginalInvoiceNumber = OriginalInvoiceNumber_
            self.validate_genericStringType1_20(self.OriginalInvoiceNumber)    # validate type genericStringType1_20
        elif nodeName_ == 'InvoicingPeriodStartDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.InvoicingPeriodStartDate = obj_
            obj_.original_tagname_ = 'InvoicingPeriodStartDate'
        elif nodeName_ == 'InvoicingPeriodEndDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.InvoicingPeriodEndDate = obj_
            obj_.original_tagname_ = 'InvoicingPeriodEndDate'
        elif nodeName_ == 'SellerReferenceIdentifier':
            SellerReferenceIdentifier_ = child_.text
            SellerReferenceIdentifier_ = self.gds_validate_string(SellerReferenceIdentifier_, node, 'SellerReferenceIdentifier')
            self.SellerReferenceIdentifier = SellerReferenceIdentifier_
            self.validate_genericStringType0_35(self.SellerReferenceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerReferenceIdentifierUrlText':
            SellerReferenceIdentifierUrlText_ = child_.text
            SellerReferenceIdentifierUrlText_ = self.gds_validate_string(SellerReferenceIdentifierUrlText_, node, 'SellerReferenceIdentifierUrlText')
            self.SellerReferenceIdentifierUrlText = SellerReferenceIdentifierUrlText_
            self.validate_genericStringType0_512(self.SellerReferenceIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'BuyersSellerIdentifier':
            BuyersSellerIdentifier_ = child_.text
            BuyersSellerIdentifier_ = self.gds_validate_string(BuyersSellerIdentifier_, node, 'BuyersSellerIdentifier')
            self.BuyersSellerIdentifier = BuyersSellerIdentifier_
            self.validate_genericStringType0_35(self.BuyersSellerIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SellersBuyerIdentifier':
            SellersBuyerIdentifier_ = child_.text
            SellersBuyerIdentifier_ = self.gds_validate_string(SellersBuyerIdentifier_, node, 'SellersBuyerIdentifier')
            self.SellersBuyerIdentifier = SellersBuyerIdentifier_
            self.validate_genericStringType0_35(self.SellersBuyerIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'OrderIdentifier':
            OrderIdentifier_ = child_.text
            OrderIdentifier_ = self.gds_validate_string(OrderIdentifier_, node, 'OrderIdentifier')
            self.OrderIdentifier = OrderIdentifier_
            self.validate_genericStringType0_35(self.OrderIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'OrderIdentifierUrlText':
            OrderIdentifierUrlText_ = child_.text
            OrderIdentifierUrlText_ = self.gds_validate_string(OrderIdentifierUrlText_, node, 'OrderIdentifierUrlText')
            self.OrderIdentifierUrlText = OrderIdentifierUrlText_
            self.validate_genericStringType0_512(self.OrderIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'OrderDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.OrderDate = obj_
            obj_.original_tagname_ = 'OrderDate'
        elif nodeName_ == 'OrdererName':
            OrdererName_ = child_.text
            OrdererName_ = self.gds_validate_string(OrdererName_, node, 'OrdererName')
            self.OrdererName = OrdererName_
            self.validate_genericStringType0_35(self.OrdererName)    # validate type genericStringType0_35
        elif nodeName_ == 'SalesPersonName':
            SalesPersonName_ = child_.text
            SalesPersonName_ = self.gds_validate_string(SalesPersonName_, node, 'SalesPersonName')
            self.SalesPersonName = SalesPersonName_
            self.validate_genericStringType0_35(self.SalesPersonName)    # validate type genericStringType0_35
        elif nodeName_ == 'OrderConfirmationIdentifier':
            OrderConfirmationIdentifier_ = child_.text
            OrderConfirmationIdentifier_ = self.gds_validate_string(OrderConfirmationIdentifier_, node, 'OrderConfirmationIdentifier')
            self.OrderConfirmationIdentifier = OrderConfirmationIdentifier_
            self.validate_genericStringType0_35(self.OrderConfirmationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'OrderConfirmationDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.OrderConfirmationDate = obj_
            obj_.original_tagname_ = 'OrderConfirmationDate'
        elif nodeName_ == 'AgreementIdentifier':
            AgreementIdentifier_ = child_.text
            AgreementIdentifier_ = self.gds_validate_string(AgreementIdentifier_, node, 'AgreementIdentifier')
            self.AgreementIdentifier = AgreementIdentifier_
            self.validate_genericStringType0_35(self.AgreementIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'AgreementIdentifierUrlText':
            AgreementIdentifierUrlText_ = child_.text
            AgreementIdentifierUrlText_ = self.gds_validate_string(AgreementIdentifierUrlText_, node, 'AgreementIdentifierUrlText')
            self.AgreementIdentifierUrlText = AgreementIdentifierUrlText_
            self.validate_genericStringType0_512(self.AgreementIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'AgreementTypeText':
            AgreementTypeText_ = child_.text
            AgreementTypeText_ = self.gds_validate_string(AgreementTypeText_, node, 'AgreementTypeText')
            self.AgreementTypeText = AgreementTypeText_
            self.validate_genericStringType0_35(self.AgreementTypeText)    # validate type genericStringType0_35
        elif nodeName_ == 'AgreementTypeCode':
            AgreementTypeCode_ = child_.text
            AgreementTypeCode_ = self.gds_validate_string(AgreementTypeCode_, node, 'AgreementTypeCode')
            self.AgreementTypeCode = AgreementTypeCode_
            self.validate_genericStringType0_35(self.AgreementTypeCode)    # validate type genericStringType0_35
        elif nodeName_ == 'AgreementDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.AgreementDate = obj_
            obj_.original_tagname_ = 'AgreementDate'
        elif nodeName_ == 'NotificationIdentifier':
            NotificationIdentifier_ = child_.text
            NotificationIdentifier_ = self.gds_validate_string(NotificationIdentifier_, node, 'NotificationIdentifier')
            self.NotificationIdentifier = NotificationIdentifier_
            self.validate_genericStringType0_35(self.NotificationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'NotificationDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.NotificationDate = obj_
            obj_.original_tagname_ = 'NotificationDate'
        elif nodeName_ == 'RegistrationNumberIdentifier':
            RegistrationNumberIdentifier_ = child_.text
            RegistrationNumberIdentifier_ = self.gds_validate_string(RegistrationNumberIdentifier_, node, 'RegistrationNumberIdentifier')
            self.RegistrationNumberIdentifier = RegistrationNumberIdentifier_
            self.validate_genericStringType0_35(self.RegistrationNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'ControllerIdentifier':
            ControllerIdentifier_ = child_.text
            ControllerIdentifier_ = self.gds_validate_string(ControllerIdentifier_, node, 'ControllerIdentifier')
            self.ControllerIdentifier = ControllerIdentifier_
            self.validate_genericStringType0_35(self.ControllerIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'ControllerName':
            ControllerName_ = child_.text
            ControllerName_ = self.gds_validate_string(ControllerName_, node, 'ControllerName')
            self.ControllerName = ControllerName_
            self.validate_genericStringType0_35(self.ControllerName)    # validate type genericStringType0_35
        elif nodeName_ == 'ControlDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.ControlDate = obj_
            obj_.original_tagname_ = 'ControlDate'
        elif nodeName_ == 'BuyerReferenceIdentifier':
            BuyerReferenceIdentifier_ = child_.text
            BuyerReferenceIdentifier_ = self.gds_validate_string(BuyerReferenceIdentifier_, node, 'BuyerReferenceIdentifier')
            self.BuyerReferenceIdentifier = BuyerReferenceIdentifier_
            self.validate_genericStringType0_35(self.BuyerReferenceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'ProjectReferenceIdentifier':
            ProjectReferenceIdentifier_ = child_.text
            ProjectReferenceIdentifier_ = self.gds_validate_string(ProjectReferenceIdentifier_, node, 'ProjectReferenceIdentifier')
            self.ProjectReferenceIdentifier = ProjectReferenceIdentifier_
            self.validate_genericStringType0_35(self.ProjectReferenceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'DefinitionDetails':
            obj_ = DefinitionDetailsType.factory()
            obj_.build(child_)
            self.DefinitionDetails.append(obj_)
            obj_.original_tagname_ = 'DefinitionDetails'
        elif nodeName_ == 'InvoiceTotalVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.InvoiceTotalVatExcludedAmount = obj_
            obj_.original_tagname_ = 'InvoiceTotalVatExcludedAmount'
        elif nodeName_ == 'InvoiceTotalVatAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.InvoiceTotalVatAmount = obj_
            obj_.original_tagname_ = 'InvoiceTotalVatAmount'
        elif nodeName_ == 'InvoiceTotalVatIncludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.InvoiceTotalVatIncludedAmount = obj_
            obj_.original_tagname_ = 'InvoiceTotalVatIncludedAmount'
        elif nodeName_ == 'InvoiceTotalRoundoffAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.InvoiceTotalRoundoffAmount = obj_
            obj_.original_tagname_ = 'InvoiceTotalRoundoffAmount'
        elif nodeName_ == 'ExchangeRate':
            ExchangeRate_ = child_.text
            ExchangeRate_ = self.gds_validate_string(ExchangeRate_, node, 'ExchangeRate')
            self.ExchangeRate = ExchangeRate_
            self.validate_exchangeRate(self.ExchangeRate)    # validate type exchangeRate
        elif nodeName_ == 'OtherCurrencyAmountVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.OtherCurrencyAmountVatExcludedAmount = obj_
            obj_.original_tagname_ = 'OtherCurrencyAmountVatExcludedAmount'
        elif nodeName_ == 'OtherCurrencyAmountVatIncludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.OtherCurrencyAmountVatIncludedAmount = obj_
            obj_.original_tagname_ = 'OtherCurrencyAmountVatIncludedAmount'
        elif nodeName_ == 'CreditLimitAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.CreditLimitAmount = obj_
            obj_.original_tagname_ = 'CreditLimitAmount'
        elif nodeName_ == 'CreditInterestPercent':
            CreditInterestPercent_ = child_.text
            CreditInterestPercent_ = self.gds_validate_string(CreditInterestPercent_, node, 'CreditInterestPercent')
            self.CreditInterestPercent = CreditInterestPercent_
            self.validate_percentage(self.CreditInterestPercent)    # validate type percentage
        elif nodeName_ == 'OperationLimitAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.OperationLimitAmount = obj_
            obj_.original_tagname_ = 'OperationLimitAmount'
        elif nodeName_ == 'MonthlyAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.MonthlyAmount = obj_
            obj_.original_tagname_ = 'MonthlyAmount'
        elif nodeName_ == 'ShortProposedAccountIdentifier':
            ShortProposedAccountIdentifier_ = child_.text
            ShortProposedAccountIdentifier_ = re_.sub(String_cleanup_pat_, " ", ShortProposedAccountIdentifier_).strip()
            ShortProposedAccountIdentifier_ = self.gds_validate_string(ShortProposedAccountIdentifier_, node, 'ShortProposedAccountIdentifier')
            self.ShortProposedAccountIdentifier = ShortProposedAccountIdentifier_
            self.validate_genericNMtokenType0_4(self.ShortProposedAccountIdentifier)    # validate type genericNMtokenType0_4
        elif nodeName_ == 'NormalProposedAccountIdentifier':
            NormalProposedAccountIdentifier_ = child_.text
            NormalProposedAccountIdentifier_ = re_.sub(String_cleanup_pat_, " ", NormalProposedAccountIdentifier_).strip()
            NormalProposedAccountIdentifier_ = self.gds_validate_string(NormalProposedAccountIdentifier_, node, 'NormalProposedAccountIdentifier')
            self.NormalProposedAccountIdentifier = NormalProposedAccountIdentifier_
            self.validate_genericNMtokenType0_4(self.NormalProposedAccountIdentifier)    # validate type genericNMtokenType0_4
        elif nodeName_ == 'ProposedAccountText':
            ProposedAccountText_ = child_.text
            ProposedAccountText_ = self.gds_validate_string(ProposedAccountText_, node, 'ProposedAccountText')
            self.ProposedAccountText = ProposedAccountText_
            self.validate_genericStringType0_35(self.ProposedAccountText)    # validate type genericStringType0_35
        elif nodeName_ == 'AccountDimensionText':
            AccountDimensionText_ = child_.text
            AccountDimensionText_ = self.gds_validate_string(AccountDimensionText_, node, 'AccountDimensionText')
            self.AccountDimensionText = AccountDimensionText_
            self.validate_genericStringType0_35(self.AccountDimensionText)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerAccountText':
            SellerAccountText_ = child_.text
            SellerAccountText_ = self.gds_validate_string(SellerAccountText_, node, 'SellerAccountText')
            self.SellerAccountText = SellerAccountText_
            self.validate_genericStringType0_35(self.SellerAccountText)    # validate type genericStringType0_35
        elif nodeName_ == 'VatSpecificationDetails':
            obj_ = VatSpecificationDetailsType.factory()
            obj_.build(child_)
            self.VatSpecificationDetails.append(obj_)
            obj_.original_tagname_ = 'VatSpecificationDetails'
        elif nodeName_ == 'InvoiceFreeText':
            InvoiceFreeText_ = child_.text
            InvoiceFreeText_ = self.gds_validate_string(InvoiceFreeText_, node, 'InvoiceFreeText')
            self.InvoiceFreeText.append(InvoiceFreeText_)
            self.validate_genericStringType0_512(self.InvoiceFreeText)    # validate type genericStringType0_512
        elif nodeName_ == 'InvoiceVatFreeText':
            InvoiceVatFreeText_ = child_.text
            InvoiceVatFreeText_ = self.gds_validate_string(InvoiceVatFreeText_, node, 'InvoiceVatFreeText')
            self.InvoiceVatFreeText = InvoiceVatFreeText_
            self.validate_genericStringType0_70(self.InvoiceVatFreeText)    # validate type genericStringType0_70
        elif nodeName_ == 'PaymentTermsDetails':
            obj_ = PaymentTermsDetailsType.factory()
            obj_.build(child_)
            self.PaymentTermsDetails.append(obj_)
            obj_.original_tagname_ = 'PaymentTermsDetails'
        elif nodeName_ == 'DiscountDetails':
            obj_ = DiscountDetailsType.factory()
            obj_.build(child_)
            self.DiscountDetails.append(obj_)
            obj_.original_tagname_ = 'DiscountDetails'
# end class InvoiceDetailsType


class InvoiceRecipientCommunicationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, InvoiceRecipientPhoneNumberIdentifier=None, InvoiceRecipientEmailaddressIdentifier=None):
        self.original_tagname_ = None
        self.InvoiceRecipientPhoneNumberIdentifier = InvoiceRecipientPhoneNumberIdentifier
        self.InvoiceRecipientEmailaddressIdentifier = InvoiceRecipientEmailaddressIdentifier
    def factory(*args_, **kwargs_):
        if InvoiceRecipientCommunicationDetailsType.subclass:
            return InvoiceRecipientCommunicationDetailsType.subclass(*args_, **kwargs_)
        else:
            return InvoiceRecipientCommunicationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_InvoiceRecipientPhoneNumberIdentifier(self): return self.InvoiceRecipientPhoneNumberIdentifier
    def set_InvoiceRecipientPhoneNumberIdentifier(self, InvoiceRecipientPhoneNumberIdentifier): self.InvoiceRecipientPhoneNumberIdentifier = InvoiceRecipientPhoneNumberIdentifier
    def get_InvoiceRecipientEmailaddressIdentifier(self): return self.InvoiceRecipientEmailaddressIdentifier
    def set_InvoiceRecipientEmailaddressIdentifier(self, InvoiceRecipientEmailaddressIdentifier): self.InvoiceRecipientEmailaddressIdentifier = InvoiceRecipientEmailaddressIdentifier
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.InvoiceRecipientPhoneNumberIdentifier is not None or
            self.InvoiceRecipientEmailaddressIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='InvoiceRecipientCommunicationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='InvoiceRecipientCommunicationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='InvoiceRecipientCommunicationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='InvoiceRecipientCommunicationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='InvoiceRecipientCommunicationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.InvoiceRecipientPhoneNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientPhoneNumberIdentifier>%s</%sInvoiceRecipientPhoneNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientPhoneNumberIdentifier).encode(ExternalEncoding), input_name='InvoiceRecipientPhoneNumberIdentifier'), namespace_, eol_))
        if self.InvoiceRecipientEmailaddressIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientEmailaddressIdentifier>%s</%sInvoiceRecipientEmailaddressIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientEmailaddressIdentifier).encode(ExternalEncoding), input_name='InvoiceRecipientEmailaddressIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='InvoiceRecipientCommunicationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.InvoiceRecipientPhoneNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientPhoneNumberIdentifier=%s,\n' % quote_python(self.InvoiceRecipientPhoneNumberIdentifier).encode(ExternalEncoding))
        if self.InvoiceRecipientEmailaddressIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientEmailaddressIdentifier=%s,\n' % quote_python(self.InvoiceRecipientEmailaddressIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'InvoiceRecipientPhoneNumberIdentifier':
            InvoiceRecipientPhoneNumberIdentifier_ = child_.text
            InvoiceRecipientPhoneNumberIdentifier_ = self.gds_validate_string(InvoiceRecipientPhoneNumberIdentifier_, node, 'InvoiceRecipientPhoneNumberIdentifier')
            self.InvoiceRecipientPhoneNumberIdentifier = InvoiceRecipientPhoneNumberIdentifier_
            self.validate_genericStringType0_35(self.InvoiceRecipientPhoneNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceRecipientEmailaddressIdentifier':
            InvoiceRecipientEmailaddressIdentifier_ = child_.text
            InvoiceRecipientEmailaddressIdentifier_ = self.gds_validate_string(InvoiceRecipientEmailaddressIdentifier_, node, 'InvoiceRecipientEmailaddressIdentifier')
            self.InvoiceRecipientEmailaddressIdentifier = InvoiceRecipientEmailaddressIdentifier_
            self.validate_genericStringType0_70(self.InvoiceRecipientEmailaddressIdentifier)    # validate type genericStringType0_70
# end class InvoiceRecipientCommunicationDetailsType


class InvoiceRecipientDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, InvoiceRecipientAddress=None, InvoiceRecipientIntermediatorAddress=None):
        self.original_tagname_ = None
        self.InvoiceRecipientAddress = InvoiceRecipientAddress
        self.InvoiceRecipientIntermediatorAddress = InvoiceRecipientIntermediatorAddress
    def factory(*args_, **kwargs_):
        if InvoiceRecipientDetailsType.subclass:
            return InvoiceRecipientDetailsType.subclass(*args_, **kwargs_)
        else:
            return InvoiceRecipientDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_InvoiceRecipientAddress(self): return self.InvoiceRecipientAddress
    def set_InvoiceRecipientAddress(self, InvoiceRecipientAddress): self.InvoiceRecipientAddress = InvoiceRecipientAddress
    def get_InvoiceRecipientIntermediatorAddress(self): return self.InvoiceRecipientIntermediatorAddress
    def set_InvoiceRecipientIntermediatorAddress(self, InvoiceRecipientIntermediatorAddress): self.InvoiceRecipientIntermediatorAddress = InvoiceRecipientIntermediatorAddress
    def validate_genericStringType1_35(self, value):
        # Validate type genericStringType1_35, a restriction on xs:string.
        pass
    def validate_genericNMtokenType8_11(self, value):
        # Validate type genericNMtokenType8_11, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.InvoiceRecipientAddress is not None or
            self.InvoiceRecipientIntermediatorAddress is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='InvoiceRecipientDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='InvoiceRecipientDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='InvoiceRecipientDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='InvoiceRecipientDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='InvoiceRecipientDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.InvoiceRecipientAddress is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientAddress>%s</%sInvoiceRecipientAddress>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientAddress).encode(ExternalEncoding), input_name='InvoiceRecipientAddress'), namespace_, eol_))
        if self.InvoiceRecipientIntermediatorAddress is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientIntermediatorAddress>%s</%sInvoiceRecipientIntermediatorAddress>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientIntermediatorAddress).encode(ExternalEncoding), input_name='InvoiceRecipientIntermediatorAddress'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='InvoiceRecipientDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.InvoiceRecipientAddress is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientAddress=%s,\n' % quote_python(self.InvoiceRecipientAddress).encode(ExternalEncoding))
        if self.InvoiceRecipientIntermediatorAddress is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientIntermediatorAddress=%s,\n' % quote_python(self.InvoiceRecipientIntermediatorAddress).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'InvoiceRecipientAddress':
            InvoiceRecipientAddress_ = child_.text
            InvoiceRecipientAddress_ = self.gds_validate_string(InvoiceRecipientAddress_, node, 'InvoiceRecipientAddress')
            self.InvoiceRecipientAddress = InvoiceRecipientAddress_
            self.validate_genericStringType1_35(self.InvoiceRecipientAddress)    # validate type genericStringType1_35
        elif nodeName_ == 'InvoiceRecipientIntermediatorAddress':
            InvoiceRecipientIntermediatorAddress_ = child_.text
            InvoiceRecipientIntermediatorAddress_ = re_.sub(String_cleanup_pat_, " ", InvoiceRecipientIntermediatorAddress_).strip()
            InvoiceRecipientIntermediatorAddress_ = self.gds_validate_string(InvoiceRecipientIntermediatorAddress_, node, 'InvoiceRecipientIntermediatorAddress')
            self.InvoiceRecipientIntermediatorAddress = InvoiceRecipientIntermediatorAddress_
            self.validate_genericNMtokenType8_11(self.InvoiceRecipientIntermediatorAddress)    # validate type genericNMtokenType8_11
# end class InvoiceRecipientDetailsType


class InvoiceRecipientPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, InvoiceRecipientPartyIdentifier=None, InvoiceRecipientOrganisationName=None, InvoiceRecipientDepartment=None, InvoiceRecipientOrganisationTaxCode=None, InvoiceRecipientCode=None, InvoiceRecipientPostalAddressDetails=None):
        self.original_tagname_ = None
        self.InvoiceRecipientPartyIdentifier = InvoiceRecipientPartyIdentifier
        if InvoiceRecipientOrganisationName is None:
            self.InvoiceRecipientOrganisationName = []
        else:
            self.InvoiceRecipientOrganisationName = InvoiceRecipientOrganisationName
        if InvoiceRecipientDepartment is None:
            self.InvoiceRecipientDepartment = []
        else:
            self.InvoiceRecipientDepartment = InvoiceRecipientDepartment
        self.InvoiceRecipientOrganisationTaxCode = InvoiceRecipientOrganisationTaxCode
        self.InvoiceRecipientCode = InvoiceRecipientCode
        self.InvoiceRecipientPostalAddressDetails = InvoiceRecipientPostalAddressDetails
    def factory(*args_, **kwargs_):
        if InvoiceRecipientPartyDetailsType.subclass:
            return InvoiceRecipientPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return InvoiceRecipientPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_InvoiceRecipientPartyIdentifier(self): return self.InvoiceRecipientPartyIdentifier
    def set_InvoiceRecipientPartyIdentifier(self, InvoiceRecipientPartyIdentifier): self.InvoiceRecipientPartyIdentifier = InvoiceRecipientPartyIdentifier
    def get_InvoiceRecipientOrganisationName(self): return self.InvoiceRecipientOrganisationName
    def set_InvoiceRecipientOrganisationName(self, InvoiceRecipientOrganisationName): self.InvoiceRecipientOrganisationName = InvoiceRecipientOrganisationName
    def add_InvoiceRecipientOrganisationName(self, value): self.InvoiceRecipientOrganisationName.append(value)
    def insert_InvoiceRecipientOrganisationName_at(self, index, value): self.InvoiceRecipientOrganisationName.insert(index, value)
    def replace_InvoiceRecipientOrganisationName_at(self, index, value): self.InvoiceRecipientOrganisationName[index] = value
    def get_InvoiceRecipientDepartment(self): return self.InvoiceRecipientDepartment
    def set_InvoiceRecipientDepartment(self, InvoiceRecipientDepartment): self.InvoiceRecipientDepartment = InvoiceRecipientDepartment
    def add_InvoiceRecipientDepartment(self, value): self.InvoiceRecipientDepartment.append(value)
    def insert_InvoiceRecipientDepartment_at(self, index, value): self.InvoiceRecipientDepartment.insert(index, value)
    def replace_InvoiceRecipientDepartment_at(self, index, value): self.InvoiceRecipientDepartment[index] = value
    def get_InvoiceRecipientOrganisationTaxCode(self): return self.InvoiceRecipientOrganisationTaxCode
    def set_InvoiceRecipientOrganisationTaxCode(self, InvoiceRecipientOrganisationTaxCode): self.InvoiceRecipientOrganisationTaxCode = InvoiceRecipientOrganisationTaxCode
    def get_InvoiceRecipientCode(self): return self.InvoiceRecipientCode
    def set_InvoiceRecipientCode(self, InvoiceRecipientCode): self.InvoiceRecipientCode = InvoiceRecipientCode
    def get_InvoiceRecipientPostalAddressDetails(self): return self.InvoiceRecipientPostalAddressDetails
    def set_InvoiceRecipientPostalAddressDetails(self, InvoiceRecipientPostalAddressDetails): self.InvoiceRecipientPostalAddressDetails = InvoiceRecipientPostalAddressDetails
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_genericNMtokenType0_35(self, value):
        # Validate type genericNMtokenType0_35, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.InvoiceRecipientPartyIdentifier is not None or
            self.InvoiceRecipientOrganisationName or
            self.InvoiceRecipientDepartment or
            self.InvoiceRecipientOrganisationTaxCode is not None or
            self.InvoiceRecipientCode is not None or
            self.InvoiceRecipientPostalAddressDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='InvoiceRecipientPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='InvoiceRecipientPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='InvoiceRecipientPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='InvoiceRecipientPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='InvoiceRecipientPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.InvoiceRecipientPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientPartyIdentifier>%s</%sInvoiceRecipientPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientPartyIdentifier).encode(ExternalEncoding), input_name='InvoiceRecipientPartyIdentifier'), namespace_, eol_))
        for InvoiceRecipientOrganisationName_ in self.InvoiceRecipientOrganisationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientOrganisationName>%s</%sInvoiceRecipientOrganisationName>%s' % (namespace_, self.gds_format_string(quote_xml(InvoiceRecipientOrganisationName_).encode(ExternalEncoding), input_name='InvoiceRecipientOrganisationName'), namespace_, eol_))
        for InvoiceRecipientDepartment_ in self.InvoiceRecipientDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientDepartment>%s</%sInvoiceRecipientDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(InvoiceRecipientDepartment_).encode(ExternalEncoding), input_name='InvoiceRecipientDepartment'), namespace_, eol_))
        if self.InvoiceRecipientOrganisationTaxCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientOrganisationTaxCode>%s</%sInvoiceRecipientOrganisationTaxCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientOrganisationTaxCode).encode(ExternalEncoding), input_name='InvoiceRecipientOrganisationTaxCode'), namespace_, eol_))
        if self.InvoiceRecipientCode is not None:
            self.InvoiceRecipientCode.export(outfile, level, namespace_, name_='InvoiceRecipientCode', pretty_print=pretty_print)
        if self.InvoiceRecipientPostalAddressDetails is not None:
            self.InvoiceRecipientPostalAddressDetails.export(outfile, level, namespace_, name_='InvoiceRecipientPostalAddressDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='InvoiceRecipientPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.InvoiceRecipientPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientPartyIdentifier=%s,\n' % quote_python(self.InvoiceRecipientPartyIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('InvoiceRecipientOrganisationName=[\n')
        level += 1
        for InvoiceRecipientOrganisationName_ in self.InvoiceRecipientOrganisationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(InvoiceRecipientOrganisationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('InvoiceRecipientDepartment=[\n')
        level += 1
        for InvoiceRecipientDepartment_ in self.InvoiceRecipientDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(InvoiceRecipientDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.InvoiceRecipientOrganisationTaxCode is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientOrganisationTaxCode=%s,\n' % quote_python(self.InvoiceRecipientOrganisationTaxCode).encode(ExternalEncoding))
        if self.InvoiceRecipientCode is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientCode=model_.PartyIdentifierType(\n')
            self.InvoiceRecipientCode.exportLiteral(outfile, level, name_='InvoiceRecipientCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InvoiceRecipientPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientPostalAddressDetails=model_.InvoiceRecipientPostalAddressDetailsType(\n')
            self.InvoiceRecipientPostalAddressDetails.exportLiteral(outfile, level, name_='InvoiceRecipientPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'InvoiceRecipientPartyIdentifier':
            InvoiceRecipientPartyIdentifier_ = child_.text
            InvoiceRecipientPartyIdentifier_ = self.gds_validate_string(InvoiceRecipientPartyIdentifier_, node, 'InvoiceRecipientPartyIdentifier')
            self.InvoiceRecipientPartyIdentifier = InvoiceRecipientPartyIdentifier_
            self.validate_genericStringType0_35(self.InvoiceRecipientPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceRecipientOrganisationName':
            InvoiceRecipientOrganisationName_ = child_.text
            InvoiceRecipientOrganisationName_ = self.gds_validate_string(InvoiceRecipientOrganisationName_, node, 'InvoiceRecipientOrganisationName')
            self.InvoiceRecipientOrganisationName.append(InvoiceRecipientOrganisationName_)
            self.validate_genericStringType2_35(self.InvoiceRecipientOrganisationName)    # validate type genericStringType2_35
        elif nodeName_ == 'InvoiceRecipientDepartment':
            InvoiceRecipientDepartment_ = child_.text
            InvoiceRecipientDepartment_ = self.gds_validate_string(InvoiceRecipientDepartment_, node, 'InvoiceRecipientDepartment')
            self.InvoiceRecipientDepartment.append(InvoiceRecipientDepartment_)
            self.validate_genericStringType0_35(self.InvoiceRecipientDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceRecipientOrganisationTaxCode':
            InvoiceRecipientOrganisationTaxCode_ = child_.text
            InvoiceRecipientOrganisationTaxCode_ = re_.sub(String_cleanup_pat_, " ", InvoiceRecipientOrganisationTaxCode_).strip()
            InvoiceRecipientOrganisationTaxCode_ = self.gds_validate_string(InvoiceRecipientOrganisationTaxCode_, node, 'InvoiceRecipientOrganisationTaxCode')
            self.InvoiceRecipientOrganisationTaxCode = InvoiceRecipientOrganisationTaxCode_
            self.validate_genericNMtokenType0_35(self.InvoiceRecipientOrganisationTaxCode)    # validate type genericNMtokenType0_35
        elif nodeName_ == 'InvoiceRecipientCode':
            obj_ = PartyIdentifierType.factory()
            obj_.build(child_)
            self.InvoiceRecipientCode = obj_
            obj_.original_tagname_ = 'InvoiceRecipientCode'
        elif nodeName_ == 'InvoiceRecipientPostalAddressDetails':
            obj_ = InvoiceRecipientPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.InvoiceRecipientPostalAddressDetails = obj_
            obj_.original_tagname_ = 'InvoiceRecipientPostalAddressDetails'
# end class InvoiceRecipientPartyDetailsType


class InvoiceRecipientPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, InvoiceRecipientStreetName=None, InvoiceRecipientTownName=None, InvoiceRecipientPostCodeIdentifier=None, CountryCode=None, CountryName=None, InvoiceRecipientPostOfficeBoxIdentifier=None):
        self.original_tagname_ = None
        if InvoiceRecipientStreetName is None:
            self.InvoiceRecipientStreetName = []
        else:
            self.InvoiceRecipientStreetName = InvoiceRecipientStreetName
        self.InvoiceRecipientTownName = InvoiceRecipientTownName
        self.InvoiceRecipientPostCodeIdentifier = InvoiceRecipientPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
        self.InvoiceRecipientPostOfficeBoxIdentifier = InvoiceRecipientPostOfficeBoxIdentifier
    def factory(*args_, **kwargs_):
        if InvoiceRecipientPostalAddressDetailsType.subclass:
            return InvoiceRecipientPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return InvoiceRecipientPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_InvoiceRecipientStreetName(self): return self.InvoiceRecipientStreetName
    def set_InvoiceRecipientStreetName(self, InvoiceRecipientStreetName): self.InvoiceRecipientStreetName = InvoiceRecipientStreetName
    def add_InvoiceRecipientStreetName(self, value): self.InvoiceRecipientStreetName.append(value)
    def insert_InvoiceRecipientStreetName_at(self, index, value): self.InvoiceRecipientStreetName.insert(index, value)
    def replace_InvoiceRecipientStreetName_at(self, index, value): self.InvoiceRecipientStreetName[index] = value
    def get_InvoiceRecipientTownName(self): return self.InvoiceRecipientTownName
    def set_InvoiceRecipientTownName(self, InvoiceRecipientTownName): self.InvoiceRecipientTownName = InvoiceRecipientTownName
    def get_InvoiceRecipientPostCodeIdentifier(self): return self.InvoiceRecipientPostCodeIdentifier
    def set_InvoiceRecipientPostCodeIdentifier(self, InvoiceRecipientPostCodeIdentifier): self.InvoiceRecipientPostCodeIdentifier = InvoiceRecipientPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def get_InvoiceRecipientPostOfficeBoxIdentifier(self): return self.InvoiceRecipientPostOfficeBoxIdentifier
    def set_InvoiceRecipientPostOfficeBoxIdentifier(self, InvoiceRecipientPostOfficeBoxIdentifier): self.InvoiceRecipientPostOfficeBoxIdentifier = InvoiceRecipientPostOfficeBoxIdentifier
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.InvoiceRecipientStreetName or
            self.InvoiceRecipientTownName is not None or
            self.InvoiceRecipientPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None or
            self.InvoiceRecipientPostOfficeBoxIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='InvoiceRecipientPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='InvoiceRecipientPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='InvoiceRecipientPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='InvoiceRecipientPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='InvoiceRecipientPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for InvoiceRecipientStreetName_ in self.InvoiceRecipientStreetName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientStreetName>%s</%sInvoiceRecipientStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(InvoiceRecipientStreetName_).encode(ExternalEncoding), input_name='InvoiceRecipientStreetName'), namespace_, eol_))
        if self.InvoiceRecipientTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientTownName>%s</%sInvoiceRecipientTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientTownName).encode(ExternalEncoding), input_name='InvoiceRecipientTownName'), namespace_, eol_))
        if self.InvoiceRecipientPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientPostCodeIdentifier>%s</%sInvoiceRecipientPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientPostCodeIdentifier).encode(ExternalEncoding), input_name='InvoiceRecipientPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
        if self.InvoiceRecipientPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceRecipientPostOfficeBoxIdentifier>%s</%sInvoiceRecipientPostOfficeBoxIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceRecipientPostOfficeBoxIdentifier).encode(ExternalEncoding), input_name='InvoiceRecipientPostOfficeBoxIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='InvoiceRecipientPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('InvoiceRecipientStreetName=[\n')
        level += 1
        for InvoiceRecipientStreetName_ in self.InvoiceRecipientStreetName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(InvoiceRecipientStreetName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.InvoiceRecipientTownName is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientTownName=%s,\n' % quote_python(self.InvoiceRecipientTownName).encode(ExternalEncoding))
        if self.InvoiceRecipientPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientPostCodeIdentifier=%s,\n' % quote_python(self.InvoiceRecipientPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
        if self.InvoiceRecipientPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceRecipientPostOfficeBoxIdentifier=%s,\n' % quote_python(self.InvoiceRecipientPostOfficeBoxIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'InvoiceRecipientStreetName':
            InvoiceRecipientStreetName_ = child_.text
            InvoiceRecipientStreetName_ = self.gds_validate_string(InvoiceRecipientStreetName_, node, 'InvoiceRecipientStreetName')
            self.InvoiceRecipientStreetName.append(InvoiceRecipientStreetName_)
            self.validate_genericStringType2_35(self.InvoiceRecipientStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'InvoiceRecipientTownName':
            InvoiceRecipientTownName_ = child_.text
            InvoiceRecipientTownName_ = self.gds_validate_string(InvoiceRecipientTownName_, node, 'InvoiceRecipientTownName')
            self.InvoiceRecipientTownName = InvoiceRecipientTownName_
            self.validate_genericStringType2_35(self.InvoiceRecipientTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'InvoiceRecipientPostCodeIdentifier':
            InvoiceRecipientPostCodeIdentifier_ = child_.text
            InvoiceRecipientPostCodeIdentifier_ = self.gds_validate_string(InvoiceRecipientPostCodeIdentifier_, node, 'InvoiceRecipientPostCodeIdentifier')
            self.InvoiceRecipientPostCodeIdentifier = InvoiceRecipientPostCodeIdentifier_
            self.validate_genericStringType2_35(self.InvoiceRecipientPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceRecipientPostOfficeBoxIdentifier':
            InvoiceRecipientPostOfficeBoxIdentifier_ = child_.text
            InvoiceRecipientPostOfficeBoxIdentifier_ = self.gds_validate_string(InvoiceRecipientPostOfficeBoxIdentifier_, node, 'InvoiceRecipientPostOfficeBoxIdentifier')
            self.InvoiceRecipientPostOfficeBoxIdentifier = InvoiceRecipientPostOfficeBoxIdentifier_
            self.validate_genericStringType0_35(self.InvoiceRecipientPostOfficeBoxIdentifier)    # validate type genericStringType0_35
# end class InvoiceRecipientPostalAddressDetailsType


class InvoiceRowType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, RowSubIdentifier=None, ArticleIdentifier=None, ArticleGroupIdentifier=None, ArticleName=None, ArticleInfoUrlText=None, BuyerArticleIdentifier=None, EanCode=None, RowRegistrationNumberIdentifier=None, SerialNumberIdentifier=None, RowActionCode=None, RowDefinitionDetails=None, OfferedQuantity=None, DeliveredQuantity=None, OrderedQuantity=None, ConfirmedQuantity=None, PostDeliveredQuantity=None, InvoicedQuantity=None, CreditRequestedQuantity=None, ReturnedQuantity=None, StartDate=None, EndDate=None, UnitPriceAmount=None, UnitPriceVatIncludedAmount=None, UnitPriceBaseQuantity=None, RowIdentifier=None, RowIdentifierUrlText=None, RowOrderPositionIdentifier=None, RowIdentifierDate=None, RowPositionIdentifier=None, OriginalInvoiceNumber=None, RowOrdererName=None, RowSalesPersonName=None, RowOrderConfirmationIdentifier=None, RowOrderConfirmationDate=None, RowDeliveryIdentifier=None, RowDeliveryIdentifierUrlText=None, RowDeliveryDate=None, RowQuotationIdentifier=None, RowQuotationIdentifierUrlText=None, RowAgreementIdentifier=None, RowAgreementIdentifierUrlText=None, RowRequestOfQuotationIdentifier=None, RowRequestOfQuotationIdentifierUrlText=None, RowPriceListIdentifier=None, RowPriceListIdentifierUrlText=None, RowProjectReferenceIdentifier=None, RowOverDuePaymentDetails=None, RowAnyPartyDetails=None, RowDeliveryDetails=None, RowShortProposedAccountIdentifier=None, RowNormalProposedAccountIdentifier=None, RowProposedAccountText=None, RowAccountDimensionText=None, RowSellerAccountText=None, RowFreeText=None, RowUsedQuantity=None, RowPreviousMeterReadingDate=None, RowLatestMeterReadingDate=None, RowCalculatedQuantity=None, RowAveragePriceAmount=None, RowDiscountPercent=None, RowDiscountAmount=None, RowDiscountTypeCode=None, RowDiscountTypeText=None, RowProgressiveDiscountDetails=None, RowVatRatePercent=None, RowVatCode=None, RowVatAmount=None, RowVatExcludedAmount=None, RowAmount=None, RowTransactionDetails=None, SubInvoiceRow=None):
        self.original_tagname_ = None
        self.RowSubIdentifier = RowSubIdentifier
        self.ArticleIdentifier = ArticleIdentifier
        self.ArticleGroupIdentifier = ArticleGroupIdentifier
        self.ArticleName = ArticleName
        self.ArticleInfoUrlText = ArticleInfoUrlText
        self.BuyerArticleIdentifier = BuyerArticleIdentifier
        self.EanCode = EanCode
        self.RowRegistrationNumberIdentifier = RowRegistrationNumberIdentifier
        self.SerialNumberIdentifier = SerialNumberIdentifier
        self.RowActionCode = RowActionCode
        if RowDefinitionDetails is None:
            self.RowDefinitionDetails = []
        else:
            self.RowDefinitionDetails = RowDefinitionDetails
        if OfferedQuantity is None:
            self.OfferedQuantity = []
        else:
            self.OfferedQuantity = OfferedQuantity
        if DeliveredQuantity is None:
            self.DeliveredQuantity = []
        else:
            self.DeliveredQuantity = DeliveredQuantity
        self.OrderedQuantity = OrderedQuantity
        self.ConfirmedQuantity = ConfirmedQuantity
        self.PostDeliveredQuantity = PostDeliveredQuantity
        if InvoicedQuantity is None:
            self.InvoicedQuantity = []
        else:
            self.InvoicedQuantity = InvoicedQuantity
        self.CreditRequestedQuantity = CreditRequestedQuantity
        self.ReturnedQuantity = ReturnedQuantity
        self.StartDate = StartDate
        self.EndDate = EndDate
        self.UnitPriceAmount = UnitPriceAmount
        self.UnitPriceVatIncludedAmount = UnitPriceVatIncludedAmount
        self.UnitPriceBaseQuantity = UnitPriceBaseQuantity
        self.RowIdentifier = RowIdentifier
        self.RowIdentifierUrlText = RowIdentifierUrlText
        self.RowOrderPositionIdentifier = RowOrderPositionIdentifier
        self.RowIdentifierDate = RowIdentifierDate
        self.RowPositionIdentifier = RowPositionIdentifier
        self.OriginalInvoiceNumber = OriginalInvoiceNumber
        self.RowOrdererName = RowOrdererName
        self.RowSalesPersonName = RowSalesPersonName
        self.RowOrderConfirmationIdentifier = RowOrderConfirmationIdentifier
        self.RowOrderConfirmationDate = RowOrderConfirmationDate
        self.RowDeliveryIdentifier = RowDeliveryIdentifier
        self.RowDeliveryIdentifierUrlText = RowDeliveryIdentifierUrlText
        self.RowDeliveryDate = RowDeliveryDate
        self.RowQuotationIdentifier = RowQuotationIdentifier
        self.RowQuotationIdentifierUrlText = RowQuotationIdentifierUrlText
        self.RowAgreementIdentifier = RowAgreementIdentifier
        self.RowAgreementIdentifierUrlText = RowAgreementIdentifierUrlText
        self.RowRequestOfQuotationIdentifier = RowRequestOfQuotationIdentifier
        self.RowRequestOfQuotationIdentifierUrlText = RowRequestOfQuotationIdentifierUrlText
        self.RowPriceListIdentifier = RowPriceListIdentifier
        self.RowPriceListIdentifierUrlText = RowPriceListIdentifierUrlText
        self.RowProjectReferenceIdentifier = RowProjectReferenceIdentifier
        self.RowOverDuePaymentDetails = RowOverDuePaymentDetails
        if RowAnyPartyDetails is None:
            self.RowAnyPartyDetails = []
        else:
            self.RowAnyPartyDetails = RowAnyPartyDetails
        self.RowDeliveryDetails = RowDeliveryDetails
        self.RowShortProposedAccountIdentifier = RowShortProposedAccountIdentifier
        self.RowNormalProposedAccountIdentifier = RowNormalProposedAccountIdentifier
        self.RowProposedAccountText = RowProposedAccountText
        self.RowAccountDimensionText = RowAccountDimensionText
        self.RowSellerAccountText = RowSellerAccountText
        if RowFreeText is None:
            self.RowFreeText = []
        else:
            self.RowFreeText = RowFreeText
        self.RowUsedQuantity = RowUsedQuantity
        self.RowPreviousMeterReadingDate = RowPreviousMeterReadingDate
        self.RowLatestMeterReadingDate = RowLatestMeterReadingDate
        self.RowCalculatedQuantity = RowCalculatedQuantity
        self.RowAveragePriceAmount = RowAveragePriceAmount
        self.RowDiscountPercent = RowDiscountPercent
        self.RowDiscountAmount = RowDiscountAmount
        self.RowDiscountTypeCode = RowDiscountTypeCode
        self.RowDiscountTypeText = RowDiscountTypeText
        if RowProgressiveDiscountDetails is None:
            self.RowProgressiveDiscountDetails = []
        else:
            self.RowProgressiveDiscountDetails = RowProgressiveDiscountDetails
        self.RowVatRatePercent = RowVatRatePercent
        self.RowVatCode = RowVatCode
        self.RowVatAmount = RowVatAmount
        self.RowVatExcludedAmount = RowVatExcludedAmount
        self.RowAmount = RowAmount
        self.RowTransactionDetails = RowTransactionDetails
        if SubInvoiceRow is None:
            self.SubInvoiceRow = []
        else:
            self.SubInvoiceRow = SubInvoiceRow
    def factory(*args_, **kwargs_):
        if InvoiceRowType.subclass:
            return InvoiceRowType.subclass(*args_, **kwargs_)
        else:
            return InvoiceRowType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RowSubIdentifier(self): return self.RowSubIdentifier
    def set_RowSubIdentifier(self, RowSubIdentifier): self.RowSubIdentifier = RowSubIdentifier
    def get_ArticleIdentifier(self): return self.ArticleIdentifier
    def set_ArticleIdentifier(self, ArticleIdentifier): self.ArticleIdentifier = ArticleIdentifier
    def get_ArticleGroupIdentifier(self): return self.ArticleGroupIdentifier
    def set_ArticleGroupIdentifier(self, ArticleGroupIdentifier): self.ArticleGroupIdentifier = ArticleGroupIdentifier
    def get_ArticleName(self): return self.ArticleName
    def set_ArticleName(self, ArticleName): self.ArticleName = ArticleName
    def get_ArticleInfoUrlText(self): return self.ArticleInfoUrlText
    def set_ArticleInfoUrlText(self, ArticleInfoUrlText): self.ArticleInfoUrlText = ArticleInfoUrlText
    def get_BuyerArticleIdentifier(self): return self.BuyerArticleIdentifier
    def set_BuyerArticleIdentifier(self, BuyerArticleIdentifier): self.BuyerArticleIdentifier = BuyerArticleIdentifier
    def get_EanCode(self): return self.EanCode
    def set_EanCode(self, EanCode): self.EanCode = EanCode
    def get_RowRegistrationNumberIdentifier(self): return self.RowRegistrationNumberIdentifier
    def set_RowRegistrationNumberIdentifier(self, RowRegistrationNumberIdentifier): self.RowRegistrationNumberIdentifier = RowRegistrationNumberIdentifier
    def get_SerialNumberIdentifier(self): return self.SerialNumberIdentifier
    def set_SerialNumberIdentifier(self, SerialNumberIdentifier): self.SerialNumberIdentifier = SerialNumberIdentifier
    def get_RowActionCode(self): return self.RowActionCode
    def set_RowActionCode(self, RowActionCode): self.RowActionCode = RowActionCode
    def get_RowDefinitionDetails(self): return self.RowDefinitionDetails
    def set_RowDefinitionDetails(self, RowDefinitionDetails): self.RowDefinitionDetails = RowDefinitionDetails
    def add_RowDefinitionDetails(self, value): self.RowDefinitionDetails.append(value)
    def insert_RowDefinitionDetails_at(self, index, value): self.RowDefinitionDetails.insert(index, value)
    def replace_RowDefinitionDetails_at(self, index, value): self.RowDefinitionDetails[index] = value
    def get_OfferedQuantity(self): return self.OfferedQuantity
    def set_OfferedQuantity(self, OfferedQuantity): self.OfferedQuantity = OfferedQuantity
    def add_OfferedQuantity(self, value): self.OfferedQuantity.append(value)
    def insert_OfferedQuantity_at(self, index, value): self.OfferedQuantity.insert(index, value)
    def replace_OfferedQuantity_at(self, index, value): self.OfferedQuantity[index] = value
    def get_DeliveredQuantity(self): return self.DeliveredQuantity
    def set_DeliveredQuantity(self, DeliveredQuantity): self.DeliveredQuantity = DeliveredQuantity
    def add_DeliveredQuantity(self, value): self.DeliveredQuantity.append(value)
    def insert_DeliveredQuantity_at(self, index, value): self.DeliveredQuantity.insert(index, value)
    def replace_DeliveredQuantity_at(self, index, value): self.DeliveredQuantity[index] = value
    def get_OrderedQuantity(self): return self.OrderedQuantity
    def set_OrderedQuantity(self, OrderedQuantity): self.OrderedQuantity = OrderedQuantity
    def get_ConfirmedQuantity(self): return self.ConfirmedQuantity
    def set_ConfirmedQuantity(self, ConfirmedQuantity): self.ConfirmedQuantity = ConfirmedQuantity
    def get_PostDeliveredQuantity(self): return self.PostDeliveredQuantity
    def set_PostDeliveredQuantity(self, PostDeliveredQuantity): self.PostDeliveredQuantity = PostDeliveredQuantity
    def get_InvoicedQuantity(self): return self.InvoicedQuantity
    def set_InvoicedQuantity(self, InvoicedQuantity): self.InvoicedQuantity = InvoicedQuantity
    def add_InvoicedQuantity(self, value): self.InvoicedQuantity.append(value)
    def insert_InvoicedQuantity_at(self, index, value): self.InvoicedQuantity.insert(index, value)
    def replace_InvoicedQuantity_at(self, index, value): self.InvoicedQuantity[index] = value
    def get_CreditRequestedQuantity(self): return self.CreditRequestedQuantity
    def set_CreditRequestedQuantity(self, CreditRequestedQuantity): self.CreditRequestedQuantity = CreditRequestedQuantity
    def get_ReturnedQuantity(self): return self.ReturnedQuantity
    def set_ReturnedQuantity(self, ReturnedQuantity): self.ReturnedQuantity = ReturnedQuantity
    def get_StartDate(self): return self.StartDate
    def set_StartDate(self, StartDate): self.StartDate = StartDate
    def get_EndDate(self): return self.EndDate
    def set_EndDate(self, EndDate): self.EndDate = EndDate
    def get_UnitPriceAmount(self): return self.UnitPriceAmount
    def set_UnitPriceAmount(self, UnitPriceAmount): self.UnitPriceAmount = UnitPriceAmount
    def get_UnitPriceVatIncludedAmount(self): return self.UnitPriceVatIncludedAmount
    def set_UnitPriceVatIncludedAmount(self, UnitPriceVatIncludedAmount): self.UnitPriceVatIncludedAmount = UnitPriceVatIncludedAmount
    def get_UnitPriceBaseQuantity(self): return self.UnitPriceBaseQuantity
    def set_UnitPriceBaseQuantity(self, UnitPriceBaseQuantity): self.UnitPriceBaseQuantity = UnitPriceBaseQuantity
    def get_RowIdentifier(self): return self.RowIdentifier
    def set_RowIdentifier(self, RowIdentifier): self.RowIdentifier = RowIdentifier
    def get_RowIdentifierUrlText(self): return self.RowIdentifierUrlText
    def set_RowIdentifierUrlText(self, RowIdentifierUrlText): self.RowIdentifierUrlText = RowIdentifierUrlText
    def get_RowOrderPositionIdentifier(self): return self.RowOrderPositionIdentifier
    def set_RowOrderPositionIdentifier(self, RowOrderPositionIdentifier): self.RowOrderPositionIdentifier = RowOrderPositionIdentifier
    def get_RowIdentifierDate(self): return self.RowIdentifierDate
    def set_RowIdentifierDate(self, RowIdentifierDate): self.RowIdentifierDate = RowIdentifierDate
    def get_RowPositionIdentifier(self): return self.RowPositionIdentifier
    def set_RowPositionIdentifier(self, RowPositionIdentifier): self.RowPositionIdentifier = RowPositionIdentifier
    def get_OriginalInvoiceNumber(self): return self.OriginalInvoiceNumber
    def set_OriginalInvoiceNumber(self, OriginalInvoiceNumber): self.OriginalInvoiceNumber = OriginalInvoiceNumber
    def get_RowOrdererName(self): return self.RowOrdererName
    def set_RowOrdererName(self, RowOrdererName): self.RowOrdererName = RowOrdererName
    def get_RowSalesPersonName(self): return self.RowSalesPersonName
    def set_RowSalesPersonName(self, RowSalesPersonName): self.RowSalesPersonName = RowSalesPersonName
    def get_RowOrderConfirmationIdentifier(self): return self.RowOrderConfirmationIdentifier
    def set_RowOrderConfirmationIdentifier(self, RowOrderConfirmationIdentifier): self.RowOrderConfirmationIdentifier = RowOrderConfirmationIdentifier
    def get_RowOrderConfirmationDate(self): return self.RowOrderConfirmationDate
    def set_RowOrderConfirmationDate(self, RowOrderConfirmationDate): self.RowOrderConfirmationDate = RowOrderConfirmationDate
    def get_RowDeliveryIdentifier(self): return self.RowDeliveryIdentifier
    def set_RowDeliveryIdentifier(self, RowDeliveryIdentifier): self.RowDeliveryIdentifier = RowDeliveryIdentifier
    def get_RowDeliveryIdentifierUrlText(self): return self.RowDeliveryIdentifierUrlText
    def set_RowDeliveryIdentifierUrlText(self, RowDeliveryIdentifierUrlText): self.RowDeliveryIdentifierUrlText = RowDeliveryIdentifierUrlText
    def get_RowDeliveryDate(self): return self.RowDeliveryDate
    def set_RowDeliveryDate(self, RowDeliveryDate): self.RowDeliveryDate = RowDeliveryDate
    def get_RowQuotationIdentifier(self): return self.RowQuotationIdentifier
    def set_RowQuotationIdentifier(self, RowQuotationIdentifier): self.RowQuotationIdentifier = RowQuotationIdentifier
    def get_RowQuotationIdentifierUrlText(self): return self.RowQuotationIdentifierUrlText
    def set_RowQuotationIdentifierUrlText(self, RowQuotationIdentifierUrlText): self.RowQuotationIdentifierUrlText = RowQuotationIdentifierUrlText
    def get_RowAgreementIdentifier(self): return self.RowAgreementIdentifier
    def set_RowAgreementIdentifier(self, RowAgreementIdentifier): self.RowAgreementIdentifier = RowAgreementIdentifier
    def get_RowAgreementIdentifierUrlText(self): return self.RowAgreementIdentifierUrlText
    def set_RowAgreementIdentifierUrlText(self, RowAgreementIdentifierUrlText): self.RowAgreementIdentifierUrlText = RowAgreementIdentifierUrlText
    def get_RowRequestOfQuotationIdentifier(self): return self.RowRequestOfQuotationIdentifier
    def set_RowRequestOfQuotationIdentifier(self, RowRequestOfQuotationIdentifier): self.RowRequestOfQuotationIdentifier = RowRequestOfQuotationIdentifier
    def get_RowRequestOfQuotationIdentifierUrlText(self): return self.RowRequestOfQuotationIdentifierUrlText
    def set_RowRequestOfQuotationIdentifierUrlText(self, RowRequestOfQuotationIdentifierUrlText): self.RowRequestOfQuotationIdentifierUrlText = RowRequestOfQuotationIdentifierUrlText
    def get_RowPriceListIdentifier(self): return self.RowPriceListIdentifier
    def set_RowPriceListIdentifier(self, RowPriceListIdentifier): self.RowPriceListIdentifier = RowPriceListIdentifier
    def get_RowPriceListIdentifierUrlText(self): return self.RowPriceListIdentifierUrlText
    def set_RowPriceListIdentifierUrlText(self, RowPriceListIdentifierUrlText): self.RowPriceListIdentifierUrlText = RowPriceListIdentifierUrlText
    def get_RowProjectReferenceIdentifier(self): return self.RowProjectReferenceIdentifier
    def set_RowProjectReferenceIdentifier(self, RowProjectReferenceIdentifier): self.RowProjectReferenceIdentifier = RowProjectReferenceIdentifier
    def get_RowOverDuePaymentDetails(self): return self.RowOverDuePaymentDetails
    def set_RowOverDuePaymentDetails(self, RowOverDuePaymentDetails): self.RowOverDuePaymentDetails = RowOverDuePaymentDetails
    def get_RowAnyPartyDetails(self): return self.RowAnyPartyDetails
    def set_RowAnyPartyDetails(self, RowAnyPartyDetails): self.RowAnyPartyDetails = RowAnyPartyDetails
    def add_RowAnyPartyDetails(self, value): self.RowAnyPartyDetails.append(value)
    def insert_RowAnyPartyDetails_at(self, index, value): self.RowAnyPartyDetails.insert(index, value)
    def replace_RowAnyPartyDetails_at(self, index, value): self.RowAnyPartyDetails[index] = value
    def get_RowDeliveryDetails(self): return self.RowDeliveryDetails
    def set_RowDeliveryDetails(self, RowDeliveryDetails): self.RowDeliveryDetails = RowDeliveryDetails
    def get_RowShortProposedAccountIdentifier(self): return self.RowShortProposedAccountIdentifier
    def set_RowShortProposedAccountIdentifier(self, RowShortProposedAccountIdentifier): self.RowShortProposedAccountIdentifier = RowShortProposedAccountIdentifier
    def get_RowNormalProposedAccountIdentifier(self): return self.RowNormalProposedAccountIdentifier
    def set_RowNormalProposedAccountIdentifier(self, RowNormalProposedAccountIdentifier): self.RowNormalProposedAccountIdentifier = RowNormalProposedAccountIdentifier
    def get_RowProposedAccountText(self): return self.RowProposedAccountText
    def set_RowProposedAccountText(self, RowProposedAccountText): self.RowProposedAccountText = RowProposedAccountText
    def get_RowAccountDimensionText(self): return self.RowAccountDimensionText
    def set_RowAccountDimensionText(self, RowAccountDimensionText): self.RowAccountDimensionText = RowAccountDimensionText
    def get_RowSellerAccountText(self): return self.RowSellerAccountText
    def set_RowSellerAccountText(self, RowSellerAccountText): self.RowSellerAccountText = RowSellerAccountText
    def get_RowFreeText(self): return self.RowFreeText
    def set_RowFreeText(self, RowFreeText): self.RowFreeText = RowFreeText
    def add_RowFreeText(self, value): self.RowFreeText.append(value)
    def insert_RowFreeText_at(self, index, value): self.RowFreeText.insert(index, value)
    def replace_RowFreeText_at(self, index, value): self.RowFreeText[index] = value
    def get_RowUsedQuantity(self): return self.RowUsedQuantity
    def set_RowUsedQuantity(self, RowUsedQuantity): self.RowUsedQuantity = RowUsedQuantity
    def get_RowPreviousMeterReadingDate(self): return self.RowPreviousMeterReadingDate
    def set_RowPreviousMeterReadingDate(self, RowPreviousMeterReadingDate): self.RowPreviousMeterReadingDate = RowPreviousMeterReadingDate
    def get_RowLatestMeterReadingDate(self): return self.RowLatestMeterReadingDate
    def set_RowLatestMeterReadingDate(self, RowLatestMeterReadingDate): self.RowLatestMeterReadingDate = RowLatestMeterReadingDate
    def get_RowCalculatedQuantity(self): return self.RowCalculatedQuantity
    def set_RowCalculatedQuantity(self, RowCalculatedQuantity): self.RowCalculatedQuantity = RowCalculatedQuantity
    def get_RowAveragePriceAmount(self): return self.RowAveragePriceAmount
    def set_RowAveragePriceAmount(self, RowAveragePriceAmount): self.RowAveragePriceAmount = RowAveragePriceAmount
    def get_RowDiscountPercent(self): return self.RowDiscountPercent
    def set_RowDiscountPercent(self, RowDiscountPercent): self.RowDiscountPercent = RowDiscountPercent
    def get_RowDiscountAmount(self): return self.RowDiscountAmount
    def set_RowDiscountAmount(self, RowDiscountAmount): self.RowDiscountAmount = RowDiscountAmount
    def get_RowDiscountTypeCode(self): return self.RowDiscountTypeCode
    def set_RowDiscountTypeCode(self, RowDiscountTypeCode): self.RowDiscountTypeCode = RowDiscountTypeCode
    def get_RowDiscountTypeText(self): return self.RowDiscountTypeText
    def set_RowDiscountTypeText(self, RowDiscountTypeText): self.RowDiscountTypeText = RowDiscountTypeText
    def get_RowProgressiveDiscountDetails(self): return self.RowProgressiveDiscountDetails
    def set_RowProgressiveDiscountDetails(self, RowProgressiveDiscountDetails): self.RowProgressiveDiscountDetails = RowProgressiveDiscountDetails
    def add_RowProgressiveDiscountDetails(self, value): self.RowProgressiveDiscountDetails.append(value)
    def insert_RowProgressiveDiscountDetails_at(self, index, value): self.RowProgressiveDiscountDetails.insert(index, value)
    def replace_RowProgressiveDiscountDetails_at(self, index, value): self.RowProgressiveDiscountDetails[index] = value
    def get_RowVatRatePercent(self): return self.RowVatRatePercent
    def set_RowVatRatePercent(self, RowVatRatePercent): self.RowVatRatePercent = RowVatRatePercent
    def get_RowVatCode(self): return self.RowVatCode
    def set_RowVatCode(self, RowVatCode): self.RowVatCode = RowVatCode
    def get_RowVatAmount(self): return self.RowVatAmount
    def set_RowVatAmount(self, RowVatAmount): self.RowVatAmount = RowVatAmount
    def get_RowVatExcludedAmount(self): return self.RowVatExcludedAmount
    def set_RowVatExcludedAmount(self, RowVatExcludedAmount): self.RowVatExcludedAmount = RowVatExcludedAmount
    def get_RowAmount(self): return self.RowAmount
    def set_RowAmount(self, RowAmount): self.RowAmount = RowAmount
    def get_RowTransactionDetails(self): return self.RowTransactionDetails
    def set_RowTransactionDetails(self, RowTransactionDetails): self.RowTransactionDetails = RowTransactionDetails
    def get_SubInvoiceRow(self): return self.SubInvoiceRow
    def set_SubInvoiceRow(self, SubInvoiceRow): self.SubInvoiceRow = SubInvoiceRow
    def add_SubInvoiceRow(self, value): self.SubInvoiceRow.append(value)
    def insert_SubInvoiceRow_at(self, index, value): self.SubInvoiceRow.insert(index, value)
    def replace_SubInvoiceRow_at(self, index, value): self.SubInvoiceRow[index] = value
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_100(self, value):
        # Validate type genericStringType0_100, a restriction on xs:string.
        pass
    def validate_genericStringType0_512(self, value):
        # Validate type genericStringType0_512, a restriction on xs:string.
        pass
    def validate_genericTokenType0_35(self, value):
        # Validate type genericTokenType0_35, a restriction on xs:token.
        pass
    def validate_genericStringType1_20(self, value):
        # Validate type genericStringType1_20, a restriction on xs:string.
        pass
    def validate_genericNMtokenType0_4(self, value):
        # Validate type genericNMtokenType0_4, a restriction on xs:token.
        pass
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def validate_genericStringType0_10(self, value):
        # Validate type genericStringType0_10, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.RowSubIdentifier is not None or
            self.ArticleIdentifier is not None or
            self.ArticleGroupIdentifier is not None or
            self.ArticleName is not None or
            self.ArticleInfoUrlText is not None or
            self.BuyerArticleIdentifier is not None or
            self.EanCode is not None or
            self.RowRegistrationNumberIdentifier is not None or
            self.SerialNumberIdentifier is not None or
            self.RowActionCode is not None or
            self.RowDefinitionDetails or
            self.OfferedQuantity or
            self.DeliveredQuantity or
            self.OrderedQuantity is not None or
            self.ConfirmedQuantity is not None or
            self.PostDeliveredQuantity is not None or
            self.InvoicedQuantity or
            self.CreditRequestedQuantity is not None or
            self.ReturnedQuantity is not None or
            self.StartDate is not None or
            self.EndDate is not None or
            self.UnitPriceAmount is not None or
            self.UnitPriceVatIncludedAmount is not None or
            self.UnitPriceBaseQuantity is not None or
            self.RowIdentifier is not None or
            self.RowIdentifierUrlText is not None or
            self.RowOrderPositionIdentifier is not None or
            self.RowIdentifierDate is not None or
            self.RowPositionIdentifier is not None or
            self.OriginalInvoiceNumber is not None or
            self.RowOrdererName is not None or
            self.RowSalesPersonName is not None or
            self.RowOrderConfirmationIdentifier is not None or
            self.RowOrderConfirmationDate is not None or
            self.RowDeliveryIdentifier is not None or
            self.RowDeliveryIdentifierUrlText is not None or
            self.RowDeliveryDate is not None or
            self.RowQuotationIdentifier is not None or
            self.RowQuotationIdentifierUrlText is not None or
            self.RowAgreementIdentifier is not None or
            self.RowAgreementIdentifierUrlText is not None or
            self.RowRequestOfQuotationIdentifier is not None or
            self.RowRequestOfQuotationIdentifierUrlText is not None or
            self.RowPriceListIdentifier is not None or
            self.RowPriceListIdentifierUrlText is not None or
            self.RowProjectReferenceIdentifier is not None or
            self.RowOverDuePaymentDetails is not None or
            self.RowAnyPartyDetails or
            self.RowDeliveryDetails is not None or
            self.RowShortProposedAccountIdentifier is not None or
            self.RowNormalProposedAccountIdentifier is not None or
            self.RowProposedAccountText is not None or
            self.RowAccountDimensionText is not None or
            self.RowSellerAccountText is not None or
            self.RowFreeText or
            self.RowUsedQuantity is not None or
            self.RowPreviousMeterReadingDate is not None or
            self.RowLatestMeterReadingDate is not None or
            self.RowCalculatedQuantity is not None or
            self.RowAveragePriceAmount is not None or
            self.RowDiscountPercent is not None or
            self.RowDiscountAmount is not None or
            self.RowDiscountTypeCode is not None or
            self.RowDiscountTypeText is not None or
            self.RowProgressiveDiscountDetails or
            self.RowVatRatePercent is not None or
            self.RowVatCode is not None or
            self.RowVatAmount is not None or
            self.RowVatExcludedAmount is not None or
            self.RowAmount is not None or
            self.RowTransactionDetails is not None or
            self.SubInvoiceRow
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='InvoiceRowType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='InvoiceRowType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='InvoiceRowType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='InvoiceRowType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='InvoiceRowType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.RowSubIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowSubIdentifier>%s</%sRowSubIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowSubIdentifier).encode(ExternalEncoding), input_name='RowSubIdentifier'), namespace_, eol_))
        if self.ArticleIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sArticleIdentifier>%s</%sArticleIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ArticleIdentifier).encode(ExternalEncoding), input_name='ArticleIdentifier'), namespace_, eol_))
        if self.ArticleGroupIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sArticleGroupIdentifier>%s</%sArticleGroupIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ArticleGroupIdentifier).encode(ExternalEncoding), input_name='ArticleGroupIdentifier'), namespace_, eol_))
        if self.ArticleName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sArticleName>%s</%sArticleName>%s' % (namespace_, self.gds_format_string(quote_xml(self.ArticleName).encode(ExternalEncoding), input_name='ArticleName'), namespace_, eol_))
        if self.ArticleInfoUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sArticleInfoUrlText>%s</%sArticleInfoUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.ArticleInfoUrlText).encode(ExternalEncoding), input_name='ArticleInfoUrlText'), namespace_, eol_))
        if self.BuyerArticleIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBuyerArticleIdentifier>%s</%sBuyerArticleIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.BuyerArticleIdentifier).encode(ExternalEncoding), input_name='BuyerArticleIdentifier'), namespace_, eol_))
        if self.EanCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEanCode>%s</%sEanCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.EanCode).encode(ExternalEncoding), input_name='EanCode'), namespace_, eol_))
        if self.RowRegistrationNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowRegistrationNumberIdentifier>%s</%sRowRegistrationNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowRegistrationNumberIdentifier).encode(ExternalEncoding), input_name='RowRegistrationNumberIdentifier'), namespace_, eol_))
        if self.SerialNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSerialNumberIdentifier>%s</%sSerialNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SerialNumberIdentifier).encode(ExternalEncoding), input_name='SerialNumberIdentifier'), namespace_, eol_))
        if self.RowActionCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowActionCode>%s</%sRowActionCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowActionCode).encode(ExternalEncoding), input_name='RowActionCode'), namespace_, eol_))
        for RowDefinitionDetails_ in self.RowDefinitionDetails:
            RowDefinitionDetails_.export(outfile, level, namespace_, name_='RowDefinitionDetails', pretty_print=pretty_print)
        for OfferedQuantity_ in self.OfferedQuantity:
            OfferedQuantity_.export(outfile, level, namespace_, name_='OfferedQuantity', pretty_print=pretty_print)
        for DeliveredQuantity_ in self.DeliveredQuantity:
            DeliveredQuantity_.export(outfile, level, namespace_, name_='DeliveredQuantity', pretty_print=pretty_print)
        if self.OrderedQuantity is not None:
            self.OrderedQuantity.export(outfile, level, namespace_, name_='OrderedQuantity', pretty_print=pretty_print)
        if self.ConfirmedQuantity is not None:
            self.ConfirmedQuantity.export(outfile, level, namespace_, name_='ConfirmedQuantity', pretty_print=pretty_print)
        if self.PostDeliveredQuantity is not None:
            self.PostDeliveredQuantity.export(outfile, level, namespace_, name_='PostDeliveredQuantity', pretty_print=pretty_print)
        for InvoicedQuantity_ in self.InvoicedQuantity:
            InvoicedQuantity_.export(outfile, level, namespace_, name_='InvoicedQuantity', pretty_print=pretty_print)
        if self.CreditRequestedQuantity is not None:
            self.CreditRequestedQuantity.export(outfile, level, namespace_, name_='CreditRequestedQuantity', pretty_print=pretty_print)
        if self.ReturnedQuantity is not None:
            self.ReturnedQuantity.export(outfile, level, namespace_, name_='ReturnedQuantity', pretty_print=pretty_print)
        if self.StartDate is not None:
            self.StartDate.export(outfile, level, namespace_, name_='StartDate', pretty_print=pretty_print)
        if self.EndDate is not None:
            self.EndDate.export(outfile, level, namespace_, name_='EndDate', pretty_print=pretty_print)
        if self.UnitPriceAmount is not None:
            self.UnitPriceAmount.export(outfile, level, namespace_, name_='UnitPriceAmount', pretty_print=pretty_print)
        if self.UnitPriceVatIncludedAmount is not None:
            self.UnitPriceVatIncludedAmount.export(outfile, level, namespace_, name_='UnitPriceVatIncludedAmount', pretty_print=pretty_print)
        if self.UnitPriceBaseQuantity is not None:
            self.UnitPriceBaseQuantity.export(outfile, level, namespace_, name_='UnitPriceBaseQuantity', pretty_print=pretty_print)
        if self.RowIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowIdentifier>%s</%sRowIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowIdentifier).encode(ExternalEncoding), input_name='RowIdentifier'), namespace_, eol_))
        if self.RowIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowIdentifierUrlText>%s</%sRowIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowIdentifierUrlText).encode(ExternalEncoding), input_name='RowIdentifierUrlText'), namespace_, eol_))
        if self.RowOrderPositionIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowOrderPositionIdentifier>%s</%sRowOrderPositionIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowOrderPositionIdentifier).encode(ExternalEncoding), input_name='RowOrderPositionIdentifier'), namespace_, eol_))
        if self.RowIdentifierDate is not None:
            self.RowIdentifierDate.export(outfile, level, namespace_, name_='RowIdentifierDate', pretty_print=pretty_print)
        if self.RowPositionIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowPositionIdentifier>%s</%sRowPositionIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowPositionIdentifier).encode(ExternalEncoding), input_name='RowPositionIdentifier'), namespace_, eol_))
        if self.OriginalInvoiceNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOriginalInvoiceNumber>%s</%sOriginalInvoiceNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.OriginalInvoiceNumber).encode(ExternalEncoding), input_name='OriginalInvoiceNumber'), namespace_, eol_))
        if self.RowOrdererName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowOrdererName>%s</%sRowOrdererName>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowOrdererName).encode(ExternalEncoding), input_name='RowOrdererName'), namespace_, eol_))
        if self.RowSalesPersonName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowSalesPersonName>%s</%sRowSalesPersonName>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowSalesPersonName).encode(ExternalEncoding), input_name='RowSalesPersonName'), namespace_, eol_))
        if self.RowOrderConfirmationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowOrderConfirmationIdentifier>%s</%sRowOrderConfirmationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowOrderConfirmationIdentifier).encode(ExternalEncoding), input_name='RowOrderConfirmationIdentifier'), namespace_, eol_))
        if self.RowOrderConfirmationDate is not None:
            self.RowOrderConfirmationDate.export(outfile, level, namespace_, name_='RowOrderConfirmationDate', pretty_print=pretty_print)
        if self.RowDeliveryIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDeliveryIdentifier>%s</%sRowDeliveryIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDeliveryIdentifier).encode(ExternalEncoding), input_name='RowDeliveryIdentifier'), namespace_, eol_))
        if self.RowDeliveryIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDeliveryIdentifierUrlText>%s</%sRowDeliveryIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDeliveryIdentifierUrlText).encode(ExternalEncoding), input_name='RowDeliveryIdentifierUrlText'), namespace_, eol_))
        if self.RowDeliveryDate is not None:
            self.RowDeliveryDate.export(outfile, level, namespace_, name_='RowDeliveryDate', pretty_print=pretty_print)
        if self.RowQuotationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowQuotationIdentifier>%s</%sRowQuotationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowQuotationIdentifier).encode(ExternalEncoding), input_name='RowQuotationIdentifier'), namespace_, eol_))
        if self.RowQuotationIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowQuotationIdentifierUrlText>%s</%sRowQuotationIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowQuotationIdentifierUrlText).encode(ExternalEncoding), input_name='RowQuotationIdentifierUrlText'), namespace_, eol_))
        if self.RowAgreementIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAgreementIdentifier>%s</%sRowAgreementIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAgreementIdentifier).encode(ExternalEncoding), input_name='RowAgreementIdentifier'), namespace_, eol_))
        if self.RowAgreementIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAgreementIdentifierUrlText>%s</%sRowAgreementIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAgreementIdentifierUrlText).encode(ExternalEncoding), input_name='RowAgreementIdentifierUrlText'), namespace_, eol_))
        if self.RowRequestOfQuotationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowRequestOfQuotationIdentifier>%s</%sRowRequestOfQuotationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowRequestOfQuotationIdentifier).encode(ExternalEncoding), input_name='RowRequestOfQuotationIdentifier'), namespace_, eol_))
        if self.RowRequestOfQuotationIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowRequestOfQuotationIdentifierUrlText>%s</%sRowRequestOfQuotationIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowRequestOfQuotationIdentifierUrlText).encode(ExternalEncoding), input_name='RowRequestOfQuotationIdentifierUrlText'), namespace_, eol_))
        if self.RowPriceListIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowPriceListIdentifier>%s</%sRowPriceListIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowPriceListIdentifier).encode(ExternalEncoding), input_name='RowPriceListIdentifier'), namespace_, eol_))
        if self.RowPriceListIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowPriceListIdentifierUrlText>%s</%sRowPriceListIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowPriceListIdentifierUrlText).encode(ExternalEncoding), input_name='RowPriceListIdentifierUrlText'), namespace_, eol_))
        if self.RowProjectReferenceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowProjectReferenceIdentifier>%s</%sRowProjectReferenceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowProjectReferenceIdentifier).encode(ExternalEncoding), input_name='RowProjectReferenceIdentifier'), namespace_, eol_))
        if self.RowOverDuePaymentDetails is not None:
            self.RowOverDuePaymentDetails.export(outfile, level, namespace_, name_='RowOverDuePaymentDetails', pretty_print=pretty_print)
        for RowAnyPartyDetails_ in self.RowAnyPartyDetails:
            RowAnyPartyDetails_.export(outfile, level, namespace_, name_='RowAnyPartyDetails', pretty_print=pretty_print)
        if self.RowDeliveryDetails is not None:
            self.RowDeliveryDetails.export(outfile, level, namespace_, name_='RowDeliveryDetails', pretty_print=pretty_print)
        if self.RowShortProposedAccountIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowShortProposedAccountIdentifier>%s</%sRowShortProposedAccountIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowShortProposedAccountIdentifier).encode(ExternalEncoding), input_name='RowShortProposedAccountIdentifier'), namespace_, eol_))
        if self.RowNormalProposedAccountIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowNormalProposedAccountIdentifier>%s</%sRowNormalProposedAccountIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowNormalProposedAccountIdentifier).encode(ExternalEncoding), input_name='RowNormalProposedAccountIdentifier'), namespace_, eol_))
        if self.RowProposedAccountText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowProposedAccountText>%s</%sRowProposedAccountText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowProposedAccountText).encode(ExternalEncoding), input_name='RowProposedAccountText'), namespace_, eol_))
        if self.RowAccountDimensionText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAccountDimensionText>%s</%sRowAccountDimensionText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAccountDimensionText).encode(ExternalEncoding), input_name='RowAccountDimensionText'), namespace_, eol_))
        if self.RowSellerAccountText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowSellerAccountText>%s</%sRowSellerAccountText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowSellerAccountText).encode(ExternalEncoding), input_name='RowSellerAccountText'), namespace_, eol_))
        for RowFreeText_ in self.RowFreeText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowFreeText>%s</%sRowFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(RowFreeText_).encode(ExternalEncoding), input_name='RowFreeText'), namespace_, eol_))
        if self.RowUsedQuantity is not None:
            self.RowUsedQuantity.export(outfile, level, namespace_, name_='RowUsedQuantity', pretty_print=pretty_print)
        if self.RowPreviousMeterReadingDate is not None:
            self.RowPreviousMeterReadingDate.export(outfile, level, namespace_, name_='RowPreviousMeterReadingDate', pretty_print=pretty_print)
        if self.RowLatestMeterReadingDate is not None:
            self.RowLatestMeterReadingDate.export(outfile, level, namespace_, name_='RowLatestMeterReadingDate', pretty_print=pretty_print)
        if self.RowCalculatedQuantity is not None:
            self.RowCalculatedQuantity.export(outfile, level, namespace_, name_='RowCalculatedQuantity', pretty_print=pretty_print)
        if self.RowAveragePriceAmount is not None:
            self.RowAveragePriceAmount.export(outfile, level, namespace_, name_='RowAveragePriceAmount', pretty_print=pretty_print)
        if self.RowDiscountPercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDiscountPercent>%s</%sRowDiscountPercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDiscountPercent).encode(ExternalEncoding), input_name='RowDiscountPercent'), namespace_, eol_))
        if self.RowDiscountAmount is not None:
            self.RowDiscountAmount.export(outfile, level, namespace_, name_='RowDiscountAmount', pretty_print=pretty_print)
        if self.RowDiscountTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDiscountTypeCode>%s</%sRowDiscountTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDiscountTypeCode).encode(ExternalEncoding), input_name='RowDiscountTypeCode'), namespace_, eol_))
        if self.RowDiscountTypeText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDiscountTypeText>%s</%sRowDiscountTypeText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDiscountTypeText).encode(ExternalEncoding), input_name='RowDiscountTypeText'), namespace_, eol_))
        for RowProgressiveDiscountDetails_ in self.RowProgressiveDiscountDetails:
            RowProgressiveDiscountDetails_.export(outfile, level, namespace_, name_='RowProgressiveDiscountDetails', pretty_print=pretty_print)
        if self.RowVatRatePercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowVatRatePercent>%s</%sRowVatRatePercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowVatRatePercent).encode(ExternalEncoding), input_name='RowVatRatePercent'), namespace_, eol_))
        if self.RowVatCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowVatCode>%s</%sRowVatCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowVatCode).encode(ExternalEncoding), input_name='RowVatCode'), namespace_, eol_))
        if self.RowVatAmount is not None:
            self.RowVatAmount.export(outfile, level, namespace_, name_='RowVatAmount', pretty_print=pretty_print)
        if self.RowVatExcludedAmount is not None:
            self.RowVatExcludedAmount.export(outfile, level, namespace_, name_='RowVatExcludedAmount', pretty_print=pretty_print)
        if self.RowAmount is not None:
            self.RowAmount.export(outfile, level, namespace_, name_='RowAmount', pretty_print=pretty_print)
        if self.RowTransactionDetails is not None:
            self.RowTransactionDetails.export(outfile, level, namespace_, name_='RowTransactionDetails', pretty_print=pretty_print)
        for SubInvoiceRow_ in self.SubInvoiceRow:
            SubInvoiceRow_.export(outfile, level, namespace_, name_='SubInvoiceRow', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='InvoiceRowType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.RowSubIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowSubIdentifier=%s,\n' % quote_python(self.RowSubIdentifier).encode(ExternalEncoding))
        if self.ArticleIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ArticleIdentifier=%s,\n' % quote_python(self.ArticleIdentifier).encode(ExternalEncoding))
        if self.ArticleGroupIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ArticleGroupIdentifier=%s,\n' % quote_python(self.ArticleGroupIdentifier).encode(ExternalEncoding))
        if self.ArticleName is not None:
            showIndent(outfile, level)
            outfile.write('ArticleName=%s,\n' % quote_python(self.ArticleName).encode(ExternalEncoding))
        if self.ArticleInfoUrlText is not None:
            showIndent(outfile, level)
            outfile.write('ArticleInfoUrlText=%s,\n' % quote_python(self.ArticleInfoUrlText).encode(ExternalEncoding))
        if self.BuyerArticleIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('BuyerArticleIdentifier=%s,\n' % quote_python(self.BuyerArticleIdentifier).encode(ExternalEncoding))
        if self.EanCode is not None:
            showIndent(outfile, level)
            outfile.write('EanCode=%s,\n' % quote_python(self.EanCode).encode(ExternalEncoding))
        if self.RowRegistrationNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowRegistrationNumberIdentifier=%s,\n' % quote_python(self.RowRegistrationNumberIdentifier).encode(ExternalEncoding))
        if self.SerialNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SerialNumberIdentifier=%s,\n' % quote_python(self.SerialNumberIdentifier).encode(ExternalEncoding))
        if self.RowActionCode is not None:
            showIndent(outfile, level)
            outfile.write('RowActionCode=%s,\n' % quote_python(self.RowActionCode).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('RowDefinitionDetails=[\n')
        level += 1
        for RowDefinitionDetails_ in self.RowDefinitionDetails:
            showIndent(outfile, level)
            outfile.write('model_.RowDefinitionDetailsType(\n')
            RowDefinitionDetails_.exportLiteral(outfile, level, name_='RowDefinitionDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('OfferedQuantity=[\n')
        level += 1
        for OfferedQuantity_ in self.OfferedQuantity:
            showIndent(outfile, level)
            outfile.write('model_.QuantityType0_14(\n')
            OfferedQuantity_.exportLiteral(outfile, level, name_='QuantityType0_14')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('DeliveredQuantity=[\n')
        level += 1
        for DeliveredQuantity_ in self.DeliveredQuantity:
            showIndent(outfile, level)
            outfile.write('model_.QuantityType0_14(\n')
            DeliveredQuantity_.exportLiteral(outfile, level, name_='QuantityType0_14')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.OrderedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('OrderedQuantity=model_.QuantityType0_14(\n')
            self.OrderedQuantity.exportLiteral(outfile, level, name_='OrderedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ConfirmedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('ConfirmedQuantity=model_.QuantityType0_14(\n')
            self.ConfirmedQuantity.exportLiteral(outfile, level, name_='ConfirmedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.PostDeliveredQuantity is not None:
            showIndent(outfile, level)
            outfile.write('PostDeliveredQuantity=model_.QuantityType0_14(\n')
            self.PostDeliveredQuantity.exportLiteral(outfile, level, name_='PostDeliveredQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('InvoicedQuantity=[\n')
        level += 1
        for InvoicedQuantity_ in self.InvoicedQuantity:
            showIndent(outfile, level)
            outfile.write('model_.QuantityType0_14(\n')
            InvoicedQuantity_.exportLiteral(outfile, level, name_='QuantityType0_14')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.CreditRequestedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('CreditRequestedQuantity=model_.QuantityType0_14(\n')
            self.CreditRequestedQuantity.exportLiteral(outfile, level, name_='CreditRequestedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ReturnedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('ReturnedQuantity=model_.QuantityType0_14(\n')
            self.ReturnedQuantity.exportLiteral(outfile, level, name_='ReturnedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.StartDate is not None:
            showIndent(outfile, level)
            outfile.write('StartDate=model_.date(\n')
            self.StartDate.exportLiteral(outfile, level, name_='StartDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.EndDate is not None:
            showIndent(outfile, level)
            outfile.write('EndDate=model_.date(\n')
            self.EndDate.exportLiteral(outfile, level, name_='EndDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.UnitPriceAmount is not None:
            showIndent(outfile, level)
            outfile.write('UnitPriceAmount=model_.unitAmount(\n')
            self.UnitPriceAmount.exportLiteral(outfile, level, name_='UnitPriceAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.UnitPriceVatIncludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('UnitPriceVatIncludedAmount=model_.unitAmount(\n')
            self.UnitPriceVatIncludedAmount.exportLiteral(outfile, level, name_='UnitPriceVatIncludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.UnitPriceBaseQuantity is not None:
            showIndent(outfile, level)
            outfile.write('UnitPriceBaseQuantity=model_.QuantityType0_14(\n')
            self.UnitPriceBaseQuantity.exportLiteral(outfile, level, name_='UnitPriceBaseQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowIdentifier=%s,\n' % quote_python(self.RowIdentifier).encode(ExternalEncoding))
        if self.RowIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('RowIdentifierUrlText=%s,\n' % quote_python(self.RowIdentifierUrlText).encode(ExternalEncoding))
        if self.RowOrderPositionIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowOrderPositionIdentifier=%s,\n' % quote_python(self.RowOrderPositionIdentifier).encode(ExternalEncoding))
        if self.RowIdentifierDate is not None:
            showIndent(outfile, level)
            outfile.write('RowIdentifierDate=model_.date(\n')
            self.RowIdentifierDate.exportLiteral(outfile, level, name_='RowIdentifierDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowPositionIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowPositionIdentifier=%s,\n' % quote_python(self.RowPositionIdentifier).encode(ExternalEncoding))
        if self.OriginalInvoiceNumber is not None:
            showIndent(outfile, level)
            outfile.write('OriginalInvoiceNumber=%s,\n' % quote_python(self.OriginalInvoiceNumber).encode(ExternalEncoding))
        if self.RowOrdererName is not None:
            showIndent(outfile, level)
            outfile.write('RowOrdererName=%s,\n' % quote_python(self.RowOrdererName).encode(ExternalEncoding))
        if self.RowSalesPersonName is not None:
            showIndent(outfile, level)
            outfile.write('RowSalesPersonName=%s,\n' % quote_python(self.RowSalesPersonName).encode(ExternalEncoding))
        if self.RowOrderConfirmationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowOrderConfirmationIdentifier=%s,\n' % quote_python(self.RowOrderConfirmationIdentifier).encode(ExternalEncoding))
        if self.RowOrderConfirmationDate is not None:
            showIndent(outfile, level)
            outfile.write('RowOrderConfirmationDate=model_.date(\n')
            self.RowOrderConfirmationDate.exportLiteral(outfile, level, name_='RowOrderConfirmationDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowDeliveryIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowDeliveryIdentifier=%s,\n' % quote_python(self.RowDeliveryIdentifier).encode(ExternalEncoding))
        if self.RowDeliveryIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('RowDeliveryIdentifierUrlText=%s,\n' % quote_python(self.RowDeliveryIdentifierUrlText).encode(ExternalEncoding))
        if self.RowDeliveryDate is not None:
            showIndent(outfile, level)
            outfile.write('RowDeliveryDate=model_.date(\n')
            self.RowDeliveryDate.exportLiteral(outfile, level, name_='RowDeliveryDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowQuotationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowQuotationIdentifier=%s,\n' % quote_python(self.RowQuotationIdentifier).encode(ExternalEncoding))
        if self.RowQuotationIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('RowQuotationIdentifierUrlText=%s,\n' % quote_python(self.RowQuotationIdentifierUrlText).encode(ExternalEncoding))
        if self.RowAgreementIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowAgreementIdentifier=%s,\n' % quote_python(self.RowAgreementIdentifier).encode(ExternalEncoding))
        if self.RowAgreementIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('RowAgreementIdentifierUrlText=%s,\n' % quote_python(self.RowAgreementIdentifierUrlText).encode(ExternalEncoding))
        if self.RowRequestOfQuotationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowRequestOfQuotationIdentifier=%s,\n' % quote_python(self.RowRequestOfQuotationIdentifier).encode(ExternalEncoding))
        if self.RowRequestOfQuotationIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('RowRequestOfQuotationIdentifierUrlText=%s,\n' % quote_python(self.RowRequestOfQuotationIdentifierUrlText).encode(ExternalEncoding))
        if self.RowPriceListIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowPriceListIdentifier=%s,\n' % quote_python(self.RowPriceListIdentifier).encode(ExternalEncoding))
        if self.RowPriceListIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('RowPriceListIdentifierUrlText=%s,\n' % quote_python(self.RowPriceListIdentifierUrlText).encode(ExternalEncoding))
        if self.RowProjectReferenceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowProjectReferenceIdentifier=%s,\n' % quote_python(self.RowProjectReferenceIdentifier).encode(ExternalEncoding))
        if self.RowOverDuePaymentDetails is not None:
            showIndent(outfile, level)
            outfile.write('RowOverDuePaymentDetails=model_.RowOverDuePaymentDetailsType(\n')
            self.RowOverDuePaymentDetails.exportLiteral(outfile, level, name_='RowOverDuePaymentDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('RowAnyPartyDetails=[\n')
        level += 1
        for RowAnyPartyDetails_ in self.RowAnyPartyDetails:
            showIndent(outfile, level)
            outfile.write('model_.RowAnyPartyDetailsType(\n')
            RowAnyPartyDetails_.exportLiteral(outfile, level, name_='RowAnyPartyDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.RowDeliveryDetails is not None:
            showIndent(outfile, level)
            outfile.write('RowDeliveryDetails=model_.RowDeliveryDetailsType(\n')
            self.RowDeliveryDetails.exportLiteral(outfile, level, name_='RowDeliveryDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowShortProposedAccountIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowShortProposedAccountIdentifier=%s,\n' % quote_python(self.RowShortProposedAccountIdentifier).encode(ExternalEncoding))
        if self.RowNormalProposedAccountIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowNormalProposedAccountIdentifier=%s,\n' % quote_python(self.RowNormalProposedAccountIdentifier).encode(ExternalEncoding))
        if self.RowProposedAccountText is not None:
            showIndent(outfile, level)
            outfile.write('RowProposedAccountText=%s,\n' % quote_python(self.RowProposedAccountText).encode(ExternalEncoding))
        if self.RowAccountDimensionText is not None:
            showIndent(outfile, level)
            outfile.write('RowAccountDimensionText=%s,\n' % quote_python(self.RowAccountDimensionText).encode(ExternalEncoding))
        if self.RowSellerAccountText is not None:
            showIndent(outfile, level)
            outfile.write('RowSellerAccountText=%s,\n' % quote_python(self.RowSellerAccountText).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('RowFreeText=[\n')
        level += 1
        for RowFreeText_ in self.RowFreeText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(RowFreeText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.RowUsedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('RowUsedQuantity=model_.QuantityType0_14(\n')
            self.RowUsedQuantity.exportLiteral(outfile, level, name_='RowUsedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowPreviousMeterReadingDate is not None:
            showIndent(outfile, level)
            outfile.write('RowPreviousMeterReadingDate=model_.date(\n')
            self.RowPreviousMeterReadingDate.exportLiteral(outfile, level, name_='RowPreviousMeterReadingDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowLatestMeterReadingDate is not None:
            showIndent(outfile, level)
            outfile.write('RowLatestMeterReadingDate=model_.date(\n')
            self.RowLatestMeterReadingDate.exportLiteral(outfile, level, name_='RowLatestMeterReadingDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowCalculatedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('RowCalculatedQuantity=model_.QuantityType0_14(\n')
            self.RowCalculatedQuantity.exportLiteral(outfile, level, name_='RowCalculatedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowAveragePriceAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowAveragePriceAmount=model_.amount(\n')
            self.RowAveragePriceAmount.exportLiteral(outfile, level, name_='RowAveragePriceAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowDiscountPercent is not None:
            showIndent(outfile, level)
            outfile.write('RowDiscountPercent=%s,\n' % quote_python(self.RowDiscountPercent).encode(ExternalEncoding))
        if self.RowDiscountAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowDiscountAmount=model_.amount(\n')
            self.RowDiscountAmount.exportLiteral(outfile, level, name_='RowDiscountAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowDiscountTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('RowDiscountTypeCode=%s,\n' % quote_python(self.RowDiscountTypeCode).encode(ExternalEncoding))
        if self.RowDiscountTypeText is not None:
            showIndent(outfile, level)
            outfile.write('RowDiscountTypeText=%s,\n' % quote_python(self.RowDiscountTypeText).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('RowProgressiveDiscountDetails=[\n')
        level += 1
        for RowProgressiveDiscountDetails_ in self.RowProgressiveDiscountDetails:
            showIndent(outfile, level)
            outfile.write('model_.RowProgressiveDiscountDetailsType(\n')
            RowProgressiveDiscountDetails_.exportLiteral(outfile, level, name_='RowProgressiveDiscountDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.RowVatRatePercent is not None:
            showIndent(outfile, level)
            outfile.write('RowVatRatePercent=%s,\n' % quote_python(self.RowVatRatePercent).encode(ExternalEncoding))
        if self.RowVatCode is not None:
            showIndent(outfile, level)
            outfile.write('RowVatCode=%s,\n' % quote_python(self.RowVatCode).encode(ExternalEncoding))
        if self.RowVatAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowVatAmount=model_.amount(\n')
            self.RowVatAmount.exportLiteral(outfile, level, name_='RowVatAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowVatExcludedAmount=model_.amount(\n')
            self.RowVatExcludedAmount.exportLiteral(outfile, level, name_='RowVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowAmount=model_.amount(\n')
            self.RowAmount.exportLiteral(outfile, level, name_='RowAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowTransactionDetails is not None:
            showIndent(outfile, level)
            outfile.write('RowTransactionDetails=model_.TransactionDetailsType(\n')
            self.RowTransactionDetails.exportLiteral(outfile, level, name_='RowTransactionDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('SubInvoiceRow=[\n')
        level += 1
        for SubInvoiceRow_ in self.SubInvoiceRow:
            showIndent(outfile, level)
            outfile.write('model_.SubInvoiceRowType(\n')
            SubInvoiceRow_.exportLiteral(outfile, level, name_='SubInvoiceRowType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RowSubIdentifier':
            RowSubIdentifier_ = child_.text
            RowSubIdentifier_ = self.gds_validate_string(RowSubIdentifier_, node, 'RowSubIdentifier')
            self.RowSubIdentifier = RowSubIdentifier_
            self.validate_genericStringType0_35(self.RowSubIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'ArticleIdentifier':
            ArticleIdentifier_ = child_.text
            ArticleIdentifier_ = self.gds_validate_string(ArticleIdentifier_, node, 'ArticleIdentifier')
            self.ArticleIdentifier = ArticleIdentifier_
            self.validate_genericStringType0_35(self.ArticleIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'ArticleGroupIdentifier':
            ArticleGroupIdentifier_ = child_.text
            ArticleGroupIdentifier_ = self.gds_validate_string(ArticleGroupIdentifier_, node, 'ArticleGroupIdentifier')
            self.ArticleGroupIdentifier = ArticleGroupIdentifier_
            self.validate_genericStringType0_35(self.ArticleGroupIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'ArticleName':
            ArticleName_ = child_.text
            ArticleName_ = self.gds_validate_string(ArticleName_, node, 'ArticleName')
            self.ArticleName = ArticleName_
            self.validate_genericStringType0_100(self.ArticleName)    # validate type genericStringType0_100
        elif nodeName_ == 'ArticleInfoUrlText':
            ArticleInfoUrlText_ = child_.text
            ArticleInfoUrlText_ = self.gds_validate_string(ArticleInfoUrlText_, node, 'ArticleInfoUrlText')
            self.ArticleInfoUrlText = ArticleInfoUrlText_
            self.validate_genericStringType0_512(self.ArticleInfoUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'BuyerArticleIdentifier':
            BuyerArticleIdentifier_ = child_.text
            BuyerArticleIdentifier_ = self.gds_validate_string(BuyerArticleIdentifier_, node, 'BuyerArticleIdentifier')
            self.BuyerArticleIdentifier = BuyerArticleIdentifier_
            self.validate_genericStringType0_35(self.BuyerArticleIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'EanCode':
            EanCode_ = child_.text
            EanCode_ = re_.sub(String_cleanup_pat_, " ", EanCode_).strip()
            EanCode_ = self.gds_validate_string(EanCode_, node, 'EanCode')
            self.EanCode = EanCode_
            self.validate_genericTokenType0_35(self.EanCode)    # validate type genericTokenType0_35
        elif nodeName_ == 'RowRegistrationNumberIdentifier':
            RowRegistrationNumberIdentifier_ = child_.text
            RowRegistrationNumberIdentifier_ = self.gds_validate_string(RowRegistrationNumberIdentifier_, node, 'RowRegistrationNumberIdentifier')
            self.RowRegistrationNumberIdentifier = RowRegistrationNumberIdentifier_
            self.validate_genericStringType0_35(self.RowRegistrationNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SerialNumberIdentifier':
            SerialNumberIdentifier_ = child_.text
            SerialNumberIdentifier_ = self.gds_validate_string(SerialNumberIdentifier_, node, 'SerialNumberIdentifier')
            self.SerialNumberIdentifier = SerialNumberIdentifier_
            self.validate_genericStringType0_35(self.SerialNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowActionCode':
            RowActionCode_ = child_.text
            RowActionCode_ = re_.sub(String_cleanup_pat_, " ", RowActionCode_).strip()
            RowActionCode_ = self.gds_validate_string(RowActionCode_, node, 'RowActionCode')
            self.RowActionCode = RowActionCode_
            self.validate_genericTokenType0_35(self.RowActionCode)    # validate type genericTokenType0_35
        elif nodeName_ == 'RowDefinitionDetails':
            obj_ = RowDefinitionDetailsType.factory()
            obj_.build(child_)
            self.RowDefinitionDetails.append(obj_)
            obj_.original_tagname_ = 'RowDefinitionDetails'
        elif nodeName_ == 'OfferedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.OfferedQuantity.append(obj_)
            obj_.original_tagname_ = 'OfferedQuantity'
        elif nodeName_ == 'DeliveredQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.DeliveredQuantity.append(obj_)
            obj_.original_tagname_ = 'DeliveredQuantity'
        elif nodeName_ == 'OrderedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.OrderedQuantity = obj_
            obj_.original_tagname_ = 'OrderedQuantity'
        elif nodeName_ == 'ConfirmedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.ConfirmedQuantity = obj_
            obj_.original_tagname_ = 'ConfirmedQuantity'
        elif nodeName_ == 'PostDeliveredQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.PostDeliveredQuantity = obj_
            obj_.original_tagname_ = 'PostDeliveredQuantity'
        elif nodeName_ == 'InvoicedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.InvoicedQuantity.append(obj_)
            obj_.original_tagname_ = 'InvoicedQuantity'
        elif nodeName_ == 'CreditRequestedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.CreditRequestedQuantity = obj_
            obj_.original_tagname_ = 'CreditRequestedQuantity'
        elif nodeName_ == 'ReturnedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.ReturnedQuantity = obj_
            obj_.original_tagname_ = 'ReturnedQuantity'
        elif nodeName_ == 'StartDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.StartDate = obj_
            obj_.original_tagname_ = 'StartDate'
        elif nodeName_ == 'EndDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.EndDate = obj_
            obj_.original_tagname_ = 'EndDate'
        elif nodeName_ == 'UnitPriceAmount':
            obj_ = unitAmount.factory()
            obj_.build(child_)
            self.UnitPriceAmount = obj_
            obj_.original_tagname_ = 'UnitPriceAmount'
        elif nodeName_ == 'UnitPriceVatIncludedAmount':
            obj_ = unitAmount.factory()
            obj_.build(child_)
            self.UnitPriceVatIncludedAmount = obj_
            obj_.original_tagname_ = 'UnitPriceVatIncludedAmount'
        elif nodeName_ == 'UnitPriceBaseQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.UnitPriceBaseQuantity = obj_
            obj_.original_tagname_ = 'UnitPriceBaseQuantity'
        elif nodeName_ == 'RowIdentifier':
            RowIdentifier_ = child_.text
            RowIdentifier_ = self.gds_validate_string(RowIdentifier_, node, 'RowIdentifier')
            self.RowIdentifier = RowIdentifier_
            self.validate_genericStringType0_35(self.RowIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowIdentifierUrlText':
            RowIdentifierUrlText_ = child_.text
            RowIdentifierUrlText_ = self.gds_validate_string(RowIdentifierUrlText_, node, 'RowIdentifierUrlText')
            self.RowIdentifierUrlText = RowIdentifierUrlText_
            self.validate_genericStringType0_512(self.RowIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'RowOrderPositionIdentifier':
            RowOrderPositionIdentifier_ = child_.text
            RowOrderPositionIdentifier_ = self.gds_validate_string(RowOrderPositionIdentifier_, node, 'RowOrderPositionIdentifier')
            self.RowOrderPositionIdentifier = RowOrderPositionIdentifier_
            self.validate_genericStringType0_35(self.RowOrderPositionIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowIdentifierDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowIdentifierDate = obj_
            obj_.original_tagname_ = 'RowIdentifierDate'
        elif nodeName_ == 'RowPositionIdentifier':
            RowPositionIdentifier_ = child_.text
            RowPositionIdentifier_ = self.gds_validate_string(RowPositionIdentifier_, node, 'RowPositionIdentifier')
            self.RowPositionIdentifier = RowPositionIdentifier_
            self.validate_genericStringType0_35(self.RowPositionIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'OriginalInvoiceNumber':
            OriginalInvoiceNumber_ = child_.text
            OriginalInvoiceNumber_ = self.gds_validate_string(OriginalInvoiceNumber_, node, 'OriginalInvoiceNumber')
            self.OriginalInvoiceNumber = OriginalInvoiceNumber_
            self.validate_genericStringType1_20(self.OriginalInvoiceNumber)    # validate type genericStringType1_20
        elif nodeName_ == 'RowOrdererName':
            RowOrdererName_ = child_.text
            RowOrdererName_ = self.gds_validate_string(RowOrdererName_, node, 'RowOrdererName')
            self.RowOrdererName = RowOrdererName_
            self.validate_genericStringType0_35(self.RowOrdererName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowSalesPersonName':
            RowSalesPersonName_ = child_.text
            RowSalesPersonName_ = self.gds_validate_string(RowSalesPersonName_, node, 'RowSalesPersonName')
            self.RowSalesPersonName = RowSalesPersonName_
            self.validate_genericStringType0_35(self.RowSalesPersonName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowOrderConfirmationIdentifier':
            RowOrderConfirmationIdentifier_ = child_.text
            RowOrderConfirmationIdentifier_ = self.gds_validate_string(RowOrderConfirmationIdentifier_, node, 'RowOrderConfirmationIdentifier')
            self.RowOrderConfirmationIdentifier = RowOrderConfirmationIdentifier_
            self.validate_genericStringType0_35(self.RowOrderConfirmationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowOrderConfirmationDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowOrderConfirmationDate = obj_
            obj_.original_tagname_ = 'RowOrderConfirmationDate'
        elif nodeName_ == 'RowDeliveryIdentifier':
            RowDeliveryIdentifier_ = child_.text
            RowDeliveryIdentifier_ = self.gds_validate_string(RowDeliveryIdentifier_, node, 'RowDeliveryIdentifier')
            self.RowDeliveryIdentifier = RowDeliveryIdentifier_
            self.validate_genericStringType0_35(self.RowDeliveryIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowDeliveryIdentifierUrlText':
            RowDeliveryIdentifierUrlText_ = child_.text
            RowDeliveryIdentifierUrlText_ = self.gds_validate_string(RowDeliveryIdentifierUrlText_, node, 'RowDeliveryIdentifierUrlText')
            self.RowDeliveryIdentifierUrlText = RowDeliveryIdentifierUrlText_
            self.validate_genericStringType0_512(self.RowDeliveryIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'RowDeliveryDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowDeliveryDate = obj_
            obj_.original_tagname_ = 'RowDeliveryDate'
        elif nodeName_ == 'RowQuotationIdentifier':
            RowQuotationIdentifier_ = child_.text
            RowQuotationIdentifier_ = self.gds_validate_string(RowQuotationIdentifier_, node, 'RowQuotationIdentifier')
            self.RowQuotationIdentifier = RowQuotationIdentifier_
            self.validate_genericStringType0_35(self.RowQuotationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowQuotationIdentifierUrlText':
            RowQuotationIdentifierUrlText_ = child_.text
            RowQuotationIdentifierUrlText_ = self.gds_validate_string(RowQuotationIdentifierUrlText_, node, 'RowQuotationIdentifierUrlText')
            self.RowQuotationIdentifierUrlText = RowQuotationIdentifierUrlText_
            self.validate_genericStringType0_512(self.RowQuotationIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'RowAgreementIdentifier':
            RowAgreementIdentifier_ = child_.text
            RowAgreementIdentifier_ = self.gds_validate_string(RowAgreementIdentifier_, node, 'RowAgreementIdentifier')
            self.RowAgreementIdentifier = RowAgreementIdentifier_
            self.validate_genericStringType0_35(self.RowAgreementIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowAgreementIdentifierUrlText':
            RowAgreementIdentifierUrlText_ = child_.text
            RowAgreementIdentifierUrlText_ = self.gds_validate_string(RowAgreementIdentifierUrlText_, node, 'RowAgreementIdentifierUrlText')
            self.RowAgreementIdentifierUrlText = RowAgreementIdentifierUrlText_
            self.validate_genericStringType0_512(self.RowAgreementIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'RowRequestOfQuotationIdentifier':
            RowRequestOfQuotationIdentifier_ = child_.text
            RowRequestOfQuotationIdentifier_ = self.gds_validate_string(RowRequestOfQuotationIdentifier_, node, 'RowRequestOfQuotationIdentifier')
            self.RowRequestOfQuotationIdentifier = RowRequestOfQuotationIdentifier_
            self.validate_genericStringType0_35(self.RowRequestOfQuotationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowRequestOfQuotationIdentifierUrlText':
            RowRequestOfQuotationIdentifierUrlText_ = child_.text
            RowRequestOfQuotationIdentifierUrlText_ = self.gds_validate_string(RowRequestOfQuotationIdentifierUrlText_, node, 'RowRequestOfQuotationIdentifierUrlText')
            self.RowRequestOfQuotationIdentifierUrlText = RowRequestOfQuotationIdentifierUrlText_
            self.validate_genericStringType0_512(self.RowRequestOfQuotationIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'RowPriceListIdentifier':
            RowPriceListIdentifier_ = child_.text
            RowPriceListIdentifier_ = self.gds_validate_string(RowPriceListIdentifier_, node, 'RowPriceListIdentifier')
            self.RowPriceListIdentifier = RowPriceListIdentifier_
            self.validate_genericStringType0_35(self.RowPriceListIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowPriceListIdentifierUrlText':
            RowPriceListIdentifierUrlText_ = child_.text
            RowPriceListIdentifierUrlText_ = self.gds_validate_string(RowPriceListIdentifierUrlText_, node, 'RowPriceListIdentifierUrlText')
            self.RowPriceListIdentifierUrlText = RowPriceListIdentifierUrlText_
            self.validate_genericStringType0_512(self.RowPriceListIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'RowProjectReferenceIdentifier':
            RowProjectReferenceIdentifier_ = child_.text
            RowProjectReferenceIdentifier_ = self.gds_validate_string(RowProjectReferenceIdentifier_, node, 'RowProjectReferenceIdentifier')
            self.RowProjectReferenceIdentifier = RowProjectReferenceIdentifier_
            self.validate_genericStringType0_35(self.RowProjectReferenceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowOverDuePaymentDetails':
            obj_ = RowOverDuePaymentDetailsType.factory()
            obj_.build(child_)
            self.RowOverDuePaymentDetails = obj_
            obj_.original_tagname_ = 'RowOverDuePaymentDetails'
        elif nodeName_ == 'RowAnyPartyDetails':
            obj_ = RowAnyPartyDetailsType.factory()
            obj_.build(child_)
            self.RowAnyPartyDetails.append(obj_)
            obj_.original_tagname_ = 'RowAnyPartyDetails'
        elif nodeName_ == 'RowDeliveryDetails':
            obj_ = RowDeliveryDetailsType.factory()
            obj_.build(child_)
            self.RowDeliveryDetails = obj_
            obj_.original_tagname_ = 'RowDeliveryDetails'
        elif nodeName_ == 'RowShortProposedAccountIdentifier':
            RowShortProposedAccountIdentifier_ = child_.text
            RowShortProposedAccountIdentifier_ = re_.sub(String_cleanup_pat_, " ", RowShortProposedAccountIdentifier_).strip()
            RowShortProposedAccountIdentifier_ = self.gds_validate_string(RowShortProposedAccountIdentifier_, node, 'RowShortProposedAccountIdentifier')
            self.RowShortProposedAccountIdentifier = RowShortProposedAccountIdentifier_
            self.validate_genericNMtokenType0_4(self.RowShortProposedAccountIdentifier)    # validate type genericNMtokenType0_4
        elif nodeName_ == 'RowNormalProposedAccountIdentifier':
            RowNormalProposedAccountIdentifier_ = child_.text
            RowNormalProposedAccountIdentifier_ = re_.sub(String_cleanup_pat_, " ", RowNormalProposedAccountIdentifier_).strip()
            RowNormalProposedAccountIdentifier_ = self.gds_validate_string(RowNormalProposedAccountIdentifier_, node, 'RowNormalProposedAccountIdentifier')
            self.RowNormalProposedAccountIdentifier = RowNormalProposedAccountIdentifier_
            self.validate_genericNMtokenType0_4(self.RowNormalProposedAccountIdentifier)    # validate type genericNMtokenType0_4
        elif nodeName_ == 'RowProposedAccountText':
            RowProposedAccountText_ = child_.text
            RowProposedAccountText_ = self.gds_validate_string(RowProposedAccountText_, node, 'RowProposedAccountText')
            self.RowProposedAccountText = RowProposedAccountText_
            self.validate_genericStringType0_35(self.RowProposedAccountText)    # validate type genericStringType0_35
        elif nodeName_ == 'RowAccountDimensionText':
            RowAccountDimensionText_ = child_.text
            RowAccountDimensionText_ = self.gds_validate_string(RowAccountDimensionText_, node, 'RowAccountDimensionText')
            self.RowAccountDimensionText = RowAccountDimensionText_
            self.validate_genericStringType0_35(self.RowAccountDimensionText)    # validate type genericStringType0_35
        elif nodeName_ == 'RowSellerAccountText':
            RowSellerAccountText_ = child_.text
            RowSellerAccountText_ = self.gds_validate_string(RowSellerAccountText_, node, 'RowSellerAccountText')
            self.RowSellerAccountText = RowSellerAccountText_
            self.validate_genericStringType0_35(self.RowSellerAccountText)    # validate type genericStringType0_35
        elif nodeName_ == 'RowFreeText':
            RowFreeText_ = child_.text
            RowFreeText_ = self.gds_validate_string(RowFreeText_, node, 'RowFreeText')
            self.RowFreeText.append(RowFreeText_)
            self.validate_genericStringType0_512(self.RowFreeText)    # validate type genericStringType0_512
        elif nodeName_ == 'RowUsedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowUsedQuantity = obj_
            obj_.original_tagname_ = 'RowUsedQuantity'
        elif nodeName_ == 'RowPreviousMeterReadingDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowPreviousMeterReadingDate = obj_
            obj_.original_tagname_ = 'RowPreviousMeterReadingDate'
        elif nodeName_ == 'RowLatestMeterReadingDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowLatestMeterReadingDate = obj_
            obj_.original_tagname_ = 'RowLatestMeterReadingDate'
        elif nodeName_ == 'RowCalculatedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowCalculatedQuantity = obj_
            obj_.original_tagname_ = 'RowCalculatedQuantity'
        elif nodeName_ == 'RowAveragePriceAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowAveragePriceAmount = obj_
            obj_.original_tagname_ = 'RowAveragePriceAmount'
        elif nodeName_ == 'RowDiscountPercent':
            RowDiscountPercent_ = child_.text
            RowDiscountPercent_ = self.gds_validate_string(RowDiscountPercent_, node, 'RowDiscountPercent')
            self.RowDiscountPercent = RowDiscountPercent_
            self.validate_percentage(self.RowDiscountPercent)    # validate type percentage
        elif nodeName_ == 'RowDiscountAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowDiscountAmount = obj_
            obj_.original_tagname_ = 'RowDiscountAmount'
        elif nodeName_ == 'RowDiscountTypeCode':
            RowDiscountTypeCode_ = child_.text
            RowDiscountTypeCode_ = self.gds_validate_string(RowDiscountTypeCode_, node, 'RowDiscountTypeCode')
            self.RowDiscountTypeCode = RowDiscountTypeCode_
            self.validate_genericStringType0_35(self.RowDiscountTypeCode)    # validate type genericStringType0_35
        elif nodeName_ == 'RowDiscountTypeText':
            RowDiscountTypeText_ = child_.text
            RowDiscountTypeText_ = self.gds_validate_string(RowDiscountTypeText_, node, 'RowDiscountTypeText')
            self.RowDiscountTypeText = RowDiscountTypeText_
            self.validate_genericStringType0_35(self.RowDiscountTypeText)    # validate type genericStringType0_35
        elif nodeName_ == 'RowProgressiveDiscountDetails':
            obj_ = RowProgressiveDiscountDetailsType.factory()
            obj_.build(child_)
            self.RowProgressiveDiscountDetails.append(obj_)
            obj_.original_tagname_ = 'RowProgressiveDiscountDetails'
        elif nodeName_ == 'RowVatRatePercent':
            RowVatRatePercent_ = child_.text
            RowVatRatePercent_ = self.gds_validate_string(RowVatRatePercent_, node, 'RowVatRatePercent')
            self.RowVatRatePercent = RowVatRatePercent_
            self.validate_percentage(self.RowVatRatePercent)    # validate type percentage
        elif nodeName_ == 'RowVatCode':
            RowVatCode_ = child_.text
            RowVatCode_ = self.gds_validate_string(RowVatCode_, node, 'RowVatCode')
            self.RowVatCode = RowVatCode_
            self.validate_genericStringType0_10(self.RowVatCode)    # validate type genericStringType0_10
        elif nodeName_ == 'RowVatAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowVatAmount = obj_
            obj_.original_tagname_ = 'RowVatAmount'
        elif nodeName_ == 'RowVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowVatExcludedAmount = obj_
            obj_.original_tagname_ = 'RowVatExcludedAmount'
        elif nodeName_ == 'RowAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowAmount = obj_
            obj_.original_tagname_ = 'RowAmount'
        elif nodeName_ == 'RowTransactionDetails':
            obj_ = TransactionDetailsType.factory()
            obj_.build(child_)
            self.RowTransactionDetails = obj_
            obj_.original_tagname_ = 'RowTransactionDetails'
        elif nodeName_ == 'SubInvoiceRow':
            obj_ = SubInvoiceRowType.factory()
            obj_.build(child_)
            self.SubInvoiceRow.append(obj_)
            obj_.original_tagname_ = 'SubInvoiceRow'
# end class InvoiceRowType


class InvoiceSenderPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, InvoiceSenderPartyIdentifier=None, InvoiceSenderOrganisationName=None, InvoiceSenderOrganisationTaxCode=None, InvoiceSenderCode=None):
        self.original_tagname_ = None
        self.InvoiceSenderPartyIdentifier = InvoiceSenderPartyIdentifier
        if InvoiceSenderOrganisationName is None:
            self.InvoiceSenderOrganisationName = []
        else:
            self.InvoiceSenderOrganisationName = InvoiceSenderOrganisationName
        self.InvoiceSenderOrganisationTaxCode = InvoiceSenderOrganisationTaxCode
        self.InvoiceSenderCode = InvoiceSenderCode
    def factory(*args_, **kwargs_):
        if InvoiceSenderPartyDetailsType.subclass:
            return InvoiceSenderPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return InvoiceSenderPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_InvoiceSenderPartyIdentifier(self): return self.InvoiceSenderPartyIdentifier
    def set_InvoiceSenderPartyIdentifier(self, InvoiceSenderPartyIdentifier): self.InvoiceSenderPartyIdentifier = InvoiceSenderPartyIdentifier
    def get_InvoiceSenderOrganisationName(self): return self.InvoiceSenderOrganisationName
    def set_InvoiceSenderOrganisationName(self, InvoiceSenderOrganisationName): self.InvoiceSenderOrganisationName = InvoiceSenderOrganisationName
    def add_InvoiceSenderOrganisationName(self, value): self.InvoiceSenderOrganisationName.append(value)
    def insert_InvoiceSenderOrganisationName_at(self, index, value): self.InvoiceSenderOrganisationName.insert(index, value)
    def replace_InvoiceSenderOrganisationName_at(self, index, value): self.InvoiceSenderOrganisationName[index] = value
    def get_InvoiceSenderOrganisationTaxCode(self): return self.InvoiceSenderOrganisationTaxCode
    def set_InvoiceSenderOrganisationTaxCode(self, InvoiceSenderOrganisationTaxCode): self.InvoiceSenderOrganisationTaxCode = InvoiceSenderOrganisationTaxCode
    def get_InvoiceSenderCode(self): return self.InvoiceSenderCode
    def set_InvoiceSenderCode(self, InvoiceSenderCode): self.InvoiceSenderCode = InvoiceSenderCode
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_genericNMtokenType0_35(self, value):
        # Validate type genericNMtokenType0_35, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.InvoiceSenderPartyIdentifier is not None or
            self.InvoiceSenderOrganisationName or
            self.InvoiceSenderOrganisationTaxCode is not None or
            self.InvoiceSenderCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='InvoiceSenderPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='InvoiceSenderPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='InvoiceSenderPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='InvoiceSenderPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='InvoiceSenderPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.InvoiceSenderPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceSenderPartyIdentifier>%s</%sInvoiceSenderPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceSenderPartyIdentifier).encode(ExternalEncoding), input_name='InvoiceSenderPartyIdentifier'), namespace_, eol_))
        for InvoiceSenderOrganisationName_ in self.InvoiceSenderOrganisationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceSenderOrganisationName>%s</%sInvoiceSenderOrganisationName>%s' % (namespace_, self.gds_format_string(quote_xml(InvoiceSenderOrganisationName_).encode(ExternalEncoding), input_name='InvoiceSenderOrganisationName'), namespace_, eol_))
        if self.InvoiceSenderOrganisationTaxCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInvoiceSenderOrganisationTaxCode>%s</%sInvoiceSenderOrganisationTaxCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.InvoiceSenderOrganisationTaxCode).encode(ExternalEncoding), input_name='InvoiceSenderOrganisationTaxCode'), namespace_, eol_))
        if self.InvoiceSenderCode is not None:
            self.InvoiceSenderCode.export(outfile, level, namespace_, name_='InvoiceSenderCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='InvoiceSenderPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.InvoiceSenderPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceSenderPartyIdentifier=%s,\n' % quote_python(self.InvoiceSenderPartyIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('InvoiceSenderOrganisationName=[\n')
        level += 1
        for InvoiceSenderOrganisationName_ in self.InvoiceSenderOrganisationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(InvoiceSenderOrganisationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.InvoiceSenderOrganisationTaxCode is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceSenderOrganisationTaxCode=%s,\n' % quote_python(self.InvoiceSenderOrganisationTaxCode).encode(ExternalEncoding))
        if self.InvoiceSenderCode is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceSenderCode=model_.PartyIdentifierType(\n')
            self.InvoiceSenderCode.exportLiteral(outfile, level, name_='InvoiceSenderCode')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'InvoiceSenderPartyIdentifier':
            InvoiceSenderPartyIdentifier_ = child_.text
            InvoiceSenderPartyIdentifier_ = self.gds_validate_string(InvoiceSenderPartyIdentifier_, node, 'InvoiceSenderPartyIdentifier')
            self.InvoiceSenderPartyIdentifier = InvoiceSenderPartyIdentifier_
            self.validate_genericStringType0_35(self.InvoiceSenderPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'InvoiceSenderOrganisationName':
            InvoiceSenderOrganisationName_ = child_.text
            InvoiceSenderOrganisationName_ = self.gds_validate_string(InvoiceSenderOrganisationName_, node, 'InvoiceSenderOrganisationName')
            self.InvoiceSenderOrganisationName.append(InvoiceSenderOrganisationName_)
            self.validate_genericStringType2_35(self.InvoiceSenderOrganisationName)    # validate type genericStringType2_35
        elif nodeName_ == 'InvoiceSenderOrganisationTaxCode':
            InvoiceSenderOrganisationTaxCode_ = child_.text
            InvoiceSenderOrganisationTaxCode_ = re_.sub(String_cleanup_pat_, " ", InvoiceSenderOrganisationTaxCode_).strip()
            InvoiceSenderOrganisationTaxCode_ = self.gds_validate_string(InvoiceSenderOrganisationTaxCode_, node, 'InvoiceSenderOrganisationTaxCode')
            self.InvoiceSenderOrganisationTaxCode = InvoiceSenderOrganisationTaxCode_
            self.validate_genericNMtokenType0_35(self.InvoiceSenderOrganisationTaxCode)    # validate type genericNMtokenType0_35
        elif nodeName_ == 'InvoiceSenderCode':
            obj_ = PartyIdentifierType.factory()
            obj_.build(child_)
            self.InvoiceSenderCode = obj_
            obj_.original_tagname_ = 'InvoiceSenderCode'
# end class InvoiceSenderPartyDetailsType


class InvoiceTypeCodeType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, CodeListAgencyIdentifier=None, valueOf_=None):
        self.original_tagname_ = None
        self.CodeListAgencyIdentifier = _cast(None, CodeListAgencyIdentifier)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if InvoiceTypeCodeType.subclass:
            return InvoiceTypeCodeType.subclass(*args_, **kwargs_)
        else:
            return InvoiceTypeCodeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CodeListAgencyIdentifier(self): return self.CodeListAgencyIdentifier
    def set_CodeListAgencyIdentifier(self, CodeListAgencyIdentifier): self.CodeListAgencyIdentifier = CodeListAgencyIdentifier
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='InvoiceTypeCodeType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='InvoiceTypeCodeType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='InvoiceTypeCodeType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='InvoiceTypeCodeType'):
        if self.CodeListAgencyIdentifier is not None and 'CodeListAgencyIdentifier' not in already_processed:
            already_processed.add('CodeListAgencyIdentifier')
            outfile.write(' CodeListAgencyIdentifier=%s' % (self.gds_format_string(quote_attrib(self.CodeListAgencyIdentifier).encode(ExternalEncoding), input_name='CodeListAgencyIdentifier'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='InvoiceTypeCodeType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='InvoiceTypeCodeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.CodeListAgencyIdentifier is not None and 'CodeListAgencyIdentifier' not in already_processed:
            already_processed.add('CodeListAgencyIdentifier')
            showIndent(outfile, level)
            outfile.write('CodeListAgencyIdentifier="%s",\n' % (self.CodeListAgencyIdentifier,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('CodeListAgencyIdentifier', node)
        if value is not None and 'CodeListAgencyIdentifier' not in already_processed:
            already_processed.add('CodeListAgencyIdentifier')
            self.CodeListAgencyIdentifier = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class InvoiceTypeCodeType


class PartialPaymentDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PaidAmount=None, PaidVatExcludedAmount=None, UnPaidAmount=None, UnPaidVatExcludedAmount=None, InterestPercent=None, ProsessingCostsAmount=None, PartialPaymentVatIncludedAmount=None, PartialPaymentVatExcludedAmount=None, PartialPaymentDueDate=None, PartialPaymentReferenceIdentifier=None):
        self.original_tagname_ = None
        self.PaidAmount = PaidAmount
        self.PaidVatExcludedAmount = PaidVatExcludedAmount
        self.UnPaidAmount = UnPaidAmount
        self.UnPaidVatExcludedAmount = UnPaidVatExcludedAmount
        self.InterestPercent = InterestPercent
        self.ProsessingCostsAmount = ProsessingCostsAmount
        if PartialPaymentVatIncludedAmount is None:
            self.PartialPaymentVatIncludedAmount = []
        else:
            self.PartialPaymentVatIncludedAmount = PartialPaymentVatIncludedAmount
        if PartialPaymentVatExcludedAmount is None:
            self.PartialPaymentVatExcludedAmount = []
        else:
            self.PartialPaymentVatExcludedAmount = PartialPaymentVatExcludedAmount
        if PartialPaymentDueDate is None:
            self.PartialPaymentDueDate = []
        else:
            self.PartialPaymentDueDate = PartialPaymentDueDate
        if PartialPaymentReferenceIdentifier is None:
            self.PartialPaymentReferenceIdentifier = []
        else:
            self.PartialPaymentReferenceIdentifier = PartialPaymentReferenceIdentifier
    def factory(*args_, **kwargs_):
        if PartialPaymentDetailsType.subclass:
            return PartialPaymentDetailsType.subclass(*args_, **kwargs_)
        else:
            return PartialPaymentDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PaidAmount(self): return self.PaidAmount
    def set_PaidAmount(self, PaidAmount): self.PaidAmount = PaidAmount
    def get_PaidVatExcludedAmount(self): return self.PaidVatExcludedAmount
    def set_PaidVatExcludedAmount(self, PaidVatExcludedAmount): self.PaidVatExcludedAmount = PaidVatExcludedAmount
    def get_UnPaidAmount(self): return self.UnPaidAmount
    def set_UnPaidAmount(self, UnPaidAmount): self.UnPaidAmount = UnPaidAmount
    def get_UnPaidVatExcludedAmount(self): return self.UnPaidVatExcludedAmount
    def set_UnPaidVatExcludedAmount(self, UnPaidVatExcludedAmount): self.UnPaidVatExcludedAmount = UnPaidVatExcludedAmount
    def get_InterestPercent(self): return self.InterestPercent
    def set_InterestPercent(self, InterestPercent): self.InterestPercent = InterestPercent
    def get_ProsessingCostsAmount(self): return self.ProsessingCostsAmount
    def set_ProsessingCostsAmount(self, ProsessingCostsAmount): self.ProsessingCostsAmount = ProsessingCostsAmount
    def get_PartialPaymentVatIncludedAmount(self): return self.PartialPaymentVatIncludedAmount
    def set_PartialPaymentVatIncludedAmount(self, PartialPaymentVatIncludedAmount): self.PartialPaymentVatIncludedAmount = PartialPaymentVatIncludedAmount
    def add_PartialPaymentVatIncludedAmount(self, value): self.PartialPaymentVatIncludedAmount.append(value)
    def insert_PartialPaymentVatIncludedAmount_at(self, index, value): self.PartialPaymentVatIncludedAmount.insert(index, value)
    def replace_PartialPaymentVatIncludedAmount_at(self, index, value): self.PartialPaymentVatIncludedAmount[index] = value
    def get_PartialPaymentVatExcludedAmount(self): return self.PartialPaymentVatExcludedAmount
    def set_PartialPaymentVatExcludedAmount(self, PartialPaymentVatExcludedAmount): self.PartialPaymentVatExcludedAmount = PartialPaymentVatExcludedAmount
    def add_PartialPaymentVatExcludedAmount(self, value): self.PartialPaymentVatExcludedAmount.append(value)
    def insert_PartialPaymentVatExcludedAmount_at(self, index, value): self.PartialPaymentVatExcludedAmount.insert(index, value)
    def replace_PartialPaymentVatExcludedAmount_at(self, index, value): self.PartialPaymentVatExcludedAmount[index] = value
    def get_PartialPaymentDueDate(self): return self.PartialPaymentDueDate
    def set_PartialPaymentDueDate(self, PartialPaymentDueDate): self.PartialPaymentDueDate = PartialPaymentDueDate
    def add_PartialPaymentDueDate(self, value): self.PartialPaymentDueDate.append(value)
    def insert_PartialPaymentDueDate_at(self, index, value): self.PartialPaymentDueDate.insert(index, value)
    def replace_PartialPaymentDueDate_at(self, index, value): self.PartialPaymentDueDate[index] = value
    def get_PartialPaymentReferenceIdentifier(self): return self.PartialPaymentReferenceIdentifier
    def set_PartialPaymentReferenceIdentifier(self, PartialPaymentReferenceIdentifier): self.PartialPaymentReferenceIdentifier = PartialPaymentReferenceIdentifier
    def add_PartialPaymentReferenceIdentifier(self, value): self.PartialPaymentReferenceIdentifier.append(value)
    def insert_PartialPaymentReferenceIdentifier_at(self, index, value): self.PartialPaymentReferenceIdentifier.insert(index, value)
    def replace_PartialPaymentReferenceIdentifier_at(self, index, value): self.PartialPaymentReferenceIdentifier[index] = value
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.PaidAmount is not None or
            self.PaidVatExcludedAmount is not None or
            self.UnPaidAmount is not None or
            self.UnPaidVatExcludedAmount is not None or
            self.InterestPercent is not None or
            self.ProsessingCostsAmount is not None or
            self.PartialPaymentVatIncludedAmount or
            self.PartialPaymentVatExcludedAmount or
            self.PartialPaymentDueDate or
            self.PartialPaymentReferenceIdentifier
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='PartialPaymentDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PartialPaymentDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='PartialPaymentDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='PartialPaymentDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='PartialPaymentDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PaidAmount is not None:
            self.PaidAmount.export(outfile, level, namespace_, name_='PaidAmount', pretty_print=pretty_print)
        if self.PaidVatExcludedAmount is not None:
            self.PaidVatExcludedAmount.export(outfile, level, namespace_, name_='PaidVatExcludedAmount', pretty_print=pretty_print)
        if self.UnPaidAmount is not None:
            self.UnPaidAmount.export(outfile, level, namespace_, name_='UnPaidAmount', pretty_print=pretty_print)
        if self.UnPaidVatExcludedAmount is not None:
            self.UnPaidVatExcludedAmount.export(outfile, level, namespace_, name_='UnPaidVatExcludedAmount', pretty_print=pretty_print)
        if self.InterestPercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInterestPercent>%s</%sInterestPercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.InterestPercent).encode(ExternalEncoding), input_name='InterestPercent'), namespace_, eol_))
        if self.ProsessingCostsAmount is not None:
            self.ProsessingCostsAmount.export(outfile, level, namespace_, name_='ProsessingCostsAmount', pretty_print=pretty_print)
        for PartialPaymentVatIncludedAmount_ in self.PartialPaymentVatIncludedAmount:
            PartialPaymentVatIncludedAmount_.export(outfile, level, namespace_, name_='PartialPaymentVatIncludedAmount', pretty_print=pretty_print)
        for PartialPaymentVatExcludedAmount_ in self.PartialPaymentVatExcludedAmount:
            PartialPaymentVatExcludedAmount_.export(outfile, level, namespace_, name_='PartialPaymentVatExcludedAmount', pretty_print=pretty_print)
        for PartialPaymentDueDate_ in self.PartialPaymentDueDate:
            PartialPaymentDueDate_.export(outfile, level, namespace_, name_='PartialPaymentDueDate', pretty_print=pretty_print)
        for PartialPaymentReferenceIdentifier_ in self.PartialPaymentReferenceIdentifier:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPartialPaymentReferenceIdentifier>%s</%sPartialPaymentReferenceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(PartialPaymentReferenceIdentifier_).encode(ExternalEncoding), input_name='PartialPaymentReferenceIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='PartialPaymentDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.PaidAmount is not None:
            showIndent(outfile, level)
            outfile.write('PaidAmount=model_.amount(\n')
            self.PaidAmount.exportLiteral(outfile, level, name_='PaidAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.PaidVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('PaidVatExcludedAmount=model_.amount(\n')
            self.PaidVatExcludedAmount.exportLiteral(outfile, level, name_='PaidVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.UnPaidAmount is not None:
            showIndent(outfile, level)
            outfile.write('UnPaidAmount=model_.amount(\n')
            self.UnPaidAmount.exportLiteral(outfile, level, name_='UnPaidAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.UnPaidVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('UnPaidVatExcludedAmount=model_.amount(\n')
            self.UnPaidVatExcludedAmount.exportLiteral(outfile, level, name_='UnPaidVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.InterestPercent is not None:
            showIndent(outfile, level)
            outfile.write('InterestPercent=%s,\n' % quote_python(self.InterestPercent).encode(ExternalEncoding))
        if self.ProsessingCostsAmount is not None:
            showIndent(outfile, level)
            outfile.write('ProsessingCostsAmount=model_.amount(\n')
            self.ProsessingCostsAmount.exportLiteral(outfile, level, name_='ProsessingCostsAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('PartialPaymentVatIncludedAmount=[\n')
        level += 1
        for PartialPaymentVatIncludedAmount_ in self.PartialPaymentVatIncludedAmount:
            showIndent(outfile, level)
            outfile.write('model_.amount(\n')
            PartialPaymentVatIncludedAmount_.exportLiteral(outfile, level, name_='amount')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('PartialPaymentVatExcludedAmount=[\n')
        level += 1
        for PartialPaymentVatExcludedAmount_ in self.PartialPaymentVatExcludedAmount:
            showIndent(outfile, level)
            outfile.write('model_.amount(\n')
            PartialPaymentVatExcludedAmount_.exportLiteral(outfile, level, name_='amount')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('PartialPaymentDueDate=[\n')
        level += 1
        for PartialPaymentDueDate_ in self.PartialPaymentDueDate:
            showIndent(outfile, level)
            outfile.write('model_.date(\n')
            PartialPaymentDueDate_.exportLiteral(outfile, level, name_='date')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('PartialPaymentReferenceIdentifier=[\n')
        level += 1
        for PartialPaymentReferenceIdentifier_ in self.PartialPaymentReferenceIdentifier:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(PartialPaymentReferenceIdentifier_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PaidAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.PaidAmount = obj_
            obj_.original_tagname_ = 'PaidAmount'
        elif nodeName_ == 'PaidVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.PaidVatExcludedAmount = obj_
            obj_.original_tagname_ = 'PaidVatExcludedAmount'
        elif nodeName_ == 'UnPaidAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.UnPaidAmount = obj_
            obj_.original_tagname_ = 'UnPaidAmount'
        elif nodeName_ == 'UnPaidVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.UnPaidVatExcludedAmount = obj_
            obj_.original_tagname_ = 'UnPaidVatExcludedAmount'
        elif nodeName_ == 'InterestPercent':
            InterestPercent_ = child_.text
            InterestPercent_ = self.gds_validate_string(InterestPercent_, node, 'InterestPercent')
            self.InterestPercent = InterestPercent_
            self.validate_percentage(self.InterestPercent)    # validate type percentage
        elif nodeName_ == 'ProsessingCostsAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.ProsessingCostsAmount = obj_
            obj_.original_tagname_ = 'ProsessingCostsAmount'
        elif nodeName_ == 'PartialPaymentVatIncludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.PartialPaymentVatIncludedAmount.append(obj_)
            obj_.original_tagname_ = 'PartialPaymentVatIncludedAmount'
        elif nodeName_ == 'PartialPaymentVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.PartialPaymentVatExcludedAmount.append(obj_)
            obj_.original_tagname_ = 'PartialPaymentVatExcludedAmount'
        elif nodeName_ == 'PartialPaymentDueDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.PartialPaymentDueDate.append(obj_)
            obj_.original_tagname_ = 'PartialPaymentDueDate'
        elif nodeName_ == 'PartialPaymentReferenceIdentifier':
            PartialPaymentReferenceIdentifier_ = child_.text
            PartialPaymentReferenceIdentifier_ = self.gds_validate_string(PartialPaymentReferenceIdentifier_, node, 'PartialPaymentReferenceIdentifier')
            self.PartialPaymentReferenceIdentifier.append(PartialPaymentReferenceIdentifier_)
            self.validate_genericStringType2_35(self.PartialPaymentReferenceIdentifier)    # validate type genericStringType2_35
# end class PartialPaymentDetailsType


class PaymentOverDueFineDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PaymentOverDueFineFreeText=None, PaymentOverDueFinePercent=None, PaymentOverDueFixedAmount=None):
        self.original_tagname_ = None
        if PaymentOverDueFineFreeText is None:
            self.PaymentOverDueFineFreeText = []
        else:
            self.PaymentOverDueFineFreeText = PaymentOverDueFineFreeText
        self.PaymentOverDueFinePercent = PaymentOverDueFinePercent
        self.PaymentOverDueFixedAmount = PaymentOverDueFixedAmount
    def factory(*args_, **kwargs_):
        if PaymentOverDueFineDetailsType.subclass:
            return PaymentOverDueFineDetailsType.subclass(*args_, **kwargs_)
        else:
            return PaymentOverDueFineDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PaymentOverDueFineFreeText(self): return self.PaymentOverDueFineFreeText
    def set_PaymentOverDueFineFreeText(self, PaymentOverDueFineFreeText): self.PaymentOverDueFineFreeText = PaymentOverDueFineFreeText
    def add_PaymentOverDueFineFreeText(self, value): self.PaymentOverDueFineFreeText.append(value)
    def insert_PaymentOverDueFineFreeText_at(self, index, value): self.PaymentOverDueFineFreeText.insert(index, value)
    def replace_PaymentOverDueFineFreeText_at(self, index, value): self.PaymentOverDueFineFreeText[index] = value
    def get_PaymentOverDueFinePercent(self): return self.PaymentOverDueFinePercent
    def set_PaymentOverDueFinePercent(self, PaymentOverDueFinePercent): self.PaymentOverDueFinePercent = PaymentOverDueFinePercent
    def get_PaymentOverDueFixedAmount(self): return self.PaymentOverDueFixedAmount
    def set_PaymentOverDueFixedAmount(self, PaymentOverDueFixedAmount): self.PaymentOverDueFixedAmount = PaymentOverDueFixedAmount
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.PaymentOverDueFineFreeText or
            self.PaymentOverDueFinePercent is not None or
            self.PaymentOverDueFixedAmount is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='PaymentOverDueFineDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PaymentOverDueFineDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='PaymentOverDueFineDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='PaymentOverDueFineDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='PaymentOverDueFineDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for PaymentOverDueFineFreeText_ in self.PaymentOverDueFineFreeText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPaymentOverDueFineFreeText>%s</%sPaymentOverDueFineFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(PaymentOverDueFineFreeText_).encode(ExternalEncoding), input_name='PaymentOverDueFineFreeText'), namespace_, eol_))
        if self.PaymentOverDueFinePercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPaymentOverDueFinePercent>%s</%sPaymentOverDueFinePercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.PaymentOverDueFinePercent).encode(ExternalEncoding), input_name='PaymentOverDueFinePercent'), namespace_, eol_))
        if self.PaymentOverDueFixedAmount is not None:
            self.PaymentOverDueFixedAmount.export(outfile, level, namespace_, name_='PaymentOverDueFixedAmount', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PaymentOverDueFineDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('PaymentOverDueFineFreeText=[\n')
        level += 1
        for PaymentOverDueFineFreeText_ in self.PaymentOverDueFineFreeText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(PaymentOverDueFineFreeText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.PaymentOverDueFinePercent is not None:
            showIndent(outfile, level)
            outfile.write('PaymentOverDueFinePercent=%s,\n' % quote_python(self.PaymentOverDueFinePercent).encode(ExternalEncoding))
        if self.PaymentOverDueFixedAmount is not None:
            showIndent(outfile, level)
            outfile.write('PaymentOverDueFixedAmount=model_.amount(\n')
            self.PaymentOverDueFixedAmount.exportLiteral(outfile, level, name_='PaymentOverDueFixedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PaymentOverDueFineFreeText':
            PaymentOverDueFineFreeText_ = child_.text
            PaymentOverDueFineFreeText_ = self.gds_validate_string(PaymentOverDueFineFreeText_, node, 'PaymentOverDueFineFreeText')
            self.PaymentOverDueFineFreeText.append(PaymentOverDueFineFreeText_)
            self.validate_genericStringType0_70(self.PaymentOverDueFineFreeText)    # validate type genericStringType0_70
        elif nodeName_ == 'PaymentOverDueFinePercent':
            PaymentOverDueFinePercent_ = child_.text
            PaymentOverDueFinePercent_ = self.gds_validate_string(PaymentOverDueFinePercent_, node, 'PaymentOverDueFinePercent')
            self.PaymentOverDueFinePercent = PaymentOverDueFinePercent_
            self.validate_percentage(self.PaymentOverDueFinePercent)    # validate type percentage
        elif nodeName_ == 'PaymentOverDueFixedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.PaymentOverDueFixedAmount = obj_
            obj_.original_tagname_ = 'PaymentOverDueFixedAmount'
# end class PaymentOverDueFineDetailsType


class PaymentStatusDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PaymentStatusCode=None, PaymentMethodText=None):
        self.original_tagname_ = None
        self.PaymentStatusCode = PaymentStatusCode
        self.PaymentMethodText = PaymentMethodText
    def factory(*args_, **kwargs_):
        if PaymentStatusDetailsType.subclass:
            return PaymentStatusDetailsType.subclass(*args_, **kwargs_)
        else:
            return PaymentStatusDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PaymentStatusCode(self): return self.PaymentStatusCode
    def set_PaymentStatusCode(self, PaymentStatusCode): self.PaymentStatusCode = PaymentStatusCode
    def get_PaymentMethodText(self): return self.PaymentMethodText
    def set_PaymentMethodText(self, PaymentMethodText): self.PaymentMethodText = PaymentMethodText
    def validate_PaymentStatusCodeType(self, value):
        # Validate type PaymentStatusCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.PaymentStatusCode is not None or
            self.PaymentMethodText is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='PaymentStatusDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PaymentStatusDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='PaymentStatusDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='PaymentStatusDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='PaymentStatusDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PaymentStatusCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPaymentStatusCode>%s</%sPaymentStatusCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PaymentStatusCode).encode(ExternalEncoding), input_name='PaymentStatusCode'), namespace_, eol_))
        if self.PaymentMethodText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPaymentMethodText>%s</%sPaymentMethodText>%s' % (namespace_, self.gds_format_string(quote_xml(self.PaymentMethodText).encode(ExternalEncoding), input_name='PaymentMethodText'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='PaymentStatusDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.PaymentStatusCode is not None:
            showIndent(outfile, level)
            outfile.write('PaymentStatusCode=%s,\n' % quote_python(self.PaymentStatusCode).encode(ExternalEncoding))
        if self.PaymentMethodText is not None:
            showIndent(outfile, level)
            outfile.write('PaymentMethodText=%s,\n' % quote_python(self.PaymentMethodText).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PaymentStatusCode':
            PaymentStatusCode_ = child_.text
            PaymentStatusCode_ = self.gds_validate_string(PaymentStatusCode_, node, 'PaymentStatusCode')
            self.PaymentStatusCode = PaymentStatusCode_
            self.validate_PaymentStatusCodeType(self.PaymentStatusCode)    # validate type PaymentStatusCodeType
        elif nodeName_ == 'PaymentMethodText':
            PaymentMethodText_ = child_.text
            PaymentMethodText_ = self.gds_validate_string(PaymentMethodText_, node, 'PaymentMethodText')
            self.PaymentMethodText = PaymentMethodText_
            self.validate_genericStringType0_35(self.PaymentMethodText)    # validate type genericStringType0_35
# end class PaymentStatusDetailsType


class PaymentTermsDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PaymentTermsFreeText=None, InvoiceDueDate=None, CashDiscountDate=None, CashDiscountBaseAmount=None, CashDiscountPercent=None, CashDiscountAmount=None, CashDiscountExcludingVatAmount=None, CashDiscountVatDetails=None, ReducedInvoiceVatIncludedAmount=None, PaymentOverDueFineDetails=None):
        self.original_tagname_ = None
        if PaymentTermsFreeText is None:
            self.PaymentTermsFreeText = []
        else:
            self.PaymentTermsFreeText = PaymentTermsFreeText
        self.InvoiceDueDate = InvoiceDueDate
        self.CashDiscountDate = CashDiscountDate
        self.CashDiscountBaseAmount = CashDiscountBaseAmount
        self.CashDiscountPercent = CashDiscountPercent
        self.CashDiscountAmount = CashDiscountAmount
        self.CashDiscountExcludingVatAmount = CashDiscountExcludingVatAmount
        if CashDiscountVatDetails is None:
            self.CashDiscountVatDetails = []
        else:
            self.CashDiscountVatDetails = CashDiscountVatDetails
        self.ReducedInvoiceVatIncludedAmount = ReducedInvoiceVatIncludedAmount
        self.PaymentOverDueFineDetails = PaymentOverDueFineDetails
    def factory(*args_, **kwargs_):
        if PaymentTermsDetailsType.subclass:
            return PaymentTermsDetailsType.subclass(*args_, **kwargs_)
        else:
            return PaymentTermsDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PaymentTermsFreeText(self): return self.PaymentTermsFreeText
    def set_PaymentTermsFreeText(self, PaymentTermsFreeText): self.PaymentTermsFreeText = PaymentTermsFreeText
    def add_PaymentTermsFreeText(self, value): self.PaymentTermsFreeText.append(value)
    def insert_PaymentTermsFreeText_at(self, index, value): self.PaymentTermsFreeText.insert(index, value)
    def replace_PaymentTermsFreeText_at(self, index, value): self.PaymentTermsFreeText[index] = value
    def get_InvoiceDueDate(self): return self.InvoiceDueDate
    def set_InvoiceDueDate(self, InvoiceDueDate): self.InvoiceDueDate = InvoiceDueDate
    def get_CashDiscountDate(self): return self.CashDiscountDate
    def set_CashDiscountDate(self, CashDiscountDate): self.CashDiscountDate = CashDiscountDate
    def get_CashDiscountBaseAmount(self): return self.CashDiscountBaseAmount
    def set_CashDiscountBaseAmount(self, CashDiscountBaseAmount): self.CashDiscountBaseAmount = CashDiscountBaseAmount
    def get_CashDiscountPercent(self): return self.CashDiscountPercent
    def set_CashDiscountPercent(self, CashDiscountPercent): self.CashDiscountPercent = CashDiscountPercent
    def get_CashDiscountAmount(self): return self.CashDiscountAmount
    def set_CashDiscountAmount(self, CashDiscountAmount): self.CashDiscountAmount = CashDiscountAmount
    def get_CashDiscountExcludingVatAmount(self): return self.CashDiscountExcludingVatAmount
    def set_CashDiscountExcludingVatAmount(self, CashDiscountExcludingVatAmount): self.CashDiscountExcludingVatAmount = CashDiscountExcludingVatAmount
    def get_CashDiscountVatDetails(self): return self.CashDiscountVatDetails
    def set_CashDiscountVatDetails(self, CashDiscountVatDetails): self.CashDiscountVatDetails = CashDiscountVatDetails
    def add_CashDiscountVatDetails(self, value): self.CashDiscountVatDetails.append(value)
    def insert_CashDiscountVatDetails_at(self, index, value): self.CashDiscountVatDetails.insert(index, value)
    def replace_CashDiscountVatDetails_at(self, index, value): self.CashDiscountVatDetails[index] = value
    def get_ReducedInvoiceVatIncludedAmount(self): return self.ReducedInvoiceVatIncludedAmount
    def set_ReducedInvoiceVatIncludedAmount(self, ReducedInvoiceVatIncludedAmount): self.ReducedInvoiceVatIncludedAmount = ReducedInvoiceVatIncludedAmount
    def get_PaymentOverDueFineDetails(self): return self.PaymentOverDueFineDetails
    def set_PaymentOverDueFineDetails(self, PaymentOverDueFineDetails): self.PaymentOverDueFineDetails = PaymentOverDueFineDetails
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.PaymentTermsFreeText or
            self.InvoiceDueDate is not None or
            self.CashDiscountDate is not None or
            self.CashDiscountBaseAmount is not None or
            self.CashDiscountPercent is not None or
            self.CashDiscountAmount is not None or
            self.CashDiscountExcludingVatAmount is not None or
            self.CashDiscountVatDetails or
            self.ReducedInvoiceVatIncludedAmount is not None or
            self.PaymentOverDueFineDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='PaymentTermsDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PaymentTermsDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='PaymentTermsDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='PaymentTermsDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='PaymentTermsDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for PaymentTermsFreeText_ in self.PaymentTermsFreeText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPaymentTermsFreeText>%s</%sPaymentTermsFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(PaymentTermsFreeText_).encode(ExternalEncoding), input_name='PaymentTermsFreeText'), namespace_, eol_))
        if self.InvoiceDueDate is not None:
            self.InvoiceDueDate.export(outfile, level, namespace_, name_='InvoiceDueDate', pretty_print=pretty_print)
        if self.CashDiscountDate is not None:
            self.CashDiscountDate.export(outfile, level, namespace_, name_='CashDiscountDate', pretty_print=pretty_print)
        if self.CashDiscountBaseAmount is not None:
            self.CashDiscountBaseAmount.export(outfile, level, namespace_, name_='CashDiscountBaseAmount', pretty_print=pretty_print)
        if self.CashDiscountPercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCashDiscountPercent>%s</%sCashDiscountPercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.CashDiscountPercent).encode(ExternalEncoding), input_name='CashDiscountPercent'), namespace_, eol_))
        if self.CashDiscountAmount is not None:
            self.CashDiscountAmount.export(outfile, level, namespace_, name_='CashDiscountAmount', pretty_print=pretty_print)
        if self.CashDiscountExcludingVatAmount is not None:
            self.CashDiscountExcludingVatAmount.export(outfile, level, namespace_, name_='CashDiscountExcludingVatAmount', pretty_print=pretty_print)
        for CashDiscountVatDetails_ in self.CashDiscountVatDetails:
            CashDiscountVatDetails_.export(outfile, level, namespace_, name_='CashDiscountVatDetails', pretty_print=pretty_print)
        if self.ReducedInvoiceVatIncludedAmount is not None:
            self.ReducedInvoiceVatIncludedAmount.export(outfile, level, namespace_, name_='ReducedInvoiceVatIncludedAmount', pretty_print=pretty_print)
        if self.PaymentOverDueFineDetails is not None:
            self.PaymentOverDueFineDetails.export(outfile, level, namespace_, name_='PaymentOverDueFineDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PaymentTermsDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('PaymentTermsFreeText=[\n')
        level += 1
        for PaymentTermsFreeText_ in self.PaymentTermsFreeText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(PaymentTermsFreeText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.InvoiceDueDate is not None:
            showIndent(outfile, level)
            outfile.write('InvoiceDueDate=model_.date(\n')
            self.InvoiceDueDate.exportLiteral(outfile, level, name_='InvoiceDueDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CashDiscountDate is not None:
            showIndent(outfile, level)
            outfile.write('CashDiscountDate=model_.date(\n')
            self.CashDiscountDate.exportLiteral(outfile, level, name_='CashDiscountDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CashDiscountBaseAmount is not None:
            showIndent(outfile, level)
            outfile.write('CashDiscountBaseAmount=model_.amount(\n')
            self.CashDiscountBaseAmount.exportLiteral(outfile, level, name_='CashDiscountBaseAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CashDiscountPercent is not None:
            showIndent(outfile, level)
            outfile.write('CashDiscountPercent=%s,\n' % quote_python(self.CashDiscountPercent).encode(ExternalEncoding))
        if self.CashDiscountAmount is not None:
            showIndent(outfile, level)
            outfile.write('CashDiscountAmount=model_.amount(\n')
            self.CashDiscountAmount.exportLiteral(outfile, level, name_='CashDiscountAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CashDiscountExcludingVatAmount is not None:
            showIndent(outfile, level)
            outfile.write('CashDiscountExcludingVatAmount=model_.amount(\n')
            self.CashDiscountExcludingVatAmount.exportLiteral(outfile, level, name_='CashDiscountExcludingVatAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('CashDiscountVatDetails=[\n')
        level += 1
        for CashDiscountVatDetails_ in self.CashDiscountVatDetails:
            showIndent(outfile, level)
            outfile.write('model_.CashDiscountVatDetailsType(\n')
            CashDiscountVatDetails_.exportLiteral(outfile, level, name_='CashDiscountVatDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.ReducedInvoiceVatIncludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('ReducedInvoiceVatIncludedAmount=model_.amount(\n')
            self.ReducedInvoiceVatIncludedAmount.exportLiteral(outfile, level, name_='ReducedInvoiceVatIncludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.PaymentOverDueFineDetails is not None:
            showIndent(outfile, level)
            outfile.write('PaymentOverDueFineDetails=model_.PaymentOverDueFineDetailsType(\n')
            self.PaymentOverDueFineDetails.exportLiteral(outfile, level, name_='PaymentOverDueFineDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PaymentTermsFreeText':
            PaymentTermsFreeText_ = child_.text
            PaymentTermsFreeText_ = self.gds_validate_string(PaymentTermsFreeText_, node, 'PaymentTermsFreeText')
            self.PaymentTermsFreeText.append(PaymentTermsFreeText_)
            self.validate_genericStringType0_70(self.PaymentTermsFreeText)    # validate type genericStringType0_70
        elif nodeName_ == 'InvoiceDueDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.InvoiceDueDate = obj_
            obj_.original_tagname_ = 'InvoiceDueDate'
        elif nodeName_ == 'CashDiscountDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.CashDiscountDate = obj_
            obj_.original_tagname_ = 'CashDiscountDate'
        elif nodeName_ == 'CashDiscountBaseAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.CashDiscountBaseAmount = obj_
            obj_.original_tagname_ = 'CashDiscountBaseAmount'
        elif nodeName_ == 'CashDiscountPercent':
            CashDiscountPercent_ = child_.text
            CashDiscountPercent_ = self.gds_validate_string(CashDiscountPercent_, node, 'CashDiscountPercent')
            self.CashDiscountPercent = CashDiscountPercent_
            self.validate_percentage(self.CashDiscountPercent)    # validate type percentage
        elif nodeName_ == 'CashDiscountAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.CashDiscountAmount = obj_
            obj_.original_tagname_ = 'CashDiscountAmount'
        elif nodeName_ == 'CashDiscountExcludingVatAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.CashDiscountExcludingVatAmount = obj_
            obj_.original_tagname_ = 'CashDiscountExcludingVatAmount'
        elif nodeName_ == 'CashDiscountVatDetails':
            obj_ = CashDiscountVatDetailsType.factory()
            obj_.build(child_)
            self.CashDiscountVatDetails.append(obj_)
            obj_.original_tagname_ = 'CashDiscountVatDetails'
        elif nodeName_ == 'ReducedInvoiceVatIncludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.ReducedInvoiceVatIncludedAmount = obj_
            obj_.original_tagname_ = 'ReducedInvoiceVatIncludedAmount'
        elif nodeName_ == 'PaymentOverDueFineDetails':
            obj_ = PaymentOverDueFineDetailsType.factory()
            obj_.build(child_)
            self.PaymentOverDueFineDetails = obj_
            obj_.original_tagname_ = 'PaymentOverDueFineDetails'
# end class PaymentTermsDetailsType


class RowDeliveryDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, RowTerminalAddressText=None, RowWaybillIdentifier=None, RowWaybillTypeCode=None, RowClearanceIdentifier=None, RowDeliveryNoteIdentifier=None, RowDelivererIdentifier=None, RowDelivererName=None, RowDelivererCountryCode=None, RowDelivererCountryName=None, RowModeOfTransportIdentifier=None, RowCarrierName=None, RowVesselName=None, RowLocationIdentifier=None, RowTransportInformationDate=None, RowCountryOfOrigin=None, RowCountryOfDestinationName=None, RowDestinationCountryCode=None, RowPlaceOfDischarge=None, RowFinalDestinationName=None, RowCustomsInfo=None, RowManufacturerArticleIdentifier=None, RowManufacturerIdentifier=None, RowManufacturerName=None, RowManufacturerCountryCode=None, RowManufacturerCountryName=None, RowManufacturerOrderIdentifier=None, RowPackageDetails=None):
        self.original_tagname_ = None
        self.RowTerminalAddressText = RowTerminalAddressText
        self.RowWaybillIdentifier = RowWaybillIdentifier
        self.RowWaybillTypeCode = RowWaybillTypeCode
        self.RowClearanceIdentifier = RowClearanceIdentifier
        self.RowDeliveryNoteIdentifier = RowDeliveryNoteIdentifier
        self.RowDelivererIdentifier = RowDelivererIdentifier
        if RowDelivererName is None:
            self.RowDelivererName = []
        else:
            self.RowDelivererName = RowDelivererName
        self.RowDelivererCountryCode = RowDelivererCountryCode
        self.RowDelivererCountryName = RowDelivererCountryName
        self.RowModeOfTransportIdentifier = RowModeOfTransportIdentifier
        self.RowCarrierName = RowCarrierName
        self.RowVesselName = RowVesselName
        self.RowLocationIdentifier = RowLocationIdentifier
        self.RowTransportInformationDate = RowTransportInformationDate
        self.RowCountryOfOrigin = RowCountryOfOrigin
        self.RowCountryOfDestinationName = RowCountryOfDestinationName
        self.RowDestinationCountryCode = RowDestinationCountryCode
        self.RowPlaceOfDischarge = RowPlaceOfDischarge
        if RowFinalDestinationName is None:
            self.RowFinalDestinationName = []
        else:
            self.RowFinalDestinationName = RowFinalDestinationName
        self.RowCustomsInfo = RowCustomsInfo
        self.RowManufacturerArticleIdentifier = RowManufacturerArticleIdentifier
        self.RowManufacturerIdentifier = RowManufacturerIdentifier
        if RowManufacturerName is None:
            self.RowManufacturerName = []
        else:
            self.RowManufacturerName = RowManufacturerName
        self.RowManufacturerCountryCode = RowManufacturerCountryCode
        self.RowManufacturerCountryName = RowManufacturerCountryName
        self.RowManufacturerOrderIdentifier = RowManufacturerOrderIdentifier
        self.RowPackageDetails = RowPackageDetails
    def factory(*args_, **kwargs_):
        if RowDeliveryDetailsType.subclass:
            return RowDeliveryDetailsType.subclass(*args_, **kwargs_)
        else:
            return RowDeliveryDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RowTerminalAddressText(self): return self.RowTerminalAddressText
    def set_RowTerminalAddressText(self, RowTerminalAddressText): self.RowTerminalAddressText = RowTerminalAddressText
    def get_RowWaybillIdentifier(self): return self.RowWaybillIdentifier
    def set_RowWaybillIdentifier(self, RowWaybillIdentifier): self.RowWaybillIdentifier = RowWaybillIdentifier
    def get_RowWaybillTypeCode(self): return self.RowWaybillTypeCode
    def set_RowWaybillTypeCode(self, RowWaybillTypeCode): self.RowWaybillTypeCode = RowWaybillTypeCode
    def get_RowClearanceIdentifier(self): return self.RowClearanceIdentifier
    def set_RowClearanceIdentifier(self, RowClearanceIdentifier): self.RowClearanceIdentifier = RowClearanceIdentifier
    def get_RowDeliveryNoteIdentifier(self): return self.RowDeliveryNoteIdentifier
    def set_RowDeliveryNoteIdentifier(self, RowDeliveryNoteIdentifier): self.RowDeliveryNoteIdentifier = RowDeliveryNoteIdentifier
    def get_RowDelivererIdentifier(self): return self.RowDelivererIdentifier
    def set_RowDelivererIdentifier(self, RowDelivererIdentifier): self.RowDelivererIdentifier = RowDelivererIdentifier
    def get_RowDelivererName(self): return self.RowDelivererName
    def set_RowDelivererName(self, RowDelivererName): self.RowDelivererName = RowDelivererName
    def add_RowDelivererName(self, value): self.RowDelivererName.append(value)
    def insert_RowDelivererName_at(self, index, value): self.RowDelivererName.insert(index, value)
    def replace_RowDelivererName_at(self, index, value): self.RowDelivererName[index] = value
    def get_RowDelivererCountryCode(self): return self.RowDelivererCountryCode
    def set_RowDelivererCountryCode(self, RowDelivererCountryCode): self.RowDelivererCountryCode = RowDelivererCountryCode
    def get_RowDelivererCountryName(self): return self.RowDelivererCountryName
    def set_RowDelivererCountryName(self, RowDelivererCountryName): self.RowDelivererCountryName = RowDelivererCountryName
    def get_RowModeOfTransportIdentifier(self): return self.RowModeOfTransportIdentifier
    def set_RowModeOfTransportIdentifier(self, RowModeOfTransportIdentifier): self.RowModeOfTransportIdentifier = RowModeOfTransportIdentifier
    def get_RowCarrierName(self): return self.RowCarrierName
    def set_RowCarrierName(self, RowCarrierName): self.RowCarrierName = RowCarrierName
    def get_RowVesselName(self): return self.RowVesselName
    def set_RowVesselName(self, RowVesselName): self.RowVesselName = RowVesselName
    def get_RowLocationIdentifier(self): return self.RowLocationIdentifier
    def set_RowLocationIdentifier(self, RowLocationIdentifier): self.RowLocationIdentifier = RowLocationIdentifier
    def get_RowTransportInformationDate(self): return self.RowTransportInformationDate
    def set_RowTransportInformationDate(self, RowTransportInformationDate): self.RowTransportInformationDate = RowTransportInformationDate
    def get_RowCountryOfOrigin(self): return self.RowCountryOfOrigin
    def set_RowCountryOfOrigin(self, RowCountryOfOrigin): self.RowCountryOfOrigin = RowCountryOfOrigin
    def get_RowCountryOfDestinationName(self): return self.RowCountryOfDestinationName
    def set_RowCountryOfDestinationName(self, RowCountryOfDestinationName): self.RowCountryOfDestinationName = RowCountryOfDestinationName
    def get_RowDestinationCountryCode(self): return self.RowDestinationCountryCode
    def set_RowDestinationCountryCode(self, RowDestinationCountryCode): self.RowDestinationCountryCode = RowDestinationCountryCode
    def get_RowPlaceOfDischarge(self): return self.RowPlaceOfDischarge
    def set_RowPlaceOfDischarge(self, RowPlaceOfDischarge): self.RowPlaceOfDischarge = RowPlaceOfDischarge
    def get_RowFinalDestinationName(self): return self.RowFinalDestinationName
    def set_RowFinalDestinationName(self, RowFinalDestinationName): self.RowFinalDestinationName = RowFinalDestinationName
    def add_RowFinalDestinationName(self, value): self.RowFinalDestinationName.append(value)
    def insert_RowFinalDestinationName_at(self, index, value): self.RowFinalDestinationName.insert(index, value)
    def replace_RowFinalDestinationName_at(self, index, value): self.RowFinalDestinationName[index] = value
    def get_RowCustomsInfo(self): return self.RowCustomsInfo
    def set_RowCustomsInfo(self, RowCustomsInfo): self.RowCustomsInfo = RowCustomsInfo
    def get_RowManufacturerArticleIdentifier(self): return self.RowManufacturerArticleIdentifier
    def set_RowManufacturerArticleIdentifier(self, RowManufacturerArticleIdentifier): self.RowManufacturerArticleIdentifier = RowManufacturerArticleIdentifier
    def get_RowManufacturerIdentifier(self): return self.RowManufacturerIdentifier
    def set_RowManufacturerIdentifier(self, RowManufacturerIdentifier): self.RowManufacturerIdentifier = RowManufacturerIdentifier
    def get_RowManufacturerName(self): return self.RowManufacturerName
    def set_RowManufacturerName(self, RowManufacturerName): self.RowManufacturerName = RowManufacturerName
    def add_RowManufacturerName(self, value): self.RowManufacturerName.append(value)
    def insert_RowManufacturerName_at(self, index, value): self.RowManufacturerName.insert(index, value)
    def replace_RowManufacturerName_at(self, index, value): self.RowManufacturerName[index] = value
    def get_RowManufacturerCountryCode(self): return self.RowManufacturerCountryCode
    def set_RowManufacturerCountryCode(self, RowManufacturerCountryCode): self.RowManufacturerCountryCode = RowManufacturerCountryCode
    def get_RowManufacturerCountryName(self): return self.RowManufacturerCountryName
    def set_RowManufacturerCountryName(self, RowManufacturerCountryName): self.RowManufacturerCountryName = RowManufacturerCountryName
    def get_RowManufacturerOrderIdentifier(self): return self.RowManufacturerOrderIdentifier
    def set_RowManufacturerOrderIdentifier(self, RowManufacturerOrderIdentifier): self.RowManufacturerOrderIdentifier = RowManufacturerOrderIdentifier
    def get_RowPackageDetails(self): return self.RowPackageDetails
    def set_RowPackageDetails(self, RowPackageDetails): self.RowPackageDetails = RowPackageDetails
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def hasContent_(self):
        if (
            self.RowTerminalAddressText is not None or
            self.RowWaybillIdentifier is not None or
            self.RowWaybillTypeCode is not None or
            self.RowClearanceIdentifier is not None or
            self.RowDeliveryNoteIdentifier is not None or
            self.RowDelivererIdentifier is not None or
            self.RowDelivererName or
            self.RowDelivererCountryCode is not None or
            self.RowDelivererCountryName is not None or
            self.RowModeOfTransportIdentifier is not None or
            self.RowCarrierName is not None or
            self.RowVesselName is not None or
            self.RowLocationIdentifier is not None or
            self.RowTransportInformationDate is not None or
            self.RowCountryOfOrigin is not None or
            self.RowCountryOfDestinationName is not None or
            self.RowDestinationCountryCode is not None or
            self.RowPlaceOfDischarge is not None or
            self.RowFinalDestinationName or
            self.RowCustomsInfo is not None or
            self.RowManufacturerArticleIdentifier is not None or
            self.RowManufacturerIdentifier is not None or
            self.RowManufacturerName or
            self.RowManufacturerCountryCode is not None or
            self.RowManufacturerCountryName is not None or
            self.RowManufacturerOrderIdentifier is not None or
            self.RowPackageDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='RowDeliveryDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RowDeliveryDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='RowDeliveryDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RowDeliveryDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='RowDeliveryDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.RowTerminalAddressText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowTerminalAddressText>%s</%sRowTerminalAddressText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowTerminalAddressText).encode(ExternalEncoding), input_name='RowTerminalAddressText'), namespace_, eol_))
        if self.RowWaybillIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowWaybillIdentifier>%s</%sRowWaybillIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowWaybillIdentifier).encode(ExternalEncoding), input_name='RowWaybillIdentifier'), namespace_, eol_))
        if self.RowWaybillTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowWaybillTypeCode>%s</%sRowWaybillTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowWaybillTypeCode).encode(ExternalEncoding), input_name='RowWaybillTypeCode'), namespace_, eol_))
        if self.RowClearanceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowClearanceIdentifier>%s</%sRowClearanceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowClearanceIdentifier).encode(ExternalEncoding), input_name='RowClearanceIdentifier'), namespace_, eol_))
        if self.RowDeliveryNoteIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDeliveryNoteIdentifier>%s</%sRowDeliveryNoteIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDeliveryNoteIdentifier).encode(ExternalEncoding), input_name='RowDeliveryNoteIdentifier'), namespace_, eol_))
        if self.RowDelivererIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDelivererIdentifier>%s</%sRowDelivererIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDelivererIdentifier).encode(ExternalEncoding), input_name='RowDelivererIdentifier'), namespace_, eol_))
        for RowDelivererName_ in self.RowDelivererName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDelivererName>%s</%sRowDelivererName>%s' % (namespace_, self.gds_format_string(quote_xml(RowDelivererName_).encode(ExternalEncoding), input_name='RowDelivererName'), namespace_, eol_))
        if self.RowDelivererCountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDelivererCountryCode>%s</%sRowDelivererCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDelivererCountryCode).encode(ExternalEncoding), input_name='RowDelivererCountryCode'), namespace_, eol_))
        if self.RowDelivererCountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDelivererCountryName>%s</%sRowDelivererCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDelivererCountryName).encode(ExternalEncoding), input_name='RowDelivererCountryName'), namespace_, eol_))
        if self.RowModeOfTransportIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowModeOfTransportIdentifier>%s</%sRowModeOfTransportIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowModeOfTransportIdentifier).encode(ExternalEncoding), input_name='RowModeOfTransportIdentifier'), namespace_, eol_))
        if self.RowCarrierName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowCarrierName>%s</%sRowCarrierName>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowCarrierName).encode(ExternalEncoding), input_name='RowCarrierName'), namespace_, eol_))
        if self.RowVesselName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowVesselName>%s</%sRowVesselName>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowVesselName).encode(ExternalEncoding), input_name='RowVesselName'), namespace_, eol_))
        if self.RowLocationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowLocationIdentifier>%s</%sRowLocationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowLocationIdentifier).encode(ExternalEncoding), input_name='RowLocationIdentifier'), namespace_, eol_))
        if self.RowTransportInformationDate is not None:
            self.RowTransportInformationDate.export(outfile, level, namespace_, name_='RowTransportInformationDate', pretty_print=pretty_print)
        if self.RowCountryOfOrigin is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowCountryOfOrigin>%s</%sRowCountryOfOrigin>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowCountryOfOrigin).encode(ExternalEncoding), input_name='RowCountryOfOrigin'), namespace_, eol_))
        if self.RowCountryOfDestinationName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowCountryOfDestinationName>%s</%sRowCountryOfDestinationName>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowCountryOfDestinationName).encode(ExternalEncoding), input_name='RowCountryOfDestinationName'), namespace_, eol_))
        if self.RowDestinationCountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDestinationCountryCode>%s</%sRowDestinationCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDestinationCountryCode).encode(ExternalEncoding), input_name='RowDestinationCountryCode'), namespace_, eol_))
        if self.RowPlaceOfDischarge is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowPlaceOfDischarge>%s</%sRowPlaceOfDischarge>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowPlaceOfDischarge).encode(ExternalEncoding), input_name='RowPlaceOfDischarge'), namespace_, eol_))
        for RowFinalDestinationName_ in self.RowFinalDestinationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowFinalDestinationName>%s</%sRowFinalDestinationName>%s' % (namespace_, self.gds_format_string(quote_xml(RowFinalDestinationName_).encode(ExternalEncoding), input_name='RowFinalDestinationName'), namespace_, eol_))
        if self.RowCustomsInfo is not None:
            self.RowCustomsInfo.export(outfile, level, namespace_, name_='RowCustomsInfo', pretty_print=pretty_print)
        if self.RowManufacturerArticleIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowManufacturerArticleIdentifier>%s</%sRowManufacturerArticleIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowManufacturerArticleIdentifier).encode(ExternalEncoding), input_name='RowManufacturerArticleIdentifier'), namespace_, eol_))
        if self.RowManufacturerIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowManufacturerIdentifier>%s</%sRowManufacturerIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowManufacturerIdentifier).encode(ExternalEncoding), input_name='RowManufacturerIdentifier'), namespace_, eol_))
        for RowManufacturerName_ in self.RowManufacturerName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowManufacturerName>%s</%sRowManufacturerName>%s' % (namespace_, self.gds_format_string(quote_xml(RowManufacturerName_).encode(ExternalEncoding), input_name='RowManufacturerName'), namespace_, eol_))
        if self.RowManufacturerCountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowManufacturerCountryCode>%s</%sRowManufacturerCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowManufacturerCountryCode).encode(ExternalEncoding), input_name='RowManufacturerCountryCode'), namespace_, eol_))
        if self.RowManufacturerCountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowManufacturerCountryName>%s</%sRowManufacturerCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowManufacturerCountryName).encode(ExternalEncoding), input_name='RowManufacturerCountryName'), namespace_, eol_))
        if self.RowManufacturerOrderIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowManufacturerOrderIdentifier>%s</%sRowManufacturerOrderIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowManufacturerOrderIdentifier).encode(ExternalEncoding), input_name='RowManufacturerOrderIdentifier'), namespace_, eol_))
        if self.RowPackageDetails is not None:
            self.RowPackageDetails.export(outfile, level, namespace_, name_='RowPackageDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RowDeliveryDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.RowTerminalAddressText is not None:
            showIndent(outfile, level)
            outfile.write('RowTerminalAddressText=%s,\n' % quote_python(self.RowTerminalAddressText).encode(ExternalEncoding))
        if self.RowWaybillIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowWaybillIdentifier=%s,\n' % quote_python(self.RowWaybillIdentifier).encode(ExternalEncoding))
        if self.RowWaybillTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('RowWaybillTypeCode=%s,\n' % quote_python(self.RowWaybillTypeCode).encode(ExternalEncoding))
        if self.RowClearanceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowClearanceIdentifier=%s,\n' % quote_python(self.RowClearanceIdentifier).encode(ExternalEncoding))
        if self.RowDeliveryNoteIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowDeliveryNoteIdentifier=%s,\n' % quote_python(self.RowDeliveryNoteIdentifier).encode(ExternalEncoding))
        if self.RowDelivererIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowDelivererIdentifier=%s,\n' % quote_python(self.RowDelivererIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('RowDelivererName=[\n')
        level += 1
        for RowDelivererName_ in self.RowDelivererName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(RowDelivererName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.RowDelivererCountryCode is not None:
            showIndent(outfile, level)
            outfile.write('RowDelivererCountryCode=%s,\n' % quote_python(self.RowDelivererCountryCode).encode(ExternalEncoding))
        if self.RowDelivererCountryName is not None:
            showIndent(outfile, level)
            outfile.write('RowDelivererCountryName=%s,\n' % quote_python(self.RowDelivererCountryName).encode(ExternalEncoding))
        if self.RowModeOfTransportIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowModeOfTransportIdentifier=%s,\n' % quote_python(self.RowModeOfTransportIdentifier).encode(ExternalEncoding))
        if self.RowCarrierName is not None:
            showIndent(outfile, level)
            outfile.write('RowCarrierName=%s,\n' % quote_python(self.RowCarrierName).encode(ExternalEncoding))
        if self.RowVesselName is not None:
            showIndent(outfile, level)
            outfile.write('RowVesselName=%s,\n' % quote_python(self.RowVesselName).encode(ExternalEncoding))
        if self.RowLocationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowLocationIdentifier=%s,\n' % quote_python(self.RowLocationIdentifier).encode(ExternalEncoding))
        if self.RowTransportInformationDate is not None:
            showIndent(outfile, level)
            outfile.write('RowTransportInformationDate=model_.date(\n')
            self.RowTransportInformationDate.exportLiteral(outfile, level, name_='RowTransportInformationDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowCountryOfOrigin is not None:
            showIndent(outfile, level)
            outfile.write('RowCountryOfOrigin=%s,\n' % quote_python(self.RowCountryOfOrigin).encode(ExternalEncoding))
        if self.RowCountryOfDestinationName is not None:
            showIndent(outfile, level)
            outfile.write('RowCountryOfDestinationName=%s,\n' % quote_python(self.RowCountryOfDestinationName).encode(ExternalEncoding))
        if self.RowDestinationCountryCode is not None:
            showIndent(outfile, level)
            outfile.write('RowDestinationCountryCode=%s,\n' % quote_python(self.RowDestinationCountryCode).encode(ExternalEncoding))
        if self.RowPlaceOfDischarge is not None:
            showIndent(outfile, level)
            outfile.write('RowPlaceOfDischarge=%s,\n' % quote_python(self.RowPlaceOfDischarge).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('RowFinalDestinationName=[\n')
        level += 1
        for RowFinalDestinationName_ in self.RowFinalDestinationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(RowFinalDestinationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.RowCustomsInfo is not None:
            showIndent(outfile, level)
            outfile.write('RowCustomsInfo=model_.CustomsInfoType(\n')
            self.RowCustomsInfo.exportLiteral(outfile, level, name_='RowCustomsInfo')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowManufacturerArticleIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowManufacturerArticleIdentifier=%s,\n' % quote_python(self.RowManufacturerArticleIdentifier).encode(ExternalEncoding))
        if self.RowManufacturerIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowManufacturerIdentifier=%s,\n' % quote_python(self.RowManufacturerIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('RowManufacturerName=[\n')
        level += 1
        for RowManufacturerName_ in self.RowManufacturerName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(RowManufacturerName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.RowManufacturerCountryCode is not None:
            showIndent(outfile, level)
            outfile.write('RowManufacturerCountryCode=%s,\n' % quote_python(self.RowManufacturerCountryCode).encode(ExternalEncoding))
        if self.RowManufacturerCountryName is not None:
            showIndent(outfile, level)
            outfile.write('RowManufacturerCountryName=%s,\n' % quote_python(self.RowManufacturerCountryName).encode(ExternalEncoding))
        if self.RowManufacturerOrderIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowManufacturerOrderIdentifier=%s,\n' % quote_python(self.RowManufacturerOrderIdentifier).encode(ExternalEncoding))
        if self.RowPackageDetails is not None:
            showIndent(outfile, level)
            outfile.write('RowPackageDetails=model_.RowPackageDetailsType(\n')
            self.RowPackageDetails.exportLiteral(outfile, level, name_='RowPackageDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RowTerminalAddressText':
            RowTerminalAddressText_ = child_.text
            RowTerminalAddressText_ = self.gds_validate_string(RowTerminalAddressText_, node, 'RowTerminalAddressText')
            self.RowTerminalAddressText = RowTerminalAddressText_
            self.validate_genericStringType0_70(self.RowTerminalAddressText)    # validate type genericStringType0_70
        elif nodeName_ == 'RowWaybillIdentifier':
            RowWaybillIdentifier_ = child_.text
            RowWaybillIdentifier_ = self.gds_validate_string(RowWaybillIdentifier_, node, 'RowWaybillIdentifier')
            self.RowWaybillIdentifier = RowWaybillIdentifier_
            self.validate_genericStringType0_35(self.RowWaybillIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowWaybillTypeCode':
            RowWaybillTypeCode_ = child_.text
            RowWaybillTypeCode_ = self.gds_validate_string(RowWaybillTypeCode_, node, 'RowWaybillTypeCode')
            self.RowWaybillTypeCode = RowWaybillTypeCode_
            self.validate_genericStringType0_35(self.RowWaybillTypeCode)    # validate type genericStringType0_35
        elif nodeName_ == 'RowClearanceIdentifier':
            RowClearanceIdentifier_ = child_.text
            RowClearanceIdentifier_ = self.gds_validate_string(RowClearanceIdentifier_, node, 'RowClearanceIdentifier')
            self.RowClearanceIdentifier = RowClearanceIdentifier_
            self.validate_genericStringType0_35(self.RowClearanceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowDeliveryNoteIdentifier':
            RowDeliveryNoteIdentifier_ = child_.text
            RowDeliveryNoteIdentifier_ = self.gds_validate_string(RowDeliveryNoteIdentifier_, node, 'RowDeliveryNoteIdentifier')
            self.RowDeliveryNoteIdentifier = RowDeliveryNoteIdentifier_
            self.validate_genericStringType0_35(self.RowDeliveryNoteIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowDelivererIdentifier':
            RowDelivererIdentifier_ = child_.text
            RowDelivererIdentifier_ = self.gds_validate_string(RowDelivererIdentifier_, node, 'RowDelivererIdentifier')
            self.RowDelivererIdentifier = RowDelivererIdentifier_
            self.validate_genericStringType0_35(self.RowDelivererIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowDelivererName':
            RowDelivererName_ = child_.text
            RowDelivererName_ = self.gds_validate_string(RowDelivererName_, node, 'RowDelivererName')
            self.RowDelivererName.append(RowDelivererName_)
            self.validate_genericStringType0_35(self.RowDelivererName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowDelivererCountryCode':
            RowDelivererCountryCode_ = child_.text
            RowDelivererCountryCode_ = self.gds_validate_string(RowDelivererCountryCode_, node, 'RowDelivererCountryCode')
            self.RowDelivererCountryCode = RowDelivererCountryCode_
            self.validate_CountryCodeType(self.RowDelivererCountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'RowDelivererCountryName':
            RowDelivererCountryName_ = child_.text
            RowDelivererCountryName_ = self.gds_validate_string(RowDelivererCountryName_, node, 'RowDelivererCountryName')
            self.RowDelivererCountryName = RowDelivererCountryName_
            self.validate_genericStringType0_35(self.RowDelivererCountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowModeOfTransportIdentifier':
            RowModeOfTransportIdentifier_ = child_.text
            RowModeOfTransportIdentifier_ = self.gds_validate_string(RowModeOfTransportIdentifier_, node, 'RowModeOfTransportIdentifier')
            self.RowModeOfTransportIdentifier = RowModeOfTransportIdentifier_
            self.validate_genericStringType0_35(self.RowModeOfTransportIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowCarrierName':
            RowCarrierName_ = child_.text
            RowCarrierName_ = self.gds_validate_string(RowCarrierName_, node, 'RowCarrierName')
            self.RowCarrierName = RowCarrierName_
            self.validate_genericStringType0_35(self.RowCarrierName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowVesselName':
            RowVesselName_ = child_.text
            RowVesselName_ = self.gds_validate_string(RowVesselName_, node, 'RowVesselName')
            self.RowVesselName = RowVesselName_
            self.validate_genericStringType0_35(self.RowVesselName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowLocationIdentifier':
            RowLocationIdentifier_ = child_.text
            RowLocationIdentifier_ = self.gds_validate_string(RowLocationIdentifier_, node, 'RowLocationIdentifier')
            self.RowLocationIdentifier = RowLocationIdentifier_
            self.validate_genericStringType0_35(self.RowLocationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowTransportInformationDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowTransportInformationDate = obj_
            obj_.original_tagname_ = 'RowTransportInformationDate'
        elif nodeName_ == 'RowCountryOfOrigin':
            RowCountryOfOrigin_ = child_.text
            RowCountryOfOrigin_ = self.gds_validate_string(RowCountryOfOrigin_, node, 'RowCountryOfOrigin')
            self.RowCountryOfOrigin = RowCountryOfOrigin_
            self.validate_genericStringType0_35(self.RowCountryOfOrigin)    # validate type genericStringType0_35
        elif nodeName_ == 'RowCountryOfDestinationName':
            RowCountryOfDestinationName_ = child_.text
            RowCountryOfDestinationName_ = self.gds_validate_string(RowCountryOfDestinationName_, node, 'RowCountryOfDestinationName')
            self.RowCountryOfDestinationName = RowCountryOfDestinationName_
            self.validate_genericStringType0_35(self.RowCountryOfDestinationName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowDestinationCountryCode':
            RowDestinationCountryCode_ = child_.text
            RowDestinationCountryCode_ = self.gds_validate_string(RowDestinationCountryCode_, node, 'RowDestinationCountryCode')
            self.RowDestinationCountryCode = RowDestinationCountryCode_
            self.validate_CountryCodeType(self.RowDestinationCountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'RowPlaceOfDischarge':
            RowPlaceOfDischarge_ = child_.text
            RowPlaceOfDischarge_ = self.gds_validate_string(RowPlaceOfDischarge_, node, 'RowPlaceOfDischarge')
            self.RowPlaceOfDischarge = RowPlaceOfDischarge_
            self.validate_genericStringType0_35(self.RowPlaceOfDischarge)    # validate type genericStringType0_35
        elif nodeName_ == 'RowFinalDestinationName':
            RowFinalDestinationName_ = child_.text
            RowFinalDestinationName_ = self.gds_validate_string(RowFinalDestinationName_, node, 'RowFinalDestinationName')
            self.RowFinalDestinationName.append(RowFinalDestinationName_)
            self.validate_genericStringType0_35(self.RowFinalDestinationName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowCustomsInfo':
            obj_ = CustomsInfoType.factory()
            obj_.build(child_)
            self.RowCustomsInfo = obj_
            obj_.original_tagname_ = 'RowCustomsInfo'
        elif nodeName_ == 'RowManufacturerArticleIdentifier':
            RowManufacturerArticleIdentifier_ = child_.text
            RowManufacturerArticleIdentifier_ = self.gds_validate_string(RowManufacturerArticleIdentifier_, node, 'RowManufacturerArticleIdentifier')
            self.RowManufacturerArticleIdentifier = RowManufacturerArticleIdentifier_
            self.validate_genericStringType0_35(self.RowManufacturerArticleIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowManufacturerIdentifier':
            RowManufacturerIdentifier_ = child_.text
            RowManufacturerIdentifier_ = self.gds_validate_string(RowManufacturerIdentifier_, node, 'RowManufacturerIdentifier')
            self.RowManufacturerIdentifier = RowManufacturerIdentifier_
            self.validate_genericStringType0_35(self.RowManufacturerIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowManufacturerName':
            RowManufacturerName_ = child_.text
            RowManufacturerName_ = self.gds_validate_string(RowManufacturerName_, node, 'RowManufacturerName')
            self.RowManufacturerName.append(RowManufacturerName_)
            self.validate_genericStringType0_35(self.RowManufacturerName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowManufacturerCountryCode':
            RowManufacturerCountryCode_ = child_.text
            RowManufacturerCountryCode_ = self.gds_validate_string(RowManufacturerCountryCode_, node, 'RowManufacturerCountryCode')
            self.RowManufacturerCountryCode = RowManufacturerCountryCode_
            self.validate_CountryCodeType(self.RowManufacturerCountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'RowManufacturerCountryName':
            RowManufacturerCountryName_ = child_.text
            RowManufacturerCountryName_ = self.gds_validate_string(RowManufacturerCountryName_, node, 'RowManufacturerCountryName')
            self.RowManufacturerCountryName = RowManufacturerCountryName_
            self.validate_genericStringType0_35(self.RowManufacturerCountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowManufacturerOrderIdentifier':
            RowManufacturerOrderIdentifier_ = child_.text
            RowManufacturerOrderIdentifier_ = self.gds_validate_string(RowManufacturerOrderIdentifier_, node, 'RowManufacturerOrderIdentifier')
            self.RowManufacturerOrderIdentifier = RowManufacturerOrderIdentifier_
            self.validate_genericStringType0_35(self.RowManufacturerOrderIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowPackageDetails':
            obj_ = RowPackageDetailsType.factory()
            obj_.build(child_)
            self.RowPackageDetails = obj_
            obj_.original_tagname_ = 'RowPackageDetails'
# end class RowDeliveryDetailsType


class SellerAccountDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SellerAccountID=None, SellerBic=None):
        self.original_tagname_ = None
        self.SellerAccountID = SellerAccountID
        self.SellerBic = SellerBic
    def factory(*args_, **kwargs_):
        if SellerAccountDetailsType.subclass:
            return SellerAccountDetailsType.subclass(*args_, **kwargs_)
        else:
            return SellerAccountDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SellerAccountID(self): return self.SellerAccountID
    def set_SellerAccountID(self, SellerAccountID): self.SellerAccountID = SellerAccountID
    def get_SellerBic(self): return self.SellerBic
    def set_SellerBic(self, SellerBic): self.SellerBic = SellerBic
    def hasContent_(self):
        if (
            self.SellerAccountID is not None or
            self.SellerBic is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SellerAccountDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SellerAccountDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SellerAccountDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SellerAccountDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SellerAccountDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SellerAccountID is not None:
            self.SellerAccountID.export(outfile, level, namespace_, name_='SellerAccountID', pretty_print=pretty_print)
        if self.SellerBic is not None:
            self.SellerBic.export(outfile, level, namespace_, name_='SellerBic', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SellerAccountDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SellerAccountID is not None:
            showIndent(outfile, level)
            outfile.write('SellerAccountID=model_.SellerAccountIDType(\n')
            self.SellerAccountID.exportLiteral(outfile, level, name_='SellerAccountID')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SellerBic is not None:
            showIndent(outfile, level)
            outfile.write('SellerBic=model_.SellerBicType(\n')
            self.SellerBic.exportLiteral(outfile, level, name_='SellerBic')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SellerAccountID':
            obj_ = SellerAccountIDType.factory()
            obj_.build(child_)
            self.SellerAccountID = obj_
            obj_.original_tagname_ = 'SellerAccountID'
        elif nodeName_ == 'SellerBic':
            obj_ = SellerBicType.factory()
            obj_.build(child_)
            self.SellerBic = obj_
            obj_.original_tagname_ = 'SellerBic'
# end class SellerAccountDetailsType


class SellerAccountIDType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, IdentificationSchemeName=None, valueOf_=None):
        self.original_tagname_ = None
        self.IdentificationSchemeName = _cast(None, IdentificationSchemeName)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SellerAccountIDType.subclass:
            return SellerAccountIDType.subclass(*args_, **kwargs_)
        else:
            return SellerAccountIDType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_IdentificationSchemeName(self): return self.IdentificationSchemeName
    def set_IdentificationSchemeName(self, IdentificationSchemeName): self.IdentificationSchemeName = IdentificationSchemeName
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SellerAccountIDType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SellerAccountIDType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SellerAccountIDType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SellerAccountIDType'):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            outfile.write(' IdentificationSchemeName=%s' % (self.gds_format_string(quote_attrib(self.IdentificationSchemeName).encode(ExternalEncoding), input_name='IdentificationSchemeName'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='SellerAccountIDType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='SellerAccountIDType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            showIndent(outfile, level)
            outfile.write('IdentificationSchemeName="%s",\n' % (self.IdentificationSchemeName,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('IdentificationSchemeName', node)
        if value is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            self.IdentificationSchemeName = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SellerAccountIDType


class SellerBicType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, IdentificationSchemeName=None, valueOf_=None):
        self.original_tagname_ = None
        self.IdentificationSchemeName = _cast(None, IdentificationSchemeName)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SellerBicType.subclass:
            return SellerBicType.subclass(*args_, **kwargs_)
        else:
            return SellerBicType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_IdentificationSchemeName(self): return self.IdentificationSchemeName
    def set_IdentificationSchemeName(self, IdentificationSchemeName): self.IdentificationSchemeName = IdentificationSchemeName
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SellerBicType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SellerBicType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SellerBicType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SellerBicType'):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            outfile.write(' IdentificationSchemeName=%s' % (self.gds_format_string(quote_attrib(self.IdentificationSchemeName).encode(ExternalEncoding), input_name='IdentificationSchemeName'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='SellerBicType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='SellerBicType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.IdentificationSchemeName is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            showIndent(outfile, level)
            outfile.write('IdentificationSchemeName="%s",\n' % (self.IdentificationSchemeName,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('IdentificationSchemeName', node)
        if value is not None and 'IdentificationSchemeName' not in already_processed:
            already_processed.add('IdentificationSchemeName')
            self.IdentificationSchemeName = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SellerBicType


class SellerCommunicationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SellerPhoneNumberIdentifier=None, SellerEmailaddressIdentifier=None):
        self.original_tagname_ = None
        self.SellerPhoneNumberIdentifier = SellerPhoneNumberIdentifier
        self.SellerEmailaddressIdentifier = SellerEmailaddressIdentifier
    def factory(*args_, **kwargs_):
        if SellerCommunicationDetailsType.subclass:
            return SellerCommunicationDetailsType.subclass(*args_, **kwargs_)
        else:
            return SellerCommunicationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SellerPhoneNumberIdentifier(self): return self.SellerPhoneNumberIdentifier
    def set_SellerPhoneNumberIdentifier(self, SellerPhoneNumberIdentifier): self.SellerPhoneNumberIdentifier = SellerPhoneNumberIdentifier
    def get_SellerEmailaddressIdentifier(self): return self.SellerEmailaddressIdentifier
    def set_SellerEmailaddressIdentifier(self, SellerEmailaddressIdentifier): self.SellerEmailaddressIdentifier = SellerEmailaddressIdentifier
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SellerPhoneNumberIdentifier is not None or
            self.SellerEmailaddressIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SellerCommunicationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SellerCommunicationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SellerCommunicationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SellerCommunicationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SellerCommunicationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SellerPhoneNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerPhoneNumberIdentifier>%s</%sSellerPhoneNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerPhoneNumberIdentifier).encode(ExternalEncoding), input_name='SellerPhoneNumberIdentifier'), namespace_, eol_))
        if self.SellerEmailaddressIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerEmailaddressIdentifier>%s</%sSellerEmailaddressIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerEmailaddressIdentifier).encode(ExternalEncoding), input_name='SellerEmailaddressIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='SellerCommunicationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SellerPhoneNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellerPhoneNumberIdentifier=%s,\n' % quote_python(self.SellerPhoneNumberIdentifier).encode(ExternalEncoding))
        if self.SellerEmailaddressIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellerEmailaddressIdentifier=%s,\n' % quote_python(self.SellerEmailaddressIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SellerPhoneNumberIdentifier':
            SellerPhoneNumberIdentifier_ = child_.text
            SellerPhoneNumberIdentifier_ = self.gds_validate_string(SellerPhoneNumberIdentifier_, node, 'SellerPhoneNumberIdentifier')
            self.SellerPhoneNumberIdentifier = SellerPhoneNumberIdentifier_
            self.validate_genericStringType0_35(self.SellerPhoneNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerEmailaddressIdentifier':
            SellerEmailaddressIdentifier_ = child_.text
            SellerEmailaddressIdentifier_ = self.gds_validate_string(SellerEmailaddressIdentifier_, node, 'SellerEmailaddressIdentifier')
            self.SellerEmailaddressIdentifier = SellerEmailaddressIdentifier_
            self.validate_genericStringType0_70(self.SellerEmailaddressIdentifier)    # validate type genericStringType0_70
# end class SellerCommunicationDetailsType


class SellerInformationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SellerOfficialPostalAddressDetails=None, SellerHomeTownName=None, SellerVatRegistrationText=None, SellerVatRegistrationDate=None, SellerTaxRegistrationText=None, SellerPhoneNumber=None, SellerFaxNumber=None, SellerCommonEmailaddressIdentifier=None, SellerWebaddressIdentifier=None, SellerFreeText=None, SellerAccountDetails=None, InvoiceRecipientDetails=None):
        self.original_tagname_ = None
        self.SellerOfficialPostalAddressDetails = SellerOfficialPostalAddressDetails
        self.SellerHomeTownName = SellerHomeTownName
        self.SellerVatRegistrationText = SellerVatRegistrationText
        self.SellerVatRegistrationDate = SellerVatRegistrationDate
        self.SellerTaxRegistrationText = SellerTaxRegistrationText
        self.SellerPhoneNumber = SellerPhoneNumber
        self.SellerFaxNumber = SellerFaxNumber
        self.SellerCommonEmailaddressIdentifier = SellerCommonEmailaddressIdentifier
        self.SellerWebaddressIdentifier = SellerWebaddressIdentifier
        self.SellerFreeText = SellerFreeText
        if SellerAccountDetails is None:
            self.SellerAccountDetails = []
        else:
            self.SellerAccountDetails = SellerAccountDetails
        if InvoiceRecipientDetails is None:
            self.InvoiceRecipientDetails = []
        else:
            self.InvoiceRecipientDetails = InvoiceRecipientDetails
    def factory(*args_, **kwargs_):
        if SellerInformationDetailsType.subclass:
            return SellerInformationDetailsType.subclass(*args_, **kwargs_)
        else:
            return SellerInformationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SellerOfficialPostalAddressDetails(self): return self.SellerOfficialPostalAddressDetails
    def set_SellerOfficialPostalAddressDetails(self, SellerOfficialPostalAddressDetails): self.SellerOfficialPostalAddressDetails = SellerOfficialPostalAddressDetails
    def get_SellerHomeTownName(self): return self.SellerHomeTownName
    def set_SellerHomeTownName(self, SellerHomeTownName): self.SellerHomeTownName = SellerHomeTownName
    def get_SellerVatRegistrationText(self): return self.SellerVatRegistrationText
    def set_SellerVatRegistrationText(self, SellerVatRegistrationText): self.SellerVatRegistrationText = SellerVatRegistrationText
    def get_SellerVatRegistrationDate(self): return self.SellerVatRegistrationDate
    def set_SellerVatRegistrationDate(self, SellerVatRegistrationDate): self.SellerVatRegistrationDate = SellerVatRegistrationDate
    def get_SellerTaxRegistrationText(self): return self.SellerTaxRegistrationText
    def set_SellerTaxRegistrationText(self, SellerTaxRegistrationText): self.SellerTaxRegistrationText = SellerTaxRegistrationText
    def get_SellerPhoneNumber(self): return self.SellerPhoneNumber
    def set_SellerPhoneNumber(self, SellerPhoneNumber): self.SellerPhoneNumber = SellerPhoneNumber
    def get_SellerFaxNumber(self): return self.SellerFaxNumber
    def set_SellerFaxNumber(self, SellerFaxNumber): self.SellerFaxNumber = SellerFaxNumber
    def get_SellerCommonEmailaddressIdentifier(self): return self.SellerCommonEmailaddressIdentifier
    def set_SellerCommonEmailaddressIdentifier(self, SellerCommonEmailaddressIdentifier): self.SellerCommonEmailaddressIdentifier = SellerCommonEmailaddressIdentifier
    def get_SellerWebaddressIdentifier(self): return self.SellerWebaddressIdentifier
    def set_SellerWebaddressIdentifier(self, SellerWebaddressIdentifier): self.SellerWebaddressIdentifier = SellerWebaddressIdentifier
    def get_SellerFreeText(self): return self.SellerFreeText
    def set_SellerFreeText(self, SellerFreeText): self.SellerFreeText = SellerFreeText
    def get_SellerAccountDetails(self): return self.SellerAccountDetails
    def set_SellerAccountDetails(self, SellerAccountDetails): self.SellerAccountDetails = SellerAccountDetails
    def add_SellerAccountDetails(self, value): self.SellerAccountDetails.append(value)
    def insert_SellerAccountDetails_at(self, index, value): self.SellerAccountDetails.insert(index, value)
    def replace_SellerAccountDetails_at(self, index, value): self.SellerAccountDetails[index] = value
    def get_InvoiceRecipientDetails(self): return self.InvoiceRecipientDetails
    def set_InvoiceRecipientDetails(self, InvoiceRecipientDetails): self.InvoiceRecipientDetails = InvoiceRecipientDetails
    def add_InvoiceRecipientDetails(self, value): self.InvoiceRecipientDetails.append(value)
    def insert_InvoiceRecipientDetails_at(self, index, value): self.InvoiceRecipientDetails.insert(index, value)
    def replace_InvoiceRecipientDetails_at(self, index, value): self.InvoiceRecipientDetails[index] = value
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def validate_genericStringType0_512(self, value):
        # Validate type genericStringType0_512, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SellerOfficialPostalAddressDetails is not None or
            self.SellerHomeTownName is not None or
            self.SellerVatRegistrationText is not None or
            self.SellerVatRegistrationDate is not None or
            self.SellerTaxRegistrationText is not None or
            self.SellerPhoneNumber is not None or
            self.SellerFaxNumber is not None or
            self.SellerCommonEmailaddressIdentifier is not None or
            self.SellerWebaddressIdentifier is not None or
            self.SellerFreeText is not None or
            self.SellerAccountDetails or
            self.InvoiceRecipientDetails
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SellerInformationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SellerInformationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SellerInformationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SellerInformationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SellerInformationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SellerOfficialPostalAddressDetails is not None:
            self.SellerOfficialPostalAddressDetails.export(outfile, level, namespace_, name_='SellerOfficialPostalAddressDetails', pretty_print=pretty_print)
        if self.SellerHomeTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerHomeTownName>%s</%sSellerHomeTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerHomeTownName).encode(ExternalEncoding), input_name='SellerHomeTownName'), namespace_, eol_))
        if self.SellerVatRegistrationText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerVatRegistrationText>%s</%sSellerVatRegistrationText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerVatRegistrationText).encode(ExternalEncoding), input_name='SellerVatRegistrationText'), namespace_, eol_))
        if self.SellerVatRegistrationDate is not None:
            self.SellerVatRegistrationDate.export(outfile, level, namespace_, name_='SellerVatRegistrationDate', pretty_print=pretty_print)
        if self.SellerTaxRegistrationText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerTaxRegistrationText>%s</%sSellerTaxRegistrationText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerTaxRegistrationText).encode(ExternalEncoding), input_name='SellerTaxRegistrationText'), namespace_, eol_))
        if self.SellerPhoneNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerPhoneNumber>%s</%sSellerPhoneNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerPhoneNumber).encode(ExternalEncoding), input_name='SellerPhoneNumber'), namespace_, eol_))
        if self.SellerFaxNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerFaxNumber>%s</%sSellerFaxNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerFaxNumber).encode(ExternalEncoding), input_name='SellerFaxNumber'), namespace_, eol_))
        if self.SellerCommonEmailaddressIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerCommonEmailaddressIdentifier>%s</%sSellerCommonEmailaddressIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerCommonEmailaddressIdentifier).encode(ExternalEncoding), input_name='SellerCommonEmailaddressIdentifier'), namespace_, eol_))
        if self.SellerWebaddressIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerWebaddressIdentifier>%s</%sSellerWebaddressIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerWebaddressIdentifier).encode(ExternalEncoding), input_name='SellerWebaddressIdentifier'), namespace_, eol_))
        if self.SellerFreeText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerFreeText>%s</%sSellerFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerFreeText).encode(ExternalEncoding), input_name='SellerFreeText'), namespace_, eol_))
        for SellerAccountDetails_ in self.SellerAccountDetails:
            SellerAccountDetails_.export(outfile, level, namespace_, name_='SellerAccountDetails', pretty_print=pretty_print)
        for InvoiceRecipientDetails_ in self.InvoiceRecipientDetails:
            InvoiceRecipientDetails_.export(outfile, level, namespace_, name_='InvoiceRecipientDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SellerInformationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SellerOfficialPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('SellerOfficialPostalAddressDetails=model_.SellerOfficialPostalAddressDetailsType(\n')
            self.SellerOfficialPostalAddressDetails.exportLiteral(outfile, level, name_='SellerOfficialPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SellerHomeTownName is not None:
            showIndent(outfile, level)
            outfile.write('SellerHomeTownName=%s,\n' % quote_python(self.SellerHomeTownName).encode(ExternalEncoding))
        if self.SellerVatRegistrationText is not None:
            showIndent(outfile, level)
            outfile.write('SellerVatRegistrationText=%s,\n' % quote_python(self.SellerVatRegistrationText).encode(ExternalEncoding))
        if self.SellerVatRegistrationDate is not None:
            showIndent(outfile, level)
            outfile.write('SellerVatRegistrationDate=model_.date(\n')
            self.SellerVatRegistrationDate.exportLiteral(outfile, level, name_='SellerVatRegistrationDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SellerTaxRegistrationText is not None:
            showIndent(outfile, level)
            outfile.write('SellerTaxRegistrationText=%s,\n' % quote_python(self.SellerTaxRegistrationText).encode(ExternalEncoding))
        if self.SellerPhoneNumber is not None:
            showIndent(outfile, level)
            outfile.write('SellerPhoneNumber=%s,\n' % quote_python(self.SellerPhoneNumber).encode(ExternalEncoding))
        if self.SellerFaxNumber is not None:
            showIndent(outfile, level)
            outfile.write('SellerFaxNumber=%s,\n' % quote_python(self.SellerFaxNumber).encode(ExternalEncoding))
        if self.SellerCommonEmailaddressIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellerCommonEmailaddressIdentifier=%s,\n' % quote_python(self.SellerCommonEmailaddressIdentifier).encode(ExternalEncoding))
        if self.SellerWebaddressIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellerWebaddressIdentifier=%s,\n' % quote_python(self.SellerWebaddressIdentifier).encode(ExternalEncoding))
        if self.SellerFreeText is not None:
            showIndent(outfile, level)
            outfile.write('SellerFreeText=%s,\n' % quote_python(self.SellerFreeText).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SellerAccountDetails=[\n')
        level += 1
        for SellerAccountDetails_ in self.SellerAccountDetails:
            showIndent(outfile, level)
            outfile.write('model_.SellerAccountDetailsType(\n')
            SellerAccountDetails_.exportLiteral(outfile, level, name_='SellerAccountDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('InvoiceRecipientDetails=[\n')
        level += 1
        for InvoiceRecipientDetails_ in self.InvoiceRecipientDetails:
            showIndent(outfile, level)
            outfile.write('model_.InvoiceRecipientDetailsType(\n')
            InvoiceRecipientDetails_.exportLiteral(outfile, level, name_='InvoiceRecipientDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SellerOfficialPostalAddressDetails':
            obj_ = SellerOfficialPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.SellerOfficialPostalAddressDetails = obj_
            obj_.original_tagname_ = 'SellerOfficialPostalAddressDetails'
        elif nodeName_ == 'SellerHomeTownName':
            SellerHomeTownName_ = child_.text
            SellerHomeTownName_ = self.gds_validate_string(SellerHomeTownName_, node, 'SellerHomeTownName')
            self.SellerHomeTownName = SellerHomeTownName_
            self.validate_genericStringType0_35(self.SellerHomeTownName)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerVatRegistrationText':
            SellerVatRegistrationText_ = child_.text
            SellerVatRegistrationText_ = self.gds_validate_string(SellerVatRegistrationText_, node, 'SellerVatRegistrationText')
            self.SellerVatRegistrationText = SellerVatRegistrationText_
            self.validate_genericStringType0_35(self.SellerVatRegistrationText)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerVatRegistrationDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SellerVatRegistrationDate = obj_
            obj_.original_tagname_ = 'SellerVatRegistrationDate'
        elif nodeName_ == 'SellerTaxRegistrationText':
            SellerTaxRegistrationText_ = child_.text
            SellerTaxRegistrationText_ = self.gds_validate_string(SellerTaxRegistrationText_, node, 'SellerTaxRegistrationText')
            self.SellerTaxRegistrationText = SellerTaxRegistrationText_
            self.validate_genericStringType0_35(self.SellerTaxRegistrationText)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerPhoneNumber':
            SellerPhoneNumber_ = child_.text
            SellerPhoneNumber_ = self.gds_validate_string(SellerPhoneNumber_, node, 'SellerPhoneNumber')
            self.SellerPhoneNumber = SellerPhoneNumber_
            self.validate_genericStringType0_35(self.SellerPhoneNumber)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerFaxNumber':
            SellerFaxNumber_ = child_.text
            SellerFaxNumber_ = self.gds_validate_string(SellerFaxNumber_, node, 'SellerFaxNumber')
            self.SellerFaxNumber = SellerFaxNumber_
            self.validate_genericStringType0_35(self.SellerFaxNumber)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerCommonEmailaddressIdentifier':
            SellerCommonEmailaddressIdentifier_ = child_.text
            SellerCommonEmailaddressIdentifier_ = self.gds_validate_string(SellerCommonEmailaddressIdentifier_, node, 'SellerCommonEmailaddressIdentifier')
            self.SellerCommonEmailaddressIdentifier = SellerCommonEmailaddressIdentifier_
            self.validate_genericStringType0_70(self.SellerCommonEmailaddressIdentifier)    # validate type genericStringType0_70
        elif nodeName_ == 'SellerWebaddressIdentifier':
            SellerWebaddressIdentifier_ = child_.text
            SellerWebaddressIdentifier_ = self.gds_validate_string(SellerWebaddressIdentifier_, node, 'SellerWebaddressIdentifier')
            self.SellerWebaddressIdentifier = SellerWebaddressIdentifier_
            self.validate_genericStringType0_35(self.SellerWebaddressIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerFreeText':
            SellerFreeText_ = child_.text
            SellerFreeText_ = self.gds_validate_string(SellerFreeText_, node, 'SellerFreeText')
            self.SellerFreeText = SellerFreeText_
            self.validate_genericStringType0_512(self.SellerFreeText)    # validate type genericStringType0_512
        elif nodeName_ == 'SellerAccountDetails':
            obj_ = SellerAccountDetailsType.factory()
            obj_.build(child_)
            self.SellerAccountDetails.append(obj_)
            obj_.original_tagname_ = 'SellerAccountDetails'
        elif nodeName_ == 'InvoiceRecipientDetails':
            obj_ = InvoiceRecipientDetailsType.factory()
            obj_.build(child_)
            self.InvoiceRecipientDetails.append(obj_)
            obj_.original_tagname_ = 'InvoiceRecipientDetails'
# end class SellerInformationDetailsType


class SellerPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SellerPartyIdentifier=None, SellerPartyIdentifierUrlText=None, SellerOrganisationName=None, SellerOrganisationDepartment=None, SellerOrganisationTaxCode=None, SellerOrganisationTaxCodeUrlText=None, SellerCode=None, SellerPostalAddressDetails=None):
        self.original_tagname_ = None
        self.SellerPartyIdentifier = SellerPartyIdentifier
        self.SellerPartyIdentifierUrlText = SellerPartyIdentifierUrlText
        if SellerOrganisationName is None:
            self.SellerOrganisationName = []
        else:
            self.SellerOrganisationName = SellerOrganisationName
        if SellerOrganisationDepartment is None:
            self.SellerOrganisationDepartment = []
        else:
            self.SellerOrganisationDepartment = SellerOrganisationDepartment
        self.SellerOrganisationTaxCode = SellerOrganisationTaxCode
        self.SellerOrganisationTaxCodeUrlText = SellerOrganisationTaxCodeUrlText
        self.SellerCode = SellerCode
        self.SellerPostalAddressDetails = SellerPostalAddressDetails
    def factory(*args_, **kwargs_):
        if SellerPartyDetailsType.subclass:
            return SellerPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return SellerPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SellerPartyIdentifier(self): return self.SellerPartyIdentifier
    def set_SellerPartyIdentifier(self, SellerPartyIdentifier): self.SellerPartyIdentifier = SellerPartyIdentifier
    def get_SellerPartyIdentifierUrlText(self): return self.SellerPartyIdentifierUrlText
    def set_SellerPartyIdentifierUrlText(self, SellerPartyIdentifierUrlText): self.SellerPartyIdentifierUrlText = SellerPartyIdentifierUrlText
    def get_SellerOrganisationName(self): return self.SellerOrganisationName
    def set_SellerOrganisationName(self, SellerOrganisationName): self.SellerOrganisationName = SellerOrganisationName
    def add_SellerOrganisationName(self, value): self.SellerOrganisationName.append(value)
    def insert_SellerOrganisationName_at(self, index, value): self.SellerOrganisationName.insert(index, value)
    def replace_SellerOrganisationName_at(self, index, value): self.SellerOrganisationName[index] = value
    def get_SellerOrganisationDepartment(self): return self.SellerOrganisationDepartment
    def set_SellerOrganisationDepartment(self, SellerOrganisationDepartment): self.SellerOrganisationDepartment = SellerOrganisationDepartment
    def add_SellerOrganisationDepartment(self, value): self.SellerOrganisationDepartment.append(value)
    def insert_SellerOrganisationDepartment_at(self, index, value): self.SellerOrganisationDepartment.insert(index, value)
    def replace_SellerOrganisationDepartment_at(self, index, value): self.SellerOrganisationDepartment[index] = value
    def get_SellerOrganisationTaxCode(self): return self.SellerOrganisationTaxCode
    def set_SellerOrganisationTaxCode(self, SellerOrganisationTaxCode): self.SellerOrganisationTaxCode = SellerOrganisationTaxCode
    def get_SellerOrganisationTaxCodeUrlText(self): return self.SellerOrganisationTaxCodeUrlText
    def set_SellerOrganisationTaxCodeUrlText(self, SellerOrganisationTaxCodeUrlText): self.SellerOrganisationTaxCodeUrlText = SellerOrganisationTaxCodeUrlText
    def get_SellerCode(self): return self.SellerCode
    def set_SellerCode(self, SellerCode): self.SellerCode = SellerCode
    def get_SellerPostalAddressDetails(self): return self.SellerPostalAddressDetails
    def set_SellerPostalAddressDetails(self, SellerPostalAddressDetails): self.SellerPostalAddressDetails = SellerPostalAddressDetails
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_512(self, value):
        # Validate type genericStringType0_512, a restriction on xs:string.
        pass
    def validate_genericStringType2_70(self, value):
        # Validate type genericStringType2_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SellerPartyIdentifier is not None or
            self.SellerPartyIdentifierUrlText is not None or
            self.SellerOrganisationName or
            self.SellerOrganisationDepartment or
            self.SellerOrganisationTaxCode is not None or
            self.SellerOrganisationTaxCodeUrlText is not None or
            self.SellerCode is not None or
            self.SellerPostalAddressDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SellerPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SellerPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SellerPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SellerPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SellerPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SellerPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerPartyIdentifier>%s</%sSellerPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerPartyIdentifier).encode(ExternalEncoding), input_name='SellerPartyIdentifier'), namespace_, eol_))
        if self.SellerPartyIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerPartyIdentifierUrlText>%s</%sSellerPartyIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerPartyIdentifierUrlText).encode(ExternalEncoding), input_name='SellerPartyIdentifierUrlText'), namespace_, eol_))
        for SellerOrganisationName_ in self.SellerOrganisationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerOrganisationName>%s</%sSellerOrganisationName>%s' % (namespace_, self.gds_format_string(quote_xml(SellerOrganisationName_).encode(ExternalEncoding), input_name='SellerOrganisationName'), namespace_, eol_))
        for SellerOrganisationDepartment_ in self.SellerOrganisationDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerOrganisationDepartment>%s</%sSellerOrganisationDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(SellerOrganisationDepartment_).encode(ExternalEncoding), input_name='SellerOrganisationDepartment'), namespace_, eol_))
        if self.SellerOrganisationTaxCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerOrganisationTaxCode>%s</%sSellerOrganisationTaxCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerOrganisationTaxCode).encode(ExternalEncoding), input_name='SellerOrganisationTaxCode'), namespace_, eol_))
        if self.SellerOrganisationTaxCodeUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerOrganisationTaxCodeUrlText>%s</%sSellerOrganisationTaxCodeUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerOrganisationTaxCodeUrlText).encode(ExternalEncoding), input_name='SellerOrganisationTaxCodeUrlText'), namespace_, eol_))
        if self.SellerCode is not None:
            self.SellerCode.export(outfile, level, namespace_, name_='SellerCode', pretty_print=pretty_print)
        if self.SellerPostalAddressDetails is not None:
            self.SellerPostalAddressDetails.export(outfile, level, namespace_, name_='SellerPostalAddressDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SellerPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SellerPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellerPartyIdentifier=%s,\n' % quote_python(self.SellerPartyIdentifier).encode(ExternalEncoding))
        if self.SellerPartyIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SellerPartyIdentifierUrlText=%s,\n' % quote_python(self.SellerPartyIdentifierUrlText).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SellerOrganisationName=[\n')
        level += 1
        for SellerOrganisationName_ in self.SellerOrganisationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SellerOrganisationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('SellerOrganisationDepartment=[\n')
        level += 1
        for SellerOrganisationDepartment_ in self.SellerOrganisationDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SellerOrganisationDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SellerOrganisationTaxCode is not None:
            showIndent(outfile, level)
            outfile.write('SellerOrganisationTaxCode=%s,\n' % quote_python(self.SellerOrganisationTaxCode).encode(ExternalEncoding))
        if self.SellerOrganisationTaxCodeUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SellerOrganisationTaxCodeUrlText=%s,\n' % quote_python(self.SellerOrganisationTaxCodeUrlText).encode(ExternalEncoding))
        if self.SellerCode is not None:
            showIndent(outfile, level)
            outfile.write('SellerCode=model_.PartyIdentifierType(\n')
            self.SellerCode.exportLiteral(outfile, level, name_='SellerCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SellerPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('SellerPostalAddressDetails=model_.SellerPostalAddressDetailsType(\n')
            self.SellerPostalAddressDetails.exportLiteral(outfile, level, name_='SellerPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SellerPartyIdentifier':
            SellerPartyIdentifier_ = child_.text
            SellerPartyIdentifier_ = self.gds_validate_string(SellerPartyIdentifier_, node, 'SellerPartyIdentifier')
            self.SellerPartyIdentifier = SellerPartyIdentifier_
            self.validate_genericStringType0_35(self.SellerPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerPartyIdentifierUrlText':
            SellerPartyIdentifierUrlText_ = child_.text
            SellerPartyIdentifierUrlText_ = self.gds_validate_string(SellerPartyIdentifierUrlText_, node, 'SellerPartyIdentifierUrlText')
            self.SellerPartyIdentifierUrlText = SellerPartyIdentifierUrlText_
            self.validate_genericStringType0_512(self.SellerPartyIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'SellerOrganisationName':
            SellerOrganisationName_ = child_.text
            SellerOrganisationName_ = self.gds_validate_string(SellerOrganisationName_, node, 'SellerOrganisationName')
            self.SellerOrganisationName.append(SellerOrganisationName_)
            self.validate_genericStringType2_70(self.SellerOrganisationName)    # validate type genericStringType2_70
        elif nodeName_ == 'SellerOrganisationDepartment':
            SellerOrganisationDepartment_ = child_.text
            SellerOrganisationDepartment_ = self.gds_validate_string(SellerOrganisationDepartment_, node, 'SellerOrganisationDepartment')
            self.SellerOrganisationDepartment.append(SellerOrganisationDepartment_)
            self.validate_genericStringType0_35(self.SellerOrganisationDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerOrganisationTaxCode':
            SellerOrganisationTaxCode_ = child_.text
            SellerOrganisationTaxCode_ = self.gds_validate_string(SellerOrganisationTaxCode_, node, 'SellerOrganisationTaxCode')
            self.SellerOrganisationTaxCode = SellerOrganisationTaxCode_
            self.validate_genericStringType0_35(self.SellerOrganisationTaxCode)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerOrganisationTaxCodeUrlText':
            SellerOrganisationTaxCodeUrlText_ = child_.text
            SellerOrganisationTaxCodeUrlText_ = self.gds_validate_string(SellerOrganisationTaxCodeUrlText_, node, 'SellerOrganisationTaxCodeUrlText')
            self.SellerOrganisationTaxCodeUrlText = SellerOrganisationTaxCodeUrlText_
            self.validate_genericStringType0_512(self.SellerOrganisationTaxCodeUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'SellerCode':
            obj_ = PartyIdentifierType.factory()
            obj_.build(child_)
            self.SellerCode = obj_
            obj_.original_tagname_ = 'SellerCode'
        elif nodeName_ == 'SellerPostalAddressDetails':
            obj_ = SellerPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.SellerPostalAddressDetails = obj_
            obj_.original_tagname_ = 'SellerPostalAddressDetails'
# end class SellerPartyDetailsType


class SellerPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SellerStreetName=None, SellerTownName=None, SellerPostCodeIdentifier=None, CountryCode=None, CountryName=None, SellerPostOfficeBoxIdentifier=None):
        self.original_tagname_ = None
        if SellerStreetName is None:
            self.SellerStreetName = []
        else:
            self.SellerStreetName = SellerStreetName
        self.SellerTownName = SellerTownName
        self.SellerPostCodeIdentifier = SellerPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
        self.SellerPostOfficeBoxIdentifier = SellerPostOfficeBoxIdentifier
    def factory(*args_, **kwargs_):
        if SellerPostalAddressDetailsType.subclass:
            return SellerPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return SellerPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SellerStreetName(self): return self.SellerStreetName
    def set_SellerStreetName(self, SellerStreetName): self.SellerStreetName = SellerStreetName
    def add_SellerStreetName(self, value): self.SellerStreetName.append(value)
    def insert_SellerStreetName_at(self, index, value): self.SellerStreetName.insert(index, value)
    def replace_SellerStreetName_at(self, index, value): self.SellerStreetName[index] = value
    def get_SellerTownName(self): return self.SellerTownName
    def set_SellerTownName(self, SellerTownName): self.SellerTownName = SellerTownName
    def get_SellerPostCodeIdentifier(self): return self.SellerPostCodeIdentifier
    def set_SellerPostCodeIdentifier(self, SellerPostCodeIdentifier): self.SellerPostCodeIdentifier = SellerPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def get_SellerPostOfficeBoxIdentifier(self): return self.SellerPostOfficeBoxIdentifier
    def set_SellerPostOfficeBoxIdentifier(self, SellerPostOfficeBoxIdentifier): self.SellerPostOfficeBoxIdentifier = SellerPostOfficeBoxIdentifier
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SellerStreetName or
            self.SellerTownName is not None or
            self.SellerPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None or
            self.SellerPostOfficeBoxIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SellerPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SellerPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SellerPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SellerPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SellerPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SellerStreetName_ in self.SellerStreetName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerStreetName>%s</%sSellerStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(SellerStreetName_).encode(ExternalEncoding), input_name='SellerStreetName'), namespace_, eol_))
        if self.SellerTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerTownName>%s</%sSellerTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerTownName).encode(ExternalEncoding), input_name='SellerTownName'), namespace_, eol_))
        if self.SellerPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerPostCodeIdentifier>%s</%sSellerPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerPostCodeIdentifier).encode(ExternalEncoding), input_name='SellerPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
        if self.SellerPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerPostOfficeBoxIdentifier>%s</%sSellerPostOfficeBoxIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerPostOfficeBoxIdentifier).encode(ExternalEncoding), input_name='SellerPostOfficeBoxIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='SellerPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('SellerStreetName=[\n')
        level += 1
        for SellerStreetName_ in self.SellerStreetName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SellerStreetName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SellerTownName is not None:
            showIndent(outfile, level)
            outfile.write('SellerTownName=%s,\n' % quote_python(self.SellerTownName).encode(ExternalEncoding))
        if self.SellerPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellerPostCodeIdentifier=%s,\n' % quote_python(self.SellerPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
        if self.SellerPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellerPostOfficeBoxIdentifier=%s,\n' % quote_python(self.SellerPostOfficeBoxIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SellerStreetName':
            SellerStreetName_ = child_.text
            SellerStreetName_ = self.gds_validate_string(SellerStreetName_, node, 'SellerStreetName')
            self.SellerStreetName.append(SellerStreetName_)
            self.validate_genericStringType2_35(self.SellerStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'SellerTownName':
            SellerTownName_ = child_.text
            SellerTownName_ = self.gds_validate_string(SellerTownName_, node, 'SellerTownName')
            self.SellerTownName = SellerTownName_
            self.validate_genericStringType2_35(self.SellerTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'SellerPostCodeIdentifier':
            SellerPostCodeIdentifier_ = child_.text
            SellerPostCodeIdentifier_ = self.gds_validate_string(SellerPostCodeIdentifier_, node, 'SellerPostCodeIdentifier')
            self.SellerPostCodeIdentifier = SellerPostCodeIdentifier_
            self.validate_genericStringType2_35(self.SellerPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'SellerPostOfficeBoxIdentifier':
            SellerPostOfficeBoxIdentifier_ = child_.text
            SellerPostOfficeBoxIdentifier_ = self.gds_validate_string(SellerPostOfficeBoxIdentifier_, node, 'SellerPostOfficeBoxIdentifier')
            self.SellerPostOfficeBoxIdentifier = SellerPostOfficeBoxIdentifier_
            self.validate_genericStringType0_35(self.SellerPostOfficeBoxIdentifier)    # validate type genericStringType0_35
# end class SellerPostalAddressDetailsType


class AnyPartyCommunicationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AnyPartyPhoneNumberIdentifier=None, AnyPartyEmailAddressIdentifier=None):
        self.original_tagname_ = None
        self.AnyPartyPhoneNumberIdentifier = AnyPartyPhoneNumberIdentifier
        self.AnyPartyEmailAddressIdentifier = AnyPartyEmailAddressIdentifier
    def factory(*args_, **kwargs_):
        if AnyPartyCommunicationDetailsType.subclass:
            return AnyPartyCommunicationDetailsType.subclass(*args_, **kwargs_)
        else:
            return AnyPartyCommunicationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AnyPartyPhoneNumberIdentifier(self): return self.AnyPartyPhoneNumberIdentifier
    def set_AnyPartyPhoneNumberIdentifier(self, AnyPartyPhoneNumberIdentifier): self.AnyPartyPhoneNumberIdentifier = AnyPartyPhoneNumberIdentifier
    def get_AnyPartyEmailAddressIdentifier(self): return self.AnyPartyEmailAddressIdentifier
    def set_AnyPartyEmailAddressIdentifier(self, AnyPartyEmailAddressIdentifier): self.AnyPartyEmailAddressIdentifier = AnyPartyEmailAddressIdentifier
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.AnyPartyPhoneNumberIdentifier is not None or
            self.AnyPartyEmailAddressIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='AnyPartyCommunicationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AnyPartyCommunicationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='AnyPartyCommunicationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AnyPartyCommunicationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='AnyPartyCommunicationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AnyPartyPhoneNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyPhoneNumberIdentifier>%s</%sAnyPartyPhoneNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartyPhoneNumberIdentifier).encode(ExternalEncoding), input_name='AnyPartyPhoneNumberIdentifier'), namespace_, eol_))
        if self.AnyPartyEmailAddressIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyEmailAddressIdentifier>%s</%sAnyPartyEmailAddressIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartyEmailAddressIdentifier).encode(ExternalEncoding), input_name='AnyPartyEmailAddressIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='AnyPartyCommunicationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AnyPartyPhoneNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyPhoneNumberIdentifier=%s,\n' % quote_python(self.AnyPartyPhoneNumberIdentifier).encode(ExternalEncoding))
        if self.AnyPartyEmailAddressIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyEmailAddressIdentifier=%s,\n' % quote_python(self.AnyPartyEmailAddressIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AnyPartyPhoneNumberIdentifier':
            AnyPartyPhoneNumberIdentifier_ = child_.text
            AnyPartyPhoneNumberIdentifier_ = self.gds_validate_string(AnyPartyPhoneNumberIdentifier_, node, 'AnyPartyPhoneNumberIdentifier')
            self.AnyPartyPhoneNumberIdentifier = AnyPartyPhoneNumberIdentifier_
            self.validate_genericStringType0_35(self.AnyPartyPhoneNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'AnyPartyEmailAddressIdentifier':
            AnyPartyEmailAddressIdentifier_ = child_.text
            AnyPartyEmailAddressIdentifier_ = self.gds_validate_string(AnyPartyEmailAddressIdentifier_, node, 'AnyPartyEmailAddressIdentifier')
            self.AnyPartyEmailAddressIdentifier = AnyPartyEmailAddressIdentifier_
            self.validate_genericStringType0_70(self.AnyPartyEmailAddressIdentifier)    # validate type genericStringType0_70
# end class AnyPartyCommunicationDetailsType


class SpecificationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SpecificationFreeText=None, ExternalSpecificationDetails=None):
        self.original_tagname_ = None
        if SpecificationFreeText is None:
            self.SpecificationFreeText = []
        else:
            self.SpecificationFreeText = SpecificationFreeText
        self.ExternalSpecificationDetails = ExternalSpecificationDetails
    def factory(*args_, **kwargs_):
        if SpecificationDetailsType.subclass:
            return SpecificationDetailsType.subclass(*args_, **kwargs_)
        else:
            return SpecificationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SpecificationFreeText(self): return self.SpecificationFreeText
    def set_SpecificationFreeText(self, SpecificationFreeText): self.SpecificationFreeText = SpecificationFreeText
    def add_SpecificationFreeText(self, value): self.SpecificationFreeText.append(value)
    def insert_SpecificationFreeText_at(self, index, value): self.SpecificationFreeText.insert(index, value)
    def replace_SpecificationFreeText_at(self, index, value): self.SpecificationFreeText[index] = value
    def get_ExternalSpecificationDetails(self): return self.ExternalSpecificationDetails
    def set_ExternalSpecificationDetails(self, ExternalSpecificationDetails): self.ExternalSpecificationDetails = ExternalSpecificationDetails
    def validate_genericStringType0_80(self, value):
        # Validate type genericStringType0_80, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SpecificationFreeText or
            self.ExternalSpecificationDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SpecificationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SpecificationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SpecificationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SpecificationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SpecificationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpecificationFreeText_ in self.SpecificationFreeText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSpecificationFreeText>%s</%sSpecificationFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(SpecificationFreeText_).encode(ExternalEncoding), input_name='SpecificationFreeText'), namespace_, eol_))
        if self.ExternalSpecificationDetails is not None:
            self.ExternalSpecificationDetails.export(outfile, level, namespace_, name_='ExternalSpecificationDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SpecificationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('SpecificationFreeText=[\n')
        level += 1
        for SpecificationFreeText_ in self.SpecificationFreeText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SpecificationFreeText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.ExternalSpecificationDetails is not None:
            showIndent(outfile, level)
            outfile.write('ExternalSpecificationDetails=model_.ExternalSpecificationDetailsType(\n')
            self.ExternalSpecificationDetails.exportLiteral(outfile, level, name_='ExternalSpecificationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SpecificationFreeText':
            SpecificationFreeText_ = child_.text
            SpecificationFreeText_ = self.gds_validate_string(SpecificationFreeText_, node, 'SpecificationFreeText')
            self.SpecificationFreeText.append(SpecificationFreeText_)
            self.validate_genericStringType0_80(self.SpecificationFreeText)    # validate type genericStringType0_80
        elif nodeName_ == 'ExternalSpecificationDetails':
            obj_ = ExternalSpecificationDetailsType.factory()
            obj_.build(child_)
            self.ExternalSpecificationDetails = obj_
            obj_.original_tagname_ = 'ExternalSpecificationDetails'
# end class SpecificationDetailsType


class ExternalSpecificationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, anytypeobjs_=None):
        self.original_tagname_ = None
        if anytypeobjs_ is None:
            self.anytypeobjs_ = []
        else:
            self.anytypeobjs_ = anytypeobjs_
    def factory(*args_, **kwargs_):
        if ExternalSpecificationDetailsType.subclass:
            return ExternalSpecificationDetailsType.subclass(*args_, **kwargs_)
        else:
            return ExternalSpecificationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_anytypeobjs_(self): return self.anytypeobjs_
    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_
    def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value)
    def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value
    def hasContent_(self):
        if (
            self.anytypeobjs_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='ExternalSpecificationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ExternalSpecificationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='ExternalSpecificationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ExternalSpecificationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ExternalSpecificationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for obj_ in self.anytypeobjs_:
            obj_.export(outfile, level, namespace_, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ExternalSpecificationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('anytypeobjs_=[\n')
        level += 1
        for anytypeobjs_ in self.anytypeobjs_:
            anytypeobjs_.exportLiteral(outfile, level)
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        obj_ = self.gds_build_any(child_, 'ExternalSpecificationDetailsType')
        if obj_ is not None:
            self.add_anytypeobjs_(obj_)
# end class ExternalSpecificationDetailsType


class SubInvoiceRowType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SubIdentifier=None, SubRowPositionIdentifier=None, SubArticleIdentifier=None, SubArticleGroupIdentifier=None, SubArticleName=None, SubArticleInfoUrlText=None, SubBuyerArticleIdentifier=None, SubEanCode=None, SubRowRegistrationNumberIdentifier=None, SubSerialNumberIdentifier=None, SubRowActionCode=None, SubRowDefinitionDetails=None, SubOfferedQuantity=None, SubDeliveredQuantity=None, SubOrderedQuantity=None, SubConfirmedQuantity=None, SubPostDeliveredQuantity=None, SubInvoicedQuantity=None, SubCreditRequestedQuantity=None, SubReturnedQuantity=None, SubStartDate=None, SubEndDate=None, SubUnitPriceAmount=None, SubUnitPriceVatIncludedAmount=None, SubUnitPriceBaseQuantity=None, SubRowIdentifier=None, SubRowIdentifierUrlText=None, SubRowIdentifierDate=None, SubRowOrdererName=None, SubRowSalesPersonName=None, SubRowOrderConfirmationIdentifier=None, SubRowOrderConfirmationDate=None, SubOriginalInvoiceNumber=None, SubRowDeliveryIdentifier=None, SubRowDeliveryIdentifierUrlText=None, SubRowDeliveryDate=None, SubRowQuotationIdentifier=None, SubRowQuotationIdentifierUrlText=None, SubRowAgreementIdentifier=None, SubRowAgreementIdentifierUrlText=None, SubRowRequestOfQuotationIdentifier=None, SubRowRequestOfQuotationIdentifierUrlText=None, SubRowPriceListIdentifier=None, SubRowPriceListIdentifierUrlText=None, SubRowProjectReferenceIdentifier=None, SubRowOverDuePaymentDetails=None, SubRowAnyPartyDetails=None, SubRowDeliveryDetails=None, SubRowShortProposedAccountIdentifier=None, SubRowNormalProposedAccountIdentifier=None, SubRowProposedAccountText=None, SubRowAccountDimensionText=None, SubRowSellerAccountText=None, SubRowFreeText=None, SubRowUsedQuantity=None, SubRowPreviousMeterReadingDate=None, SubRowLatestMeterReadingDate=None, SubRowCalculatedQuantity=None, SubRowAveragePriceAmount=None, SubRowDiscountPercent=None, SubRowDiscountAmount=None, SubRowDiscountTypeCode=None, SubRowDiscountTypeText=None, SubRowProgressiveDiscountDetails=None, SubRowVatRatePercent=None, SubRowVatCode=None, SubRowVatAmount=None, SubRowVatExcludedAmount=None, SubRowAmount=None, SubRowTransactionDetails=None):
        self.original_tagname_ = None
        self.SubIdentifier = SubIdentifier
        self.SubRowPositionIdentifier = SubRowPositionIdentifier
        self.SubArticleIdentifier = SubArticleIdentifier
        self.SubArticleGroupIdentifier = SubArticleGroupIdentifier
        self.SubArticleName = SubArticleName
        self.SubArticleInfoUrlText = SubArticleInfoUrlText
        self.SubBuyerArticleIdentifier = SubBuyerArticleIdentifier
        self.SubEanCode = SubEanCode
        self.SubRowRegistrationNumberIdentifier = SubRowRegistrationNumberIdentifier
        self.SubSerialNumberIdentifier = SubSerialNumberIdentifier
        self.SubRowActionCode = SubRowActionCode
        if SubRowDefinitionDetails is None:
            self.SubRowDefinitionDetails = []
        else:
            self.SubRowDefinitionDetails = SubRowDefinitionDetails
        if SubOfferedQuantity is None:
            self.SubOfferedQuantity = []
        else:
            self.SubOfferedQuantity = SubOfferedQuantity
        if SubDeliveredQuantity is None:
            self.SubDeliveredQuantity = []
        else:
            self.SubDeliveredQuantity = SubDeliveredQuantity
        self.SubOrderedQuantity = SubOrderedQuantity
        self.SubConfirmedQuantity = SubConfirmedQuantity
        self.SubPostDeliveredQuantity = SubPostDeliveredQuantity
        if SubInvoicedQuantity is None:
            self.SubInvoicedQuantity = []
        else:
            self.SubInvoicedQuantity = SubInvoicedQuantity
        self.SubCreditRequestedQuantity = SubCreditRequestedQuantity
        self.SubReturnedQuantity = SubReturnedQuantity
        self.SubStartDate = SubStartDate
        self.SubEndDate = SubEndDate
        self.SubUnitPriceAmount = SubUnitPriceAmount
        self.SubUnitPriceVatIncludedAmount = SubUnitPriceVatIncludedAmount
        self.SubUnitPriceBaseQuantity = SubUnitPriceBaseQuantity
        self.SubRowIdentifier = SubRowIdentifier
        self.SubRowIdentifierUrlText = SubRowIdentifierUrlText
        self.SubRowIdentifierDate = SubRowIdentifierDate
        self.SubRowOrdererName = SubRowOrdererName
        self.SubRowSalesPersonName = SubRowSalesPersonName
        self.SubRowOrderConfirmationIdentifier = SubRowOrderConfirmationIdentifier
        self.SubRowOrderConfirmationDate = SubRowOrderConfirmationDate
        self.SubOriginalInvoiceNumber = SubOriginalInvoiceNumber
        self.SubRowDeliveryIdentifier = SubRowDeliveryIdentifier
        self.SubRowDeliveryIdentifierUrlText = SubRowDeliveryIdentifierUrlText
        self.SubRowDeliveryDate = SubRowDeliveryDate
        self.SubRowQuotationIdentifier = SubRowQuotationIdentifier
        self.SubRowQuotationIdentifierUrlText = SubRowQuotationIdentifierUrlText
        self.SubRowAgreementIdentifier = SubRowAgreementIdentifier
        self.SubRowAgreementIdentifierUrlText = SubRowAgreementIdentifierUrlText
        self.SubRowRequestOfQuotationIdentifier = SubRowRequestOfQuotationIdentifier
        self.SubRowRequestOfQuotationIdentifierUrlText = SubRowRequestOfQuotationIdentifierUrlText
        self.SubRowPriceListIdentifier = SubRowPriceListIdentifier
        self.SubRowPriceListIdentifierUrlText = SubRowPriceListIdentifierUrlText
        self.SubRowProjectReferenceIdentifier = SubRowProjectReferenceIdentifier
        self.SubRowOverDuePaymentDetails = SubRowOverDuePaymentDetails
        if SubRowAnyPartyDetails is None:
            self.SubRowAnyPartyDetails = []
        else:
            self.SubRowAnyPartyDetails = SubRowAnyPartyDetails
        self.SubRowDeliveryDetails = SubRowDeliveryDetails
        self.SubRowShortProposedAccountIdentifier = SubRowShortProposedAccountIdentifier
        self.SubRowNormalProposedAccountIdentifier = SubRowNormalProposedAccountIdentifier
        self.SubRowProposedAccountText = SubRowProposedAccountText
        self.SubRowAccountDimensionText = SubRowAccountDimensionText
        self.SubRowSellerAccountText = SubRowSellerAccountText
        if SubRowFreeText is None:
            self.SubRowFreeText = []
        else:
            self.SubRowFreeText = SubRowFreeText
        self.SubRowUsedQuantity = SubRowUsedQuantity
        self.SubRowPreviousMeterReadingDate = SubRowPreviousMeterReadingDate
        self.SubRowLatestMeterReadingDate = SubRowLatestMeterReadingDate
        self.SubRowCalculatedQuantity = SubRowCalculatedQuantity
        self.SubRowAveragePriceAmount = SubRowAveragePriceAmount
        self.SubRowDiscountPercent = SubRowDiscountPercent
        self.SubRowDiscountAmount = SubRowDiscountAmount
        self.SubRowDiscountTypeCode = SubRowDiscountTypeCode
        self.SubRowDiscountTypeText = SubRowDiscountTypeText
        if SubRowProgressiveDiscountDetails is None:
            self.SubRowProgressiveDiscountDetails = []
        else:
            self.SubRowProgressiveDiscountDetails = SubRowProgressiveDiscountDetails
        self.SubRowVatRatePercent = SubRowVatRatePercent
        self.SubRowVatCode = SubRowVatCode
        self.SubRowVatAmount = SubRowVatAmount
        self.SubRowVatExcludedAmount = SubRowVatExcludedAmount
        self.SubRowAmount = SubRowAmount
        self.SubRowTransactionDetails = SubRowTransactionDetails
    def factory(*args_, **kwargs_):
        if SubInvoiceRowType.subclass:
            return SubInvoiceRowType.subclass(*args_, **kwargs_)
        else:
            return SubInvoiceRowType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SubIdentifier(self): return self.SubIdentifier
    def set_SubIdentifier(self, SubIdentifier): self.SubIdentifier = SubIdentifier
    def get_SubRowPositionIdentifier(self): return self.SubRowPositionIdentifier
    def set_SubRowPositionIdentifier(self, SubRowPositionIdentifier): self.SubRowPositionIdentifier = SubRowPositionIdentifier
    def get_SubArticleIdentifier(self): return self.SubArticleIdentifier
    def set_SubArticleIdentifier(self, SubArticleIdentifier): self.SubArticleIdentifier = SubArticleIdentifier
    def get_SubArticleGroupIdentifier(self): return self.SubArticleGroupIdentifier
    def set_SubArticleGroupIdentifier(self, SubArticleGroupIdentifier): self.SubArticleGroupIdentifier = SubArticleGroupIdentifier
    def get_SubArticleName(self): return self.SubArticleName
    def set_SubArticleName(self, SubArticleName): self.SubArticleName = SubArticleName
    def get_SubArticleInfoUrlText(self): return self.SubArticleInfoUrlText
    def set_SubArticleInfoUrlText(self, SubArticleInfoUrlText): self.SubArticleInfoUrlText = SubArticleInfoUrlText
    def get_SubBuyerArticleIdentifier(self): return self.SubBuyerArticleIdentifier
    def set_SubBuyerArticleIdentifier(self, SubBuyerArticleIdentifier): self.SubBuyerArticleIdentifier = SubBuyerArticleIdentifier
    def get_SubEanCode(self): return self.SubEanCode
    def set_SubEanCode(self, SubEanCode): self.SubEanCode = SubEanCode
    def get_SubRowRegistrationNumberIdentifier(self): return self.SubRowRegistrationNumberIdentifier
    def set_SubRowRegistrationNumberIdentifier(self, SubRowRegistrationNumberIdentifier): self.SubRowRegistrationNumberIdentifier = SubRowRegistrationNumberIdentifier
    def get_SubSerialNumberIdentifier(self): return self.SubSerialNumberIdentifier
    def set_SubSerialNumberIdentifier(self, SubSerialNumberIdentifier): self.SubSerialNumberIdentifier = SubSerialNumberIdentifier
    def get_SubRowActionCode(self): return self.SubRowActionCode
    def set_SubRowActionCode(self, SubRowActionCode): self.SubRowActionCode = SubRowActionCode
    def get_SubRowDefinitionDetails(self): return self.SubRowDefinitionDetails
    def set_SubRowDefinitionDetails(self, SubRowDefinitionDetails): self.SubRowDefinitionDetails = SubRowDefinitionDetails
    def add_SubRowDefinitionDetails(self, value): self.SubRowDefinitionDetails.append(value)
    def insert_SubRowDefinitionDetails_at(self, index, value): self.SubRowDefinitionDetails.insert(index, value)
    def replace_SubRowDefinitionDetails_at(self, index, value): self.SubRowDefinitionDetails[index] = value
    def get_SubOfferedQuantity(self): return self.SubOfferedQuantity
    def set_SubOfferedQuantity(self, SubOfferedQuantity): self.SubOfferedQuantity = SubOfferedQuantity
    def add_SubOfferedQuantity(self, value): self.SubOfferedQuantity.append(value)
    def insert_SubOfferedQuantity_at(self, index, value): self.SubOfferedQuantity.insert(index, value)
    def replace_SubOfferedQuantity_at(self, index, value): self.SubOfferedQuantity[index] = value
    def get_SubDeliveredQuantity(self): return self.SubDeliveredQuantity
    def set_SubDeliveredQuantity(self, SubDeliveredQuantity): self.SubDeliveredQuantity = SubDeliveredQuantity
    def add_SubDeliveredQuantity(self, value): self.SubDeliveredQuantity.append(value)
    def insert_SubDeliveredQuantity_at(self, index, value): self.SubDeliveredQuantity.insert(index, value)
    def replace_SubDeliveredQuantity_at(self, index, value): self.SubDeliveredQuantity[index] = value
    def get_SubOrderedQuantity(self): return self.SubOrderedQuantity
    def set_SubOrderedQuantity(self, SubOrderedQuantity): self.SubOrderedQuantity = SubOrderedQuantity
    def get_SubConfirmedQuantity(self): return self.SubConfirmedQuantity
    def set_SubConfirmedQuantity(self, SubConfirmedQuantity): self.SubConfirmedQuantity = SubConfirmedQuantity
    def get_SubPostDeliveredQuantity(self): return self.SubPostDeliveredQuantity
    def set_SubPostDeliveredQuantity(self, SubPostDeliveredQuantity): self.SubPostDeliveredQuantity = SubPostDeliveredQuantity
    def get_SubInvoicedQuantity(self): return self.SubInvoicedQuantity
    def set_SubInvoicedQuantity(self, SubInvoicedQuantity): self.SubInvoicedQuantity = SubInvoicedQuantity
    def add_SubInvoicedQuantity(self, value): self.SubInvoicedQuantity.append(value)
    def insert_SubInvoicedQuantity_at(self, index, value): self.SubInvoicedQuantity.insert(index, value)
    def replace_SubInvoicedQuantity_at(self, index, value): self.SubInvoicedQuantity[index] = value
    def get_SubCreditRequestedQuantity(self): return self.SubCreditRequestedQuantity
    def set_SubCreditRequestedQuantity(self, SubCreditRequestedQuantity): self.SubCreditRequestedQuantity = SubCreditRequestedQuantity
    def get_SubReturnedQuantity(self): return self.SubReturnedQuantity
    def set_SubReturnedQuantity(self, SubReturnedQuantity): self.SubReturnedQuantity = SubReturnedQuantity
    def get_SubStartDate(self): return self.SubStartDate
    def set_SubStartDate(self, SubStartDate): self.SubStartDate = SubStartDate
    def get_SubEndDate(self): return self.SubEndDate
    def set_SubEndDate(self, SubEndDate): self.SubEndDate = SubEndDate
    def get_SubUnitPriceAmount(self): return self.SubUnitPriceAmount
    def set_SubUnitPriceAmount(self, SubUnitPriceAmount): self.SubUnitPriceAmount = SubUnitPriceAmount
    def get_SubUnitPriceVatIncludedAmount(self): return self.SubUnitPriceVatIncludedAmount
    def set_SubUnitPriceVatIncludedAmount(self, SubUnitPriceVatIncludedAmount): self.SubUnitPriceVatIncludedAmount = SubUnitPriceVatIncludedAmount
    def get_SubUnitPriceBaseQuantity(self): return self.SubUnitPriceBaseQuantity
    def set_SubUnitPriceBaseQuantity(self, SubUnitPriceBaseQuantity): self.SubUnitPriceBaseQuantity = SubUnitPriceBaseQuantity
    def get_SubRowIdentifier(self): return self.SubRowIdentifier
    def set_SubRowIdentifier(self, SubRowIdentifier): self.SubRowIdentifier = SubRowIdentifier
    def get_SubRowIdentifierUrlText(self): return self.SubRowIdentifierUrlText
    def set_SubRowIdentifierUrlText(self, SubRowIdentifierUrlText): self.SubRowIdentifierUrlText = SubRowIdentifierUrlText
    def get_SubRowIdentifierDate(self): return self.SubRowIdentifierDate
    def set_SubRowIdentifierDate(self, SubRowIdentifierDate): self.SubRowIdentifierDate = SubRowIdentifierDate
    def get_SubRowOrdererName(self): return self.SubRowOrdererName
    def set_SubRowOrdererName(self, SubRowOrdererName): self.SubRowOrdererName = SubRowOrdererName
    def get_SubRowSalesPersonName(self): return self.SubRowSalesPersonName
    def set_SubRowSalesPersonName(self, SubRowSalesPersonName): self.SubRowSalesPersonName = SubRowSalesPersonName
    def get_SubRowOrderConfirmationIdentifier(self): return self.SubRowOrderConfirmationIdentifier
    def set_SubRowOrderConfirmationIdentifier(self, SubRowOrderConfirmationIdentifier): self.SubRowOrderConfirmationIdentifier = SubRowOrderConfirmationIdentifier
    def get_SubRowOrderConfirmationDate(self): return self.SubRowOrderConfirmationDate
    def set_SubRowOrderConfirmationDate(self, SubRowOrderConfirmationDate): self.SubRowOrderConfirmationDate = SubRowOrderConfirmationDate
    def get_SubOriginalInvoiceNumber(self): return self.SubOriginalInvoiceNumber
    def set_SubOriginalInvoiceNumber(self, SubOriginalInvoiceNumber): self.SubOriginalInvoiceNumber = SubOriginalInvoiceNumber
    def get_SubRowDeliveryIdentifier(self): return self.SubRowDeliveryIdentifier
    def set_SubRowDeliveryIdentifier(self, SubRowDeliveryIdentifier): self.SubRowDeliveryIdentifier = SubRowDeliveryIdentifier
    def get_SubRowDeliveryIdentifierUrlText(self): return self.SubRowDeliveryIdentifierUrlText
    def set_SubRowDeliveryIdentifierUrlText(self, SubRowDeliveryIdentifierUrlText): self.SubRowDeliveryIdentifierUrlText = SubRowDeliveryIdentifierUrlText
    def get_SubRowDeliveryDate(self): return self.SubRowDeliveryDate
    def set_SubRowDeliveryDate(self, SubRowDeliveryDate): self.SubRowDeliveryDate = SubRowDeliveryDate
    def get_SubRowQuotationIdentifier(self): return self.SubRowQuotationIdentifier
    def set_SubRowQuotationIdentifier(self, SubRowQuotationIdentifier): self.SubRowQuotationIdentifier = SubRowQuotationIdentifier
    def get_SubRowQuotationIdentifierUrlText(self): return self.SubRowQuotationIdentifierUrlText
    def set_SubRowQuotationIdentifierUrlText(self, SubRowQuotationIdentifierUrlText): self.SubRowQuotationIdentifierUrlText = SubRowQuotationIdentifierUrlText
    def get_SubRowAgreementIdentifier(self): return self.SubRowAgreementIdentifier
    def set_SubRowAgreementIdentifier(self, SubRowAgreementIdentifier): self.SubRowAgreementIdentifier = SubRowAgreementIdentifier
    def get_SubRowAgreementIdentifierUrlText(self): return self.SubRowAgreementIdentifierUrlText
    def set_SubRowAgreementIdentifierUrlText(self, SubRowAgreementIdentifierUrlText): self.SubRowAgreementIdentifierUrlText = SubRowAgreementIdentifierUrlText
    def get_SubRowRequestOfQuotationIdentifier(self): return self.SubRowRequestOfQuotationIdentifier
    def set_SubRowRequestOfQuotationIdentifier(self, SubRowRequestOfQuotationIdentifier): self.SubRowRequestOfQuotationIdentifier = SubRowRequestOfQuotationIdentifier
    def get_SubRowRequestOfQuotationIdentifierUrlText(self): return self.SubRowRequestOfQuotationIdentifierUrlText
    def set_SubRowRequestOfQuotationIdentifierUrlText(self, SubRowRequestOfQuotationIdentifierUrlText): self.SubRowRequestOfQuotationIdentifierUrlText = SubRowRequestOfQuotationIdentifierUrlText
    def get_SubRowPriceListIdentifier(self): return self.SubRowPriceListIdentifier
    def set_SubRowPriceListIdentifier(self, SubRowPriceListIdentifier): self.SubRowPriceListIdentifier = SubRowPriceListIdentifier
    def get_SubRowPriceListIdentifierUrlText(self): return self.SubRowPriceListIdentifierUrlText
    def set_SubRowPriceListIdentifierUrlText(self, SubRowPriceListIdentifierUrlText): self.SubRowPriceListIdentifierUrlText = SubRowPriceListIdentifierUrlText
    def get_SubRowProjectReferenceIdentifier(self): return self.SubRowProjectReferenceIdentifier
    def set_SubRowProjectReferenceIdentifier(self, SubRowProjectReferenceIdentifier): self.SubRowProjectReferenceIdentifier = SubRowProjectReferenceIdentifier
    def get_SubRowOverDuePaymentDetails(self): return self.SubRowOverDuePaymentDetails
    def set_SubRowOverDuePaymentDetails(self, SubRowOverDuePaymentDetails): self.SubRowOverDuePaymentDetails = SubRowOverDuePaymentDetails
    def get_SubRowAnyPartyDetails(self): return self.SubRowAnyPartyDetails
    def set_SubRowAnyPartyDetails(self, SubRowAnyPartyDetails): self.SubRowAnyPartyDetails = SubRowAnyPartyDetails
    def add_SubRowAnyPartyDetails(self, value): self.SubRowAnyPartyDetails.append(value)
    def insert_SubRowAnyPartyDetails_at(self, index, value): self.SubRowAnyPartyDetails.insert(index, value)
    def replace_SubRowAnyPartyDetails_at(self, index, value): self.SubRowAnyPartyDetails[index] = value
    def get_SubRowDeliveryDetails(self): return self.SubRowDeliveryDetails
    def set_SubRowDeliveryDetails(self, SubRowDeliveryDetails): self.SubRowDeliveryDetails = SubRowDeliveryDetails
    def get_SubRowShortProposedAccountIdentifier(self): return self.SubRowShortProposedAccountIdentifier
    def set_SubRowShortProposedAccountIdentifier(self, SubRowShortProposedAccountIdentifier): self.SubRowShortProposedAccountIdentifier = SubRowShortProposedAccountIdentifier
    def get_SubRowNormalProposedAccountIdentifier(self): return self.SubRowNormalProposedAccountIdentifier
    def set_SubRowNormalProposedAccountIdentifier(self, SubRowNormalProposedAccountIdentifier): self.SubRowNormalProposedAccountIdentifier = SubRowNormalProposedAccountIdentifier
    def get_SubRowProposedAccountText(self): return self.SubRowProposedAccountText
    def set_SubRowProposedAccountText(self, SubRowProposedAccountText): self.SubRowProposedAccountText = SubRowProposedAccountText
    def get_SubRowAccountDimensionText(self): return self.SubRowAccountDimensionText
    def set_SubRowAccountDimensionText(self, SubRowAccountDimensionText): self.SubRowAccountDimensionText = SubRowAccountDimensionText
    def get_SubRowSellerAccountText(self): return self.SubRowSellerAccountText
    def set_SubRowSellerAccountText(self, SubRowSellerAccountText): self.SubRowSellerAccountText = SubRowSellerAccountText
    def get_SubRowFreeText(self): return self.SubRowFreeText
    def set_SubRowFreeText(self, SubRowFreeText): self.SubRowFreeText = SubRowFreeText
    def add_SubRowFreeText(self, value): self.SubRowFreeText.append(value)
    def insert_SubRowFreeText_at(self, index, value): self.SubRowFreeText.insert(index, value)
    def replace_SubRowFreeText_at(self, index, value): self.SubRowFreeText[index] = value
    def get_SubRowUsedQuantity(self): return self.SubRowUsedQuantity
    def set_SubRowUsedQuantity(self, SubRowUsedQuantity): self.SubRowUsedQuantity = SubRowUsedQuantity
    def get_SubRowPreviousMeterReadingDate(self): return self.SubRowPreviousMeterReadingDate
    def set_SubRowPreviousMeterReadingDate(self, SubRowPreviousMeterReadingDate): self.SubRowPreviousMeterReadingDate = SubRowPreviousMeterReadingDate
    def get_SubRowLatestMeterReadingDate(self): return self.SubRowLatestMeterReadingDate
    def set_SubRowLatestMeterReadingDate(self, SubRowLatestMeterReadingDate): self.SubRowLatestMeterReadingDate = SubRowLatestMeterReadingDate
    def get_SubRowCalculatedQuantity(self): return self.SubRowCalculatedQuantity
    def set_SubRowCalculatedQuantity(self, SubRowCalculatedQuantity): self.SubRowCalculatedQuantity = SubRowCalculatedQuantity
    def get_SubRowAveragePriceAmount(self): return self.SubRowAveragePriceAmount
    def set_SubRowAveragePriceAmount(self, SubRowAveragePriceAmount): self.SubRowAveragePriceAmount = SubRowAveragePriceAmount
    def get_SubRowDiscountPercent(self): return self.SubRowDiscountPercent
    def set_SubRowDiscountPercent(self, SubRowDiscountPercent): self.SubRowDiscountPercent = SubRowDiscountPercent
    def get_SubRowDiscountAmount(self): return self.SubRowDiscountAmount
    def set_SubRowDiscountAmount(self, SubRowDiscountAmount): self.SubRowDiscountAmount = SubRowDiscountAmount
    def get_SubRowDiscountTypeCode(self): return self.SubRowDiscountTypeCode
    def set_SubRowDiscountTypeCode(self, SubRowDiscountTypeCode): self.SubRowDiscountTypeCode = SubRowDiscountTypeCode
    def get_SubRowDiscountTypeText(self): return self.SubRowDiscountTypeText
    def set_SubRowDiscountTypeText(self, SubRowDiscountTypeText): self.SubRowDiscountTypeText = SubRowDiscountTypeText
    def get_SubRowProgressiveDiscountDetails(self): return self.SubRowProgressiveDiscountDetails
    def set_SubRowProgressiveDiscountDetails(self, SubRowProgressiveDiscountDetails): self.SubRowProgressiveDiscountDetails = SubRowProgressiveDiscountDetails
    def add_SubRowProgressiveDiscountDetails(self, value): self.SubRowProgressiveDiscountDetails.append(value)
    def insert_SubRowProgressiveDiscountDetails_at(self, index, value): self.SubRowProgressiveDiscountDetails.insert(index, value)
    def replace_SubRowProgressiveDiscountDetails_at(self, index, value): self.SubRowProgressiveDiscountDetails[index] = value
    def get_SubRowVatRatePercent(self): return self.SubRowVatRatePercent
    def set_SubRowVatRatePercent(self, SubRowVatRatePercent): self.SubRowVatRatePercent = SubRowVatRatePercent
    def get_SubRowVatCode(self): return self.SubRowVatCode
    def set_SubRowVatCode(self, SubRowVatCode): self.SubRowVatCode = SubRowVatCode
    def get_SubRowVatAmount(self): return self.SubRowVatAmount
    def set_SubRowVatAmount(self, SubRowVatAmount): self.SubRowVatAmount = SubRowVatAmount
    def get_SubRowVatExcludedAmount(self): return self.SubRowVatExcludedAmount
    def set_SubRowVatExcludedAmount(self, SubRowVatExcludedAmount): self.SubRowVatExcludedAmount = SubRowVatExcludedAmount
    def get_SubRowAmount(self): return self.SubRowAmount
    def set_SubRowAmount(self, SubRowAmount): self.SubRowAmount = SubRowAmount
    def get_SubRowTransactionDetails(self): return self.SubRowTransactionDetails
    def set_SubRowTransactionDetails(self, SubRowTransactionDetails): self.SubRowTransactionDetails = SubRowTransactionDetails
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_100(self, value):
        # Validate type genericStringType0_100, a restriction on xs:string.
        pass
    def validate_genericStringType0_512(self, value):
        # Validate type genericStringType0_512, a restriction on xs:string.
        pass
    def validate_genericTokenType0_35(self, value):
        # Validate type genericTokenType0_35, a restriction on xs:token.
        pass
    def validate_genericStringType1_20(self, value):
        # Validate type genericStringType1_20, a restriction on xs:string.
        pass
    def validate_genericStringType0_4(self, value):
        # Validate type genericStringType0_4, a restriction on xs:string.
        pass
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def validate_genericStringType0_10(self, value):
        # Validate type genericStringType0_10, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SubIdentifier is not None or
            self.SubRowPositionIdentifier is not None or
            self.SubArticleIdentifier is not None or
            self.SubArticleGroupIdentifier is not None or
            self.SubArticleName is not None or
            self.SubArticleInfoUrlText is not None or
            self.SubBuyerArticleIdentifier is not None or
            self.SubEanCode is not None or
            self.SubRowRegistrationNumberIdentifier is not None or
            self.SubSerialNumberIdentifier is not None or
            self.SubRowActionCode is not None or
            self.SubRowDefinitionDetails or
            self.SubOfferedQuantity or
            self.SubDeliveredQuantity or
            self.SubOrderedQuantity is not None or
            self.SubConfirmedQuantity is not None or
            self.SubPostDeliveredQuantity is not None or
            self.SubInvoicedQuantity or
            self.SubCreditRequestedQuantity is not None or
            self.SubReturnedQuantity is not None or
            self.SubStartDate is not None or
            self.SubEndDate is not None or
            self.SubUnitPriceAmount is not None or
            self.SubUnitPriceVatIncludedAmount is not None or
            self.SubUnitPriceBaseQuantity is not None or
            self.SubRowIdentifier is not None or
            self.SubRowIdentifierUrlText is not None or
            self.SubRowIdentifierDate is not None or
            self.SubRowOrdererName is not None or
            self.SubRowSalesPersonName is not None or
            self.SubRowOrderConfirmationIdentifier is not None or
            self.SubRowOrderConfirmationDate is not None or
            self.SubOriginalInvoiceNumber is not None or
            self.SubRowDeliveryIdentifier is not None or
            self.SubRowDeliveryIdentifierUrlText is not None or
            self.SubRowDeliveryDate is not None or
            self.SubRowQuotationIdentifier is not None or
            self.SubRowQuotationIdentifierUrlText is not None or
            self.SubRowAgreementIdentifier is not None or
            self.SubRowAgreementIdentifierUrlText is not None or
            self.SubRowRequestOfQuotationIdentifier is not None or
            self.SubRowRequestOfQuotationIdentifierUrlText is not None or
            self.SubRowPriceListIdentifier is not None or
            self.SubRowPriceListIdentifierUrlText is not None or
            self.SubRowProjectReferenceIdentifier is not None or
            self.SubRowOverDuePaymentDetails is not None or
            self.SubRowAnyPartyDetails or
            self.SubRowDeliveryDetails is not None or
            self.SubRowShortProposedAccountIdentifier is not None or
            self.SubRowNormalProposedAccountIdentifier is not None or
            self.SubRowProposedAccountText is not None or
            self.SubRowAccountDimensionText is not None or
            self.SubRowSellerAccountText is not None or
            self.SubRowFreeText or
            self.SubRowUsedQuantity is not None or
            self.SubRowPreviousMeterReadingDate is not None or
            self.SubRowLatestMeterReadingDate is not None or
            self.SubRowCalculatedQuantity is not None or
            self.SubRowAveragePriceAmount is not None or
            self.SubRowDiscountPercent is not None or
            self.SubRowDiscountAmount is not None or
            self.SubRowDiscountTypeCode is not None or
            self.SubRowDiscountTypeText is not None or
            self.SubRowProgressiveDiscountDetails or
            self.SubRowVatRatePercent is not None or
            self.SubRowVatCode is not None or
            self.SubRowVatAmount is not None or
            self.SubRowVatExcludedAmount is not None or
            self.SubRowAmount is not None or
            self.SubRowTransactionDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SubInvoiceRowType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SubInvoiceRowType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SubInvoiceRowType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubInvoiceRowType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SubInvoiceRowType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SubIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubIdentifier>%s</%sSubIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubIdentifier).encode(ExternalEncoding), input_name='SubIdentifier'), namespace_, eol_))
        if self.SubRowPositionIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowPositionIdentifier>%s</%sSubRowPositionIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowPositionIdentifier).encode(ExternalEncoding), input_name='SubRowPositionIdentifier'), namespace_, eol_))
        if self.SubArticleIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubArticleIdentifier>%s</%sSubArticleIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubArticleIdentifier).encode(ExternalEncoding), input_name='SubArticleIdentifier'), namespace_, eol_))
        if self.SubArticleGroupIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubArticleGroupIdentifier>%s</%sSubArticleGroupIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubArticleGroupIdentifier).encode(ExternalEncoding), input_name='SubArticleGroupIdentifier'), namespace_, eol_))
        if self.SubArticleName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubArticleName>%s</%sSubArticleName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubArticleName).encode(ExternalEncoding), input_name='SubArticleName'), namespace_, eol_))
        if self.SubArticleInfoUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubArticleInfoUrlText>%s</%sSubArticleInfoUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubArticleInfoUrlText).encode(ExternalEncoding), input_name='SubArticleInfoUrlText'), namespace_, eol_))
        if self.SubBuyerArticleIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubBuyerArticleIdentifier>%s</%sSubBuyerArticleIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubBuyerArticleIdentifier).encode(ExternalEncoding), input_name='SubBuyerArticleIdentifier'), namespace_, eol_))
        if self.SubEanCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubEanCode>%s</%sSubEanCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubEanCode).encode(ExternalEncoding), input_name='SubEanCode'), namespace_, eol_))
        if self.SubRowRegistrationNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowRegistrationNumberIdentifier>%s</%sSubRowRegistrationNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowRegistrationNumberIdentifier).encode(ExternalEncoding), input_name='SubRowRegistrationNumberIdentifier'), namespace_, eol_))
        if self.SubSerialNumberIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubSerialNumberIdentifier>%s</%sSubSerialNumberIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubSerialNumberIdentifier).encode(ExternalEncoding), input_name='SubSerialNumberIdentifier'), namespace_, eol_))
        if self.SubRowActionCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowActionCode>%s</%sSubRowActionCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowActionCode).encode(ExternalEncoding), input_name='SubRowActionCode'), namespace_, eol_))
        for SubRowDefinitionDetails_ in self.SubRowDefinitionDetails:
            SubRowDefinitionDetails_.export(outfile, level, namespace_, name_='SubRowDefinitionDetails', pretty_print=pretty_print)
        for SubOfferedQuantity_ in self.SubOfferedQuantity:
            SubOfferedQuantity_.export(outfile, level, namespace_, name_='SubOfferedQuantity', pretty_print=pretty_print)
        for SubDeliveredQuantity_ in self.SubDeliveredQuantity:
            SubDeliveredQuantity_.export(outfile, level, namespace_, name_='SubDeliveredQuantity', pretty_print=pretty_print)
        if self.SubOrderedQuantity is not None:
            self.SubOrderedQuantity.export(outfile, level, namespace_, name_='SubOrderedQuantity', pretty_print=pretty_print)
        if self.SubConfirmedQuantity is not None:
            self.SubConfirmedQuantity.export(outfile, level, namespace_, name_='SubConfirmedQuantity', pretty_print=pretty_print)
        if self.SubPostDeliveredQuantity is not None:
            self.SubPostDeliveredQuantity.export(outfile, level, namespace_, name_='SubPostDeliveredQuantity', pretty_print=pretty_print)
        for SubInvoicedQuantity_ in self.SubInvoicedQuantity:
            SubInvoicedQuantity_.export(outfile, level, namespace_, name_='SubInvoicedQuantity', pretty_print=pretty_print)
        if self.SubCreditRequestedQuantity is not None:
            self.SubCreditRequestedQuantity.export(outfile, level, namespace_, name_='SubCreditRequestedQuantity', pretty_print=pretty_print)
        if self.SubReturnedQuantity is not None:
            self.SubReturnedQuantity.export(outfile, level, namespace_, name_='SubReturnedQuantity', pretty_print=pretty_print)
        if self.SubStartDate is not None:
            self.SubStartDate.export(outfile, level, namespace_, name_='SubStartDate', pretty_print=pretty_print)
        if self.SubEndDate is not None:
            self.SubEndDate.export(outfile, level, namespace_, name_='SubEndDate', pretty_print=pretty_print)
        if self.SubUnitPriceAmount is not None:
            self.SubUnitPriceAmount.export(outfile, level, namespace_, name_='SubUnitPriceAmount', pretty_print=pretty_print)
        if self.SubUnitPriceVatIncludedAmount is not None:
            self.SubUnitPriceVatIncludedAmount.export(outfile, level, namespace_, name_='SubUnitPriceVatIncludedAmount', pretty_print=pretty_print)
        if self.SubUnitPriceBaseQuantity is not None:
            self.SubUnitPriceBaseQuantity.export(outfile, level, namespace_, name_='SubUnitPriceBaseQuantity', pretty_print=pretty_print)
        if self.SubRowIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowIdentifier>%s</%sSubRowIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowIdentifier).encode(ExternalEncoding), input_name='SubRowIdentifier'), namespace_, eol_))
        if self.SubRowIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowIdentifierUrlText>%s</%sSubRowIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowIdentifierUrlText).encode(ExternalEncoding), input_name='SubRowIdentifierUrlText'), namespace_, eol_))
        if self.SubRowIdentifierDate is not None:
            self.SubRowIdentifierDate.export(outfile, level, namespace_, name_='SubRowIdentifierDate', pretty_print=pretty_print)
        if self.SubRowOrdererName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowOrdererName>%s</%sSubRowOrdererName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowOrdererName).encode(ExternalEncoding), input_name='SubRowOrdererName'), namespace_, eol_))
        if self.SubRowSalesPersonName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowSalesPersonName>%s</%sSubRowSalesPersonName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowSalesPersonName).encode(ExternalEncoding), input_name='SubRowSalesPersonName'), namespace_, eol_))
        if self.SubRowOrderConfirmationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowOrderConfirmationIdentifier>%s</%sSubRowOrderConfirmationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowOrderConfirmationIdentifier).encode(ExternalEncoding), input_name='SubRowOrderConfirmationIdentifier'), namespace_, eol_))
        if self.SubRowOrderConfirmationDate is not None:
            self.SubRowOrderConfirmationDate.export(outfile, level, namespace_, name_='SubRowOrderConfirmationDate', pretty_print=pretty_print)
        if self.SubOriginalInvoiceNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubOriginalInvoiceNumber>%s</%sSubOriginalInvoiceNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubOriginalInvoiceNumber).encode(ExternalEncoding), input_name='SubOriginalInvoiceNumber'), namespace_, eol_))
        if self.SubRowDeliveryIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDeliveryIdentifier>%s</%sSubRowDeliveryIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDeliveryIdentifier).encode(ExternalEncoding), input_name='SubRowDeliveryIdentifier'), namespace_, eol_))
        if self.SubRowDeliveryIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDeliveryIdentifierUrlText>%s</%sSubRowDeliveryIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDeliveryIdentifierUrlText).encode(ExternalEncoding), input_name='SubRowDeliveryIdentifierUrlText'), namespace_, eol_))
        if self.SubRowDeliveryDate is not None:
            self.SubRowDeliveryDate.export(outfile, level, namespace_, name_='SubRowDeliveryDate', pretty_print=pretty_print)
        if self.SubRowQuotationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowQuotationIdentifier>%s</%sSubRowQuotationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowQuotationIdentifier).encode(ExternalEncoding), input_name='SubRowQuotationIdentifier'), namespace_, eol_))
        if self.SubRowQuotationIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowQuotationIdentifierUrlText>%s</%sSubRowQuotationIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowQuotationIdentifierUrlText).encode(ExternalEncoding), input_name='SubRowQuotationIdentifierUrlText'), namespace_, eol_))
        if self.SubRowAgreementIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAgreementIdentifier>%s</%sSubRowAgreementIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAgreementIdentifier).encode(ExternalEncoding), input_name='SubRowAgreementIdentifier'), namespace_, eol_))
        if self.SubRowAgreementIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAgreementIdentifierUrlText>%s</%sSubRowAgreementIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAgreementIdentifierUrlText).encode(ExternalEncoding), input_name='SubRowAgreementIdentifierUrlText'), namespace_, eol_))
        if self.SubRowRequestOfQuotationIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowRequestOfQuotationIdentifier>%s</%sSubRowRequestOfQuotationIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowRequestOfQuotationIdentifier).encode(ExternalEncoding), input_name='SubRowRequestOfQuotationIdentifier'), namespace_, eol_))
        if self.SubRowRequestOfQuotationIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowRequestOfQuotationIdentifierUrlText>%s</%sSubRowRequestOfQuotationIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowRequestOfQuotationIdentifierUrlText).encode(ExternalEncoding), input_name='SubRowRequestOfQuotationIdentifierUrlText'), namespace_, eol_))
        if self.SubRowPriceListIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowPriceListIdentifier>%s</%sSubRowPriceListIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowPriceListIdentifier).encode(ExternalEncoding), input_name='SubRowPriceListIdentifier'), namespace_, eol_))
        if self.SubRowPriceListIdentifierUrlText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowPriceListIdentifierUrlText>%s</%sSubRowPriceListIdentifierUrlText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowPriceListIdentifierUrlText).encode(ExternalEncoding), input_name='SubRowPriceListIdentifierUrlText'), namespace_, eol_))
        if self.SubRowProjectReferenceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowProjectReferenceIdentifier>%s</%sSubRowProjectReferenceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowProjectReferenceIdentifier).encode(ExternalEncoding), input_name='SubRowProjectReferenceIdentifier'), namespace_, eol_))
        if self.SubRowOverDuePaymentDetails is not None:
            self.SubRowOverDuePaymentDetails.export(outfile, level, namespace_, name_='SubRowOverDuePaymentDetails', pretty_print=pretty_print)
        for SubRowAnyPartyDetails_ in self.SubRowAnyPartyDetails:
            SubRowAnyPartyDetails_.export(outfile, level, namespace_, name_='SubRowAnyPartyDetails', pretty_print=pretty_print)
        if self.SubRowDeliveryDetails is not None:
            self.SubRowDeliveryDetails.export(outfile, level, namespace_, name_='SubRowDeliveryDetails', pretty_print=pretty_print)
        if self.SubRowShortProposedAccountIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowShortProposedAccountIdentifier>%s</%sSubRowShortProposedAccountIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowShortProposedAccountIdentifier).encode(ExternalEncoding), input_name='SubRowShortProposedAccountIdentifier'), namespace_, eol_))
        if self.SubRowNormalProposedAccountIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowNormalProposedAccountIdentifier>%s</%sSubRowNormalProposedAccountIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowNormalProposedAccountIdentifier).encode(ExternalEncoding), input_name='SubRowNormalProposedAccountIdentifier'), namespace_, eol_))
        if self.SubRowProposedAccountText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowProposedAccountText>%s</%sSubRowProposedAccountText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowProposedAccountText).encode(ExternalEncoding), input_name='SubRowProposedAccountText'), namespace_, eol_))
        if self.SubRowAccountDimensionText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAccountDimensionText>%s</%sSubRowAccountDimensionText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAccountDimensionText).encode(ExternalEncoding), input_name='SubRowAccountDimensionText'), namespace_, eol_))
        if self.SubRowSellerAccountText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowSellerAccountText>%s</%sSubRowSellerAccountText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowSellerAccountText).encode(ExternalEncoding), input_name='SubRowSellerAccountText'), namespace_, eol_))
        for SubRowFreeText_ in self.SubRowFreeText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowFreeText>%s</%sSubRowFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(SubRowFreeText_).encode(ExternalEncoding), input_name='SubRowFreeText'), namespace_, eol_))
        if self.SubRowUsedQuantity is not None:
            self.SubRowUsedQuantity.export(outfile, level, namespace_, name_='SubRowUsedQuantity', pretty_print=pretty_print)
        if self.SubRowPreviousMeterReadingDate is not None:
            self.SubRowPreviousMeterReadingDate.export(outfile, level, namespace_, name_='SubRowPreviousMeterReadingDate', pretty_print=pretty_print)
        if self.SubRowLatestMeterReadingDate is not None:
            self.SubRowLatestMeterReadingDate.export(outfile, level, namespace_, name_='SubRowLatestMeterReadingDate', pretty_print=pretty_print)
        if self.SubRowCalculatedQuantity is not None:
            self.SubRowCalculatedQuantity.export(outfile, level, namespace_, name_='SubRowCalculatedQuantity', pretty_print=pretty_print)
        if self.SubRowAveragePriceAmount is not None:
            self.SubRowAveragePriceAmount.export(outfile, level, namespace_, name_='SubRowAveragePriceAmount', pretty_print=pretty_print)
        if self.SubRowDiscountPercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDiscountPercent>%s</%sSubRowDiscountPercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDiscountPercent).encode(ExternalEncoding), input_name='SubRowDiscountPercent'), namespace_, eol_))
        if self.SubRowDiscountAmount is not None:
            self.SubRowDiscountAmount.export(outfile, level, namespace_, name_='SubRowDiscountAmount', pretty_print=pretty_print)
        if self.SubRowDiscountTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDiscountTypeCode>%s</%sSubRowDiscountTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDiscountTypeCode).encode(ExternalEncoding), input_name='SubRowDiscountTypeCode'), namespace_, eol_))
        if self.SubRowDiscountTypeText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDiscountTypeText>%s</%sSubRowDiscountTypeText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDiscountTypeText).encode(ExternalEncoding), input_name='SubRowDiscountTypeText'), namespace_, eol_))
        for SubRowProgressiveDiscountDetails_ in self.SubRowProgressiveDiscountDetails:
            SubRowProgressiveDiscountDetails_.export(outfile, level, namespace_, name_='SubRowProgressiveDiscountDetails', pretty_print=pretty_print)
        if self.SubRowVatRatePercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowVatRatePercent>%s</%sSubRowVatRatePercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowVatRatePercent).encode(ExternalEncoding), input_name='SubRowVatRatePercent'), namespace_, eol_))
        if self.SubRowVatCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowVatCode>%s</%sSubRowVatCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowVatCode).encode(ExternalEncoding), input_name='SubRowVatCode'), namespace_, eol_))
        if self.SubRowVatAmount is not None:
            self.SubRowVatAmount.export(outfile, level, namespace_, name_='SubRowVatAmount', pretty_print=pretty_print)
        if self.SubRowVatExcludedAmount is not None:
            self.SubRowVatExcludedAmount.export(outfile, level, namespace_, name_='SubRowVatExcludedAmount', pretty_print=pretty_print)
        if self.SubRowAmount is not None:
            self.SubRowAmount.export(outfile, level, namespace_, name_='SubRowAmount', pretty_print=pretty_print)
        if self.SubRowTransactionDetails is not None:
            self.SubRowTransactionDetails.export(outfile, level, namespace_, name_='SubRowTransactionDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SubInvoiceRowType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SubIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubIdentifier=%s,\n' % quote_python(self.SubIdentifier).encode(ExternalEncoding))
        if self.SubRowPositionIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPositionIdentifier=%s,\n' % quote_python(self.SubRowPositionIdentifier).encode(ExternalEncoding))
        if self.SubArticleIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubArticleIdentifier=%s,\n' % quote_python(self.SubArticleIdentifier).encode(ExternalEncoding))
        if self.SubArticleGroupIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubArticleGroupIdentifier=%s,\n' % quote_python(self.SubArticleGroupIdentifier).encode(ExternalEncoding))
        if self.SubArticleName is not None:
            showIndent(outfile, level)
            outfile.write('SubArticleName=%s,\n' % quote_python(self.SubArticleName).encode(ExternalEncoding))
        if self.SubArticleInfoUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SubArticleInfoUrlText=%s,\n' % quote_python(self.SubArticleInfoUrlText).encode(ExternalEncoding))
        if self.SubBuyerArticleIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubBuyerArticleIdentifier=%s,\n' % quote_python(self.SubBuyerArticleIdentifier).encode(ExternalEncoding))
        if self.SubEanCode is not None:
            showIndent(outfile, level)
            outfile.write('SubEanCode=%s,\n' % quote_python(self.SubEanCode).encode(ExternalEncoding))
        if self.SubRowRegistrationNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowRegistrationNumberIdentifier=%s,\n' % quote_python(self.SubRowRegistrationNumberIdentifier).encode(ExternalEncoding))
        if self.SubSerialNumberIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubSerialNumberIdentifier=%s,\n' % quote_python(self.SubSerialNumberIdentifier).encode(ExternalEncoding))
        if self.SubRowActionCode is not None:
            showIndent(outfile, level)
            outfile.write('SubRowActionCode=%s,\n' % quote_python(self.SubRowActionCode).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SubRowDefinitionDetails=[\n')
        level += 1
        for SubRowDefinitionDetails_ in self.SubRowDefinitionDetails:
            showIndent(outfile, level)
            outfile.write('model_.SubRowDefinitionDetailsType(\n')
            SubRowDefinitionDetails_.exportLiteral(outfile, level, name_='SubRowDefinitionDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('SubOfferedQuantity=[\n')
        level += 1
        for SubOfferedQuantity_ in self.SubOfferedQuantity:
            showIndent(outfile, level)
            outfile.write('model_.QuantityType0_14(\n')
            SubOfferedQuantity_.exportLiteral(outfile, level, name_='QuantityType0_14')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('SubDeliveredQuantity=[\n')
        level += 1
        for SubDeliveredQuantity_ in self.SubDeliveredQuantity:
            showIndent(outfile, level)
            outfile.write('model_.QuantityType0_14(\n')
            SubDeliveredQuantity_.exportLiteral(outfile, level, name_='QuantityType0_14')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubOrderedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubOrderedQuantity=model_.QuantityType0_14(\n')
            self.SubOrderedQuantity.exportLiteral(outfile, level, name_='SubOrderedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubConfirmedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubConfirmedQuantity=model_.QuantityType0_14(\n')
            self.SubConfirmedQuantity.exportLiteral(outfile, level, name_='SubConfirmedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubPostDeliveredQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubPostDeliveredQuantity=model_.QuantityType0_14(\n')
            self.SubPostDeliveredQuantity.exportLiteral(outfile, level, name_='SubPostDeliveredQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('SubInvoicedQuantity=[\n')
        level += 1
        for SubInvoicedQuantity_ in self.SubInvoicedQuantity:
            showIndent(outfile, level)
            outfile.write('model_.QuantityType0_14(\n')
            SubInvoicedQuantity_.exportLiteral(outfile, level, name_='QuantityType0_14')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubCreditRequestedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubCreditRequestedQuantity=model_.QuantityType0_14(\n')
            self.SubCreditRequestedQuantity.exportLiteral(outfile, level, name_='SubCreditRequestedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubReturnedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubReturnedQuantity=model_.QuantityType0_14(\n')
            self.SubReturnedQuantity.exportLiteral(outfile, level, name_='SubReturnedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubStartDate is not None:
            showIndent(outfile, level)
            outfile.write('SubStartDate=model_.date(\n')
            self.SubStartDate.exportLiteral(outfile, level, name_='SubStartDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubEndDate is not None:
            showIndent(outfile, level)
            outfile.write('SubEndDate=model_.date(\n')
            self.SubEndDate.exportLiteral(outfile, level, name_='SubEndDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubUnitPriceAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubUnitPriceAmount=model_.unitAmount(\n')
            self.SubUnitPriceAmount.exportLiteral(outfile, level, name_='SubUnitPriceAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubUnitPriceVatIncludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubUnitPriceVatIncludedAmount=model_.unitAmount(\n')
            self.SubUnitPriceVatIncludedAmount.exportLiteral(outfile, level, name_='SubUnitPriceVatIncludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubUnitPriceBaseQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubUnitPriceBaseQuantity=model_.QuantityType0_14(\n')
            self.SubUnitPriceBaseQuantity.exportLiteral(outfile, level, name_='SubUnitPriceBaseQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowIdentifier=%s,\n' % quote_python(self.SubRowIdentifier).encode(ExternalEncoding))
        if self.SubRowIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowIdentifierUrlText=%s,\n' % quote_python(self.SubRowIdentifierUrlText).encode(ExternalEncoding))
        if self.SubRowIdentifierDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowIdentifierDate=model_.date(\n')
            self.SubRowIdentifierDate.exportLiteral(outfile, level, name_='SubRowIdentifierDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowOrdererName is not None:
            showIndent(outfile, level)
            outfile.write('SubRowOrdererName=%s,\n' % quote_python(self.SubRowOrdererName).encode(ExternalEncoding))
        if self.SubRowSalesPersonName is not None:
            showIndent(outfile, level)
            outfile.write('SubRowSalesPersonName=%s,\n' % quote_python(self.SubRowSalesPersonName).encode(ExternalEncoding))
        if self.SubRowOrderConfirmationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowOrderConfirmationIdentifier=%s,\n' % quote_python(self.SubRowOrderConfirmationIdentifier).encode(ExternalEncoding))
        if self.SubRowOrderConfirmationDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowOrderConfirmationDate=model_.date(\n')
            self.SubRowOrderConfirmationDate.exportLiteral(outfile, level, name_='SubRowOrderConfirmationDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubOriginalInvoiceNumber is not None:
            showIndent(outfile, level)
            outfile.write('SubOriginalInvoiceNumber=%s,\n' % quote_python(self.SubOriginalInvoiceNumber).encode(ExternalEncoding))
        if self.SubRowDeliveryIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDeliveryIdentifier=%s,\n' % quote_python(self.SubRowDeliveryIdentifier).encode(ExternalEncoding))
        if self.SubRowDeliveryIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDeliveryIdentifierUrlText=%s,\n' % quote_python(self.SubRowDeliveryIdentifierUrlText).encode(ExternalEncoding))
        if self.SubRowDeliveryDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDeliveryDate=model_.date(\n')
            self.SubRowDeliveryDate.exportLiteral(outfile, level, name_='SubRowDeliveryDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowQuotationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowQuotationIdentifier=%s,\n' % quote_python(self.SubRowQuotationIdentifier).encode(ExternalEncoding))
        if self.SubRowQuotationIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowQuotationIdentifierUrlText=%s,\n' % quote_python(self.SubRowQuotationIdentifierUrlText).encode(ExternalEncoding))
        if self.SubRowAgreementIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAgreementIdentifier=%s,\n' % quote_python(self.SubRowAgreementIdentifier).encode(ExternalEncoding))
        if self.SubRowAgreementIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAgreementIdentifierUrlText=%s,\n' % quote_python(self.SubRowAgreementIdentifierUrlText).encode(ExternalEncoding))
        if self.SubRowRequestOfQuotationIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowRequestOfQuotationIdentifier=%s,\n' % quote_python(self.SubRowRequestOfQuotationIdentifier).encode(ExternalEncoding))
        if self.SubRowRequestOfQuotationIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowRequestOfQuotationIdentifierUrlText=%s,\n' % quote_python(self.SubRowRequestOfQuotationIdentifierUrlText).encode(ExternalEncoding))
        if self.SubRowPriceListIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPriceListIdentifier=%s,\n' % quote_python(self.SubRowPriceListIdentifier).encode(ExternalEncoding))
        if self.SubRowPriceListIdentifierUrlText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPriceListIdentifierUrlText=%s,\n' % quote_python(self.SubRowPriceListIdentifierUrlText).encode(ExternalEncoding))
        if self.SubRowProjectReferenceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowProjectReferenceIdentifier=%s,\n' % quote_python(self.SubRowProjectReferenceIdentifier).encode(ExternalEncoding))
        if self.SubRowOverDuePaymentDetails is not None:
            showIndent(outfile, level)
            outfile.write('SubRowOverDuePaymentDetails=model_.SubRowOverDuePaymentDetailsType(\n')
            self.SubRowOverDuePaymentDetails.exportLiteral(outfile, level, name_='SubRowOverDuePaymentDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('SubRowAnyPartyDetails=[\n')
        level += 1
        for SubRowAnyPartyDetails_ in self.SubRowAnyPartyDetails:
            showIndent(outfile, level)
            outfile.write('model_.SubRowAnyPartyDetailsType(\n')
            SubRowAnyPartyDetails_.exportLiteral(outfile, level, name_='SubRowAnyPartyDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubRowDeliveryDetails is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDeliveryDetails=model_.SubRowDeliveryDetailsType(\n')
            self.SubRowDeliveryDetails.exportLiteral(outfile, level, name_='SubRowDeliveryDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowShortProposedAccountIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowShortProposedAccountIdentifier=%s,\n' % quote_python(self.SubRowShortProposedAccountIdentifier).encode(ExternalEncoding))
        if self.SubRowNormalProposedAccountIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowNormalProposedAccountIdentifier=%s,\n' % quote_python(self.SubRowNormalProposedAccountIdentifier).encode(ExternalEncoding))
        if self.SubRowProposedAccountText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowProposedAccountText=%s,\n' % quote_python(self.SubRowProposedAccountText).encode(ExternalEncoding))
        if self.SubRowAccountDimensionText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAccountDimensionText=%s,\n' % quote_python(self.SubRowAccountDimensionText).encode(ExternalEncoding))
        if self.SubRowSellerAccountText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowSellerAccountText=%s,\n' % quote_python(self.SubRowSellerAccountText).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SubRowFreeText=[\n')
        level += 1
        for SubRowFreeText_ in self.SubRowFreeText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SubRowFreeText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubRowUsedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubRowUsedQuantity=model_.QuantityType0_14(\n')
            self.SubRowUsedQuantity.exportLiteral(outfile, level, name_='SubRowUsedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowPreviousMeterReadingDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPreviousMeterReadingDate=model_.date(\n')
            self.SubRowPreviousMeterReadingDate.exportLiteral(outfile, level, name_='SubRowPreviousMeterReadingDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowLatestMeterReadingDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowLatestMeterReadingDate=model_.date(\n')
            self.SubRowLatestMeterReadingDate.exportLiteral(outfile, level, name_='SubRowLatestMeterReadingDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowCalculatedQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubRowCalculatedQuantity=model_.QuantityType0_14(\n')
            self.SubRowCalculatedQuantity.exportLiteral(outfile, level, name_='SubRowCalculatedQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowAveragePriceAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAveragePriceAmount=model_.amount(\n')
            self.SubRowAveragePriceAmount.exportLiteral(outfile, level, name_='SubRowAveragePriceAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowDiscountPercent is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDiscountPercent=%s,\n' % quote_python(self.SubRowDiscountPercent).encode(ExternalEncoding))
        if self.SubRowDiscountAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDiscountAmount=model_.amount(\n')
            self.SubRowDiscountAmount.exportLiteral(outfile, level, name_='SubRowDiscountAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowDiscountTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDiscountTypeCode=%s,\n' % quote_python(self.SubRowDiscountTypeCode).encode(ExternalEncoding))
        if self.SubRowDiscountTypeText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDiscountTypeText=%s,\n' % quote_python(self.SubRowDiscountTypeText).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SubRowProgressiveDiscountDetails=[\n')
        level += 1
        for SubRowProgressiveDiscountDetails_ in self.SubRowProgressiveDiscountDetails:
            showIndent(outfile, level)
            outfile.write('model_.SubRowProgressiveDiscountDetailsType(\n')
            SubRowProgressiveDiscountDetails_.exportLiteral(outfile, level, name_='SubRowProgressiveDiscountDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubRowVatRatePercent is not None:
            showIndent(outfile, level)
            outfile.write('SubRowVatRatePercent=%s,\n' % quote_python(self.SubRowVatRatePercent).encode(ExternalEncoding))
        if self.SubRowVatCode is not None:
            showIndent(outfile, level)
            outfile.write('SubRowVatCode=%s,\n' % quote_python(self.SubRowVatCode).encode(ExternalEncoding))
        if self.SubRowVatAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowVatAmount=model_.amount(\n')
            self.SubRowVatAmount.exportLiteral(outfile, level, name_='SubRowVatAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowVatExcludedAmount=model_.amount(\n')
            self.SubRowVatExcludedAmount.exportLiteral(outfile, level, name_='SubRowVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAmount=model_.amount(\n')
            self.SubRowAmount.exportLiteral(outfile, level, name_='SubRowAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowTransactionDetails is not None:
            showIndent(outfile, level)
            outfile.write('SubRowTransactionDetails=model_.TransactionDetailsType(\n')
            self.SubRowTransactionDetails.exportLiteral(outfile, level, name_='SubRowTransactionDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SubIdentifier':
            SubIdentifier_ = child_.text
            SubIdentifier_ = self.gds_validate_string(SubIdentifier_, node, 'SubIdentifier')
            self.SubIdentifier = SubIdentifier_
            self.validate_genericStringType0_35(self.SubIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowPositionIdentifier':
            SubRowPositionIdentifier_ = child_.text
            SubRowPositionIdentifier_ = self.gds_validate_string(SubRowPositionIdentifier_, node, 'SubRowPositionIdentifier')
            self.SubRowPositionIdentifier = SubRowPositionIdentifier_
            self.validate_genericStringType0_35(self.SubRowPositionIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubArticleIdentifier':
            SubArticleIdentifier_ = child_.text
            SubArticleIdentifier_ = self.gds_validate_string(SubArticleIdentifier_, node, 'SubArticleIdentifier')
            self.SubArticleIdentifier = SubArticleIdentifier_
            self.validate_genericStringType0_35(self.SubArticleIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubArticleGroupIdentifier':
            SubArticleGroupIdentifier_ = child_.text
            SubArticleGroupIdentifier_ = self.gds_validate_string(SubArticleGroupIdentifier_, node, 'SubArticleGroupIdentifier')
            self.SubArticleGroupIdentifier = SubArticleGroupIdentifier_
            self.validate_genericStringType0_35(self.SubArticleGroupIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubArticleName':
            SubArticleName_ = child_.text
            SubArticleName_ = self.gds_validate_string(SubArticleName_, node, 'SubArticleName')
            self.SubArticleName = SubArticleName_
            self.validate_genericStringType0_100(self.SubArticleName)    # validate type genericStringType0_100
        elif nodeName_ == 'SubArticleInfoUrlText':
            SubArticleInfoUrlText_ = child_.text
            SubArticleInfoUrlText_ = self.gds_validate_string(SubArticleInfoUrlText_, node, 'SubArticleInfoUrlText')
            self.SubArticleInfoUrlText = SubArticleInfoUrlText_
            self.validate_genericStringType0_512(self.SubArticleInfoUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'SubBuyerArticleIdentifier':
            SubBuyerArticleIdentifier_ = child_.text
            SubBuyerArticleIdentifier_ = self.gds_validate_string(SubBuyerArticleIdentifier_, node, 'SubBuyerArticleIdentifier')
            self.SubBuyerArticleIdentifier = SubBuyerArticleIdentifier_
            self.validate_genericStringType0_35(self.SubBuyerArticleIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubEanCode':
            SubEanCode_ = child_.text
            SubEanCode_ = re_.sub(String_cleanup_pat_, " ", SubEanCode_).strip()
            SubEanCode_ = self.gds_validate_string(SubEanCode_, node, 'SubEanCode')
            self.SubEanCode = SubEanCode_
            self.validate_genericTokenType0_35(self.SubEanCode)    # validate type genericTokenType0_35
        elif nodeName_ == 'SubRowRegistrationNumberIdentifier':
            SubRowRegistrationNumberIdentifier_ = child_.text
            SubRowRegistrationNumberIdentifier_ = self.gds_validate_string(SubRowRegistrationNumberIdentifier_, node, 'SubRowRegistrationNumberIdentifier')
            self.SubRowRegistrationNumberIdentifier = SubRowRegistrationNumberIdentifier_
            self.validate_genericStringType0_35(self.SubRowRegistrationNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubSerialNumberIdentifier':
            SubSerialNumberIdentifier_ = child_.text
            SubSerialNumberIdentifier_ = self.gds_validate_string(SubSerialNumberIdentifier_, node, 'SubSerialNumberIdentifier')
            self.SubSerialNumberIdentifier = SubSerialNumberIdentifier_
            self.validate_genericStringType0_35(self.SubSerialNumberIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowActionCode':
            SubRowActionCode_ = child_.text
            SubRowActionCode_ = re_.sub(String_cleanup_pat_, " ", SubRowActionCode_).strip()
            SubRowActionCode_ = self.gds_validate_string(SubRowActionCode_, node, 'SubRowActionCode')
            self.SubRowActionCode = SubRowActionCode_
            self.validate_genericTokenType0_35(self.SubRowActionCode)    # validate type genericTokenType0_35
        elif nodeName_ == 'SubRowDefinitionDetails':
            obj_ = SubRowDefinitionDetailsType.factory()
            obj_.build(child_)
            self.SubRowDefinitionDetails.append(obj_)
            obj_.original_tagname_ = 'SubRowDefinitionDetails'
        elif nodeName_ == 'SubOfferedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubOfferedQuantity.append(obj_)
            obj_.original_tagname_ = 'SubOfferedQuantity'
        elif nodeName_ == 'SubDeliveredQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubDeliveredQuantity.append(obj_)
            obj_.original_tagname_ = 'SubDeliveredQuantity'
        elif nodeName_ == 'SubOrderedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubOrderedQuantity = obj_
            obj_.original_tagname_ = 'SubOrderedQuantity'
        elif nodeName_ == 'SubConfirmedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubConfirmedQuantity = obj_
            obj_.original_tagname_ = 'SubConfirmedQuantity'
        elif nodeName_ == 'SubPostDeliveredQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubPostDeliveredQuantity = obj_
            obj_.original_tagname_ = 'SubPostDeliveredQuantity'
        elif nodeName_ == 'SubInvoicedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubInvoicedQuantity.append(obj_)
            obj_.original_tagname_ = 'SubInvoicedQuantity'
        elif nodeName_ == 'SubCreditRequestedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubCreditRequestedQuantity = obj_
            obj_.original_tagname_ = 'SubCreditRequestedQuantity'
        elif nodeName_ == 'SubReturnedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubReturnedQuantity = obj_
            obj_.original_tagname_ = 'SubReturnedQuantity'
        elif nodeName_ == 'SubStartDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubStartDate = obj_
            obj_.original_tagname_ = 'SubStartDate'
        elif nodeName_ == 'SubEndDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubEndDate = obj_
            obj_.original_tagname_ = 'SubEndDate'
        elif nodeName_ == 'SubUnitPriceAmount':
            obj_ = unitAmount.factory()
            obj_.build(child_)
            self.SubUnitPriceAmount = obj_
            obj_.original_tagname_ = 'SubUnitPriceAmount'
        elif nodeName_ == 'SubUnitPriceVatIncludedAmount':
            obj_ = unitAmount.factory()
            obj_.build(child_)
            self.SubUnitPriceVatIncludedAmount = obj_
            obj_.original_tagname_ = 'SubUnitPriceVatIncludedAmount'
        elif nodeName_ == 'SubUnitPriceBaseQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubUnitPriceBaseQuantity = obj_
            obj_.original_tagname_ = 'SubUnitPriceBaseQuantity'
        elif nodeName_ == 'SubRowIdentifier':
            SubRowIdentifier_ = child_.text
            SubRowIdentifier_ = self.gds_validate_string(SubRowIdentifier_, node, 'SubRowIdentifier')
            self.SubRowIdentifier = SubRowIdentifier_
            self.validate_genericStringType0_35(self.SubRowIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowIdentifierUrlText':
            SubRowIdentifierUrlText_ = child_.text
            SubRowIdentifierUrlText_ = self.gds_validate_string(SubRowIdentifierUrlText_, node, 'SubRowIdentifierUrlText')
            self.SubRowIdentifierUrlText = SubRowIdentifierUrlText_
            self.validate_genericStringType0_512(self.SubRowIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'SubRowIdentifierDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowIdentifierDate = obj_
            obj_.original_tagname_ = 'SubRowIdentifierDate'
        elif nodeName_ == 'SubRowOrdererName':
            SubRowOrdererName_ = child_.text
            SubRowOrdererName_ = self.gds_validate_string(SubRowOrdererName_, node, 'SubRowOrdererName')
            self.SubRowOrdererName = SubRowOrdererName_
            self.validate_genericStringType0_35(self.SubRowOrdererName)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowSalesPersonName':
            SubRowSalesPersonName_ = child_.text
            SubRowSalesPersonName_ = self.gds_validate_string(SubRowSalesPersonName_, node, 'SubRowSalesPersonName')
            self.SubRowSalesPersonName = SubRowSalesPersonName_
            self.validate_genericStringType0_35(self.SubRowSalesPersonName)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowOrderConfirmationIdentifier':
            SubRowOrderConfirmationIdentifier_ = child_.text
            SubRowOrderConfirmationIdentifier_ = self.gds_validate_string(SubRowOrderConfirmationIdentifier_, node, 'SubRowOrderConfirmationIdentifier')
            self.SubRowOrderConfirmationIdentifier = SubRowOrderConfirmationIdentifier_
            self.validate_genericStringType0_35(self.SubRowOrderConfirmationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowOrderConfirmationDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowOrderConfirmationDate = obj_
            obj_.original_tagname_ = 'SubRowOrderConfirmationDate'
        elif nodeName_ == 'SubOriginalInvoiceNumber':
            SubOriginalInvoiceNumber_ = child_.text
            SubOriginalInvoiceNumber_ = self.gds_validate_string(SubOriginalInvoiceNumber_, node, 'SubOriginalInvoiceNumber')
            self.SubOriginalInvoiceNumber = SubOriginalInvoiceNumber_
            self.validate_genericStringType1_20(self.SubOriginalInvoiceNumber)    # validate type genericStringType1_20
        elif nodeName_ == 'SubRowDeliveryIdentifier':
            SubRowDeliveryIdentifier_ = child_.text
            SubRowDeliveryIdentifier_ = self.gds_validate_string(SubRowDeliveryIdentifier_, node, 'SubRowDeliveryIdentifier')
            self.SubRowDeliveryIdentifier = SubRowDeliveryIdentifier_
            self.validate_genericStringType0_35(self.SubRowDeliveryIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowDeliveryIdentifierUrlText':
            SubRowDeliveryIdentifierUrlText_ = child_.text
            SubRowDeliveryIdentifierUrlText_ = self.gds_validate_string(SubRowDeliveryIdentifierUrlText_, node, 'SubRowDeliveryIdentifierUrlText')
            self.SubRowDeliveryIdentifierUrlText = SubRowDeliveryIdentifierUrlText_
            self.validate_genericStringType0_512(self.SubRowDeliveryIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'SubRowDeliveryDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowDeliveryDate = obj_
            obj_.original_tagname_ = 'SubRowDeliveryDate'
        elif nodeName_ == 'SubRowQuotationIdentifier':
            SubRowQuotationIdentifier_ = child_.text
            SubRowQuotationIdentifier_ = self.gds_validate_string(SubRowQuotationIdentifier_, node, 'SubRowQuotationIdentifier')
            self.SubRowQuotationIdentifier = SubRowQuotationIdentifier_
            self.validate_genericStringType0_35(self.SubRowQuotationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowQuotationIdentifierUrlText':
            SubRowQuotationIdentifierUrlText_ = child_.text
            SubRowQuotationIdentifierUrlText_ = self.gds_validate_string(SubRowQuotationIdentifierUrlText_, node, 'SubRowQuotationIdentifierUrlText')
            self.SubRowQuotationIdentifierUrlText = SubRowQuotationIdentifierUrlText_
            self.validate_genericStringType0_512(self.SubRowQuotationIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'SubRowAgreementIdentifier':
            SubRowAgreementIdentifier_ = child_.text
            SubRowAgreementIdentifier_ = self.gds_validate_string(SubRowAgreementIdentifier_, node, 'SubRowAgreementIdentifier')
            self.SubRowAgreementIdentifier = SubRowAgreementIdentifier_
            self.validate_genericStringType0_35(self.SubRowAgreementIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowAgreementIdentifierUrlText':
            SubRowAgreementIdentifierUrlText_ = child_.text
            SubRowAgreementIdentifierUrlText_ = self.gds_validate_string(SubRowAgreementIdentifierUrlText_, node, 'SubRowAgreementIdentifierUrlText')
            self.SubRowAgreementIdentifierUrlText = SubRowAgreementIdentifierUrlText_
            self.validate_genericStringType0_512(self.SubRowAgreementIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'SubRowRequestOfQuotationIdentifier':
            SubRowRequestOfQuotationIdentifier_ = child_.text
            SubRowRequestOfQuotationIdentifier_ = self.gds_validate_string(SubRowRequestOfQuotationIdentifier_, node, 'SubRowRequestOfQuotationIdentifier')
            self.SubRowRequestOfQuotationIdentifier = SubRowRequestOfQuotationIdentifier_
            self.validate_genericStringType0_35(self.SubRowRequestOfQuotationIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowRequestOfQuotationIdentifierUrlText':
            SubRowRequestOfQuotationIdentifierUrlText_ = child_.text
            SubRowRequestOfQuotationIdentifierUrlText_ = self.gds_validate_string(SubRowRequestOfQuotationIdentifierUrlText_, node, 'SubRowRequestOfQuotationIdentifierUrlText')
            self.SubRowRequestOfQuotationIdentifierUrlText = SubRowRequestOfQuotationIdentifierUrlText_
            self.validate_genericStringType0_512(self.SubRowRequestOfQuotationIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'SubRowPriceListIdentifier':
            SubRowPriceListIdentifier_ = child_.text
            SubRowPriceListIdentifier_ = self.gds_validate_string(SubRowPriceListIdentifier_, node, 'SubRowPriceListIdentifier')
            self.SubRowPriceListIdentifier = SubRowPriceListIdentifier_
            self.validate_genericStringType0_35(self.SubRowPriceListIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowPriceListIdentifierUrlText':
            SubRowPriceListIdentifierUrlText_ = child_.text
            SubRowPriceListIdentifierUrlText_ = self.gds_validate_string(SubRowPriceListIdentifierUrlText_, node, 'SubRowPriceListIdentifierUrlText')
            self.SubRowPriceListIdentifierUrlText = SubRowPriceListIdentifierUrlText_
            self.validate_genericStringType0_512(self.SubRowPriceListIdentifierUrlText)    # validate type genericStringType0_512
        elif nodeName_ == 'SubRowProjectReferenceIdentifier':
            SubRowProjectReferenceIdentifier_ = child_.text
            SubRowProjectReferenceIdentifier_ = self.gds_validate_string(SubRowProjectReferenceIdentifier_, node, 'SubRowProjectReferenceIdentifier')
            self.SubRowProjectReferenceIdentifier = SubRowProjectReferenceIdentifier_
            self.validate_genericStringType0_35(self.SubRowProjectReferenceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowOverDuePaymentDetails':
            obj_ = SubRowOverDuePaymentDetailsType.factory()
            obj_.build(child_)
            self.SubRowOverDuePaymentDetails = obj_
            obj_.original_tagname_ = 'SubRowOverDuePaymentDetails'
        elif nodeName_ == 'SubRowAnyPartyDetails':
            obj_ = SubRowAnyPartyDetailsType.factory()
            obj_.build(child_)
            self.SubRowAnyPartyDetails.append(obj_)
            obj_.original_tagname_ = 'SubRowAnyPartyDetails'
        elif nodeName_ == 'SubRowDeliveryDetails':
            obj_ = SubRowDeliveryDetailsType.factory()
            obj_.build(child_)
            self.SubRowDeliveryDetails = obj_
            obj_.original_tagname_ = 'SubRowDeliveryDetails'
        elif nodeName_ == 'SubRowShortProposedAccountIdentifier':
            SubRowShortProposedAccountIdentifier_ = child_.text
            SubRowShortProposedAccountIdentifier_ = self.gds_validate_string(SubRowShortProposedAccountIdentifier_, node, 'SubRowShortProposedAccountIdentifier')
            self.SubRowShortProposedAccountIdentifier = SubRowShortProposedAccountIdentifier_
            self.validate_genericStringType0_4(self.SubRowShortProposedAccountIdentifier)    # validate type genericStringType0_4
        elif nodeName_ == 'SubRowNormalProposedAccountIdentifier':
            SubRowNormalProposedAccountIdentifier_ = child_.text
            SubRowNormalProposedAccountIdentifier_ = self.gds_validate_string(SubRowNormalProposedAccountIdentifier_, node, 'SubRowNormalProposedAccountIdentifier')
            self.SubRowNormalProposedAccountIdentifier = SubRowNormalProposedAccountIdentifier_
            self.validate_genericStringType0_4(self.SubRowNormalProposedAccountIdentifier)    # validate type genericStringType0_4
        elif nodeName_ == 'SubRowProposedAccountText':
            SubRowProposedAccountText_ = child_.text
            SubRowProposedAccountText_ = self.gds_validate_string(SubRowProposedAccountText_, node, 'SubRowProposedAccountText')
            self.SubRowProposedAccountText = SubRowProposedAccountText_
            self.validate_genericStringType0_35(self.SubRowProposedAccountText)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowAccountDimensionText':
            SubRowAccountDimensionText_ = child_.text
            SubRowAccountDimensionText_ = self.gds_validate_string(SubRowAccountDimensionText_, node, 'SubRowAccountDimensionText')
            self.SubRowAccountDimensionText = SubRowAccountDimensionText_
            self.validate_genericStringType0_35(self.SubRowAccountDimensionText)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowSellerAccountText':
            SubRowSellerAccountText_ = child_.text
            SubRowSellerAccountText_ = self.gds_validate_string(SubRowSellerAccountText_, node, 'SubRowSellerAccountText')
            self.SubRowSellerAccountText = SubRowSellerAccountText_
            self.validate_genericStringType0_35(self.SubRowSellerAccountText)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowFreeText':
            SubRowFreeText_ = child_.text
            SubRowFreeText_ = self.gds_validate_string(SubRowFreeText_, node, 'SubRowFreeText')
            self.SubRowFreeText.append(SubRowFreeText_)
            self.validate_genericStringType0_512(self.SubRowFreeText)    # validate type genericStringType0_512
        elif nodeName_ == 'SubRowUsedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowUsedQuantity = obj_
            obj_.original_tagname_ = 'SubRowUsedQuantity'
        elif nodeName_ == 'SubRowPreviousMeterReadingDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowPreviousMeterReadingDate = obj_
            obj_.original_tagname_ = 'SubRowPreviousMeterReadingDate'
        elif nodeName_ == 'SubRowLatestMeterReadingDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowLatestMeterReadingDate = obj_
            obj_.original_tagname_ = 'SubRowLatestMeterReadingDate'
        elif nodeName_ == 'SubRowCalculatedQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowCalculatedQuantity = obj_
            obj_.original_tagname_ = 'SubRowCalculatedQuantity'
        elif nodeName_ == 'SubRowAveragePriceAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowAveragePriceAmount = obj_
            obj_.original_tagname_ = 'SubRowAveragePriceAmount'
        elif nodeName_ == 'SubRowDiscountPercent':
            SubRowDiscountPercent_ = child_.text
            SubRowDiscountPercent_ = self.gds_validate_string(SubRowDiscountPercent_, node, 'SubRowDiscountPercent')
            self.SubRowDiscountPercent = SubRowDiscountPercent_
            self.validate_percentage(self.SubRowDiscountPercent)    # validate type percentage
        elif nodeName_ == 'SubRowDiscountAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowDiscountAmount = obj_
            obj_.original_tagname_ = 'SubRowDiscountAmount'
        elif nodeName_ == 'SubRowDiscountTypeCode':
            SubRowDiscountTypeCode_ = child_.text
            SubRowDiscountTypeCode_ = self.gds_validate_string(SubRowDiscountTypeCode_, node, 'SubRowDiscountTypeCode')
            self.SubRowDiscountTypeCode = SubRowDiscountTypeCode_
            self.validate_genericStringType0_35(self.SubRowDiscountTypeCode)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowDiscountTypeText':
            SubRowDiscountTypeText_ = child_.text
            SubRowDiscountTypeText_ = self.gds_validate_string(SubRowDiscountTypeText_, node, 'SubRowDiscountTypeText')
            self.SubRowDiscountTypeText = SubRowDiscountTypeText_
            self.validate_genericStringType0_35(self.SubRowDiscountTypeText)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowProgressiveDiscountDetails':
            obj_ = SubRowProgressiveDiscountDetailsType.factory()
            obj_.build(child_)
            self.SubRowProgressiveDiscountDetails.append(obj_)
            obj_.original_tagname_ = 'SubRowProgressiveDiscountDetails'
        elif nodeName_ == 'SubRowVatRatePercent':
            SubRowVatRatePercent_ = child_.text
            SubRowVatRatePercent_ = self.gds_validate_string(SubRowVatRatePercent_, node, 'SubRowVatRatePercent')
            self.SubRowVatRatePercent = SubRowVatRatePercent_
            self.validate_percentage(self.SubRowVatRatePercent)    # validate type percentage
        elif nodeName_ == 'SubRowVatCode':
            SubRowVatCode_ = child_.text
            SubRowVatCode_ = self.gds_validate_string(SubRowVatCode_, node, 'SubRowVatCode')
            self.SubRowVatCode = SubRowVatCode_
            self.validate_genericStringType0_10(self.SubRowVatCode)    # validate type genericStringType0_10
        elif nodeName_ == 'SubRowVatAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowVatAmount = obj_
            obj_.original_tagname_ = 'SubRowVatAmount'
        elif nodeName_ == 'SubRowVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowVatExcludedAmount = obj_
            obj_.original_tagname_ = 'SubRowVatExcludedAmount'
        elif nodeName_ == 'SubRowAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowAmount = obj_
            obj_.original_tagname_ = 'SubRowAmount'
        elif nodeName_ == 'SubRowTransactionDetails':
            obj_ = TransactionDetailsType.factory()
            obj_.build(child_)
            self.SubRowTransactionDetails = obj_
            obj_.original_tagname_ = 'SubRowTransactionDetails'
# end class SubInvoiceRowType


class SubRowDeliveryDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SubRowTerminalAddressText=None, SubRowWaybillIdentifier=None, SubRowWaybillTypeCode=None, SubRowClearanceIdentifier=None, SubRowDeliveryNoteIdentifier=None, SubRowDelivererIdentifier=None, SubRowDelivererName=None, SubRowDelivererCountryCode=None, SubRowDelivererCountryName=None, SubRowPlaceOfDischarge=None, SubRowFinalDestinationName=None, SubRowCustomsInfo=None, SubRowManufacturerArticleIdentifier=None, SubRowManufacturerIdentifier=None, SubRowManufacturerName=None, SubRowManufacturerCountryCode=None, SubRowManufacturerCountryName=None, SubRowManufacturerOrderIdentifier=None, SubRowPackageDetails=None):
        self.original_tagname_ = None
        self.SubRowTerminalAddressText = SubRowTerminalAddressText
        self.SubRowWaybillIdentifier = SubRowWaybillIdentifier
        self.SubRowWaybillTypeCode = SubRowWaybillTypeCode
        self.SubRowClearanceIdentifier = SubRowClearanceIdentifier
        self.SubRowDeliveryNoteIdentifier = SubRowDeliveryNoteIdentifier
        self.SubRowDelivererIdentifier = SubRowDelivererIdentifier
        if SubRowDelivererName is None:
            self.SubRowDelivererName = []
        else:
            self.SubRowDelivererName = SubRowDelivererName
        self.SubRowDelivererCountryCode = SubRowDelivererCountryCode
        self.SubRowDelivererCountryName = SubRowDelivererCountryName
        self.SubRowPlaceOfDischarge = SubRowPlaceOfDischarge
        if SubRowFinalDestinationName is None:
            self.SubRowFinalDestinationName = []
        else:
            self.SubRowFinalDestinationName = SubRowFinalDestinationName
        self.SubRowCustomsInfo = SubRowCustomsInfo
        self.SubRowManufacturerArticleIdentifier = SubRowManufacturerArticleIdentifier
        self.SubRowManufacturerIdentifier = SubRowManufacturerIdentifier
        if SubRowManufacturerName is None:
            self.SubRowManufacturerName = []
        else:
            self.SubRowManufacturerName = SubRowManufacturerName
        self.SubRowManufacturerCountryCode = SubRowManufacturerCountryCode
        self.SubRowManufacturerCountryName = SubRowManufacturerCountryName
        self.SubRowManufacturerOrderIdentifier = SubRowManufacturerOrderIdentifier
        self.SubRowPackageDetails = SubRowPackageDetails
    def factory(*args_, **kwargs_):
        if SubRowDeliveryDetailsType.subclass:
            return SubRowDeliveryDetailsType.subclass(*args_, **kwargs_)
        else:
            return SubRowDeliveryDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SubRowTerminalAddressText(self): return self.SubRowTerminalAddressText
    def set_SubRowTerminalAddressText(self, SubRowTerminalAddressText): self.SubRowTerminalAddressText = SubRowTerminalAddressText
    def get_SubRowWaybillIdentifier(self): return self.SubRowWaybillIdentifier
    def set_SubRowWaybillIdentifier(self, SubRowWaybillIdentifier): self.SubRowWaybillIdentifier = SubRowWaybillIdentifier
    def get_SubRowWaybillTypeCode(self): return self.SubRowWaybillTypeCode
    def set_SubRowWaybillTypeCode(self, SubRowWaybillTypeCode): self.SubRowWaybillTypeCode = SubRowWaybillTypeCode
    def get_SubRowClearanceIdentifier(self): return self.SubRowClearanceIdentifier
    def set_SubRowClearanceIdentifier(self, SubRowClearanceIdentifier): self.SubRowClearanceIdentifier = SubRowClearanceIdentifier
    def get_SubRowDeliveryNoteIdentifier(self): return self.SubRowDeliveryNoteIdentifier
    def set_SubRowDeliveryNoteIdentifier(self, SubRowDeliveryNoteIdentifier): self.SubRowDeliveryNoteIdentifier = SubRowDeliveryNoteIdentifier
    def get_SubRowDelivererIdentifier(self): return self.SubRowDelivererIdentifier
    def set_SubRowDelivererIdentifier(self, SubRowDelivererIdentifier): self.SubRowDelivererIdentifier = SubRowDelivererIdentifier
    def get_SubRowDelivererName(self): return self.SubRowDelivererName
    def set_SubRowDelivererName(self, SubRowDelivererName): self.SubRowDelivererName = SubRowDelivererName
    def add_SubRowDelivererName(self, value): self.SubRowDelivererName.append(value)
    def insert_SubRowDelivererName_at(self, index, value): self.SubRowDelivererName.insert(index, value)
    def replace_SubRowDelivererName_at(self, index, value): self.SubRowDelivererName[index] = value
    def get_SubRowDelivererCountryCode(self): return self.SubRowDelivererCountryCode
    def set_SubRowDelivererCountryCode(self, SubRowDelivererCountryCode): self.SubRowDelivererCountryCode = SubRowDelivererCountryCode
    def get_SubRowDelivererCountryName(self): return self.SubRowDelivererCountryName
    def set_SubRowDelivererCountryName(self, SubRowDelivererCountryName): self.SubRowDelivererCountryName = SubRowDelivererCountryName
    def get_SubRowPlaceOfDischarge(self): return self.SubRowPlaceOfDischarge
    def set_SubRowPlaceOfDischarge(self, SubRowPlaceOfDischarge): self.SubRowPlaceOfDischarge = SubRowPlaceOfDischarge
    def get_SubRowFinalDestinationName(self): return self.SubRowFinalDestinationName
    def set_SubRowFinalDestinationName(self, SubRowFinalDestinationName): self.SubRowFinalDestinationName = SubRowFinalDestinationName
    def add_SubRowFinalDestinationName(self, value): self.SubRowFinalDestinationName.append(value)
    def insert_SubRowFinalDestinationName_at(self, index, value): self.SubRowFinalDestinationName.insert(index, value)
    def replace_SubRowFinalDestinationName_at(self, index, value): self.SubRowFinalDestinationName[index] = value
    def get_SubRowCustomsInfo(self): return self.SubRowCustomsInfo
    def set_SubRowCustomsInfo(self, SubRowCustomsInfo): self.SubRowCustomsInfo = SubRowCustomsInfo
    def get_SubRowManufacturerArticleIdentifier(self): return self.SubRowManufacturerArticleIdentifier
    def set_SubRowManufacturerArticleIdentifier(self, SubRowManufacturerArticleIdentifier): self.SubRowManufacturerArticleIdentifier = SubRowManufacturerArticleIdentifier
    def get_SubRowManufacturerIdentifier(self): return self.SubRowManufacturerIdentifier
    def set_SubRowManufacturerIdentifier(self, SubRowManufacturerIdentifier): self.SubRowManufacturerIdentifier = SubRowManufacturerIdentifier
    def get_SubRowManufacturerName(self): return self.SubRowManufacturerName
    def set_SubRowManufacturerName(self, SubRowManufacturerName): self.SubRowManufacturerName = SubRowManufacturerName
    def add_SubRowManufacturerName(self, value): self.SubRowManufacturerName.append(value)
    def insert_SubRowManufacturerName_at(self, index, value): self.SubRowManufacturerName.insert(index, value)
    def replace_SubRowManufacturerName_at(self, index, value): self.SubRowManufacturerName[index] = value
    def get_SubRowManufacturerCountryCode(self): return self.SubRowManufacturerCountryCode
    def set_SubRowManufacturerCountryCode(self, SubRowManufacturerCountryCode): self.SubRowManufacturerCountryCode = SubRowManufacturerCountryCode
    def get_SubRowManufacturerCountryName(self): return self.SubRowManufacturerCountryName
    def set_SubRowManufacturerCountryName(self, SubRowManufacturerCountryName): self.SubRowManufacturerCountryName = SubRowManufacturerCountryName
    def get_SubRowManufacturerOrderIdentifier(self): return self.SubRowManufacturerOrderIdentifier
    def set_SubRowManufacturerOrderIdentifier(self, SubRowManufacturerOrderIdentifier): self.SubRowManufacturerOrderIdentifier = SubRowManufacturerOrderIdentifier
    def get_SubRowPackageDetails(self): return self.SubRowPackageDetails
    def set_SubRowPackageDetails(self, SubRowPackageDetails): self.SubRowPackageDetails = SubRowPackageDetails
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericNMtokenType0_35(self, value):
        # Validate type genericNMtokenType0_35, a restriction on xs:token.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def hasContent_(self):
        if (
            self.SubRowTerminalAddressText is not None or
            self.SubRowWaybillIdentifier is not None or
            self.SubRowWaybillTypeCode is not None or
            self.SubRowClearanceIdentifier is not None or
            self.SubRowDeliveryNoteIdentifier is not None or
            self.SubRowDelivererIdentifier is not None or
            self.SubRowDelivererName or
            self.SubRowDelivererCountryCode is not None or
            self.SubRowDelivererCountryName is not None or
            self.SubRowPlaceOfDischarge is not None or
            self.SubRowFinalDestinationName or
            self.SubRowCustomsInfo is not None or
            self.SubRowManufacturerArticleIdentifier is not None or
            self.SubRowManufacturerIdentifier is not None or
            self.SubRowManufacturerName or
            self.SubRowManufacturerCountryCode is not None or
            self.SubRowManufacturerCountryName is not None or
            self.SubRowManufacturerOrderIdentifier is not None or
            self.SubRowPackageDetails is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SubRowDeliveryDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SubRowDeliveryDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SubRowDeliveryDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubRowDeliveryDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SubRowDeliveryDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SubRowTerminalAddressText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowTerminalAddressText>%s</%sSubRowTerminalAddressText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowTerminalAddressText).encode(ExternalEncoding), input_name='SubRowTerminalAddressText'), namespace_, eol_))
        if self.SubRowWaybillIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowWaybillIdentifier>%s</%sSubRowWaybillIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowWaybillIdentifier).encode(ExternalEncoding), input_name='SubRowWaybillIdentifier'), namespace_, eol_))
        if self.SubRowWaybillTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowWaybillTypeCode>%s</%sSubRowWaybillTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowWaybillTypeCode).encode(ExternalEncoding), input_name='SubRowWaybillTypeCode'), namespace_, eol_))
        if self.SubRowClearanceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowClearanceIdentifier>%s</%sSubRowClearanceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowClearanceIdentifier).encode(ExternalEncoding), input_name='SubRowClearanceIdentifier'), namespace_, eol_))
        if self.SubRowDeliveryNoteIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDeliveryNoteIdentifier>%s</%sSubRowDeliveryNoteIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDeliveryNoteIdentifier).encode(ExternalEncoding), input_name='SubRowDeliveryNoteIdentifier'), namespace_, eol_))
        if self.SubRowDelivererIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDelivererIdentifier>%s</%sSubRowDelivererIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDelivererIdentifier).encode(ExternalEncoding), input_name='SubRowDelivererIdentifier'), namespace_, eol_))
        for SubRowDelivererName_ in self.SubRowDelivererName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDelivererName>%s</%sSubRowDelivererName>%s' % (namespace_, self.gds_format_string(quote_xml(SubRowDelivererName_).encode(ExternalEncoding), input_name='SubRowDelivererName'), namespace_, eol_))
        if self.SubRowDelivererCountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDelivererCountryCode>%s</%sSubRowDelivererCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDelivererCountryCode).encode(ExternalEncoding), input_name='SubRowDelivererCountryCode'), namespace_, eol_))
        if self.SubRowDelivererCountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDelivererCountryName>%s</%sSubRowDelivererCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDelivererCountryName).encode(ExternalEncoding), input_name='SubRowDelivererCountryName'), namespace_, eol_))
        if self.SubRowPlaceOfDischarge is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowPlaceOfDischarge>%s</%sSubRowPlaceOfDischarge>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowPlaceOfDischarge).encode(ExternalEncoding), input_name='SubRowPlaceOfDischarge'), namespace_, eol_))
        for SubRowFinalDestinationName_ in self.SubRowFinalDestinationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowFinalDestinationName>%s</%sSubRowFinalDestinationName>%s' % (namespace_, self.gds_format_string(quote_xml(SubRowFinalDestinationName_).encode(ExternalEncoding), input_name='SubRowFinalDestinationName'), namespace_, eol_))
        if self.SubRowCustomsInfo is not None:
            self.SubRowCustomsInfo.export(outfile, level, namespace_, name_='SubRowCustomsInfo', pretty_print=pretty_print)
        if self.SubRowManufacturerArticleIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowManufacturerArticleIdentifier>%s</%sSubRowManufacturerArticleIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowManufacturerArticleIdentifier).encode(ExternalEncoding), input_name='SubRowManufacturerArticleIdentifier'), namespace_, eol_))
        if self.SubRowManufacturerIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowManufacturerIdentifier>%s</%sSubRowManufacturerIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowManufacturerIdentifier).encode(ExternalEncoding), input_name='SubRowManufacturerIdentifier'), namespace_, eol_))
        for SubRowManufacturerName_ in self.SubRowManufacturerName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowManufacturerName>%s</%sSubRowManufacturerName>%s' % (namespace_, self.gds_format_string(quote_xml(SubRowManufacturerName_).encode(ExternalEncoding), input_name='SubRowManufacturerName'), namespace_, eol_))
        if self.SubRowManufacturerCountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowManufacturerCountryCode>%s</%sSubRowManufacturerCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowManufacturerCountryCode).encode(ExternalEncoding), input_name='SubRowManufacturerCountryCode'), namespace_, eol_))
        if self.SubRowManufacturerCountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowManufacturerCountryName>%s</%sSubRowManufacturerCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowManufacturerCountryName).encode(ExternalEncoding), input_name='SubRowManufacturerCountryName'), namespace_, eol_))
        if self.SubRowManufacturerOrderIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowManufacturerOrderIdentifier>%s</%sSubRowManufacturerOrderIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowManufacturerOrderIdentifier).encode(ExternalEncoding), input_name='SubRowManufacturerOrderIdentifier'), namespace_, eol_))
        if self.SubRowPackageDetails is not None:
            self.SubRowPackageDetails.export(outfile, level, namespace_, name_='SubRowPackageDetails', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SubRowDeliveryDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SubRowTerminalAddressText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowTerminalAddressText=%s,\n' % quote_python(self.SubRowTerminalAddressText).encode(ExternalEncoding))
        if self.SubRowWaybillIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowWaybillIdentifier=%s,\n' % quote_python(self.SubRowWaybillIdentifier).encode(ExternalEncoding))
        if self.SubRowWaybillTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('SubRowWaybillTypeCode=%s,\n' % quote_python(self.SubRowWaybillTypeCode).encode(ExternalEncoding))
        if self.SubRowClearanceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowClearanceIdentifier=%s,\n' % quote_python(self.SubRowClearanceIdentifier).encode(ExternalEncoding))
        if self.SubRowDeliveryNoteIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDeliveryNoteIdentifier=%s,\n' % quote_python(self.SubRowDeliveryNoteIdentifier).encode(ExternalEncoding))
        if self.SubRowDelivererIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDelivererIdentifier=%s,\n' % quote_python(self.SubRowDelivererIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SubRowDelivererName=[\n')
        level += 1
        for SubRowDelivererName_ in self.SubRowDelivererName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SubRowDelivererName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubRowDelivererCountryCode is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDelivererCountryCode=%s,\n' % quote_python(self.SubRowDelivererCountryCode).encode(ExternalEncoding))
        if self.SubRowDelivererCountryName is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDelivererCountryName=%s,\n' % quote_python(self.SubRowDelivererCountryName).encode(ExternalEncoding))
        if self.SubRowPlaceOfDischarge is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPlaceOfDischarge=%s,\n' % quote_python(self.SubRowPlaceOfDischarge).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SubRowFinalDestinationName=[\n')
        level += 1
        for SubRowFinalDestinationName_ in self.SubRowFinalDestinationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SubRowFinalDestinationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubRowCustomsInfo is not None:
            showIndent(outfile, level)
            outfile.write('SubRowCustomsInfo=model_.CustomsInfoType(\n')
            self.SubRowCustomsInfo.exportLiteral(outfile, level, name_='SubRowCustomsInfo')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowManufacturerArticleIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowManufacturerArticleIdentifier=%s,\n' % quote_python(self.SubRowManufacturerArticleIdentifier).encode(ExternalEncoding))
        if self.SubRowManufacturerIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowManufacturerIdentifier=%s,\n' % quote_python(self.SubRowManufacturerIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SubRowManufacturerName=[\n')
        level += 1
        for SubRowManufacturerName_ in self.SubRowManufacturerName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SubRowManufacturerName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubRowManufacturerCountryCode is not None:
            showIndent(outfile, level)
            outfile.write('SubRowManufacturerCountryCode=%s,\n' % quote_python(self.SubRowManufacturerCountryCode).encode(ExternalEncoding))
        if self.SubRowManufacturerCountryName is not None:
            showIndent(outfile, level)
            outfile.write('SubRowManufacturerCountryName=%s,\n' % quote_python(self.SubRowManufacturerCountryName).encode(ExternalEncoding))
        if self.SubRowManufacturerOrderIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowManufacturerOrderIdentifier=%s,\n' % quote_python(self.SubRowManufacturerOrderIdentifier).encode(ExternalEncoding))
        if self.SubRowPackageDetails is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPackageDetails=model_.SubRowPackageDetailsType(\n')
            self.SubRowPackageDetails.exportLiteral(outfile, level, name_='SubRowPackageDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SubRowTerminalAddressText':
            SubRowTerminalAddressText_ = child_.text
            SubRowTerminalAddressText_ = self.gds_validate_string(SubRowTerminalAddressText_, node, 'SubRowTerminalAddressText')
            self.SubRowTerminalAddressText = SubRowTerminalAddressText_
            self.validate_genericStringType0_70(self.SubRowTerminalAddressText)    # validate type genericStringType0_70
        elif nodeName_ == 'SubRowWaybillIdentifier':
            SubRowWaybillIdentifier_ = child_.text
            SubRowWaybillIdentifier_ = self.gds_validate_string(SubRowWaybillIdentifier_, node, 'SubRowWaybillIdentifier')
            self.SubRowWaybillIdentifier = SubRowWaybillIdentifier_
            self.validate_genericStringType0_35(self.SubRowWaybillIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowWaybillTypeCode':
            SubRowWaybillTypeCode_ = child_.text
            SubRowWaybillTypeCode_ = re_.sub(String_cleanup_pat_, " ", SubRowWaybillTypeCode_).strip()
            SubRowWaybillTypeCode_ = self.gds_validate_string(SubRowWaybillTypeCode_, node, 'SubRowWaybillTypeCode')
            self.SubRowWaybillTypeCode = SubRowWaybillTypeCode_
            self.validate_genericNMtokenType0_35(self.SubRowWaybillTypeCode)    # validate type genericNMtokenType0_35
        elif nodeName_ == 'SubRowClearanceIdentifier':
            SubRowClearanceIdentifier_ = child_.text
            SubRowClearanceIdentifier_ = self.gds_validate_string(SubRowClearanceIdentifier_, node, 'SubRowClearanceIdentifier')
            self.SubRowClearanceIdentifier = SubRowClearanceIdentifier_
            self.validate_genericStringType0_35(self.SubRowClearanceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowDeliveryNoteIdentifier':
            SubRowDeliveryNoteIdentifier_ = child_.text
            SubRowDeliveryNoteIdentifier_ = self.gds_validate_string(SubRowDeliveryNoteIdentifier_, node, 'SubRowDeliveryNoteIdentifier')
            self.SubRowDeliveryNoteIdentifier = SubRowDeliveryNoteIdentifier_
            self.validate_genericStringType0_35(self.SubRowDeliveryNoteIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowDelivererIdentifier':
            SubRowDelivererIdentifier_ = child_.text
            SubRowDelivererIdentifier_ = self.gds_validate_string(SubRowDelivererIdentifier_, node, 'SubRowDelivererIdentifier')
            self.SubRowDelivererIdentifier = SubRowDelivererIdentifier_
            self.validate_genericStringType0_35(self.SubRowDelivererIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowDelivererName':
            SubRowDelivererName_ = child_.text
            SubRowDelivererName_ = self.gds_validate_string(SubRowDelivererName_, node, 'SubRowDelivererName')
            self.SubRowDelivererName.append(SubRowDelivererName_)
            self.validate_genericStringType0_35(self.SubRowDelivererName)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowDelivererCountryCode':
            SubRowDelivererCountryCode_ = child_.text
            SubRowDelivererCountryCode_ = self.gds_validate_string(SubRowDelivererCountryCode_, node, 'SubRowDelivererCountryCode')
            self.SubRowDelivererCountryCode = SubRowDelivererCountryCode_
            self.validate_CountryCodeType(self.SubRowDelivererCountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'SubRowDelivererCountryName':
            SubRowDelivererCountryName_ = child_.text
            SubRowDelivererCountryName_ = self.gds_validate_string(SubRowDelivererCountryName_, node, 'SubRowDelivererCountryName')
            self.SubRowDelivererCountryName = SubRowDelivererCountryName_
            self.validate_genericStringType0_35(self.SubRowDelivererCountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowPlaceOfDischarge':
            SubRowPlaceOfDischarge_ = child_.text
            SubRowPlaceOfDischarge_ = self.gds_validate_string(SubRowPlaceOfDischarge_, node, 'SubRowPlaceOfDischarge')
            self.SubRowPlaceOfDischarge = SubRowPlaceOfDischarge_
            self.validate_genericStringType0_35(self.SubRowPlaceOfDischarge)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowFinalDestinationName':
            SubRowFinalDestinationName_ = child_.text
            SubRowFinalDestinationName_ = self.gds_validate_string(SubRowFinalDestinationName_, node, 'SubRowFinalDestinationName')
            self.SubRowFinalDestinationName.append(SubRowFinalDestinationName_)
            self.validate_genericStringType0_35(self.SubRowFinalDestinationName)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowCustomsInfo':
            obj_ = CustomsInfoType.factory()
            obj_.build(child_)
            self.SubRowCustomsInfo = obj_
            obj_.original_tagname_ = 'SubRowCustomsInfo'
        elif nodeName_ == 'SubRowManufacturerArticleIdentifier':
            SubRowManufacturerArticleIdentifier_ = child_.text
            SubRowManufacturerArticleIdentifier_ = self.gds_validate_string(SubRowManufacturerArticleIdentifier_, node, 'SubRowManufacturerArticleIdentifier')
            self.SubRowManufacturerArticleIdentifier = SubRowManufacturerArticleIdentifier_
            self.validate_genericStringType0_35(self.SubRowManufacturerArticleIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowManufacturerIdentifier':
            SubRowManufacturerIdentifier_ = child_.text
            SubRowManufacturerIdentifier_ = self.gds_validate_string(SubRowManufacturerIdentifier_, node, 'SubRowManufacturerIdentifier')
            self.SubRowManufacturerIdentifier = SubRowManufacturerIdentifier_
            self.validate_genericStringType0_35(self.SubRowManufacturerIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowManufacturerName':
            SubRowManufacturerName_ = child_.text
            SubRowManufacturerName_ = self.gds_validate_string(SubRowManufacturerName_, node, 'SubRowManufacturerName')
            self.SubRowManufacturerName.append(SubRowManufacturerName_)
            self.validate_genericStringType0_35(self.SubRowManufacturerName)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowManufacturerCountryCode':
            SubRowManufacturerCountryCode_ = child_.text
            SubRowManufacturerCountryCode_ = self.gds_validate_string(SubRowManufacturerCountryCode_, node, 'SubRowManufacturerCountryCode')
            self.SubRowManufacturerCountryCode = SubRowManufacturerCountryCode_
            self.validate_CountryCodeType(self.SubRowManufacturerCountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'SubRowManufacturerCountryName':
            SubRowManufacturerCountryName_ = child_.text
            SubRowManufacturerCountryName_ = self.gds_validate_string(SubRowManufacturerCountryName_, node, 'SubRowManufacturerCountryName')
            self.SubRowManufacturerCountryName = SubRowManufacturerCountryName_
            self.validate_genericStringType0_35(self.SubRowManufacturerCountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowManufacturerOrderIdentifier':
            SubRowManufacturerOrderIdentifier_ = child_.text
            SubRowManufacturerOrderIdentifier_ = self.gds_validate_string(SubRowManufacturerOrderIdentifier_, node, 'SubRowManufacturerOrderIdentifier')
            self.SubRowManufacturerOrderIdentifier = SubRowManufacturerOrderIdentifier_
            self.validate_genericStringType0_35(self.SubRowManufacturerOrderIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowPackageDetails':
            obj_ = SubRowPackageDetailsType.factory()
            obj_.build(child_)
            self.SubRowPackageDetails = obj_
            obj_.original_tagname_ = 'SubRowPackageDetails'
# end class SubRowDeliveryDetailsType


class VatSpecificationDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, VatBaseAmount=None, VatRatePercent=None, VatCode=None, VatRateAmount=None, VatFreeText=None):
        self.original_tagname_ = None
        self.VatBaseAmount = VatBaseAmount
        self.VatRatePercent = VatRatePercent
        self.VatCode = VatCode
        self.VatRateAmount = VatRateAmount
        if VatFreeText is None:
            self.VatFreeText = []
        else:
            self.VatFreeText = VatFreeText
    def factory(*args_, **kwargs_):
        if VatSpecificationDetailsType.subclass:
            return VatSpecificationDetailsType.subclass(*args_, **kwargs_)
        else:
            return VatSpecificationDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_VatBaseAmount(self): return self.VatBaseAmount
    def set_VatBaseAmount(self, VatBaseAmount): self.VatBaseAmount = VatBaseAmount
    def get_VatRatePercent(self): return self.VatRatePercent
    def set_VatRatePercent(self, VatRatePercent): self.VatRatePercent = VatRatePercent
    def get_VatCode(self): return self.VatCode
    def set_VatCode(self, VatCode): self.VatCode = VatCode
    def get_VatRateAmount(self): return self.VatRateAmount
    def set_VatRateAmount(self, VatRateAmount): self.VatRateAmount = VatRateAmount
    def get_VatFreeText(self): return self.VatFreeText
    def set_VatFreeText(self, VatFreeText): self.VatFreeText = VatFreeText
    def add_VatFreeText(self, value): self.VatFreeText.append(value)
    def insert_VatFreeText_at(self, index, value): self.VatFreeText.insert(index, value)
    def replace_VatFreeText_at(self, index, value): self.VatFreeText[index] = value
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def validate_genericStringType0_10(self, value):
        # Validate type genericStringType0_10, a restriction on xs:string.
        pass
    def validate_genericStringType0_70(self, value):
        # Validate type genericStringType0_70, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.VatBaseAmount is not None or
            self.VatRatePercent is not None or
            self.VatCode is not None or
            self.VatRateAmount is not None or
            self.VatFreeText
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='VatSpecificationDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='VatSpecificationDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='VatSpecificationDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='VatSpecificationDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='VatSpecificationDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.VatBaseAmount is not None:
            self.VatBaseAmount.export(outfile, level, namespace_, name_='VatBaseAmount', pretty_print=pretty_print)
        if self.VatRatePercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sVatRatePercent>%s</%sVatRatePercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.VatRatePercent).encode(ExternalEncoding), input_name='VatRatePercent'), namespace_, eol_))
        if self.VatCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sVatCode>%s</%sVatCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.VatCode).encode(ExternalEncoding), input_name='VatCode'), namespace_, eol_))
        if self.VatRateAmount is not None:
            self.VatRateAmount.export(outfile, level, namespace_, name_='VatRateAmount', pretty_print=pretty_print)
        for VatFreeText_ in self.VatFreeText:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sVatFreeText>%s</%sVatFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(VatFreeText_).encode(ExternalEncoding), input_name='VatFreeText'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='VatSpecificationDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.VatBaseAmount is not None:
            showIndent(outfile, level)
            outfile.write('VatBaseAmount=model_.amount(\n')
            self.VatBaseAmount.exportLiteral(outfile, level, name_='VatBaseAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.VatRatePercent is not None:
            showIndent(outfile, level)
            outfile.write('VatRatePercent=%s,\n' % quote_python(self.VatRatePercent).encode(ExternalEncoding))
        if self.VatCode is not None:
            showIndent(outfile, level)
            outfile.write('VatCode=%s,\n' % quote_python(self.VatCode).encode(ExternalEncoding))
        if self.VatRateAmount is not None:
            showIndent(outfile, level)
            outfile.write('VatRateAmount=model_.amount(\n')
            self.VatRateAmount.exportLiteral(outfile, level, name_='VatRateAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('VatFreeText=[\n')
        level += 1
        for VatFreeText_ in self.VatFreeText:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(VatFreeText_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'VatBaseAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.VatBaseAmount = obj_
            obj_.original_tagname_ = 'VatBaseAmount'
        elif nodeName_ == 'VatRatePercent':
            VatRatePercent_ = child_.text
            VatRatePercent_ = self.gds_validate_string(VatRatePercent_, node, 'VatRatePercent')
            self.VatRatePercent = VatRatePercent_
            self.validate_percentage(self.VatRatePercent)    # validate type percentage
        elif nodeName_ == 'VatCode':
            VatCode_ = child_.text
            VatCode_ = self.gds_validate_string(VatCode_, node, 'VatCode')
            self.VatCode = VatCode_
            self.validate_genericStringType0_10(self.VatCode)    # validate type genericStringType0_10
        elif nodeName_ == 'VatRateAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.VatRateAmount = obj_
            obj_.original_tagname_ = 'VatRateAmount'
        elif nodeName_ == 'VatFreeText':
            VatFreeText_ = child_.text
            VatFreeText_ = self.gds_validate_string(VatFreeText_, node, 'VatFreeText')
            self.VatFreeText.append(VatFreeText_)
            self.validate_genericStringType0_70(self.VatFreeText)    # validate type genericStringType0_70
# end class VatSpecificationDetailsType


class PartyIdentifierType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, IdentifierType=None, valueOf_=None):
        self.original_tagname_ = None
        self.IdentifierType = _cast(None, IdentifierType)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if PartyIdentifierType.subclass:
            return PartyIdentifierType.subclass(*args_, **kwargs_)
        else:
            return PartyIdentifierType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_IdentifierType(self): return self.IdentifierType
    def set_IdentifierType(self, IdentifierType): self.IdentifierType = IdentifierType
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='PartyIdentifierType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PartyIdentifierType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='PartyIdentifierType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='PartyIdentifierType'):
        if self.IdentifierType is not None and 'IdentifierType' not in already_processed:
            already_processed.add('IdentifierType')
            outfile.write(' IdentifierType=%s' % (self.gds_format_string(quote_attrib(self.IdentifierType).encode(ExternalEncoding), input_name='IdentifierType'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='PartyIdentifierType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='PartyIdentifierType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.IdentifierType is not None and 'IdentifierType' not in already_processed:
            already_processed.add('IdentifierType')
            showIndent(outfile, level)
            outfile.write('IdentifierType="%s",\n' % (self.IdentifierType,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('IdentifierType', node)
        if value is not None and 'IdentifierType' not in already_processed:
            already_processed.add('IdentifierType')
            self.IdentifierType = value
            self.IdentifierType = ' '.join(self.IdentifierType.split())
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class PartyIdentifierType


class DiscountDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, FreeText=None, Percent=None, Amount=None):
        self.original_tagname_ = None
        self.FreeText = FreeText
        self.Percent = Percent
        self.Amount = Amount
    def factory(*args_, **kwargs_):
        if DiscountDetailsType.subclass:
            return DiscountDetailsType.subclass(*args_, **kwargs_)
        else:
            return DiscountDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_FreeText(self): return self.FreeText
    def set_FreeText(self, FreeText): self.FreeText = FreeText
    def get_Percent(self): return self.Percent
    def set_Percent(self, Percent): self.Percent = Percent
    def get_Amount(self): return self.Amount
    def set_Amount(self, Amount): self.Amount = Amount
    def validate_genericStringType1_70(self, value):
        # Validate type genericStringType1_70, a restriction on xs:string.
        pass
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.FreeText is not None or
            self.Percent is not None or
            self.Amount is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='DiscountDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DiscountDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='DiscountDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DiscountDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='DiscountDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.FreeText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFreeText>%s</%sFreeText>%s' % (namespace_, self.gds_format_string(quote_xml(self.FreeText).encode(ExternalEncoding), input_name='FreeText'), namespace_, eol_))
        if self.Percent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPercent>%s</%sPercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.Percent).encode(ExternalEncoding), input_name='Percent'), namespace_, eol_))
        if self.Amount is not None:
            self.Amount.export(outfile, level, namespace_, name_='Amount', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DiscountDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.FreeText is not None:
            showIndent(outfile, level)
            outfile.write('FreeText=%s,\n' % quote_python(self.FreeText).encode(ExternalEncoding))
        if self.Percent is not None:
            showIndent(outfile, level)
            outfile.write('Percent=%s,\n' % quote_python(self.Percent).encode(ExternalEncoding))
        if self.Amount is not None:
            showIndent(outfile, level)
            outfile.write('Amount=model_.amount(\n')
            self.Amount.exportLiteral(outfile, level, name_='Amount')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'FreeText':
            FreeText_ = child_.text
            FreeText_ = self.gds_validate_string(FreeText_, node, 'FreeText')
            self.FreeText = FreeText_
            self.validate_genericStringType1_70(self.FreeText)    # validate type genericStringType1_70
        elif nodeName_ == 'Percent':
            Percent_ = child_.text
            Percent_ = self.gds_validate_string(Percent_, node, 'Percent')
            self.Percent = Percent_
            self.validate_percentage(self.Percent)    # validate type percentage
        elif nodeName_ == 'Amount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.Amount = obj_
            obj_.original_tagname_ = 'Amount'
# end class DiscountDetailsType


class CustomsInfoType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, CNCode=None, CNName=None, CNOriginCountryCode=None, CNOriginCountryName=None):
        self.original_tagname_ = None
        self.CNCode = CNCode
        self.CNName = CNName
        self.CNOriginCountryCode = CNOriginCountryCode
        self.CNOriginCountryName = CNOriginCountryName
    def factory(*args_, **kwargs_):
        if CustomsInfoType.subclass:
            return CustomsInfoType.subclass(*args_, **kwargs_)
        else:
            return CustomsInfoType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CNCode(self): return self.CNCode
    def set_CNCode(self, CNCode): self.CNCode = CNCode
    def get_CNName(self): return self.CNName
    def set_CNName(self, CNName): self.CNName = CNName
    def get_CNOriginCountryCode(self): return self.CNOriginCountryCode
    def set_CNOriginCountryCode(self, CNOriginCountryCode): self.CNOriginCountryCode = CNOriginCountryCode
    def get_CNOriginCountryName(self): return self.CNOriginCountryName
    def set_CNOriginCountryName(self, CNOriginCountryName): self.CNOriginCountryName = CNOriginCountryName
    def validate_genericStringType1_8(self, value):
        # Validate type genericStringType1_8, a restriction on xs:string.
        pass
    def validate_genericStringType1_35(self, value):
        # Validate type genericStringType1_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def hasContent_(self):
        if (
            self.CNCode is not None or
            self.CNName is not None or
            self.CNOriginCountryCode is not None or
            self.CNOriginCountryName is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='CustomsInfoType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CustomsInfoType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='CustomsInfoType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='CustomsInfoType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='CustomsInfoType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CNCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCNCode>%s</%sCNCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CNCode).encode(ExternalEncoding), input_name='CNCode'), namespace_, eol_))
        if self.CNName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCNName>%s</%sCNName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CNName).encode(ExternalEncoding), input_name='CNName'), namespace_, eol_))
        if self.CNOriginCountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCNOriginCountryCode>%s</%sCNOriginCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CNOriginCountryCode).encode(ExternalEncoding), input_name='CNOriginCountryCode'), namespace_, eol_))
        if self.CNOriginCountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCNOriginCountryName>%s</%sCNOriginCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CNOriginCountryName).encode(ExternalEncoding), input_name='CNOriginCountryName'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='CustomsInfoType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CNCode is not None:
            showIndent(outfile, level)
            outfile.write('CNCode=%s,\n' % quote_python(self.CNCode).encode(ExternalEncoding))
        if self.CNName is not None:
            showIndent(outfile, level)
            outfile.write('CNName=%s,\n' % quote_python(self.CNName).encode(ExternalEncoding))
        if self.CNOriginCountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CNOriginCountryCode=%s,\n' % quote_python(self.CNOriginCountryCode).encode(ExternalEncoding))
        if self.CNOriginCountryName is not None:
            showIndent(outfile, level)
            outfile.write('CNOriginCountryName=%s,\n' % quote_python(self.CNOriginCountryName).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CNCode':
            CNCode_ = child_.text
            CNCode_ = self.gds_validate_string(CNCode_, node, 'CNCode')
            self.CNCode = CNCode_
            self.validate_genericStringType1_8(self.CNCode)    # validate type genericStringType1_8
        elif nodeName_ == 'CNName':
            CNName_ = child_.text
            CNName_ = self.gds_validate_string(CNName_, node, 'CNName')
            self.CNName = CNName_
            self.validate_genericStringType1_35(self.CNName)    # validate type genericStringType1_35
        elif nodeName_ == 'CNOriginCountryCode':
            CNOriginCountryCode_ = child_.text
            CNOriginCountryCode_ = self.gds_validate_string(CNOriginCountryCode_, node, 'CNOriginCountryCode')
            self.CNOriginCountryCode = CNOriginCountryCode_
            self.validate_CountryCodeType(self.CNOriginCountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CNOriginCountryName':
            CNOriginCountryName_ = child_.text
            CNOriginCountryName_ = self.gds_validate_string(CNOriginCountryName_, node, 'CNOriginCountryName')
            self.CNOriginCountryName = CNOriginCountryName_
            self.validate_genericStringType1_35(self.CNOriginCountryName)    # validate type genericStringType1_35
# end class CustomsInfoType


class TransactionDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, OtherCurrencyAmount=None, ExchangeRate=None, ExchangeDate=None):
        self.original_tagname_ = None
        self.OtherCurrencyAmount = OtherCurrencyAmount
        self.ExchangeRate = ExchangeRate
        self.ExchangeDate = ExchangeDate
    def factory(*args_, **kwargs_):
        if TransactionDetailsType.subclass:
            return TransactionDetailsType.subclass(*args_, **kwargs_)
        else:
            return TransactionDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_OtherCurrencyAmount(self): return self.OtherCurrencyAmount
    def set_OtherCurrencyAmount(self, OtherCurrencyAmount): self.OtherCurrencyAmount = OtherCurrencyAmount
    def get_ExchangeRate(self): return self.ExchangeRate
    def set_ExchangeRate(self, ExchangeRate): self.ExchangeRate = ExchangeRate
    def get_ExchangeDate(self): return self.ExchangeDate
    def set_ExchangeDate(self, ExchangeDate): self.ExchangeDate = ExchangeDate
    def validate_exchangeRate(self, value):
        # Validate type exchangeRate, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.OtherCurrencyAmount is not None or
            self.ExchangeRate is not None or
            self.ExchangeDate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='TransactionDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TransactionDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='TransactionDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TransactionDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='TransactionDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.OtherCurrencyAmount is not None:
            self.OtherCurrencyAmount.export(outfile, level, namespace_, name_='OtherCurrencyAmount', pretty_print=pretty_print)
        if self.ExchangeRate is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sExchangeRate>%s</%sExchangeRate>%s' % (namespace_, self.gds_format_string(quote_xml(self.ExchangeRate).encode(ExternalEncoding), input_name='ExchangeRate'), namespace_, eol_))
        if self.ExchangeDate is not None:
            self.ExchangeDate.export(outfile, level, namespace_, name_='ExchangeDate', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TransactionDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.OtherCurrencyAmount is not None:
            showIndent(outfile, level)
            outfile.write('OtherCurrencyAmount=model_.amount(\n')
            self.OtherCurrencyAmount.exportLiteral(outfile, level, name_='OtherCurrencyAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ExchangeRate is not None:
            showIndent(outfile, level)
            outfile.write('ExchangeRate=%s,\n' % quote_python(self.ExchangeRate).encode(ExternalEncoding))
        if self.ExchangeDate is not None:
            showIndent(outfile, level)
            outfile.write('ExchangeDate=model_.date(\n')
            self.ExchangeDate.exportLiteral(outfile, level, name_='ExchangeDate')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'OtherCurrencyAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.OtherCurrencyAmount = obj_
            obj_.original_tagname_ = 'OtherCurrencyAmount'
        elif nodeName_ == 'ExchangeRate':
            ExchangeRate_ = child_.text
            ExchangeRate_ = self.gds_validate_string(ExchangeRate_, node, 'ExchangeRate')
            self.ExchangeRate = ExchangeRate_
            self.validate_exchangeRate(self.ExchangeRate)    # validate type exchangeRate
        elif nodeName_ == 'ExchangeDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.ExchangeDate = obj_
            obj_.original_tagname_ = 'ExchangeDate'
# end class TransactionDetailsType


class AttachmentMessageDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AttachmentMessageIdentifier=None):
        self.original_tagname_ = None
        self.AttachmentMessageIdentifier = AttachmentMessageIdentifier
    def factory(*args_, **kwargs_):
        if AttachmentMessageDetailsType.subclass:
            return AttachmentMessageDetailsType.subclass(*args_, **kwargs_)
        else:
            return AttachmentMessageDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AttachmentMessageIdentifier(self): return self.AttachmentMessageIdentifier
    def set_AttachmentMessageIdentifier(self, AttachmentMessageIdentifier): self.AttachmentMessageIdentifier = AttachmentMessageIdentifier
    def validate_genericStringType15_61(self, value):
        # Validate type genericStringType15_61, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.AttachmentMessageIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='AttachmentMessageDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AttachmentMessageDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='AttachmentMessageDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AttachmentMessageDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='AttachmentMessageDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AttachmentMessageIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAttachmentMessageIdentifier>%s</%sAttachmentMessageIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.AttachmentMessageIdentifier).encode(ExternalEncoding), input_name='AttachmentMessageIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='AttachmentMessageDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AttachmentMessageIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('AttachmentMessageIdentifier=%s,\n' % quote_python(self.AttachmentMessageIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AttachmentMessageIdentifier':
            AttachmentMessageIdentifier_ = child_.text
            AttachmentMessageIdentifier_ = self.gds_validate_string(AttachmentMessageIdentifier_, node, 'AttachmentMessageIdentifier')
            self.AttachmentMessageIdentifier = AttachmentMessageIdentifier_
            self.validate_genericStringType15_61(self.AttachmentMessageIdentifier)    # validate type genericStringType15_61
# end class AttachmentMessageDetailsType


class QuantityType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, QuantityUnitCode=None, valueOf_=None, extensiontype_=None):
        self.original_tagname_ = None
        self.QuantityUnitCode = _cast(None, QuantityUnitCode)
        self.valueOf_ = valueOf_
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if QuantityType.subclass:
            return QuantityType.subclass(*args_, **kwargs_)
        else:
            return QuantityType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_QuantityUnitCode(self): return self.QuantityUnitCode
    def set_QuantityUnitCode(self, QuantityUnitCode): self.QuantityUnitCode = QuantityUnitCode
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_genericTokenType0_14(self, value):
        # Validate type genericTokenType0_14, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='QuantityType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='QuantityType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='QuantityType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='QuantityType'):
        if self.QuantityUnitCode is not None and 'QuantityUnitCode' not in already_processed:
            already_processed.add('QuantityUnitCode')
            outfile.write(' QuantityUnitCode=%s' % (quote_attrib(self.QuantityUnitCode), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='', name_='QuantityType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='QuantityType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.QuantityUnitCode is not None and 'QuantityUnitCode' not in already_processed:
            already_processed.add('QuantityUnitCode')
            showIndent(outfile, level)
            outfile.write('QuantityUnitCode="%s",\n' % (self.QuantityUnitCode,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('QuantityUnitCode', node)
        if value is not None and 'QuantityUnitCode' not in already_processed:
            already_processed.add('QuantityUnitCode')
            self.QuantityUnitCode = value
            self.QuantityUnitCode = ' '.join(self.QuantityUnitCode.split())
            self.validate_genericTokenType0_14(self.QuantityUnitCode)    # validate type genericTokenType0_14
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class QuantityType


class QuantityType0_14(QuantityType):
    subclass = None
    superclass = QuantityType
    def __init__(self, QuantityUnitCode=None, valueOf_=None):
        self.original_tagname_ = None
        super(QuantityType0_14, self).__init__(QuantityUnitCode, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if QuantityType0_14.subclass:
            return QuantityType0_14.subclass(*args_, **kwargs_)
        else:
            return QuantityType0_14(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(QuantityType0_14, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='QuantityType0_14', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='QuantityType0_14')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='QuantityType0_14', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='QuantityType0_14'):
        super(QuantityType0_14, self).exportAttributes(outfile, level, already_processed, namespace_, name_='QuantityType0_14')
    def exportChildren(self, outfile, level, namespace_='', name_='QuantityType0_14', fromsubclass_=False, pretty_print=True):
        super(QuantityType0_14, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='QuantityType0_14'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(QuantityType0_14, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(QuantityType0_14, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(QuantityType0_14, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class QuantityType0_14


class QuantityType0_70(QuantityType):
    subclass = None
    superclass = QuantityType
    def __init__(self, QuantityUnitCode=None, valueOf_=None):
        self.original_tagname_ = None
        super(QuantityType0_70, self).__init__(QuantityUnitCode, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if QuantityType0_70.subclass:
            return QuantityType0_70.subclass(*args_, **kwargs_)
        else:
            return QuantityType0_70(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(QuantityType0_70, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='QuantityType0_70', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='QuantityType0_70')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='QuantityType0_70', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='QuantityType0_70'):
        super(QuantityType0_70, self).exportAttributes(outfile, level, already_processed, namespace_, name_='QuantityType0_70')
    def exportChildren(self, outfile, level, namespace_='', name_='QuantityType0_70', fromsubclass_=False, pretty_print=True):
        super(QuantityType0_70, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='QuantityType0_70'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(QuantityType0_70, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(QuantityType0_70, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(QuantityType0_70, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class QuantityType0_70


class AnyPartyTextType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AnyPartyCode=None, valueOf_=None, extensiontype_=None):
        self.original_tagname_ = None
        self.AnyPartyCode = _cast(None, AnyPartyCode)
        self.valueOf_ = valueOf_
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AnyPartyTextType.subclass:
            return AnyPartyTextType.subclass(*args_, **kwargs_)
        else:
            return AnyPartyTextType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AnyPartyCode(self): return self.AnyPartyCode
    def set_AnyPartyCode(self, AnyPartyCode): self.AnyPartyCode = AnyPartyCode
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_genericTokenType0_35(self, value):
        # Validate type genericTokenType0_35, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='AnyPartyTextType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AnyPartyTextType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='AnyPartyTextType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AnyPartyTextType'):
        if self.AnyPartyCode is not None and 'AnyPartyCode' not in already_processed:
            already_processed.add('AnyPartyCode')
            outfile.write(' AnyPartyCode=%s' % (quote_attrib(self.AnyPartyCode), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='', name_='AnyPartyTextType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AnyPartyTextType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.AnyPartyCode is not None and 'AnyPartyCode' not in already_processed:
            already_processed.add('AnyPartyCode')
            showIndent(outfile, level)
            outfile.write('AnyPartyCode="%s",\n' % (self.AnyPartyCode,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('AnyPartyCode', node)
        if value is not None and 'AnyPartyCode' not in already_processed:
            already_processed.add('AnyPartyCode')
            self.AnyPartyCode = value
            self.AnyPartyCode = ' '.join(self.AnyPartyCode.split())
            self.validate_genericTokenType0_35(self.AnyPartyCode)    # validate type genericTokenType0_35
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AnyPartyTextType


class anypartytexttype0_35(AnyPartyTextType):
    subclass = None
    superclass = AnyPartyTextType
    def __init__(self, AnyPartyCode=None, valueOf_=None):
        self.original_tagname_ = None
        super(anypartytexttype0_35, self).__init__(AnyPartyCode, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if anypartytexttype0_35.subclass:
            return anypartytexttype0_35.subclass(*args_, **kwargs_)
        else:
            return anypartytexttype0_35(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(anypartytexttype0_35, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='anypartytexttype0_35', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='anypartytexttype0_35')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='anypartytexttype0_35', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='anypartytexttype0_35'):
        super(anypartytexttype0_35, self).exportAttributes(outfile, level, already_processed, namespace_, name_='anypartytexttype0_35')
    def exportChildren(self, outfile, level, namespace_='', name_='anypartytexttype0_35', fromsubclass_=False, pretty_print=True):
        super(anypartytexttype0_35, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='anypartytexttype0_35'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(anypartytexttype0_35, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(anypartytexttype0_35, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(anypartytexttype0_35, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class anypartytexttype0_35


class date(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Format=None, valueOf_=None):
        self.original_tagname_ = None
        self.Format = _cast(None, Format)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if date.subclass:
            return date.subclass(*args_, **kwargs_)
        else:
            return date(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Format(self): return self.Format
    def set_Format(self, Format): self.Format = Format
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='date', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='date')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='date', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='date'):
        if self.Format is not None and 'Format' not in already_processed:
            already_processed.add('Format')
            outfile.write(' Format=%s' % (self.gds_format_string(quote_attrib(self.Format).encode(ExternalEncoding), input_name='Format'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='date', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='date'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.Format is not None and 'Format' not in already_processed:
            already_processed.add('Format')
            showIndent(outfile, level)
            outfile.write('Format="%s",\n' % (self.Format,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Format', node)
        if value is not None and 'Format' not in already_processed:
            already_processed.add('Format')
            self.Format = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class date


class amount(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AmountCurrencyIdentifier=None, valueOf_=None):
        self.original_tagname_ = None
        self.AmountCurrencyIdentifier = _cast(None, AmountCurrencyIdentifier)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if amount.subclass:
            return amount.subclass(*args_, **kwargs_)
        else:
            return amount(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AmountCurrencyIdentifier(self): return self.AmountCurrencyIdentifier
    def set_AmountCurrencyIdentifier(self, AmountCurrencyIdentifier): self.AmountCurrencyIdentifier = AmountCurrencyIdentifier
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='amount', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='amount')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='amount', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='amount'):
        if self.AmountCurrencyIdentifier is not None and 'AmountCurrencyIdentifier' not in already_processed:
            already_processed.add('AmountCurrencyIdentifier')
            outfile.write(' AmountCurrencyIdentifier=%s' % (self.gds_format_string(quote_attrib(self.AmountCurrencyIdentifier).encode(ExternalEncoding), input_name='AmountCurrencyIdentifier'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='amount', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='amount'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.AmountCurrencyIdentifier is not None and 'AmountCurrencyIdentifier' not in already_processed:
            already_processed.add('AmountCurrencyIdentifier')
            showIndent(outfile, level)
            outfile.write('AmountCurrencyIdentifier="%s",\n' % (self.AmountCurrencyIdentifier,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('AmountCurrencyIdentifier', node)
        if value is not None and 'AmountCurrencyIdentifier' not in already_processed:
            already_processed.add('AmountCurrencyIdentifier')
            self.AmountCurrencyIdentifier = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class amount


class epiAmount(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AmountCurrencyIdentifier=None, valueOf_=None):
        self.original_tagname_ = None
        self.AmountCurrencyIdentifier = _cast(None, AmountCurrencyIdentifier)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if epiAmount.subclass:
            return epiAmount.subclass(*args_, **kwargs_)
        else:
            return epiAmount(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AmountCurrencyIdentifier(self): return self.AmountCurrencyIdentifier
    def set_AmountCurrencyIdentifier(self, AmountCurrencyIdentifier): self.AmountCurrencyIdentifier = AmountCurrencyIdentifier
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='epiAmount', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='epiAmount')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='epiAmount', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='epiAmount'):
        if self.AmountCurrencyIdentifier is not None and 'AmountCurrencyIdentifier' not in already_processed:
            already_processed.add('AmountCurrencyIdentifier')
            outfile.write(' AmountCurrencyIdentifier=%s' % (self.gds_format_string(quote_attrib(self.AmountCurrencyIdentifier).encode(ExternalEncoding), input_name='AmountCurrencyIdentifier'), ))
    def exportChildren(self, outfile, level, namespace_='', name_='epiAmount', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='epiAmount'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.AmountCurrencyIdentifier is not None and 'AmountCurrencyIdentifier' not in already_processed:
            already_processed.add('AmountCurrencyIdentifier')
            showIndent(outfile, level)
            outfile.write('AmountCurrencyIdentifier="%s",\n' % (self.AmountCurrencyIdentifier,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('AmountCurrencyIdentifier', node)
        if value is not None and 'AmountCurrencyIdentifier' not in already_processed:
            already_processed.add('AmountCurrencyIdentifier')
            self.AmountCurrencyIdentifier = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class epiAmount


class unitAmount(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AmountCurrencyIdentifier=None, UnitPriceUnitCode=None, valueOf_=None):
        self.original_tagname_ = None
        self.AmountCurrencyIdentifier = _cast(None, AmountCurrencyIdentifier)
        self.UnitPriceUnitCode = _cast(None, UnitPriceUnitCode)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if unitAmount.subclass:
            return unitAmount.subclass(*args_, **kwargs_)
        else:
            return unitAmount(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AmountCurrencyIdentifier(self): return self.AmountCurrencyIdentifier
    def set_AmountCurrencyIdentifier(self, AmountCurrencyIdentifier): self.AmountCurrencyIdentifier = AmountCurrencyIdentifier
    def get_UnitPriceUnitCode(self): return self.UnitPriceUnitCode
    def set_UnitPriceUnitCode(self, UnitPriceUnitCode): self.UnitPriceUnitCode = UnitPriceUnitCode
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def validate_genericStringType0_14(self, value):
        # Validate type genericStringType0_14, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='unitAmount', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='unitAmount')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='unitAmount', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='unitAmount'):
        if self.AmountCurrencyIdentifier is not None and 'AmountCurrencyIdentifier' not in already_processed:
            already_processed.add('AmountCurrencyIdentifier')
            outfile.write(' AmountCurrencyIdentifier=%s' % (self.gds_format_string(quote_attrib(self.AmountCurrencyIdentifier).encode(ExternalEncoding), input_name='AmountCurrencyIdentifier'), ))
        if self.UnitPriceUnitCode is not None and 'UnitPriceUnitCode' not in already_processed:
            already_processed.add('UnitPriceUnitCode')
            outfile.write(' UnitPriceUnitCode=%s' % (quote_attrib(self.UnitPriceUnitCode), ))
    def exportChildren(self, outfile, level, namespace_='', name_='unitAmount', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='unitAmount'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.AmountCurrencyIdentifier is not None and 'AmountCurrencyIdentifier' not in already_processed:
            already_processed.add('AmountCurrencyIdentifier')
            showIndent(outfile, level)
            outfile.write('AmountCurrencyIdentifier="%s",\n' % (self.AmountCurrencyIdentifier,))
        if self.UnitPriceUnitCode is not None and 'UnitPriceUnitCode' not in already_processed:
            already_processed.add('UnitPriceUnitCode')
            showIndent(outfile, level)
            outfile.write('UnitPriceUnitCode="%s",\n' % (self.UnitPriceUnitCode,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('AmountCurrencyIdentifier', node)
        if value is not None and 'AmountCurrencyIdentifier' not in already_processed:
            already_processed.add('AmountCurrencyIdentifier')
            self.AmountCurrencyIdentifier = value
        value = find_attr_value_('UnitPriceUnitCode', node)
        if value is not None and 'UnitPriceUnitCode' not in already_processed:
            already_processed.add('UnitPriceUnitCode')
            self.UnitPriceUnitCode = value
            self.validate_genericStringType0_14(self.UnitPriceUnitCode)    # validate type genericStringType0_14
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class unitAmount


class MessageSenderDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, FromIdentifier=None, FromIntermediator=None):
        self.original_tagname_ = None
        self.FromIdentifier = FromIdentifier
        self.FromIntermediator = FromIntermediator
    def factory(*args_, **kwargs_):
        if MessageSenderDetailsType.subclass:
            return MessageSenderDetailsType.subclass(*args_, **kwargs_)
        else:
            return MessageSenderDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_FromIdentifier(self): return self.FromIdentifier
    def set_FromIdentifier(self, FromIdentifier): self.FromIdentifier = FromIdentifier
    def get_FromIntermediator(self): return self.FromIntermediator
    def set_FromIntermediator(self, FromIntermediator): self.FromIntermediator = FromIntermediator
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.FromIdentifier is not None or
            self.FromIntermediator is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='MessageSenderDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MessageSenderDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='MessageSenderDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MessageSenderDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='MessageSenderDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.FromIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFromIdentifier>%s</%sFromIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.FromIdentifier).encode(ExternalEncoding), input_name='FromIdentifier'), namespace_, eol_))
        if self.FromIntermediator is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFromIntermediator>%s</%sFromIntermediator>%s' % (namespace_, self.gds_format_string(quote_xml(self.FromIntermediator).encode(ExternalEncoding), input_name='FromIntermediator'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='MessageSenderDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.FromIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('FromIdentifier=%s,\n' % quote_python(self.FromIdentifier).encode(ExternalEncoding))
        if self.FromIntermediator is not None:
            showIndent(outfile, level)
            outfile.write('FromIntermediator=%s,\n' % quote_python(self.FromIntermediator).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'FromIdentifier':
            FromIdentifier_ = child_.text
            FromIdentifier_ = self.gds_validate_string(FromIdentifier_, node, 'FromIdentifier')
            self.FromIdentifier = FromIdentifier_
            self.validate_genericStringType2_35(self.FromIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'FromIntermediator':
            FromIntermediator_ = child_.text
            FromIntermediator_ = self.gds_validate_string(FromIntermediator_, node, 'FromIntermediator')
            self.FromIntermediator = FromIntermediator_
            self.validate_genericStringType2_35(self.FromIntermediator)    # validate type genericStringType2_35
# end class MessageSenderDetailsType


class MessageReceiverDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ToIdentifier=None, ToIntermediator=None):
        self.original_tagname_ = None
        self.ToIdentifier = ToIdentifier
        self.ToIntermediator = ToIntermediator
    def factory(*args_, **kwargs_):
        if MessageReceiverDetailsType.subclass:
            return MessageReceiverDetailsType.subclass(*args_, **kwargs_)
        else:
            return MessageReceiverDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ToIdentifier(self): return self.ToIdentifier
    def set_ToIdentifier(self, ToIdentifier): self.ToIdentifier = ToIdentifier
    def get_ToIntermediator(self): return self.ToIntermediator
    def set_ToIntermediator(self, ToIntermediator): self.ToIntermediator = ToIntermediator
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.ToIdentifier is not None or
            self.ToIntermediator is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='MessageReceiverDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MessageReceiverDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='MessageReceiverDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MessageReceiverDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='MessageReceiverDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ToIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sToIdentifier>%s</%sToIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ToIdentifier).encode(ExternalEncoding), input_name='ToIdentifier'), namespace_, eol_))
        if self.ToIntermediator is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sToIntermediator>%s</%sToIntermediator>%s' % (namespace_, self.gds_format_string(quote_xml(self.ToIntermediator).encode(ExternalEncoding), input_name='ToIntermediator'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='MessageReceiverDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.ToIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ToIdentifier=%s,\n' % quote_python(self.ToIdentifier).encode(ExternalEncoding))
        if self.ToIntermediator is not None:
            showIndent(outfile, level)
            outfile.write('ToIntermediator=%s,\n' % quote_python(self.ToIntermediator).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ToIdentifier':
            ToIdentifier_ = child_.text
            ToIdentifier_ = self.gds_validate_string(ToIdentifier_, node, 'ToIdentifier')
            self.ToIdentifier = ToIdentifier_
            self.validate_genericStringType2_35(self.ToIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'ToIntermediator':
            ToIntermediator_ = child_.text
            ToIntermediator_ = self.gds_validate_string(ToIntermediator_, node, 'ToIntermediator')
            self.ToIntermediator = ToIntermediator_
            self.validate_genericStringType2_35(self.ToIntermediator)    # validate type genericStringType2_35
# end class MessageReceiverDetailsType


class MessageDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, MessageIdentifier=None, MessageTimeStamp=None, RefToMessageIdentifier=None, ImplementationCode=None):
        self.original_tagname_ = None
        self.MessageIdentifier = MessageIdentifier
        self.MessageTimeStamp = MessageTimeStamp
        self.RefToMessageIdentifier = RefToMessageIdentifier
        self.ImplementationCode = ImplementationCode
    def factory(*args_, **kwargs_):
        if MessageDetailsType.subclass:
            return MessageDetailsType.subclass(*args_, **kwargs_)
        else:
            return MessageDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MessageIdentifier(self): return self.MessageIdentifier
    def set_MessageIdentifier(self, MessageIdentifier): self.MessageIdentifier = MessageIdentifier
    def get_MessageTimeStamp(self): return self.MessageTimeStamp
    def set_MessageTimeStamp(self, MessageTimeStamp): self.MessageTimeStamp = MessageTimeStamp
    def get_RefToMessageIdentifier(self): return self.RefToMessageIdentifier
    def set_RefToMessageIdentifier(self, RefToMessageIdentifier): self.RefToMessageIdentifier = RefToMessageIdentifier
    def get_ImplementationCode(self): return self.ImplementationCode
    def set_ImplementationCode(self, ImplementationCode): self.ImplementationCode = ImplementationCode
    def validate_genericStringType2_48(self, value):
        # Validate type genericStringType2_48, a restriction on xs:string.
        pass
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_genericStringType0_48(self, value):
        # Validate type genericStringType0_48, a restriction on xs:string.
        pass
    def validate_genericStringType0_4(self, value):
        # Validate type genericStringType0_4, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.MessageIdentifier is not None or
            self.MessageTimeStamp is not None or
            self.RefToMessageIdentifier is not None or
            self.ImplementationCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='MessageDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MessageDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='MessageDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MessageDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='MessageDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MessageIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMessageIdentifier>%s</%sMessageIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.MessageIdentifier).encode(ExternalEncoding), input_name='MessageIdentifier'), namespace_, eol_))
        if self.MessageTimeStamp is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMessageTimeStamp>%s</%sMessageTimeStamp>%s' % (namespace_, self.gds_format_string(quote_xml(self.MessageTimeStamp).encode(ExternalEncoding), input_name='MessageTimeStamp'), namespace_, eol_))
        if self.RefToMessageIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRefToMessageIdentifier>%s</%sRefToMessageIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RefToMessageIdentifier).encode(ExternalEncoding), input_name='RefToMessageIdentifier'), namespace_, eol_))
        if self.ImplementationCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sImplementationCode>%s</%sImplementationCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.ImplementationCode).encode(ExternalEncoding), input_name='ImplementationCode'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='MessageDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MessageIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('MessageIdentifier=%s,\n' % quote_python(self.MessageIdentifier).encode(ExternalEncoding))
        if self.MessageTimeStamp is not None:
            showIndent(outfile, level)
            outfile.write('MessageTimeStamp=%s,\n' % quote_python(self.MessageTimeStamp).encode(ExternalEncoding))
        if self.RefToMessageIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RefToMessageIdentifier=%s,\n' % quote_python(self.RefToMessageIdentifier).encode(ExternalEncoding))
        if self.ImplementationCode is not None:
            showIndent(outfile, level)
            outfile.write('ImplementationCode=%s,\n' % quote_python(self.ImplementationCode).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MessageIdentifier':
            MessageIdentifier_ = child_.text
            MessageIdentifier_ = self.gds_validate_string(MessageIdentifier_, node, 'MessageIdentifier')
            self.MessageIdentifier = MessageIdentifier_
            self.validate_genericStringType2_48(self.MessageIdentifier)    # validate type genericStringType2_48
        elif nodeName_ == 'MessageTimeStamp':
            MessageTimeStamp_ = child_.text
            MessageTimeStamp_ = self.gds_validate_string(MessageTimeStamp_, node, 'MessageTimeStamp')
            self.MessageTimeStamp = MessageTimeStamp_
            self.validate_genericStringType2_35(self.MessageTimeStamp)    # validate type genericStringType2_35
        elif nodeName_ == 'RefToMessageIdentifier':
            RefToMessageIdentifier_ = child_.text
            RefToMessageIdentifier_ = self.gds_validate_string(RefToMessageIdentifier_, node, 'RefToMessageIdentifier')
            self.RefToMessageIdentifier = RefToMessageIdentifier_
            self.validate_genericStringType0_48(self.RefToMessageIdentifier)    # validate type genericStringType0_48
        elif nodeName_ == 'ImplementationCode':
            ImplementationCode_ = child_.text
            ImplementationCode_ = self.gds_validate_string(ImplementationCode_, node, 'ImplementationCode')
            self.ImplementationCode = ImplementationCode_
            self.validate_genericStringType0_4(self.ImplementationCode)    # validate type genericStringType0_4
# end class MessageDetailsType


class AnyPartyPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AnyPartyStreetName=None, AnyPartyTownName=None, AnyPartyPostCodeIdentifier=None, CountryCode=None, CountryName=None, AnyPartyPostOfficeBoxIdentifier=None):
        self.original_tagname_ = None
        if AnyPartyStreetName is None:
            self.AnyPartyStreetName = []
        else:
            self.AnyPartyStreetName = AnyPartyStreetName
        self.AnyPartyTownName = AnyPartyTownName
        self.AnyPartyPostCodeIdentifier = AnyPartyPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
        self.AnyPartyPostOfficeBoxIdentifier = AnyPartyPostOfficeBoxIdentifier
    def factory(*args_, **kwargs_):
        if AnyPartyPostalAddressDetailsType.subclass:
            return AnyPartyPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return AnyPartyPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AnyPartyStreetName(self): return self.AnyPartyStreetName
    def set_AnyPartyStreetName(self, AnyPartyStreetName): self.AnyPartyStreetName = AnyPartyStreetName
    def add_AnyPartyStreetName(self, value): self.AnyPartyStreetName.append(value)
    def insert_AnyPartyStreetName_at(self, index, value): self.AnyPartyStreetName.insert(index, value)
    def replace_AnyPartyStreetName_at(self, index, value): self.AnyPartyStreetName[index] = value
    def get_AnyPartyTownName(self): return self.AnyPartyTownName
    def set_AnyPartyTownName(self, AnyPartyTownName): self.AnyPartyTownName = AnyPartyTownName
    def get_AnyPartyPostCodeIdentifier(self): return self.AnyPartyPostCodeIdentifier
    def set_AnyPartyPostCodeIdentifier(self, AnyPartyPostCodeIdentifier): self.AnyPartyPostCodeIdentifier = AnyPartyPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def get_AnyPartyPostOfficeBoxIdentifier(self): return self.AnyPartyPostOfficeBoxIdentifier
    def set_AnyPartyPostOfficeBoxIdentifier(self, AnyPartyPostOfficeBoxIdentifier): self.AnyPartyPostOfficeBoxIdentifier = AnyPartyPostOfficeBoxIdentifier
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.AnyPartyStreetName or
            self.AnyPartyTownName is not None or
            self.AnyPartyPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None or
            self.AnyPartyPostOfficeBoxIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='AnyPartyPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AnyPartyPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='AnyPartyPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AnyPartyPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='AnyPartyPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AnyPartyStreetName_ in self.AnyPartyStreetName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyStreetName>%s</%sAnyPartyStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(AnyPartyStreetName_).encode(ExternalEncoding), input_name='AnyPartyStreetName'), namespace_, eol_))
        if self.AnyPartyTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyTownName>%s</%sAnyPartyTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartyTownName).encode(ExternalEncoding), input_name='AnyPartyTownName'), namespace_, eol_))
        if self.AnyPartyPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyPostCodeIdentifier>%s</%sAnyPartyPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartyPostCodeIdentifier).encode(ExternalEncoding), input_name='AnyPartyPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
        if self.AnyPartyPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnyPartyPostOfficeBoxIdentifier>%s</%sAnyPartyPostOfficeBoxIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnyPartyPostOfficeBoxIdentifier).encode(ExternalEncoding), input_name='AnyPartyPostOfficeBoxIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='AnyPartyPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AnyPartyStreetName=[\n')
        level += 1
        for AnyPartyStreetName_ in self.AnyPartyStreetName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(AnyPartyStreetName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.AnyPartyTownName is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyTownName=%s,\n' % quote_python(self.AnyPartyTownName).encode(ExternalEncoding))
        if self.AnyPartyPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyPostCodeIdentifier=%s,\n' % quote_python(self.AnyPartyPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
        if self.AnyPartyPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('AnyPartyPostOfficeBoxIdentifier=%s,\n' % quote_python(self.AnyPartyPostOfficeBoxIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AnyPartyStreetName':
            AnyPartyStreetName_ = child_.text
            AnyPartyStreetName_ = self.gds_validate_string(AnyPartyStreetName_, node, 'AnyPartyStreetName')
            self.AnyPartyStreetName.append(AnyPartyStreetName_)
            self.validate_genericStringType2_35(self.AnyPartyStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'AnyPartyTownName':
            AnyPartyTownName_ = child_.text
            AnyPartyTownName_ = self.gds_validate_string(AnyPartyTownName_, node, 'AnyPartyTownName')
            self.AnyPartyTownName = AnyPartyTownName_
            self.validate_genericStringType2_35(self.AnyPartyTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'AnyPartyPostCodeIdentifier':
            AnyPartyPostCodeIdentifier_ = child_.text
            AnyPartyPostCodeIdentifier_ = self.gds_validate_string(AnyPartyPostCodeIdentifier_, node, 'AnyPartyPostCodeIdentifier')
            self.AnyPartyPostCodeIdentifier = AnyPartyPostCodeIdentifier_
            self.validate_genericStringType2_35(self.AnyPartyPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'AnyPartyPostOfficeBoxIdentifier':
            AnyPartyPostOfficeBoxIdentifier_ = child_.text
            AnyPartyPostOfficeBoxIdentifier_ = self.gds_validate_string(AnyPartyPostOfficeBoxIdentifier_, node, 'AnyPartyPostOfficeBoxIdentifier')
            self.AnyPartyPostOfficeBoxIdentifier = AnyPartyPostOfficeBoxIdentifier_
            self.validate_genericStringType0_35(self.AnyPartyPostOfficeBoxIdentifier)    # validate type genericStringType0_35
# end class AnyPartyPostalAddressDetailsType


class FactoringPartyPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, FactoringPartyStreetName=None, FactoringPartyTownName=None, FactoringPartyPostCodeIdentifier=None, CountryCode=None, CountryName=None, FactoringPartyPostOfficeBoxIdentifier=None):
        self.original_tagname_ = None
        if FactoringPartyStreetName is None:
            self.FactoringPartyStreetName = []
        else:
            self.FactoringPartyStreetName = FactoringPartyStreetName
        self.FactoringPartyTownName = FactoringPartyTownName
        self.FactoringPartyPostCodeIdentifier = FactoringPartyPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
        self.FactoringPartyPostOfficeBoxIdentifier = FactoringPartyPostOfficeBoxIdentifier
    def factory(*args_, **kwargs_):
        if FactoringPartyPostalAddressDetailsType.subclass:
            return FactoringPartyPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return FactoringPartyPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_FactoringPartyStreetName(self): return self.FactoringPartyStreetName
    def set_FactoringPartyStreetName(self, FactoringPartyStreetName): self.FactoringPartyStreetName = FactoringPartyStreetName
    def add_FactoringPartyStreetName(self, value): self.FactoringPartyStreetName.append(value)
    def insert_FactoringPartyStreetName_at(self, index, value): self.FactoringPartyStreetName.insert(index, value)
    def replace_FactoringPartyStreetName_at(self, index, value): self.FactoringPartyStreetName[index] = value
    def get_FactoringPartyTownName(self): return self.FactoringPartyTownName
    def set_FactoringPartyTownName(self, FactoringPartyTownName): self.FactoringPartyTownName = FactoringPartyTownName
    def get_FactoringPartyPostCodeIdentifier(self): return self.FactoringPartyPostCodeIdentifier
    def set_FactoringPartyPostCodeIdentifier(self, FactoringPartyPostCodeIdentifier): self.FactoringPartyPostCodeIdentifier = FactoringPartyPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def get_FactoringPartyPostOfficeBoxIdentifier(self): return self.FactoringPartyPostOfficeBoxIdentifier
    def set_FactoringPartyPostOfficeBoxIdentifier(self, FactoringPartyPostOfficeBoxIdentifier): self.FactoringPartyPostOfficeBoxIdentifier = FactoringPartyPostOfficeBoxIdentifier
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.FactoringPartyStreetName or
            self.FactoringPartyTownName is not None or
            self.FactoringPartyPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None or
            self.FactoringPartyPostOfficeBoxIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='FactoringPartyPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FactoringPartyPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='FactoringPartyPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='FactoringPartyPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='FactoringPartyPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for FactoringPartyStreetName_ in self.FactoringPartyStreetName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFactoringPartyStreetName>%s</%sFactoringPartyStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(FactoringPartyStreetName_).encode(ExternalEncoding), input_name='FactoringPartyStreetName'), namespace_, eol_))
        if self.FactoringPartyTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFactoringPartyTownName>%s</%sFactoringPartyTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.FactoringPartyTownName).encode(ExternalEncoding), input_name='FactoringPartyTownName'), namespace_, eol_))
        if self.FactoringPartyPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFactoringPartyPostCodeIdentifier>%s</%sFactoringPartyPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.FactoringPartyPostCodeIdentifier).encode(ExternalEncoding), input_name='FactoringPartyPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
        if self.FactoringPartyPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFactoringPartyPostOfficeBoxIdentifier>%s</%sFactoringPartyPostOfficeBoxIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.FactoringPartyPostOfficeBoxIdentifier).encode(ExternalEncoding), input_name='FactoringPartyPostOfficeBoxIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='FactoringPartyPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('FactoringPartyStreetName=[\n')
        level += 1
        for FactoringPartyStreetName_ in self.FactoringPartyStreetName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(FactoringPartyStreetName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.FactoringPartyTownName is not None:
            showIndent(outfile, level)
            outfile.write('FactoringPartyTownName=%s,\n' % quote_python(self.FactoringPartyTownName).encode(ExternalEncoding))
        if self.FactoringPartyPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('FactoringPartyPostCodeIdentifier=%s,\n' % quote_python(self.FactoringPartyPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
        if self.FactoringPartyPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('FactoringPartyPostOfficeBoxIdentifier=%s,\n' % quote_python(self.FactoringPartyPostOfficeBoxIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'FactoringPartyStreetName':
            FactoringPartyStreetName_ = child_.text
            FactoringPartyStreetName_ = self.gds_validate_string(FactoringPartyStreetName_, node, 'FactoringPartyStreetName')
            self.FactoringPartyStreetName.append(FactoringPartyStreetName_)
            self.validate_genericStringType2_35(self.FactoringPartyStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'FactoringPartyTownName':
            FactoringPartyTownName_ = child_.text
            FactoringPartyTownName_ = self.gds_validate_string(FactoringPartyTownName_, node, 'FactoringPartyTownName')
            self.FactoringPartyTownName = FactoringPartyTownName_
            self.validate_genericStringType2_35(self.FactoringPartyTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'FactoringPartyPostCodeIdentifier':
            FactoringPartyPostCodeIdentifier_ = child_.text
            FactoringPartyPostCodeIdentifier_ = self.gds_validate_string(FactoringPartyPostCodeIdentifier_, node, 'FactoringPartyPostCodeIdentifier')
            self.FactoringPartyPostCodeIdentifier = FactoringPartyPostCodeIdentifier_
            self.validate_genericStringType2_35(self.FactoringPartyPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'FactoringPartyPostOfficeBoxIdentifier':
            FactoringPartyPostOfficeBoxIdentifier_ = child_.text
            FactoringPartyPostOfficeBoxIdentifier_ = self.gds_validate_string(FactoringPartyPostOfficeBoxIdentifier_, node, 'FactoringPartyPostOfficeBoxIdentifier')
            self.FactoringPartyPostOfficeBoxIdentifier = FactoringPartyPostOfficeBoxIdentifier_
            self.validate_genericStringType0_35(self.FactoringPartyPostOfficeBoxIdentifier)    # validate type genericStringType0_35
# end class FactoringPartyPostalAddressDetailsType


class ShipmentPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ShipmentPartyIdentifier=None, ShipmentOrganisationName=None, ShipmentOrganisationDepartment=None, ShipmentOrganisationTaxCode=None, ShipmentCode=None, ShipmentPostalAddressDetails=None, ShipmentSiteCode=None):
        self.original_tagname_ = None
        self.ShipmentPartyIdentifier = ShipmentPartyIdentifier
        if ShipmentOrganisationName is None:
            self.ShipmentOrganisationName = []
        else:
            self.ShipmentOrganisationName = ShipmentOrganisationName
        if ShipmentOrganisationDepartment is None:
            self.ShipmentOrganisationDepartment = []
        else:
            self.ShipmentOrganisationDepartment = ShipmentOrganisationDepartment
        self.ShipmentOrganisationTaxCode = ShipmentOrganisationTaxCode
        self.ShipmentCode = ShipmentCode
        self.ShipmentPostalAddressDetails = ShipmentPostalAddressDetails
        self.ShipmentSiteCode = ShipmentSiteCode
    def factory(*args_, **kwargs_):
        if ShipmentPartyDetailsType.subclass:
            return ShipmentPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return ShipmentPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ShipmentPartyIdentifier(self): return self.ShipmentPartyIdentifier
    def set_ShipmentPartyIdentifier(self, ShipmentPartyIdentifier): self.ShipmentPartyIdentifier = ShipmentPartyIdentifier
    def get_ShipmentOrganisationName(self): return self.ShipmentOrganisationName
    def set_ShipmentOrganisationName(self, ShipmentOrganisationName): self.ShipmentOrganisationName = ShipmentOrganisationName
    def add_ShipmentOrganisationName(self, value): self.ShipmentOrganisationName.append(value)
    def insert_ShipmentOrganisationName_at(self, index, value): self.ShipmentOrganisationName.insert(index, value)
    def replace_ShipmentOrganisationName_at(self, index, value): self.ShipmentOrganisationName[index] = value
    def get_ShipmentOrganisationDepartment(self): return self.ShipmentOrganisationDepartment
    def set_ShipmentOrganisationDepartment(self, ShipmentOrganisationDepartment): self.ShipmentOrganisationDepartment = ShipmentOrganisationDepartment
    def add_ShipmentOrganisationDepartment(self, value): self.ShipmentOrganisationDepartment.append(value)
    def insert_ShipmentOrganisationDepartment_at(self, index, value): self.ShipmentOrganisationDepartment.insert(index, value)
    def replace_ShipmentOrganisationDepartment_at(self, index, value): self.ShipmentOrganisationDepartment[index] = value
    def get_ShipmentOrganisationTaxCode(self): return self.ShipmentOrganisationTaxCode
    def set_ShipmentOrganisationTaxCode(self, ShipmentOrganisationTaxCode): self.ShipmentOrganisationTaxCode = ShipmentOrganisationTaxCode
    def get_ShipmentCode(self): return self.ShipmentCode
    def set_ShipmentCode(self, ShipmentCode): self.ShipmentCode = ShipmentCode
    def get_ShipmentPostalAddressDetails(self): return self.ShipmentPostalAddressDetails
    def set_ShipmentPostalAddressDetails(self, ShipmentPostalAddressDetails): self.ShipmentPostalAddressDetails = ShipmentPostalAddressDetails
    def get_ShipmentSiteCode(self): return self.ShipmentSiteCode
    def set_ShipmentSiteCode(self, ShipmentSiteCode): self.ShipmentSiteCode = ShipmentSiteCode
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.ShipmentPartyIdentifier is not None or
            self.ShipmentOrganisationName or
            self.ShipmentOrganisationDepartment or
            self.ShipmentOrganisationTaxCode is not None or
            self.ShipmentCode is not None or
            self.ShipmentPostalAddressDetails is not None or
            self.ShipmentSiteCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='ShipmentPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ShipmentPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='ShipmentPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ShipmentPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ShipmentPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ShipmentPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShipmentPartyIdentifier>%s</%sShipmentPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ShipmentPartyIdentifier).encode(ExternalEncoding), input_name='ShipmentPartyIdentifier'), namespace_, eol_))
        for ShipmentOrganisationName_ in self.ShipmentOrganisationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShipmentOrganisationName>%s</%sShipmentOrganisationName>%s' % (namespace_, self.gds_format_string(quote_xml(ShipmentOrganisationName_).encode(ExternalEncoding), input_name='ShipmentOrganisationName'), namespace_, eol_))
        for ShipmentOrganisationDepartment_ in self.ShipmentOrganisationDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShipmentOrganisationDepartment>%s</%sShipmentOrganisationDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(ShipmentOrganisationDepartment_).encode(ExternalEncoding), input_name='ShipmentOrganisationDepartment'), namespace_, eol_))
        if self.ShipmentOrganisationTaxCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShipmentOrganisationTaxCode>%s</%sShipmentOrganisationTaxCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.ShipmentOrganisationTaxCode).encode(ExternalEncoding), input_name='ShipmentOrganisationTaxCode'), namespace_, eol_))
        if self.ShipmentCode is not None:
            self.ShipmentCode.export(outfile, level, namespace_, name_='ShipmentCode', pretty_print=pretty_print)
        if self.ShipmentPostalAddressDetails is not None:
            self.ShipmentPostalAddressDetails.export(outfile, level, namespace_, name_='ShipmentPostalAddressDetails', pretty_print=pretty_print)
        if self.ShipmentSiteCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShipmentSiteCode>%s</%sShipmentSiteCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.ShipmentSiteCode).encode(ExternalEncoding), input_name='ShipmentSiteCode'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='ShipmentPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.ShipmentPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ShipmentPartyIdentifier=%s,\n' % quote_python(self.ShipmentPartyIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('ShipmentOrganisationName=[\n')
        level += 1
        for ShipmentOrganisationName_ in self.ShipmentOrganisationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(ShipmentOrganisationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('ShipmentOrganisationDepartment=[\n')
        level += 1
        for ShipmentOrganisationDepartment_ in self.ShipmentOrganisationDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(ShipmentOrganisationDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.ShipmentOrganisationTaxCode is not None:
            showIndent(outfile, level)
            outfile.write('ShipmentOrganisationTaxCode=%s,\n' % quote_python(self.ShipmentOrganisationTaxCode).encode(ExternalEncoding))
        if self.ShipmentCode is not None:
            showIndent(outfile, level)
            outfile.write('ShipmentCode=model_.PartyIdentifierType(\n')
            self.ShipmentCode.exportLiteral(outfile, level, name_='ShipmentCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ShipmentPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('ShipmentPostalAddressDetails=model_.ShipmentPostalAddressDetailsType(\n')
            self.ShipmentPostalAddressDetails.exportLiteral(outfile, level, name_='ShipmentPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ShipmentSiteCode is not None:
            showIndent(outfile, level)
            outfile.write('ShipmentSiteCode=%s,\n' % quote_python(self.ShipmentSiteCode).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ShipmentPartyIdentifier':
            ShipmentPartyIdentifier_ = child_.text
            ShipmentPartyIdentifier_ = self.gds_validate_string(ShipmentPartyIdentifier_, node, 'ShipmentPartyIdentifier')
            self.ShipmentPartyIdentifier = ShipmentPartyIdentifier_
            self.validate_genericStringType0_35(self.ShipmentPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'ShipmentOrganisationName':
            ShipmentOrganisationName_ = child_.text
            ShipmentOrganisationName_ = self.gds_validate_string(ShipmentOrganisationName_, node, 'ShipmentOrganisationName')
            self.ShipmentOrganisationName.append(ShipmentOrganisationName_)
            self.validate_genericStringType2_35(self.ShipmentOrganisationName)    # validate type genericStringType2_35
        elif nodeName_ == 'ShipmentOrganisationDepartment':
            ShipmentOrganisationDepartment_ = child_.text
            ShipmentOrganisationDepartment_ = self.gds_validate_string(ShipmentOrganisationDepartment_, node, 'ShipmentOrganisationDepartment')
            self.ShipmentOrganisationDepartment.append(ShipmentOrganisationDepartment_)
            self.validate_genericStringType0_35(self.ShipmentOrganisationDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'ShipmentOrganisationTaxCode':
            ShipmentOrganisationTaxCode_ = child_.text
            ShipmentOrganisationTaxCode_ = self.gds_validate_string(ShipmentOrganisationTaxCode_, node, 'ShipmentOrganisationTaxCode')
            self.ShipmentOrganisationTaxCode = ShipmentOrganisationTaxCode_
            self.validate_genericStringType0_35(self.ShipmentOrganisationTaxCode)    # validate type genericStringType0_35
        elif nodeName_ == 'ShipmentCode':
            obj_ = PartyIdentifierType.factory()
            obj_.build(child_)
            self.ShipmentCode = obj_
            obj_.original_tagname_ = 'ShipmentCode'
        elif nodeName_ == 'ShipmentPostalAddressDetails':
            obj_ = ShipmentPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.ShipmentPostalAddressDetails = obj_
            obj_.original_tagname_ = 'ShipmentPostalAddressDetails'
        elif nodeName_ == 'ShipmentSiteCode':
            ShipmentSiteCode_ = child_.text
            ShipmentSiteCode_ = self.gds_validate_string(ShipmentSiteCode_, node, 'ShipmentSiteCode')
            self.ShipmentSiteCode = ShipmentSiteCode_
            self.validate_genericStringType0_35(self.ShipmentSiteCode)    # validate type genericStringType0_35
# end class ShipmentPartyDetailsType


class ShipmentPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ShipmentStreetName=None, ShipmentTownName=None, ShipmentPostCodeIdentifier=None, CountryCode=None, CountryName=None, ShipmentPostOfficeBoxIdentifier=None):
        self.original_tagname_ = None
        if ShipmentStreetName is None:
            self.ShipmentStreetName = []
        else:
            self.ShipmentStreetName = ShipmentStreetName
        self.ShipmentTownName = ShipmentTownName
        self.ShipmentPostCodeIdentifier = ShipmentPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
        self.ShipmentPostOfficeBoxIdentifier = ShipmentPostOfficeBoxIdentifier
    def factory(*args_, **kwargs_):
        if ShipmentPostalAddressDetailsType.subclass:
            return ShipmentPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return ShipmentPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ShipmentStreetName(self): return self.ShipmentStreetName
    def set_ShipmentStreetName(self, ShipmentStreetName): self.ShipmentStreetName = ShipmentStreetName
    def add_ShipmentStreetName(self, value): self.ShipmentStreetName.append(value)
    def insert_ShipmentStreetName_at(self, index, value): self.ShipmentStreetName.insert(index, value)
    def replace_ShipmentStreetName_at(self, index, value): self.ShipmentStreetName[index] = value
    def get_ShipmentTownName(self): return self.ShipmentTownName
    def set_ShipmentTownName(self, ShipmentTownName): self.ShipmentTownName = ShipmentTownName
    def get_ShipmentPostCodeIdentifier(self): return self.ShipmentPostCodeIdentifier
    def set_ShipmentPostCodeIdentifier(self, ShipmentPostCodeIdentifier): self.ShipmentPostCodeIdentifier = ShipmentPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def get_ShipmentPostOfficeBoxIdentifier(self): return self.ShipmentPostOfficeBoxIdentifier
    def set_ShipmentPostOfficeBoxIdentifier(self, ShipmentPostOfficeBoxIdentifier): self.ShipmentPostOfficeBoxIdentifier = ShipmentPostOfficeBoxIdentifier
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.ShipmentStreetName or
            self.ShipmentTownName is not None or
            self.ShipmentPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None or
            self.ShipmentPostOfficeBoxIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='ShipmentPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ShipmentPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='ShipmentPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ShipmentPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ShipmentPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for ShipmentStreetName_ in self.ShipmentStreetName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShipmentStreetName>%s</%sShipmentStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(ShipmentStreetName_).encode(ExternalEncoding), input_name='ShipmentStreetName'), namespace_, eol_))
        if self.ShipmentTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShipmentTownName>%s</%sShipmentTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.ShipmentTownName).encode(ExternalEncoding), input_name='ShipmentTownName'), namespace_, eol_))
        if self.ShipmentPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShipmentPostCodeIdentifier>%s</%sShipmentPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ShipmentPostCodeIdentifier).encode(ExternalEncoding), input_name='ShipmentPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
        if self.ShipmentPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sShipmentPostOfficeBoxIdentifier>%s</%sShipmentPostOfficeBoxIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.ShipmentPostOfficeBoxIdentifier).encode(ExternalEncoding), input_name='ShipmentPostOfficeBoxIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='ShipmentPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('ShipmentStreetName=[\n')
        level += 1
        for ShipmentStreetName_ in self.ShipmentStreetName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(ShipmentStreetName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.ShipmentTownName is not None:
            showIndent(outfile, level)
            outfile.write('ShipmentTownName=%s,\n' % quote_python(self.ShipmentTownName).encode(ExternalEncoding))
        if self.ShipmentPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ShipmentPostCodeIdentifier=%s,\n' % quote_python(self.ShipmentPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
        if self.ShipmentPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('ShipmentPostOfficeBoxIdentifier=%s,\n' % quote_python(self.ShipmentPostOfficeBoxIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ShipmentStreetName':
            ShipmentStreetName_ = child_.text
            ShipmentStreetName_ = self.gds_validate_string(ShipmentStreetName_, node, 'ShipmentStreetName')
            self.ShipmentStreetName.append(ShipmentStreetName_)
            self.validate_genericStringType2_35(self.ShipmentStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'ShipmentTownName':
            ShipmentTownName_ = child_.text
            ShipmentTownName_ = self.gds_validate_string(ShipmentTownName_, node, 'ShipmentTownName')
            self.ShipmentTownName = ShipmentTownName_
            self.validate_genericStringType2_35(self.ShipmentTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'ShipmentPostCodeIdentifier':
            ShipmentPostCodeIdentifier_ = child_.text
            ShipmentPostCodeIdentifier_ = self.gds_validate_string(ShipmentPostCodeIdentifier_, node, 'ShipmentPostCodeIdentifier')
            self.ShipmentPostCodeIdentifier = ShipmentPostCodeIdentifier_
            self.validate_genericStringType2_35(self.ShipmentPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'ShipmentPostOfficeBoxIdentifier':
            ShipmentPostOfficeBoxIdentifier_ = child_.text
            ShipmentPostOfficeBoxIdentifier_ = self.gds_validate_string(ShipmentPostOfficeBoxIdentifier_, node, 'ShipmentPostOfficeBoxIdentifier')
            self.ShipmentPostOfficeBoxIdentifier = ShipmentPostOfficeBoxIdentifier_
            self.validate_genericStringType0_35(self.ShipmentPostOfficeBoxIdentifier)    # validate type genericStringType0_35
# end class ShipmentPostalAddressDetailsType


class PackageDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PackageLength=None, PackageWidth=None, PackageHeight=None, PackageWeight=None, PackageNetWeight=None, PackageVolume=None, TransportCarriageQuantity=None):
        self.original_tagname_ = None
        self.PackageLength = PackageLength
        self.PackageWidth = PackageWidth
        self.PackageHeight = PackageHeight
        self.PackageWeight = PackageWeight
        self.PackageNetWeight = PackageNetWeight
        self.PackageVolume = PackageVolume
        self.TransportCarriageQuantity = TransportCarriageQuantity
    def factory(*args_, **kwargs_):
        if PackageDetailsType.subclass:
            return PackageDetailsType.subclass(*args_, **kwargs_)
        else:
            return PackageDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PackageLength(self): return self.PackageLength
    def set_PackageLength(self, PackageLength): self.PackageLength = PackageLength
    def get_PackageWidth(self): return self.PackageWidth
    def set_PackageWidth(self, PackageWidth): self.PackageWidth = PackageWidth
    def get_PackageHeight(self): return self.PackageHeight
    def set_PackageHeight(self, PackageHeight): self.PackageHeight = PackageHeight
    def get_PackageWeight(self): return self.PackageWeight
    def set_PackageWeight(self, PackageWeight): self.PackageWeight = PackageWeight
    def get_PackageNetWeight(self): return self.PackageNetWeight
    def set_PackageNetWeight(self, PackageNetWeight): self.PackageNetWeight = PackageNetWeight
    def get_PackageVolume(self): return self.PackageVolume
    def set_PackageVolume(self, PackageVolume): self.PackageVolume = PackageVolume
    def get_TransportCarriageQuantity(self): return self.TransportCarriageQuantity
    def set_TransportCarriageQuantity(self, TransportCarriageQuantity): self.TransportCarriageQuantity = TransportCarriageQuantity
    def hasContent_(self):
        if (
            self.PackageLength is not None or
            self.PackageWidth is not None or
            self.PackageHeight is not None or
            self.PackageWeight is not None or
            self.PackageNetWeight is not None or
            self.PackageVolume is not None or
            self.TransportCarriageQuantity is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='PackageDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PackageDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='PackageDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='PackageDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='PackageDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PackageLength is not None:
            self.PackageLength.export(outfile, level, namespace_, name_='PackageLength', pretty_print=pretty_print)
        if self.PackageWidth is not None:
            self.PackageWidth.export(outfile, level, namespace_, name_='PackageWidth', pretty_print=pretty_print)
        if self.PackageHeight is not None:
            self.PackageHeight.export(outfile, level, namespace_, name_='PackageHeight', pretty_print=pretty_print)
        if self.PackageWeight is not None:
            self.PackageWeight.export(outfile, level, namespace_, name_='PackageWeight', pretty_print=pretty_print)
        if self.PackageNetWeight is not None:
            self.PackageNetWeight.export(outfile, level, namespace_, name_='PackageNetWeight', pretty_print=pretty_print)
        if self.PackageVolume is not None:
            self.PackageVolume.export(outfile, level, namespace_, name_='PackageVolume', pretty_print=pretty_print)
        if self.TransportCarriageQuantity is not None:
            self.TransportCarriageQuantity.export(outfile, level, namespace_, name_='TransportCarriageQuantity', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PackageDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.PackageLength is not None:
            showIndent(outfile, level)
            outfile.write('PackageLength=model_.QuantityType0_14(\n')
            self.PackageLength.exportLiteral(outfile, level, name_='PackageLength')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.PackageWidth is not None:
            showIndent(outfile, level)
            outfile.write('PackageWidth=model_.QuantityType0_14(\n')
            self.PackageWidth.exportLiteral(outfile, level, name_='PackageWidth')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.PackageHeight is not None:
            showIndent(outfile, level)
            outfile.write('PackageHeight=model_.QuantityType0_14(\n')
            self.PackageHeight.exportLiteral(outfile, level, name_='PackageHeight')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.PackageWeight is not None:
            showIndent(outfile, level)
            outfile.write('PackageWeight=model_.QuantityType0_14(\n')
            self.PackageWeight.exportLiteral(outfile, level, name_='PackageWeight')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.PackageNetWeight is not None:
            showIndent(outfile, level)
            outfile.write('PackageNetWeight=model_.QuantityType0_14(\n')
            self.PackageNetWeight.exportLiteral(outfile, level, name_='PackageNetWeight')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.PackageVolume is not None:
            showIndent(outfile, level)
            outfile.write('PackageVolume=model_.QuantityType0_14(\n')
            self.PackageVolume.exportLiteral(outfile, level, name_='PackageVolume')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.TransportCarriageQuantity is not None:
            showIndent(outfile, level)
            outfile.write('TransportCarriageQuantity=model_.QuantityType0_14(\n')
            self.TransportCarriageQuantity.exportLiteral(outfile, level, name_='TransportCarriageQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PackageLength':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.PackageLength = obj_
            obj_.original_tagname_ = 'PackageLength'
        elif nodeName_ == 'PackageWidth':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.PackageWidth = obj_
            obj_.original_tagname_ = 'PackageWidth'
        elif nodeName_ == 'PackageHeight':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.PackageHeight = obj_
            obj_.original_tagname_ = 'PackageHeight'
        elif nodeName_ == 'PackageWeight':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.PackageWeight = obj_
            obj_.original_tagname_ = 'PackageWeight'
        elif nodeName_ == 'PackageNetWeight':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.PackageNetWeight = obj_
            obj_.original_tagname_ = 'PackageNetWeight'
        elif nodeName_ == 'PackageVolume':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.PackageVolume = obj_
            obj_.original_tagname_ = 'PackageVolume'
        elif nodeName_ == 'TransportCarriageQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.TransportCarriageQuantity = obj_
            obj_.original_tagname_ = 'TransportCarriageQuantity'
# end class PackageDetailsType


class DefinitionDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DefinitionHeaderText=None, DefinitionValue=None):
        self.original_tagname_ = None
        self.DefinitionHeaderText = DefinitionHeaderText
        self.DefinitionValue = DefinitionValue
    def factory(*args_, **kwargs_):
        if DefinitionDetailsType.subclass:
            return DefinitionDetailsType.subclass(*args_, **kwargs_)
        else:
            return DefinitionDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DefinitionHeaderText(self): return self.DefinitionHeaderText
    def set_DefinitionHeaderText(self, DefinitionHeaderText): self.DefinitionHeaderText = DefinitionHeaderText
    def get_DefinitionValue(self): return self.DefinitionValue
    def set_DefinitionValue(self, DefinitionValue): self.DefinitionValue = DefinitionValue
    def hasContent_(self):
        if (
            self.DefinitionHeaderText is not None or
            self.DefinitionValue is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='DefinitionDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DefinitionDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='DefinitionDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DefinitionDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='DefinitionDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DefinitionHeaderText is not None:
            self.DefinitionHeaderText.export(outfile, level, namespace_, name_='DefinitionHeaderText', pretty_print=pretty_print)
        if self.DefinitionValue is not None:
            self.DefinitionValue.export(outfile, level, namespace_, name_='DefinitionValue', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DefinitionDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DefinitionHeaderText is not None:
            showIndent(outfile, level)
            outfile.write('DefinitionHeaderText=model_.DefinitionHeaderTextType(\n')
            self.DefinitionHeaderText.exportLiteral(outfile, level, name_='DefinitionHeaderText')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DefinitionValue is not None:
            showIndent(outfile, level)
            outfile.write('DefinitionValue=model_.QuantityType0_70(\n')
            self.DefinitionValue.exportLiteral(outfile, level, name_='DefinitionValue')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DefinitionHeaderText':
            obj_ = DefinitionHeaderTextType.factory()
            obj_.build(child_)
            self.DefinitionHeaderText = obj_
            obj_.original_tagname_ = 'DefinitionHeaderText'
        elif nodeName_ == 'DefinitionValue':
            obj_ = QuantityType0_70.factory()
            obj_.build(child_)
            self.DefinitionValue = obj_
            obj_.original_tagname_ = 'DefinitionValue'
# end class DefinitionDetailsType


class DefinitionHeaderTextType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DefinitionCode=None, valueOf_=None):
        self.original_tagname_ = None
        self.DefinitionCode = _cast(None, DefinitionCode)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if DefinitionHeaderTextType.subclass:
            return DefinitionHeaderTextType.subclass(*args_, **kwargs_)
        else:
            return DefinitionHeaderTextType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DefinitionCode(self): return self.DefinitionCode
    def set_DefinitionCode(self, DefinitionCode): self.DefinitionCode = DefinitionCode
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def validate_genericTokenType1_20(self, value):
        # Validate type genericTokenType1_20, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='DefinitionHeaderTextType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DefinitionHeaderTextType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='DefinitionHeaderTextType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DefinitionHeaderTextType'):
        if self.DefinitionCode is not None and 'DefinitionCode' not in already_processed:
            already_processed.add('DefinitionCode')
            outfile.write(' DefinitionCode=%s' % (quote_attrib(self.DefinitionCode), ))
    def exportChildren(self, outfile, level, namespace_='', name_='DefinitionHeaderTextType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='DefinitionHeaderTextType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.DefinitionCode is not None and 'DefinitionCode' not in already_processed:
            already_processed.add('DefinitionCode')
            showIndent(outfile, level)
            outfile.write('DefinitionCode="%s",\n' % (self.DefinitionCode,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('DefinitionCode', node)
        if value is not None and 'DefinitionCode' not in already_processed:
            already_processed.add('DefinitionCode')
            self.DefinitionCode = value
            self.DefinitionCode = ' '.join(self.DefinitionCode.split())
            self.validate_genericTokenType1_20(self.DefinitionCode)    # validate type genericTokenType1_20
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class DefinitionHeaderTextType


class RowDefinitionDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, RowDefinitionHeaderText=None, RowDefinitionValue=None):
        self.original_tagname_ = None
        self.RowDefinitionHeaderText = RowDefinitionHeaderText
        self.RowDefinitionValue = RowDefinitionValue
    def factory(*args_, **kwargs_):
        if RowDefinitionDetailsType.subclass:
            return RowDefinitionDetailsType.subclass(*args_, **kwargs_)
        else:
            return RowDefinitionDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RowDefinitionHeaderText(self): return self.RowDefinitionHeaderText
    def set_RowDefinitionHeaderText(self, RowDefinitionHeaderText): self.RowDefinitionHeaderText = RowDefinitionHeaderText
    def get_RowDefinitionValue(self): return self.RowDefinitionValue
    def set_RowDefinitionValue(self, RowDefinitionValue): self.RowDefinitionValue = RowDefinitionValue
    def hasContent_(self):
        if (
            self.RowDefinitionHeaderText is not None or
            self.RowDefinitionValue is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='RowDefinitionDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RowDefinitionDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='RowDefinitionDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RowDefinitionDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='RowDefinitionDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.RowDefinitionHeaderText is not None:
            self.RowDefinitionHeaderText.export(outfile, level, namespace_, name_='RowDefinitionHeaderText', pretty_print=pretty_print)
        if self.RowDefinitionValue is not None:
            self.RowDefinitionValue.export(outfile, level, namespace_, name_='RowDefinitionValue', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RowDefinitionDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.RowDefinitionHeaderText is not None:
            showIndent(outfile, level)
            outfile.write('RowDefinitionHeaderText=model_.RowDefinitionHeaderTextType(\n')
            self.RowDefinitionHeaderText.exportLiteral(outfile, level, name_='RowDefinitionHeaderText')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowDefinitionValue is not None:
            showIndent(outfile, level)
            outfile.write('RowDefinitionValue=model_.QuantityType0_70(\n')
            self.RowDefinitionValue.exportLiteral(outfile, level, name_='RowDefinitionValue')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RowDefinitionHeaderText':
            obj_ = RowDefinitionHeaderTextType.factory()
            obj_.build(child_)
            self.RowDefinitionHeaderText = obj_
            obj_.original_tagname_ = 'RowDefinitionHeaderText'
        elif nodeName_ == 'RowDefinitionValue':
            obj_ = QuantityType0_70.factory()
            obj_.build(child_)
            self.RowDefinitionValue = obj_
            obj_.original_tagname_ = 'RowDefinitionValue'
# end class RowDefinitionDetailsType


class RowDefinitionHeaderTextType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DefinitionCode=None, valueOf_=None):
        self.original_tagname_ = None
        self.DefinitionCode = _cast(None, DefinitionCode)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if RowDefinitionHeaderTextType.subclass:
            return RowDefinitionHeaderTextType.subclass(*args_, **kwargs_)
        else:
            return RowDefinitionHeaderTextType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DefinitionCode(self): return self.DefinitionCode
    def set_DefinitionCode(self, DefinitionCode): self.DefinitionCode = DefinitionCode
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def validate_genericTokenType1_20(self, value):
        # Validate type genericTokenType1_20, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='RowDefinitionHeaderTextType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RowDefinitionHeaderTextType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='RowDefinitionHeaderTextType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RowDefinitionHeaderTextType'):
        if self.DefinitionCode is not None and 'DefinitionCode' not in already_processed:
            already_processed.add('DefinitionCode')
            outfile.write(' DefinitionCode=%s' % (quote_attrib(self.DefinitionCode), ))
    def exportChildren(self, outfile, level, namespace_='', name_='RowDefinitionHeaderTextType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='RowDefinitionHeaderTextType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.DefinitionCode is not None and 'DefinitionCode' not in already_processed:
            already_processed.add('DefinitionCode')
            showIndent(outfile, level)
            outfile.write('DefinitionCode="%s",\n' % (self.DefinitionCode,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('DefinitionCode', node)
        if value is not None and 'DefinitionCode' not in already_processed:
            already_processed.add('DefinitionCode')
            self.DefinitionCode = value
            self.DefinitionCode = ' '.join(self.DefinitionCode.split())
            self.validate_genericTokenType1_20(self.DefinitionCode)    # validate type genericTokenType1_20
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class RowDefinitionHeaderTextType


class RowOverDuePaymentDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, RowOriginalInvoiceIdentifier=None, RowOriginalInvoiceDate=None, RowOriginalDueDate=None, RowOriginalInvoiceTotalAmount=None, RowOriginalEpiRemittanceInfoIdentifier=None, RowPaidVatExcludedAmount=None, RowPaidVatIncludedAmount=None, RowPaidDate=None, RowUnPaidVatExcludedAmount=None, RowUnPaidVatIncludedAmount=None, RowCollectionDate=None, RowCollectionQuantity=None, RowCollectionChargeAmount=None, RowInterestRate=None, RowInterestStartDate=None, RowInterestEndDate=None, RowInterestPeriodText=None, RowInterestDateNumber=None, RowInterestChargeAmount=None, RowInterestChargeVatAmount=None):
        self.original_tagname_ = None
        self.RowOriginalInvoiceIdentifier = RowOriginalInvoiceIdentifier
        self.RowOriginalInvoiceDate = RowOriginalInvoiceDate
        self.RowOriginalDueDate = RowOriginalDueDate
        self.RowOriginalInvoiceTotalAmount = RowOriginalInvoiceTotalAmount
        self.RowOriginalEpiRemittanceInfoIdentifier = RowOriginalEpiRemittanceInfoIdentifier
        self.RowPaidVatExcludedAmount = RowPaidVatExcludedAmount
        self.RowPaidVatIncludedAmount = RowPaidVatIncludedAmount
        self.RowPaidDate = RowPaidDate
        self.RowUnPaidVatExcludedAmount = RowUnPaidVatExcludedAmount
        self.RowUnPaidVatIncludedAmount = RowUnPaidVatIncludedAmount
        self.RowCollectionDate = RowCollectionDate
        self.RowCollectionQuantity = RowCollectionQuantity
        self.RowCollectionChargeAmount = RowCollectionChargeAmount
        self.RowInterestRate = RowInterestRate
        self.RowInterestStartDate = RowInterestStartDate
        self.RowInterestEndDate = RowInterestEndDate
        self.RowInterestPeriodText = RowInterestPeriodText
        self.RowInterestDateNumber = RowInterestDateNumber
        self.RowInterestChargeAmount = RowInterestChargeAmount
        self.RowInterestChargeVatAmount = RowInterestChargeVatAmount
    def factory(*args_, **kwargs_):
        if RowOverDuePaymentDetailsType.subclass:
            return RowOverDuePaymentDetailsType.subclass(*args_, **kwargs_)
        else:
            return RowOverDuePaymentDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RowOriginalInvoiceIdentifier(self): return self.RowOriginalInvoiceIdentifier
    def set_RowOriginalInvoiceIdentifier(self, RowOriginalInvoiceIdentifier): self.RowOriginalInvoiceIdentifier = RowOriginalInvoiceIdentifier
    def get_RowOriginalInvoiceDate(self): return self.RowOriginalInvoiceDate
    def set_RowOriginalInvoiceDate(self, RowOriginalInvoiceDate): self.RowOriginalInvoiceDate = RowOriginalInvoiceDate
    def get_RowOriginalDueDate(self): return self.RowOriginalDueDate
    def set_RowOriginalDueDate(self, RowOriginalDueDate): self.RowOriginalDueDate = RowOriginalDueDate
    def get_RowOriginalInvoiceTotalAmount(self): return self.RowOriginalInvoiceTotalAmount
    def set_RowOriginalInvoiceTotalAmount(self, RowOriginalInvoiceTotalAmount): self.RowOriginalInvoiceTotalAmount = RowOriginalInvoiceTotalAmount
    def get_RowOriginalEpiRemittanceInfoIdentifier(self): return self.RowOriginalEpiRemittanceInfoIdentifier
    def set_RowOriginalEpiRemittanceInfoIdentifier(self, RowOriginalEpiRemittanceInfoIdentifier): self.RowOriginalEpiRemittanceInfoIdentifier = RowOriginalEpiRemittanceInfoIdentifier
    def get_RowPaidVatExcludedAmount(self): return self.RowPaidVatExcludedAmount
    def set_RowPaidVatExcludedAmount(self, RowPaidVatExcludedAmount): self.RowPaidVatExcludedAmount = RowPaidVatExcludedAmount
    def get_RowPaidVatIncludedAmount(self): return self.RowPaidVatIncludedAmount
    def set_RowPaidVatIncludedAmount(self, RowPaidVatIncludedAmount): self.RowPaidVatIncludedAmount = RowPaidVatIncludedAmount
    def get_RowPaidDate(self): return self.RowPaidDate
    def set_RowPaidDate(self, RowPaidDate): self.RowPaidDate = RowPaidDate
    def get_RowUnPaidVatExcludedAmount(self): return self.RowUnPaidVatExcludedAmount
    def set_RowUnPaidVatExcludedAmount(self, RowUnPaidVatExcludedAmount): self.RowUnPaidVatExcludedAmount = RowUnPaidVatExcludedAmount
    def get_RowUnPaidVatIncludedAmount(self): return self.RowUnPaidVatIncludedAmount
    def set_RowUnPaidVatIncludedAmount(self, RowUnPaidVatIncludedAmount): self.RowUnPaidVatIncludedAmount = RowUnPaidVatIncludedAmount
    def get_RowCollectionDate(self): return self.RowCollectionDate
    def set_RowCollectionDate(self, RowCollectionDate): self.RowCollectionDate = RowCollectionDate
    def get_RowCollectionQuantity(self): return self.RowCollectionQuantity
    def set_RowCollectionQuantity(self, RowCollectionQuantity): self.RowCollectionQuantity = RowCollectionQuantity
    def get_RowCollectionChargeAmount(self): return self.RowCollectionChargeAmount
    def set_RowCollectionChargeAmount(self, RowCollectionChargeAmount): self.RowCollectionChargeAmount = RowCollectionChargeAmount
    def get_RowInterestRate(self): return self.RowInterestRate
    def set_RowInterestRate(self, RowInterestRate): self.RowInterestRate = RowInterestRate
    def get_RowInterestStartDate(self): return self.RowInterestStartDate
    def set_RowInterestStartDate(self, RowInterestStartDate): self.RowInterestStartDate = RowInterestStartDate
    def get_RowInterestEndDate(self): return self.RowInterestEndDate
    def set_RowInterestEndDate(self, RowInterestEndDate): self.RowInterestEndDate = RowInterestEndDate
    def get_RowInterestPeriodText(self): return self.RowInterestPeriodText
    def set_RowInterestPeriodText(self, RowInterestPeriodText): self.RowInterestPeriodText = RowInterestPeriodText
    def get_RowInterestDateNumber(self): return self.RowInterestDateNumber
    def set_RowInterestDateNumber(self, RowInterestDateNumber): self.RowInterestDateNumber = RowInterestDateNumber
    def get_RowInterestChargeAmount(self): return self.RowInterestChargeAmount
    def set_RowInterestChargeAmount(self, RowInterestChargeAmount): self.RowInterestChargeAmount = RowInterestChargeAmount
    def get_RowInterestChargeVatAmount(self): return self.RowInterestChargeVatAmount
    def set_RowInterestChargeVatAmount(self, RowInterestChargeVatAmount): self.RowInterestChargeVatAmount = RowInterestChargeVatAmount
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def validate_genericNMtokenType0_14(self, value):
        # Validate type genericNMtokenType0_14, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.RowOriginalInvoiceIdentifier is not None or
            self.RowOriginalInvoiceDate is not None or
            self.RowOriginalDueDate is not None or
            self.RowOriginalInvoiceTotalAmount is not None or
            self.RowOriginalEpiRemittanceInfoIdentifier is not None or
            self.RowPaidVatExcludedAmount is not None or
            self.RowPaidVatIncludedAmount is not None or
            self.RowPaidDate is not None or
            self.RowUnPaidVatExcludedAmount is not None or
            self.RowUnPaidVatIncludedAmount is not None or
            self.RowCollectionDate is not None or
            self.RowCollectionQuantity is not None or
            self.RowCollectionChargeAmount is not None or
            self.RowInterestRate is not None or
            self.RowInterestStartDate is not None or
            self.RowInterestEndDate is not None or
            self.RowInterestPeriodText is not None or
            self.RowInterestDateNumber is not None or
            self.RowInterestChargeAmount is not None or
            self.RowInterestChargeVatAmount is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='RowOverDuePaymentDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RowOverDuePaymentDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='RowOverDuePaymentDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RowOverDuePaymentDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='RowOverDuePaymentDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.RowOriginalInvoiceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowOriginalInvoiceIdentifier>%s</%sRowOriginalInvoiceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowOriginalInvoiceIdentifier).encode(ExternalEncoding), input_name='RowOriginalInvoiceIdentifier'), namespace_, eol_))
        if self.RowOriginalInvoiceDate is not None:
            self.RowOriginalInvoiceDate.export(outfile, level, namespace_, name_='RowOriginalInvoiceDate', pretty_print=pretty_print)
        if self.RowOriginalDueDate is not None:
            self.RowOriginalDueDate.export(outfile, level, namespace_, name_='RowOriginalDueDate', pretty_print=pretty_print)
        if self.RowOriginalInvoiceTotalAmount is not None:
            self.RowOriginalInvoiceTotalAmount.export(outfile, level, namespace_, name_='RowOriginalInvoiceTotalAmount', pretty_print=pretty_print)
        if self.RowOriginalEpiRemittanceInfoIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowOriginalEpiRemittanceInfoIdentifier>%s</%sRowOriginalEpiRemittanceInfoIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowOriginalEpiRemittanceInfoIdentifier).encode(ExternalEncoding), input_name='RowOriginalEpiRemittanceInfoIdentifier'), namespace_, eol_))
        if self.RowPaidVatExcludedAmount is not None:
            self.RowPaidVatExcludedAmount.export(outfile, level, namespace_, name_='RowPaidVatExcludedAmount', pretty_print=pretty_print)
        if self.RowPaidVatIncludedAmount is not None:
            self.RowPaidVatIncludedAmount.export(outfile, level, namespace_, name_='RowPaidVatIncludedAmount', pretty_print=pretty_print)
        if self.RowPaidDate is not None:
            self.RowPaidDate.export(outfile, level, namespace_, name_='RowPaidDate', pretty_print=pretty_print)
        if self.RowUnPaidVatExcludedAmount is not None:
            self.RowUnPaidVatExcludedAmount.export(outfile, level, namespace_, name_='RowUnPaidVatExcludedAmount', pretty_print=pretty_print)
        if self.RowUnPaidVatIncludedAmount is not None:
            self.RowUnPaidVatIncludedAmount.export(outfile, level, namespace_, name_='RowUnPaidVatIncludedAmount', pretty_print=pretty_print)
        if self.RowCollectionDate is not None:
            self.RowCollectionDate.export(outfile, level, namespace_, name_='RowCollectionDate', pretty_print=pretty_print)
        if self.RowCollectionQuantity is not None:
            self.RowCollectionQuantity.export(outfile, level, namespace_, name_='RowCollectionQuantity', pretty_print=pretty_print)
        if self.RowCollectionChargeAmount is not None:
            self.RowCollectionChargeAmount.export(outfile, level, namespace_, name_='RowCollectionChargeAmount', pretty_print=pretty_print)
        if self.RowInterestRate is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowInterestRate>%s</%sRowInterestRate>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowInterestRate).encode(ExternalEncoding), input_name='RowInterestRate'), namespace_, eol_))
        if self.RowInterestStartDate is not None:
            self.RowInterestStartDate.export(outfile, level, namespace_, name_='RowInterestStartDate', pretty_print=pretty_print)
        if self.RowInterestEndDate is not None:
            self.RowInterestEndDate.export(outfile, level, namespace_, name_='RowInterestEndDate', pretty_print=pretty_print)
        if self.RowInterestPeriodText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowInterestPeriodText>%s</%sRowInterestPeriodText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowInterestPeriodText).encode(ExternalEncoding), input_name='RowInterestPeriodText'), namespace_, eol_))
        if self.RowInterestDateNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowInterestDateNumber>%s</%sRowInterestDateNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowInterestDateNumber).encode(ExternalEncoding), input_name='RowInterestDateNumber'), namespace_, eol_))
        if self.RowInterestChargeAmount is not None:
            self.RowInterestChargeAmount.export(outfile, level, namespace_, name_='RowInterestChargeAmount', pretty_print=pretty_print)
        if self.RowInterestChargeVatAmount is not None:
            self.RowInterestChargeVatAmount.export(outfile, level, namespace_, name_='RowInterestChargeVatAmount', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RowOverDuePaymentDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.RowOriginalInvoiceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowOriginalInvoiceIdentifier=%s,\n' % quote_python(self.RowOriginalInvoiceIdentifier).encode(ExternalEncoding))
        if self.RowOriginalInvoiceDate is not None:
            showIndent(outfile, level)
            outfile.write('RowOriginalInvoiceDate=model_.date(\n')
            self.RowOriginalInvoiceDate.exportLiteral(outfile, level, name_='RowOriginalInvoiceDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowOriginalDueDate is not None:
            showIndent(outfile, level)
            outfile.write('RowOriginalDueDate=model_.date(\n')
            self.RowOriginalDueDate.exportLiteral(outfile, level, name_='RowOriginalDueDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowOriginalInvoiceTotalAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowOriginalInvoiceTotalAmount=model_.amount(\n')
            self.RowOriginalInvoiceTotalAmount.exportLiteral(outfile, level, name_='RowOriginalInvoiceTotalAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowOriginalEpiRemittanceInfoIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowOriginalEpiRemittanceInfoIdentifier=%s,\n' % quote_python(self.RowOriginalEpiRemittanceInfoIdentifier).encode(ExternalEncoding))
        if self.RowPaidVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowPaidVatExcludedAmount=model_.amount(\n')
            self.RowPaidVatExcludedAmount.exportLiteral(outfile, level, name_='RowPaidVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowPaidVatIncludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowPaidVatIncludedAmount=model_.amount(\n')
            self.RowPaidVatIncludedAmount.exportLiteral(outfile, level, name_='RowPaidVatIncludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowPaidDate is not None:
            showIndent(outfile, level)
            outfile.write('RowPaidDate=model_.date(\n')
            self.RowPaidDate.exportLiteral(outfile, level, name_='RowPaidDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowUnPaidVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowUnPaidVatExcludedAmount=model_.amount(\n')
            self.RowUnPaidVatExcludedAmount.exportLiteral(outfile, level, name_='RowUnPaidVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowUnPaidVatIncludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowUnPaidVatIncludedAmount=model_.amount(\n')
            self.RowUnPaidVatIncludedAmount.exportLiteral(outfile, level, name_='RowUnPaidVatIncludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowCollectionDate is not None:
            showIndent(outfile, level)
            outfile.write('RowCollectionDate=model_.date(\n')
            self.RowCollectionDate.exportLiteral(outfile, level, name_='RowCollectionDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowCollectionQuantity is not None:
            showIndent(outfile, level)
            outfile.write('RowCollectionQuantity=model_.QuantityType0_14(\n')
            self.RowCollectionQuantity.exportLiteral(outfile, level, name_='RowCollectionQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowCollectionChargeAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowCollectionChargeAmount=model_.amount(\n')
            self.RowCollectionChargeAmount.exportLiteral(outfile, level, name_='RowCollectionChargeAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowInterestRate is not None:
            showIndent(outfile, level)
            outfile.write('RowInterestRate=%s,\n' % quote_python(self.RowInterestRate).encode(ExternalEncoding))
        if self.RowInterestStartDate is not None:
            showIndent(outfile, level)
            outfile.write('RowInterestStartDate=model_.date(\n')
            self.RowInterestStartDate.exportLiteral(outfile, level, name_='RowInterestStartDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowInterestEndDate is not None:
            showIndent(outfile, level)
            outfile.write('RowInterestEndDate=model_.date(\n')
            self.RowInterestEndDate.exportLiteral(outfile, level, name_='RowInterestEndDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowInterestPeriodText is not None:
            showIndent(outfile, level)
            outfile.write('RowInterestPeriodText=%s,\n' % quote_python(self.RowInterestPeriodText).encode(ExternalEncoding))
        if self.RowInterestDateNumber is not None:
            showIndent(outfile, level)
            outfile.write('RowInterestDateNumber=%s,\n' % quote_python(self.RowInterestDateNumber).encode(ExternalEncoding))
        if self.RowInterestChargeAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowInterestChargeAmount=model_.amount(\n')
            self.RowInterestChargeAmount.exportLiteral(outfile, level, name_='RowInterestChargeAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowInterestChargeVatAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowInterestChargeVatAmount=model_.amount(\n')
            self.RowInterestChargeVatAmount.exportLiteral(outfile, level, name_='RowInterestChargeVatAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RowOriginalInvoiceIdentifier':
            RowOriginalInvoiceIdentifier_ = child_.text
            RowOriginalInvoiceIdentifier_ = self.gds_validate_string(RowOriginalInvoiceIdentifier_, node, 'RowOriginalInvoiceIdentifier')
            self.RowOriginalInvoiceIdentifier = RowOriginalInvoiceIdentifier_
            self.validate_genericStringType0_35(self.RowOriginalInvoiceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowOriginalInvoiceDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowOriginalInvoiceDate = obj_
            obj_.original_tagname_ = 'RowOriginalInvoiceDate'
        elif nodeName_ == 'RowOriginalDueDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowOriginalDueDate = obj_
            obj_.original_tagname_ = 'RowOriginalDueDate'
        elif nodeName_ == 'RowOriginalInvoiceTotalAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowOriginalInvoiceTotalAmount = obj_
            obj_.original_tagname_ = 'RowOriginalInvoiceTotalAmount'
        elif nodeName_ == 'RowOriginalEpiRemittanceInfoIdentifier':
            RowOriginalEpiRemittanceInfoIdentifier_ = child_.text
            RowOriginalEpiRemittanceInfoIdentifier_ = self.gds_validate_string(RowOriginalEpiRemittanceInfoIdentifier_, node, 'RowOriginalEpiRemittanceInfoIdentifier')
            self.RowOriginalEpiRemittanceInfoIdentifier = RowOriginalEpiRemittanceInfoIdentifier_
            self.validate_genericStringType0_35(self.RowOriginalEpiRemittanceInfoIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowPaidVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowPaidVatExcludedAmount = obj_
            obj_.original_tagname_ = 'RowPaidVatExcludedAmount'
        elif nodeName_ == 'RowPaidVatIncludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowPaidVatIncludedAmount = obj_
            obj_.original_tagname_ = 'RowPaidVatIncludedAmount'
        elif nodeName_ == 'RowPaidDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowPaidDate = obj_
            obj_.original_tagname_ = 'RowPaidDate'
        elif nodeName_ == 'RowUnPaidVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowUnPaidVatExcludedAmount = obj_
            obj_.original_tagname_ = 'RowUnPaidVatExcludedAmount'
        elif nodeName_ == 'RowUnPaidVatIncludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowUnPaidVatIncludedAmount = obj_
            obj_.original_tagname_ = 'RowUnPaidVatIncludedAmount'
        elif nodeName_ == 'RowCollectionDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowCollectionDate = obj_
            obj_.original_tagname_ = 'RowCollectionDate'
        elif nodeName_ == 'RowCollectionQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowCollectionQuantity = obj_
            obj_.original_tagname_ = 'RowCollectionQuantity'
        elif nodeName_ == 'RowCollectionChargeAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowCollectionChargeAmount = obj_
            obj_.original_tagname_ = 'RowCollectionChargeAmount'
        elif nodeName_ == 'RowInterestRate':
            RowInterestRate_ = child_.text
            RowInterestRate_ = self.gds_validate_string(RowInterestRate_, node, 'RowInterestRate')
            self.RowInterestRate = RowInterestRate_
            self.validate_percentage(self.RowInterestRate)    # validate type percentage
        elif nodeName_ == 'RowInterestStartDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowInterestStartDate = obj_
            obj_.original_tagname_ = 'RowInterestStartDate'
        elif nodeName_ == 'RowInterestEndDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.RowInterestEndDate = obj_
            obj_.original_tagname_ = 'RowInterestEndDate'
        elif nodeName_ == 'RowInterestPeriodText':
            RowInterestPeriodText_ = child_.text
            RowInterestPeriodText_ = self.gds_validate_string(RowInterestPeriodText_, node, 'RowInterestPeriodText')
            self.RowInterestPeriodText = RowInterestPeriodText_
            self.validate_genericStringType0_35(self.RowInterestPeriodText)    # validate type genericStringType0_35
        elif nodeName_ == 'RowInterestDateNumber':
            RowInterestDateNumber_ = child_.text
            RowInterestDateNumber_ = re_.sub(String_cleanup_pat_, " ", RowInterestDateNumber_).strip()
            RowInterestDateNumber_ = self.gds_validate_string(RowInterestDateNumber_, node, 'RowInterestDateNumber')
            self.RowInterestDateNumber = RowInterestDateNumber_
            self.validate_genericNMtokenType0_14(self.RowInterestDateNumber)    # validate type genericNMtokenType0_14
        elif nodeName_ == 'RowInterestChargeAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowInterestChargeAmount = obj_
            obj_.original_tagname_ = 'RowInterestChargeAmount'
        elif nodeName_ == 'RowInterestChargeVatAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowInterestChargeVatAmount = obj_
            obj_.original_tagname_ = 'RowInterestChargeVatAmount'
# end class RowOverDuePaymentDetailsType


class RowAnyPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, RowAnyPartyText=None, RowAnyPartyIdentifier=None, RowAnyPartyOrganisationName=None, RowAnyPartyOrganisationDepartment=None, RowAnyPartyOrganisationTaxCode=None, RowAnyPartyPostalAddressDetails=None, RowAnyPartyOrganisationUnitNumber=None, RowAnyPartySiteCode=None):
        self.original_tagname_ = None
        self.RowAnyPartyText = RowAnyPartyText
        self.RowAnyPartyIdentifier = RowAnyPartyIdentifier
        if RowAnyPartyOrganisationName is None:
            self.RowAnyPartyOrganisationName = []
        else:
            self.RowAnyPartyOrganisationName = RowAnyPartyOrganisationName
        if RowAnyPartyOrganisationDepartment is None:
            self.RowAnyPartyOrganisationDepartment = []
        else:
            self.RowAnyPartyOrganisationDepartment = RowAnyPartyOrganisationDepartment
        self.RowAnyPartyOrganisationTaxCode = RowAnyPartyOrganisationTaxCode
        self.RowAnyPartyPostalAddressDetails = RowAnyPartyPostalAddressDetails
        self.RowAnyPartyOrganisationUnitNumber = RowAnyPartyOrganisationUnitNumber
        self.RowAnyPartySiteCode = RowAnyPartySiteCode
    def factory(*args_, **kwargs_):
        if RowAnyPartyDetailsType.subclass:
            return RowAnyPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return RowAnyPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RowAnyPartyText(self): return self.RowAnyPartyText
    def set_RowAnyPartyText(self, RowAnyPartyText): self.RowAnyPartyText = RowAnyPartyText
    def get_RowAnyPartyIdentifier(self): return self.RowAnyPartyIdentifier
    def set_RowAnyPartyIdentifier(self, RowAnyPartyIdentifier): self.RowAnyPartyIdentifier = RowAnyPartyIdentifier
    def get_RowAnyPartyOrganisationName(self): return self.RowAnyPartyOrganisationName
    def set_RowAnyPartyOrganisationName(self, RowAnyPartyOrganisationName): self.RowAnyPartyOrganisationName = RowAnyPartyOrganisationName
    def add_RowAnyPartyOrganisationName(self, value): self.RowAnyPartyOrganisationName.append(value)
    def insert_RowAnyPartyOrganisationName_at(self, index, value): self.RowAnyPartyOrganisationName.insert(index, value)
    def replace_RowAnyPartyOrganisationName_at(self, index, value): self.RowAnyPartyOrganisationName[index] = value
    def get_RowAnyPartyOrganisationDepartment(self): return self.RowAnyPartyOrganisationDepartment
    def set_RowAnyPartyOrganisationDepartment(self, RowAnyPartyOrganisationDepartment): self.RowAnyPartyOrganisationDepartment = RowAnyPartyOrganisationDepartment
    def add_RowAnyPartyOrganisationDepartment(self, value): self.RowAnyPartyOrganisationDepartment.append(value)
    def insert_RowAnyPartyOrganisationDepartment_at(self, index, value): self.RowAnyPartyOrganisationDepartment.insert(index, value)
    def replace_RowAnyPartyOrganisationDepartment_at(self, index, value): self.RowAnyPartyOrganisationDepartment[index] = value
    def get_RowAnyPartyOrganisationTaxCode(self): return self.RowAnyPartyOrganisationTaxCode
    def set_RowAnyPartyOrganisationTaxCode(self, RowAnyPartyOrganisationTaxCode): self.RowAnyPartyOrganisationTaxCode = RowAnyPartyOrganisationTaxCode
    def get_RowAnyPartyPostalAddressDetails(self): return self.RowAnyPartyPostalAddressDetails
    def set_RowAnyPartyPostalAddressDetails(self, RowAnyPartyPostalAddressDetails): self.RowAnyPartyPostalAddressDetails = RowAnyPartyPostalAddressDetails
    def get_RowAnyPartyOrganisationUnitNumber(self): return self.RowAnyPartyOrganisationUnitNumber
    def set_RowAnyPartyOrganisationUnitNumber(self, RowAnyPartyOrganisationUnitNumber): self.RowAnyPartyOrganisationUnitNumber = RowAnyPartyOrganisationUnitNumber
    def get_RowAnyPartySiteCode(self): return self.RowAnyPartySiteCode
    def set_RowAnyPartySiteCode(self, RowAnyPartySiteCode): self.RowAnyPartySiteCode = RowAnyPartySiteCode
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.RowAnyPartyText is not None or
            self.RowAnyPartyIdentifier is not None or
            self.RowAnyPartyOrganisationName or
            self.RowAnyPartyOrganisationDepartment or
            self.RowAnyPartyOrganisationTaxCode is not None or
            self.RowAnyPartyPostalAddressDetails is not None or
            self.RowAnyPartyOrganisationUnitNumber is not None or
            self.RowAnyPartySiteCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='RowAnyPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RowAnyPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='RowAnyPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RowAnyPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='RowAnyPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.RowAnyPartyText is not None:
            self.RowAnyPartyText.export(outfile, level, namespace_, name_='RowAnyPartyText', pretty_print=pretty_print)
        if self.RowAnyPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartyIdentifier>%s</%sRowAnyPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAnyPartyIdentifier).encode(ExternalEncoding), input_name='RowAnyPartyIdentifier'), namespace_, eol_))
        for RowAnyPartyOrganisationName_ in self.RowAnyPartyOrganisationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartyOrganisationName>%s</%sRowAnyPartyOrganisationName>%s' % (namespace_, self.gds_format_string(quote_xml(RowAnyPartyOrganisationName_).encode(ExternalEncoding), input_name='RowAnyPartyOrganisationName'), namespace_, eol_))
        for RowAnyPartyOrganisationDepartment_ in self.RowAnyPartyOrganisationDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartyOrganisationDepartment>%s</%sRowAnyPartyOrganisationDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(RowAnyPartyOrganisationDepartment_).encode(ExternalEncoding), input_name='RowAnyPartyOrganisationDepartment'), namespace_, eol_))
        if self.RowAnyPartyOrganisationTaxCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartyOrganisationTaxCode>%s</%sRowAnyPartyOrganisationTaxCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAnyPartyOrganisationTaxCode).encode(ExternalEncoding), input_name='RowAnyPartyOrganisationTaxCode'), namespace_, eol_))
        if self.RowAnyPartyPostalAddressDetails is not None:
            self.RowAnyPartyPostalAddressDetails.export(outfile, level, namespace_, name_='RowAnyPartyPostalAddressDetails', pretty_print=pretty_print)
        if self.RowAnyPartyOrganisationUnitNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartyOrganisationUnitNumber>%s</%sRowAnyPartyOrganisationUnitNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAnyPartyOrganisationUnitNumber).encode(ExternalEncoding), input_name='RowAnyPartyOrganisationUnitNumber'), namespace_, eol_))
        if self.RowAnyPartySiteCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartySiteCode>%s</%sRowAnyPartySiteCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAnyPartySiteCode).encode(ExternalEncoding), input_name='RowAnyPartySiteCode'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='RowAnyPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.RowAnyPartyText is not None:
            showIndent(outfile, level)
            outfile.write('RowAnyPartyText=model_.anypartytexttype0_35(\n')
            self.RowAnyPartyText.exportLiteral(outfile, level, name_='RowAnyPartyText')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowAnyPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowAnyPartyIdentifier=%s,\n' % quote_python(self.RowAnyPartyIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('RowAnyPartyOrganisationName=[\n')
        level += 1
        for RowAnyPartyOrganisationName_ in self.RowAnyPartyOrganisationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(RowAnyPartyOrganisationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('RowAnyPartyOrganisationDepartment=[\n')
        level += 1
        for RowAnyPartyOrganisationDepartment_ in self.RowAnyPartyOrganisationDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(RowAnyPartyOrganisationDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.RowAnyPartyOrganisationTaxCode is not None:
            showIndent(outfile, level)
            outfile.write('RowAnyPartyOrganisationTaxCode=%s,\n' % quote_python(self.RowAnyPartyOrganisationTaxCode).encode(ExternalEncoding))
        if self.RowAnyPartyPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('RowAnyPartyPostalAddressDetails=model_.RowAnyPartyPostalAddressDetailsType(\n')
            self.RowAnyPartyPostalAddressDetails.exportLiteral(outfile, level, name_='RowAnyPartyPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowAnyPartyOrganisationUnitNumber is not None:
            showIndent(outfile, level)
            outfile.write('RowAnyPartyOrganisationUnitNumber=%s,\n' % quote_python(self.RowAnyPartyOrganisationUnitNumber).encode(ExternalEncoding))
        if self.RowAnyPartySiteCode is not None:
            showIndent(outfile, level)
            outfile.write('RowAnyPartySiteCode=%s,\n' % quote_python(self.RowAnyPartySiteCode).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RowAnyPartyText':
            obj_ = anypartytexttype0_35.factory()
            obj_.build(child_)
            self.RowAnyPartyText = obj_
            obj_.original_tagname_ = 'RowAnyPartyText'
        elif nodeName_ == 'RowAnyPartyIdentifier':
            RowAnyPartyIdentifier_ = child_.text
            RowAnyPartyIdentifier_ = self.gds_validate_string(RowAnyPartyIdentifier_, node, 'RowAnyPartyIdentifier')
            self.RowAnyPartyIdentifier = RowAnyPartyIdentifier_
            self.validate_genericStringType0_35(self.RowAnyPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'RowAnyPartyOrganisationName':
            RowAnyPartyOrganisationName_ = child_.text
            RowAnyPartyOrganisationName_ = self.gds_validate_string(RowAnyPartyOrganisationName_, node, 'RowAnyPartyOrganisationName')
            self.RowAnyPartyOrganisationName.append(RowAnyPartyOrganisationName_)
            self.validate_genericStringType2_35(self.RowAnyPartyOrganisationName)    # validate type genericStringType2_35
        elif nodeName_ == 'RowAnyPartyOrganisationDepartment':
            RowAnyPartyOrganisationDepartment_ = child_.text
            RowAnyPartyOrganisationDepartment_ = self.gds_validate_string(RowAnyPartyOrganisationDepartment_, node, 'RowAnyPartyOrganisationDepartment')
            self.RowAnyPartyOrganisationDepartment.append(RowAnyPartyOrganisationDepartment_)
            self.validate_genericStringType0_35(self.RowAnyPartyOrganisationDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'RowAnyPartyOrganisationTaxCode':
            RowAnyPartyOrganisationTaxCode_ = child_.text
            RowAnyPartyOrganisationTaxCode_ = self.gds_validate_string(RowAnyPartyOrganisationTaxCode_, node, 'RowAnyPartyOrganisationTaxCode')
            self.RowAnyPartyOrganisationTaxCode = RowAnyPartyOrganisationTaxCode_
            self.validate_genericStringType0_35(self.RowAnyPartyOrganisationTaxCode)    # validate type genericStringType0_35
        elif nodeName_ == 'RowAnyPartyPostalAddressDetails':
            obj_ = RowAnyPartyPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.RowAnyPartyPostalAddressDetails = obj_
            obj_.original_tagname_ = 'RowAnyPartyPostalAddressDetails'
        elif nodeName_ == 'RowAnyPartyOrganisationUnitNumber':
            RowAnyPartyOrganisationUnitNumber_ = child_.text
            RowAnyPartyOrganisationUnitNumber_ = self.gds_validate_string(RowAnyPartyOrganisationUnitNumber_, node, 'RowAnyPartyOrganisationUnitNumber')
            self.RowAnyPartyOrganisationUnitNumber = RowAnyPartyOrganisationUnitNumber_
            self.validate_genericStringType0_35(self.RowAnyPartyOrganisationUnitNumber)    # validate type genericStringType0_35
        elif nodeName_ == 'RowAnyPartySiteCode':
            RowAnyPartySiteCode_ = child_.text
            RowAnyPartySiteCode_ = self.gds_validate_string(RowAnyPartySiteCode_, node, 'RowAnyPartySiteCode')
            self.RowAnyPartySiteCode = RowAnyPartySiteCode_
            self.validate_genericStringType0_35(self.RowAnyPartySiteCode)    # validate type genericStringType0_35
# end class RowAnyPartyDetailsType


class RowAnyPartyPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, RowAnyPartyStreetName=None, RowAnyPartyTownName=None, RowAnyPartyPostCodeIdentifier=None, CountryCode=None, CountryName=None, RowAnyPartyPostOfficeBoxIdentifier=None):
        self.original_tagname_ = None
        if RowAnyPartyStreetName is None:
            self.RowAnyPartyStreetName = []
        else:
            self.RowAnyPartyStreetName = RowAnyPartyStreetName
        self.RowAnyPartyTownName = RowAnyPartyTownName
        self.RowAnyPartyPostCodeIdentifier = RowAnyPartyPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
        self.RowAnyPartyPostOfficeBoxIdentifier = RowAnyPartyPostOfficeBoxIdentifier
    def factory(*args_, **kwargs_):
        if RowAnyPartyPostalAddressDetailsType.subclass:
            return RowAnyPartyPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return RowAnyPartyPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RowAnyPartyStreetName(self): return self.RowAnyPartyStreetName
    def set_RowAnyPartyStreetName(self, RowAnyPartyStreetName): self.RowAnyPartyStreetName = RowAnyPartyStreetName
    def add_RowAnyPartyStreetName(self, value): self.RowAnyPartyStreetName.append(value)
    def insert_RowAnyPartyStreetName_at(self, index, value): self.RowAnyPartyStreetName.insert(index, value)
    def replace_RowAnyPartyStreetName_at(self, index, value): self.RowAnyPartyStreetName[index] = value
    def get_RowAnyPartyTownName(self): return self.RowAnyPartyTownName
    def set_RowAnyPartyTownName(self, RowAnyPartyTownName): self.RowAnyPartyTownName = RowAnyPartyTownName
    def get_RowAnyPartyPostCodeIdentifier(self): return self.RowAnyPartyPostCodeIdentifier
    def set_RowAnyPartyPostCodeIdentifier(self, RowAnyPartyPostCodeIdentifier): self.RowAnyPartyPostCodeIdentifier = RowAnyPartyPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def get_RowAnyPartyPostOfficeBoxIdentifier(self): return self.RowAnyPartyPostOfficeBoxIdentifier
    def set_RowAnyPartyPostOfficeBoxIdentifier(self, RowAnyPartyPostOfficeBoxIdentifier): self.RowAnyPartyPostOfficeBoxIdentifier = RowAnyPartyPostOfficeBoxIdentifier
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.RowAnyPartyStreetName or
            self.RowAnyPartyTownName is not None or
            self.RowAnyPartyPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None or
            self.RowAnyPartyPostOfficeBoxIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='RowAnyPartyPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RowAnyPartyPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='RowAnyPartyPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RowAnyPartyPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='RowAnyPartyPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for RowAnyPartyStreetName_ in self.RowAnyPartyStreetName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartyStreetName>%s</%sRowAnyPartyStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(RowAnyPartyStreetName_).encode(ExternalEncoding), input_name='RowAnyPartyStreetName'), namespace_, eol_))
        if self.RowAnyPartyTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartyTownName>%s</%sRowAnyPartyTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAnyPartyTownName).encode(ExternalEncoding), input_name='RowAnyPartyTownName'), namespace_, eol_))
        if self.RowAnyPartyPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartyPostCodeIdentifier>%s</%sRowAnyPartyPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAnyPartyPostCodeIdentifier).encode(ExternalEncoding), input_name='RowAnyPartyPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
        if self.RowAnyPartyPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowAnyPartyPostOfficeBoxIdentifier>%s</%sRowAnyPartyPostOfficeBoxIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowAnyPartyPostOfficeBoxIdentifier).encode(ExternalEncoding), input_name='RowAnyPartyPostOfficeBoxIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='RowAnyPartyPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('RowAnyPartyStreetName=[\n')
        level += 1
        for RowAnyPartyStreetName_ in self.RowAnyPartyStreetName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(RowAnyPartyStreetName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.RowAnyPartyTownName is not None:
            showIndent(outfile, level)
            outfile.write('RowAnyPartyTownName=%s,\n' % quote_python(self.RowAnyPartyTownName).encode(ExternalEncoding))
        if self.RowAnyPartyPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowAnyPartyPostCodeIdentifier=%s,\n' % quote_python(self.RowAnyPartyPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
        if self.RowAnyPartyPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('RowAnyPartyPostOfficeBoxIdentifier=%s,\n' % quote_python(self.RowAnyPartyPostOfficeBoxIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RowAnyPartyStreetName':
            RowAnyPartyStreetName_ = child_.text
            RowAnyPartyStreetName_ = self.gds_validate_string(RowAnyPartyStreetName_, node, 'RowAnyPartyStreetName')
            self.RowAnyPartyStreetName.append(RowAnyPartyStreetName_)
            self.validate_genericStringType2_35(self.RowAnyPartyStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'RowAnyPartyTownName':
            RowAnyPartyTownName_ = child_.text
            RowAnyPartyTownName_ = self.gds_validate_string(RowAnyPartyTownName_, node, 'RowAnyPartyTownName')
            self.RowAnyPartyTownName = RowAnyPartyTownName_
            self.validate_genericStringType2_35(self.RowAnyPartyTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'RowAnyPartyPostCodeIdentifier':
            RowAnyPartyPostCodeIdentifier_ = child_.text
            RowAnyPartyPostCodeIdentifier_ = self.gds_validate_string(RowAnyPartyPostCodeIdentifier_, node, 'RowAnyPartyPostCodeIdentifier')
            self.RowAnyPartyPostCodeIdentifier = RowAnyPartyPostCodeIdentifier_
            self.validate_genericStringType2_35(self.RowAnyPartyPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'RowAnyPartyPostOfficeBoxIdentifier':
            RowAnyPartyPostOfficeBoxIdentifier_ = child_.text
            RowAnyPartyPostOfficeBoxIdentifier_ = self.gds_validate_string(RowAnyPartyPostOfficeBoxIdentifier_, node, 'RowAnyPartyPostOfficeBoxIdentifier')
            self.RowAnyPartyPostOfficeBoxIdentifier = RowAnyPartyPostOfficeBoxIdentifier_
            self.validate_genericStringType0_35(self.RowAnyPartyPostOfficeBoxIdentifier)    # validate type genericStringType0_35
# end class RowAnyPartyPostalAddressDetailsType


class RowProgressiveDiscountDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, RowDiscountPercent=None, RowDiscountAmount=None, RowDiscountTypeCode=None, RowDiscountTypeText=None):
        self.original_tagname_ = None
        self.RowDiscountPercent = RowDiscountPercent
        self.RowDiscountAmount = RowDiscountAmount
        self.RowDiscountTypeCode = RowDiscountTypeCode
        self.RowDiscountTypeText = RowDiscountTypeText
    def factory(*args_, **kwargs_):
        if RowProgressiveDiscountDetailsType.subclass:
            return RowProgressiveDiscountDetailsType.subclass(*args_, **kwargs_)
        else:
            return RowProgressiveDiscountDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RowDiscountPercent(self): return self.RowDiscountPercent
    def set_RowDiscountPercent(self, RowDiscountPercent): self.RowDiscountPercent = RowDiscountPercent
    def get_RowDiscountAmount(self): return self.RowDiscountAmount
    def set_RowDiscountAmount(self, RowDiscountAmount): self.RowDiscountAmount = RowDiscountAmount
    def get_RowDiscountTypeCode(self): return self.RowDiscountTypeCode
    def set_RowDiscountTypeCode(self, RowDiscountTypeCode): self.RowDiscountTypeCode = RowDiscountTypeCode
    def get_RowDiscountTypeText(self): return self.RowDiscountTypeText
    def set_RowDiscountTypeText(self, RowDiscountTypeText): self.RowDiscountTypeText = RowDiscountTypeText
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.RowDiscountPercent is not None or
            self.RowDiscountAmount is not None or
            self.RowDiscountTypeCode is not None or
            self.RowDiscountTypeText is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='RowProgressiveDiscountDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RowProgressiveDiscountDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='RowProgressiveDiscountDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RowProgressiveDiscountDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='RowProgressiveDiscountDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.RowDiscountPercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDiscountPercent>%s</%sRowDiscountPercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDiscountPercent).encode(ExternalEncoding), input_name='RowDiscountPercent'), namespace_, eol_))
        if self.RowDiscountAmount is not None:
            self.RowDiscountAmount.export(outfile, level, namespace_, name_='RowDiscountAmount', pretty_print=pretty_print)
        if self.RowDiscountTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDiscountTypeCode>%s</%sRowDiscountTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDiscountTypeCode).encode(ExternalEncoding), input_name='RowDiscountTypeCode'), namespace_, eol_))
        if self.RowDiscountTypeText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRowDiscountTypeText>%s</%sRowDiscountTypeText>%s' % (namespace_, self.gds_format_string(quote_xml(self.RowDiscountTypeText).encode(ExternalEncoding), input_name='RowDiscountTypeText'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='RowProgressiveDiscountDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.RowDiscountPercent is not None:
            showIndent(outfile, level)
            outfile.write('RowDiscountPercent=%s,\n' % quote_python(self.RowDiscountPercent).encode(ExternalEncoding))
        if self.RowDiscountAmount is not None:
            showIndent(outfile, level)
            outfile.write('RowDiscountAmount=model_.amount(\n')
            self.RowDiscountAmount.exportLiteral(outfile, level, name_='RowDiscountAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowDiscountTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('RowDiscountTypeCode=%s,\n' % quote_python(self.RowDiscountTypeCode).encode(ExternalEncoding))
        if self.RowDiscountTypeText is not None:
            showIndent(outfile, level)
            outfile.write('RowDiscountTypeText=%s,\n' % quote_python(self.RowDiscountTypeText).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RowDiscountPercent':
            RowDiscountPercent_ = child_.text
            RowDiscountPercent_ = self.gds_validate_string(RowDiscountPercent_, node, 'RowDiscountPercent')
            self.RowDiscountPercent = RowDiscountPercent_
            self.validate_percentage(self.RowDiscountPercent)    # validate type percentage
        elif nodeName_ == 'RowDiscountAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.RowDiscountAmount = obj_
            obj_.original_tagname_ = 'RowDiscountAmount'
        elif nodeName_ == 'RowDiscountTypeCode':
            RowDiscountTypeCode_ = child_.text
            RowDiscountTypeCode_ = self.gds_validate_string(RowDiscountTypeCode_, node, 'RowDiscountTypeCode')
            self.RowDiscountTypeCode = RowDiscountTypeCode_
            self.validate_genericStringType0_35(self.RowDiscountTypeCode)    # validate type genericStringType0_35
        elif nodeName_ == 'RowDiscountTypeText':
            RowDiscountTypeText_ = child_.text
            RowDiscountTypeText_ = self.gds_validate_string(RowDiscountTypeText_, node, 'RowDiscountTypeText')
            self.RowDiscountTypeText = RowDiscountTypeText_
            self.validate_genericStringType0_35(self.RowDiscountTypeText)    # validate type genericStringType0_35
# end class RowProgressiveDiscountDetailsType


class CashDiscountVatDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, CashDiscountVatPercent=None, CashDiscountVatAmount=None):
        self.original_tagname_ = None
        self.CashDiscountVatPercent = CashDiscountVatPercent
        self.CashDiscountVatAmount = CashDiscountVatAmount
    def factory(*args_, **kwargs_):
        if CashDiscountVatDetailsType.subclass:
            return CashDiscountVatDetailsType.subclass(*args_, **kwargs_)
        else:
            return CashDiscountVatDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CashDiscountVatPercent(self): return self.CashDiscountVatPercent
    def set_CashDiscountVatPercent(self, CashDiscountVatPercent): self.CashDiscountVatPercent = CashDiscountVatPercent
    def get_CashDiscountVatAmount(self): return self.CashDiscountVatAmount
    def set_CashDiscountVatAmount(self, CashDiscountVatAmount): self.CashDiscountVatAmount = CashDiscountVatAmount
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.CashDiscountVatPercent is not None or
            self.CashDiscountVatAmount is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='CashDiscountVatDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CashDiscountVatDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='CashDiscountVatDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='CashDiscountVatDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='CashDiscountVatDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CashDiscountVatPercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCashDiscountVatPercent>%s</%sCashDiscountVatPercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.CashDiscountVatPercent).encode(ExternalEncoding), input_name='CashDiscountVatPercent'), namespace_, eol_))
        if self.CashDiscountVatAmount is not None:
            self.CashDiscountVatAmount.export(outfile, level, namespace_, name_='CashDiscountVatAmount', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CashDiscountVatDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CashDiscountVatPercent is not None:
            showIndent(outfile, level)
            outfile.write('CashDiscountVatPercent=%s,\n' % quote_python(self.CashDiscountVatPercent).encode(ExternalEncoding))
        if self.CashDiscountVatAmount is not None:
            showIndent(outfile, level)
            outfile.write('CashDiscountVatAmount=model_.amount(\n')
            self.CashDiscountVatAmount.exportLiteral(outfile, level, name_='CashDiscountVatAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CashDiscountVatPercent':
            CashDiscountVatPercent_ = child_.text
            CashDiscountVatPercent_ = self.gds_validate_string(CashDiscountVatPercent_, node, 'CashDiscountVatPercent')
            self.CashDiscountVatPercent = CashDiscountVatPercent_
            self.validate_percentage(self.CashDiscountVatPercent)    # validate type percentage
        elif nodeName_ == 'CashDiscountVatAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.CashDiscountVatAmount = obj_
            obj_.original_tagname_ = 'CashDiscountVatAmount'
# end class CashDiscountVatDetailsType


class RowPackageDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, RowPackageLength=None, RowPackageWidth=None, RowPackageHeight=None, RowPackageWeight=None, RowPackageNetWeight=None, RowPackageVolume=None, RowTransportCarriageQuantity=None):
        self.original_tagname_ = None
        self.RowPackageLength = RowPackageLength
        self.RowPackageWidth = RowPackageWidth
        self.RowPackageHeight = RowPackageHeight
        self.RowPackageWeight = RowPackageWeight
        self.RowPackageNetWeight = RowPackageNetWeight
        self.RowPackageVolume = RowPackageVolume
        self.RowTransportCarriageQuantity = RowTransportCarriageQuantity
    def factory(*args_, **kwargs_):
        if RowPackageDetailsType.subclass:
            return RowPackageDetailsType.subclass(*args_, **kwargs_)
        else:
            return RowPackageDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RowPackageLength(self): return self.RowPackageLength
    def set_RowPackageLength(self, RowPackageLength): self.RowPackageLength = RowPackageLength
    def get_RowPackageWidth(self): return self.RowPackageWidth
    def set_RowPackageWidth(self, RowPackageWidth): self.RowPackageWidth = RowPackageWidth
    def get_RowPackageHeight(self): return self.RowPackageHeight
    def set_RowPackageHeight(self, RowPackageHeight): self.RowPackageHeight = RowPackageHeight
    def get_RowPackageWeight(self): return self.RowPackageWeight
    def set_RowPackageWeight(self, RowPackageWeight): self.RowPackageWeight = RowPackageWeight
    def get_RowPackageNetWeight(self): return self.RowPackageNetWeight
    def set_RowPackageNetWeight(self, RowPackageNetWeight): self.RowPackageNetWeight = RowPackageNetWeight
    def get_RowPackageVolume(self): return self.RowPackageVolume
    def set_RowPackageVolume(self, RowPackageVolume): self.RowPackageVolume = RowPackageVolume
    def get_RowTransportCarriageQuantity(self): return self.RowTransportCarriageQuantity
    def set_RowTransportCarriageQuantity(self, RowTransportCarriageQuantity): self.RowTransportCarriageQuantity = RowTransportCarriageQuantity
    def hasContent_(self):
        if (
            self.RowPackageLength is not None or
            self.RowPackageWidth is not None or
            self.RowPackageHeight is not None or
            self.RowPackageWeight is not None or
            self.RowPackageNetWeight is not None or
            self.RowPackageVolume is not None or
            self.RowTransportCarriageQuantity is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='RowPackageDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RowPackageDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='RowPackageDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RowPackageDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='RowPackageDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.RowPackageLength is not None:
            self.RowPackageLength.export(outfile, level, namespace_, name_='RowPackageLength', pretty_print=pretty_print)
        if self.RowPackageWidth is not None:
            self.RowPackageWidth.export(outfile, level, namespace_, name_='RowPackageWidth', pretty_print=pretty_print)
        if self.RowPackageHeight is not None:
            self.RowPackageHeight.export(outfile, level, namespace_, name_='RowPackageHeight', pretty_print=pretty_print)
        if self.RowPackageWeight is not None:
            self.RowPackageWeight.export(outfile, level, namespace_, name_='RowPackageWeight', pretty_print=pretty_print)
        if self.RowPackageNetWeight is not None:
            self.RowPackageNetWeight.export(outfile, level, namespace_, name_='RowPackageNetWeight', pretty_print=pretty_print)
        if self.RowPackageVolume is not None:
            self.RowPackageVolume.export(outfile, level, namespace_, name_='RowPackageVolume', pretty_print=pretty_print)
        if self.RowTransportCarriageQuantity is not None:
            self.RowTransportCarriageQuantity.export(outfile, level, namespace_, name_='RowTransportCarriageQuantity', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RowPackageDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.RowPackageLength is not None:
            showIndent(outfile, level)
            outfile.write('RowPackageLength=model_.QuantityType0_14(\n')
            self.RowPackageLength.exportLiteral(outfile, level, name_='RowPackageLength')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowPackageWidth is not None:
            showIndent(outfile, level)
            outfile.write('RowPackageWidth=model_.QuantityType0_14(\n')
            self.RowPackageWidth.exportLiteral(outfile, level, name_='RowPackageWidth')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowPackageHeight is not None:
            showIndent(outfile, level)
            outfile.write('RowPackageHeight=model_.QuantityType0_14(\n')
            self.RowPackageHeight.exportLiteral(outfile, level, name_='RowPackageHeight')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowPackageWeight is not None:
            showIndent(outfile, level)
            outfile.write('RowPackageWeight=model_.QuantityType0_14(\n')
            self.RowPackageWeight.exportLiteral(outfile, level, name_='RowPackageWeight')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowPackageNetWeight is not None:
            showIndent(outfile, level)
            outfile.write('RowPackageNetWeight=model_.QuantityType0_14(\n')
            self.RowPackageNetWeight.exportLiteral(outfile, level, name_='RowPackageNetWeight')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowPackageVolume is not None:
            showIndent(outfile, level)
            outfile.write('RowPackageVolume=model_.QuantityType0_14(\n')
            self.RowPackageVolume.exportLiteral(outfile, level, name_='RowPackageVolume')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.RowTransportCarriageQuantity is not None:
            showIndent(outfile, level)
            outfile.write('RowTransportCarriageQuantity=model_.QuantityType0_14(\n')
            self.RowTransportCarriageQuantity.exportLiteral(outfile, level, name_='RowTransportCarriageQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RowPackageLength':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowPackageLength = obj_
            obj_.original_tagname_ = 'RowPackageLength'
        elif nodeName_ == 'RowPackageWidth':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowPackageWidth = obj_
            obj_.original_tagname_ = 'RowPackageWidth'
        elif nodeName_ == 'RowPackageHeight':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowPackageHeight = obj_
            obj_.original_tagname_ = 'RowPackageHeight'
        elif nodeName_ == 'RowPackageWeight':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowPackageWeight = obj_
            obj_.original_tagname_ = 'RowPackageWeight'
        elif nodeName_ == 'RowPackageNetWeight':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowPackageNetWeight = obj_
            obj_.original_tagname_ = 'RowPackageNetWeight'
        elif nodeName_ == 'RowPackageVolume':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowPackageVolume = obj_
            obj_.original_tagname_ = 'RowPackageVolume'
        elif nodeName_ == 'RowTransportCarriageQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.RowTransportCarriageQuantity = obj_
            obj_.original_tagname_ = 'RowTransportCarriageQuantity'
# end class RowPackageDetailsType


class SellerOfficialPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SellerOfficialStreetName=None, SellerOfficialTownName=None, SellerOfficialPostCodeIdentifier=None, CountryCode=None, CountryName=None):
        self.original_tagname_ = None
        self.SellerOfficialStreetName = SellerOfficialStreetName
        self.SellerOfficialTownName = SellerOfficialTownName
        self.SellerOfficialPostCodeIdentifier = SellerOfficialPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
    def factory(*args_, **kwargs_):
        if SellerOfficialPostalAddressDetailsType.subclass:
            return SellerOfficialPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return SellerOfficialPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SellerOfficialStreetName(self): return self.SellerOfficialStreetName
    def set_SellerOfficialStreetName(self, SellerOfficialStreetName): self.SellerOfficialStreetName = SellerOfficialStreetName
    def get_SellerOfficialTownName(self): return self.SellerOfficialTownName
    def set_SellerOfficialTownName(self, SellerOfficialTownName): self.SellerOfficialTownName = SellerOfficialTownName
    def get_SellerOfficialPostCodeIdentifier(self): return self.SellerOfficialPostCodeIdentifier
    def set_SellerOfficialPostCodeIdentifier(self, SellerOfficialPostCodeIdentifier): self.SellerOfficialPostCodeIdentifier = SellerOfficialPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SellerOfficialStreetName is not None or
            self.SellerOfficialTownName is not None or
            self.SellerOfficialPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SellerOfficialPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SellerOfficialPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SellerOfficialPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SellerOfficialPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SellerOfficialPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SellerOfficialStreetName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerOfficialStreetName>%s</%sSellerOfficialStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerOfficialStreetName).encode(ExternalEncoding), input_name='SellerOfficialStreetName'), namespace_, eol_))
        if self.SellerOfficialTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerOfficialTownName>%s</%sSellerOfficialTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerOfficialTownName).encode(ExternalEncoding), input_name='SellerOfficialTownName'), namespace_, eol_))
        if self.SellerOfficialPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSellerOfficialPostCodeIdentifier>%s</%sSellerOfficialPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SellerOfficialPostCodeIdentifier).encode(ExternalEncoding), input_name='SellerOfficialPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='SellerOfficialPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SellerOfficialStreetName is not None:
            showIndent(outfile, level)
            outfile.write('SellerOfficialStreetName=%s,\n' % quote_python(self.SellerOfficialStreetName).encode(ExternalEncoding))
        if self.SellerOfficialTownName is not None:
            showIndent(outfile, level)
            outfile.write('SellerOfficialTownName=%s,\n' % quote_python(self.SellerOfficialTownName).encode(ExternalEncoding))
        if self.SellerOfficialPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SellerOfficialPostCodeIdentifier=%s,\n' % quote_python(self.SellerOfficialPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SellerOfficialStreetName':
            SellerOfficialStreetName_ = child_.text
            SellerOfficialStreetName_ = self.gds_validate_string(SellerOfficialStreetName_, node, 'SellerOfficialStreetName')
            self.SellerOfficialStreetName = SellerOfficialStreetName_
            self.validate_genericStringType2_35(self.SellerOfficialStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'SellerOfficialTownName':
            SellerOfficialTownName_ = child_.text
            SellerOfficialTownName_ = self.gds_validate_string(SellerOfficialTownName_, node, 'SellerOfficialTownName')
            self.SellerOfficialTownName = SellerOfficialTownName_
            self.validate_genericStringType2_35(self.SellerOfficialTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'SellerOfficialPostCodeIdentifier':
            SellerOfficialPostCodeIdentifier_ = child_.text
            SellerOfficialPostCodeIdentifier_ = self.gds_validate_string(SellerOfficialPostCodeIdentifier_, node, 'SellerOfficialPostCodeIdentifier')
            self.SellerOfficialPostCodeIdentifier = SellerOfficialPostCodeIdentifier_
            self.validate_genericStringType2_35(self.SellerOfficialPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
# end class SellerOfficialPostalAddressDetailsType


class SubRowDefinitionDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SubRowDefinitionHeaderText=None, SubRowDefinitionValue=None):
        self.original_tagname_ = None
        self.SubRowDefinitionHeaderText = SubRowDefinitionHeaderText
        self.SubRowDefinitionValue = SubRowDefinitionValue
    def factory(*args_, **kwargs_):
        if SubRowDefinitionDetailsType.subclass:
            return SubRowDefinitionDetailsType.subclass(*args_, **kwargs_)
        else:
            return SubRowDefinitionDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SubRowDefinitionHeaderText(self): return self.SubRowDefinitionHeaderText
    def set_SubRowDefinitionHeaderText(self, SubRowDefinitionHeaderText): self.SubRowDefinitionHeaderText = SubRowDefinitionHeaderText
    def get_SubRowDefinitionValue(self): return self.SubRowDefinitionValue
    def set_SubRowDefinitionValue(self, SubRowDefinitionValue): self.SubRowDefinitionValue = SubRowDefinitionValue
    def hasContent_(self):
        if (
            self.SubRowDefinitionHeaderText is not None or
            self.SubRowDefinitionValue is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SubRowDefinitionDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SubRowDefinitionDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SubRowDefinitionDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubRowDefinitionDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SubRowDefinitionDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SubRowDefinitionHeaderText is not None:
            self.SubRowDefinitionHeaderText.export(outfile, level, namespace_, name_='SubRowDefinitionHeaderText', pretty_print=pretty_print)
        if self.SubRowDefinitionValue is not None:
            self.SubRowDefinitionValue.export(outfile, level, namespace_, name_='SubRowDefinitionValue', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SubRowDefinitionDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SubRowDefinitionHeaderText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDefinitionHeaderText=model_.SubRowDefinitionHeaderTextType(\n')
            self.SubRowDefinitionHeaderText.exportLiteral(outfile, level, name_='SubRowDefinitionHeaderText')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowDefinitionValue is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDefinitionValue=model_.QuantityType0_70(\n')
            self.SubRowDefinitionValue.exportLiteral(outfile, level, name_='SubRowDefinitionValue')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SubRowDefinitionHeaderText':
            obj_ = SubRowDefinitionHeaderTextType.factory()
            obj_.build(child_)
            self.SubRowDefinitionHeaderText = obj_
            obj_.original_tagname_ = 'SubRowDefinitionHeaderText'
        elif nodeName_ == 'SubRowDefinitionValue':
            obj_ = QuantityType0_70.factory()
            obj_.build(child_)
            self.SubRowDefinitionValue = obj_
            obj_.original_tagname_ = 'SubRowDefinitionValue'
# end class SubRowDefinitionDetailsType


class SubRowDefinitionHeaderTextType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DefinitionCode=None, valueOf_=None):
        self.original_tagname_ = None
        self.DefinitionCode = _cast(None, DefinitionCode)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SubRowDefinitionHeaderTextType.subclass:
            return SubRowDefinitionHeaderTextType.subclass(*args_, **kwargs_)
        else:
            return SubRowDefinitionHeaderTextType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DefinitionCode(self): return self.DefinitionCode
    def set_DefinitionCode(self, DefinitionCode): self.DefinitionCode = DefinitionCode
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def validate_genericTokenType1_20(self, value):
        # Validate type genericTokenType1_20, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SubRowDefinitionHeaderTextType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SubRowDefinitionHeaderTextType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SubRowDefinitionHeaderTextType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubRowDefinitionHeaderTextType'):
        if self.DefinitionCode is not None and 'DefinitionCode' not in already_processed:
            already_processed.add('DefinitionCode')
            outfile.write(' DefinitionCode=%s' % (quote_attrib(self.DefinitionCode), ))
    def exportChildren(self, outfile, level, namespace_='', name_='SubRowDefinitionHeaderTextType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='SubRowDefinitionHeaderTextType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.DefinitionCode is not None and 'DefinitionCode' not in already_processed:
            already_processed.add('DefinitionCode')
            showIndent(outfile, level)
            outfile.write('DefinitionCode="%s",\n' % (self.DefinitionCode,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('DefinitionCode', node)
        if value is not None and 'DefinitionCode' not in already_processed:
            already_processed.add('DefinitionCode')
            self.DefinitionCode = value
            self.DefinitionCode = ' '.join(self.DefinitionCode.split())
            self.validate_genericTokenType1_20(self.DefinitionCode)    # validate type genericTokenType1_20
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SubRowDefinitionHeaderTextType


class SubRowOverDuePaymentDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SubRowOriginalInvoiceIdentifier=None, SubRowOriginalInvoiceDate=None, SubRowOriginalDueDate=None, SubRowOriginalInvoiceTotalAmount=None, SubRowOriginalEpiRemittanceInfoIdentifier=None, SubRowPaidVatExcludedAmount=None, SubRowPaidVatIncludedAmount=None, SubRowPaidDate=None, SubRowUnPaidVatExcludedAmount=None, SubRowUnPaidVatIncludedAmount=None, SubRowCollectionDate=None, SubRowCollectionQuantity=None, SubRowCollectionChargeAmount=None, SubRowInterestRate=None, SubRowInterestStartDate=None, SubRowInterestEndDate=None, SubRowInterestPeriodText=None, SubRowInterestDateNumber=None, SubRowInterestChargeAmount=None, SubRowInterestChargeVatAmount=None):
        self.original_tagname_ = None
        self.SubRowOriginalInvoiceIdentifier = SubRowOriginalInvoiceIdentifier
        self.SubRowOriginalInvoiceDate = SubRowOriginalInvoiceDate
        self.SubRowOriginalDueDate = SubRowOriginalDueDate
        self.SubRowOriginalInvoiceTotalAmount = SubRowOriginalInvoiceTotalAmount
        self.SubRowOriginalEpiRemittanceInfoIdentifier = SubRowOriginalEpiRemittanceInfoIdentifier
        self.SubRowPaidVatExcludedAmount = SubRowPaidVatExcludedAmount
        self.SubRowPaidVatIncludedAmount = SubRowPaidVatIncludedAmount
        self.SubRowPaidDate = SubRowPaidDate
        self.SubRowUnPaidVatExcludedAmount = SubRowUnPaidVatExcludedAmount
        self.SubRowUnPaidVatIncludedAmount = SubRowUnPaidVatIncludedAmount
        self.SubRowCollectionDate = SubRowCollectionDate
        self.SubRowCollectionQuantity = SubRowCollectionQuantity
        self.SubRowCollectionChargeAmount = SubRowCollectionChargeAmount
        self.SubRowInterestRate = SubRowInterestRate
        self.SubRowInterestStartDate = SubRowInterestStartDate
        self.SubRowInterestEndDate = SubRowInterestEndDate
        self.SubRowInterestPeriodText = SubRowInterestPeriodText
        self.SubRowInterestDateNumber = SubRowInterestDateNumber
        self.SubRowInterestChargeAmount = SubRowInterestChargeAmount
        self.SubRowInterestChargeVatAmount = SubRowInterestChargeVatAmount
    def factory(*args_, **kwargs_):
        if SubRowOverDuePaymentDetailsType.subclass:
            return SubRowOverDuePaymentDetailsType.subclass(*args_, **kwargs_)
        else:
            return SubRowOverDuePaymentDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SubRowOriginalInvoiceIdentifier(self): return self.SubRowOriginalInvoiceIdentifier
    def set_SubRowOriginalInvoiceIdentifier(self, SubRowOriginalInvoiceIdentifier): self.SubRowOriginalInvoiceIdentifier = SubRowOriginalInvoiceIdentifier
    def get_SubRowOriginalInvoiceDate(self): return self.SubRowOriginalInvoiceDate
    def set_SubRowOriginalInvoiceDate(self, SubRowOriginalInvoiceDate): self.SubRowOriginalInvoiceDate = SubRowOriginalInvoiceDate
    def get_SubRowOriginalDueDate(self): return self.SubRowOriginalDueDate
    def set_SubRowOriginalDueDate(self, SubRowOriginalDueDate): self.SubRowOriginalDueDate = SubRowOriginalDueDate
    def get_SubRowOriginalInvoiceTotalAmount(self): return self.SubRowOriginalInvoiceTotalAmount
    def set_SubRowOriginalInvoiceTotalAmount(self, SubRowOriginalInvoiceTotalAmount): self.SubRowOriginalInvoiceTotalAmount = SubRowOriginalInvoiceTotalAmount
    def get_SubRowOriginalEpiRemittanceInfoIdentifier(self): return self.SubRowOriginalEpiRemittanceInfoIdentifier
    def set_SubRowOriginalEpiRemittanceInfoIdentifier(self, SubRowOriginalEpiRemittanceInfoIdentifier): self.SubRowOriginalEpiRemittanceInfoIdentifier = SubRowOriginalEpiRemittanceInfoIdentifier
    def get_SubRowPaidVatExcludedAmount(self): return self.SubRowPaidVatExcludedAmount
    def set_SubRowPaidVatExcludedAmount(self, SubRowPaidVatExcludedAmount): self.SubRowPaidVatExcludedAmount = SubRowPaidVatExcludedAmount
    def get_SubRowPaidVatIncludedAmount(self): return self.SubRowPaidVatIncludedAmount
    def set_SubRowPaidVatIncludedAmount(self, SubRowPaidVatIncludedAmount): self.SubRowPaidVatIncludedAmount = SubRowPaidVatIncludedAmount
    def get_SubRowPaidDate(self): return self.SubRowPaidDate
    def set_SubRowPaidDate(self, SubRowPaidDate): self.SubRowPaidDate = SubRowPaidDate
    def get_SubRowUnPaidVatExcludedAmount(self): return self.SubRowUnPaidVatExcludedAmount
    def set_SubRowUnPaidVatExcludedAmount(self, SubRowUnPaidVatExcludedAmount): self.SubRowUnPaidVatExcludedAmount = SubRowUnPaidVatExcludedAmount
    def get_SubRowUnPaidVatIncludedAmount(self): return self.SubRowUnPaidVatIncludedAmount
    def set_SubRowUnPaidVatIncludedAmount(self, SubRowUnPaidVatIncludedAmount): self.SubRowUnPaidVatIncludedAmount = SubRowUnPaidVatIncludedAmount
    def get_SubRowCollectionDate(self): return self.SubRowCollectionDate
    def set_SubRowCollectionDate(self, SubRowCollectionDate): self.SubRowCollectionDate = SubRowCollectionDate
    def get_SubRowCollectionQuantity(self): return self.SubRowCollectionQuantity
    def set_SubRowCollectionQuantity(self, SubRowCollectionQuantity): self.SubRowCollectionQuantity = SubRowCollectionQuantity
    def get_SubRowCollectionChargeAmount(self): return self.SubRowCollectionChargeAmount
    def set_SubRowCollectionChargeAmount(self, SubRowCollectionChargeAmount): self.SubRowCollectionChargeAmount = SubRowCollectionChargeAmount
    def get_SubRowInterestRate(self): return self.SubRowInterestRate
    def set_SubRowInterestRate(self, SubRowInterestRate): self.SubRowInterestRate = SubRowInterestRate
    def get_SubRowInterestStartDate(self): return self.SubRowInterestStartDate
    def set_SubRowInterestStartDate(self, SubRowInterestStartDate): self.SubRowInterestStartDate = SubRowInterestStartDate
    def get_SubRowInterestEndDate(self): return self.SubRowInterestEndDate
    def set_SubRowInterestEndDate(self, SubRowInterestEndDate): self.SubRowInterestEndDate = SubRowInterestEndDate
    def get_SubRowInterestPeriodText(self): return self.SubRowInterestPeriodText
    def set_SubRowInterestPeriodText(self, SubRowInterestPeriodText): self.SubRowInterestPeriodText = SubRowInterestPeriodText
    def get_SubRowInterestDateNumber(self): return self.SubRowInterestDateNumber
    def set_SubRowInterestDateNumber(self, SubRowInterestDateNumber): self.SubRowInterestDateNumber = SubRowInterestDateNumber
    def get_SubRowInterestChargeAmount(self): return self.SubRowInterestChargeAmount
    def set_SubRowInterestChargeAmount(self, SubRowInterestChargeAmount): self.SubRowInterestChargeAmount = SubRowInterestChargeAmount
    def get_SubRowInterestChargeVatAmount(self): return self.SubRowInterestChargeVatAmount
    def set_SubRowInterestChargeVatAmount(self, SubRowInterestChargeVatAmount): self.SubRowInterestChargeVatAmount = SubRowInterestChargeVatAmount
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def validate_genericNMtokenType0_14(self, value):
        # Validate type genericNMtokenType0_14, a restriction on xs:token.
        pass
    def hasContent_(self):
        if (
            self.SubRowOriginalInvoiceIdentifier is not None or
            self.SubRowOriginalInvoiceDate is not None or
            self.SubRowOriginalDueDate is not None or
            self.SubRowOriginalInvoiceTotalAmount is not None or
            self.SubRowOriginalEpiRemittanceInfoIdentifier is not None or
            self.SubRowPaidVatExcludedAmount is not None or
            self.SubRowPaidVatIncludedAmount is not None or
            self.SubRowPaidDate is not None or
            self.SubRowUnPaidVatExcludedAmount is not None or
            self.SubRowUnPaidVatIncludedAmount is not None or
            self.SubRowCollectionDate is not None or
            self.SubRowCollectionQuantity is not None or
            self.SubRowCollectionChargeAmount is not None or
            self.SubRowInterestRate is not None or
            self.SubRowInterestStartDate is not None or
            self.SubRowInterestEndDate is not None or
            self.SubRowInterestPeriodText is not None or
            self.SubRowInterestDateNumber is not None or
            self.SubRowInterestChargeAmount is not None or
            self.SubRowInterestChargeVatAmount is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SubRowOverDuePaymentDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SubRowOverDuePaymentDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SubRowOverDuePaymentDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubRowOverDuePaymentDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SubRowOverDuePaymentDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SubRowOriginalInvoiceIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowOriginalInvoiceIdentifier>%s</%sSubRowOriginalInvoiceIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowOriginalInvoiceIdentifier).encode(ExternalEncoding), input_name='SubRowOriginalInvoiceIdentifier'), namespace_, eol_))
        if self.SubRowOriginalInvoiceDate is not None:
            self.SubRowOriginalInvoiceDate.export(outfile, level, namespace_, name_='SubRowOriginalInvoiceDate', pretty_print=pretty_print)
        if self.SubRowOriginalDueDate is not None:
            self.SubRowOriginalDueDate.export(outfile, level, namespace_, name_='SubRowOriginalDueDate', pretty_print=pretty_print)
        if self.SubRowOriginalInvoiceTotalAmount is not None:
            self.SubRowOriginalInvoiceTotalAmount.export(outfile, level, namespace_, name_='SubRowOriginalInvoiceTotalAmount', pretty_print=pretty_print)
        if self.SubRowOriginalEpiRemittanceInfoIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowOriginalEpiRemittanceInfoIdentifier>%s</%sSubRowOriginalEpiRemittanceInfoIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowOriginalEpiRemittanceInfoIdentifier).encode(ExternalEncoding), input_name='SubRowOriginalEpiRemittanceInfoIdentifier'), namespace_, eol_))
        if self.SubRowPaidVatExcludedAmount is not None:
            self.SubRowPaidVatExcludedAmount.export(outfile, level, namespace_, name_='SubRowPaidVatExcludedAmount', pretty_print=pretty_print)
        if self.SubRowPaidVatIncludedAmount is not None:
            self.SubRowPaidVatIncludedAmount.export(outfile, level, namespace_, name_='SubRowPaidVatIncludedAmount', pretty_print=pretty_print)
        if self.SubRowPaidDate is not None:
            self.SubRowPaidDate.export(outfile, level, namespace_, name_='SubRowPaidDate', pretty_print=pretty_print)
        if self.SubRowUnPaidVatExcludedAmount is not None:
            self.SubRowUnPaidVatExcludedAmount.export(outfile, level, namespace_, name_='SubRowUnPaidVatExcludedAmount', pretty_print=pretty_print)
        if self.SubRowUnPaidVatIncludedAmount is not None:
            self.SubRowUnPaidVatIncludedAmount.export(outfile, level, namespace_, name_='SubRowUnPaidVatIncludedAmount', pretty_print=pretty_print)
        if self.SubRowCollectionDate is not None:
            self.SubRowCollectionDate.export(outfile, level, namespace_, name_='SubRowCollectionDate', pretty_print=pretty_print)
        if self.SubRowCollectionQuantity is not None:
            self.SubRowCollectionQuantity.export(outfile, level, namespace_, name_='SubRowCollectionQuantity', pretty_print=pretty_print)
        if self.SubRowCollectionChargeAmount is not None:
            self.SubRowCollectionChargeAmount.export(outfile, level, namespace_, name_='SubRowCollectionChargeAmount', pretty_print=pretty_print)
        if self.SubRowInterestRate is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowInterestRate>%s</%sSubRowInterestRate>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowInterestRate).encode(ExternalEncoding), input_name='SubRowInterestRate'), namespace_, eol_))
        if self.SubRowInterestStartDate is not None:
            self.SubRowInterestStartDate.export(outfile, level, namespace_, name_='SubRowInterestStartDate', pretty_print=pretty_print)
        if self.SubRowInterestEndDate is not None:
            self.SubRowInterestEndDate.export(outfile, level, namespace_, name_='SubRowInterestEndDate', pretty_print=pretty_print)
        if self.SubRowInterestPeriodText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowInterestPeriodText>%s</%sSubRowInterestPeriodText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowInterestPeriodText).encode(ExternalEncoding), input_name='SubRowInterestPeriodText'), namespace_, eol_))
        if self.SubRowInterestDateNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowInterestDateNumber>%s</%sSubRowInterestDateNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowInterestDateNumber).encode(ExternalEncoding), input_name='SubRowInterestDateNumber'), namespace_, eol_))
        if self.SubRowInterestChargeAmount is not None:
            self.SubRowInterestChargeAmount.export(outfile, level, namespace_, name_='SubRowInterestChargeAmount', pretty_print=pretty_print)
        if self.SubRowInterestChargeVatAmount is not None:
            self.SubRowInterestChargeVatAmount.export(outfile, level, namespace_, name_='SubRowInterestChargeVatAmount', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SubRowOverDuePaymentDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SubRowOriginalInvoiceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowOriginalInvoiceIdentifier=%s,\n' % quote_python(self.SubRowOriginalInvoiceIdentifier).encode(ExternalEncoding))
        if self.SubRowOriginalInvoiceDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowOriginalInvoiceDate=model_.date(\n')
            self.SubRowOriginalInvoiceDate.exportLiteral(outfile, level, name_='SubRowOriginalInvoiceDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowOriginalDueDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowOriginalDueDate=model_.date(\n')
            self.SubRowOriginalDueDate.exportLiteral(outfile, level, name_='SubRowOriginalDueDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowOriginalInvoiceTotalAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowOriginalInvoiceTotalAmount=model_.amount(\n')
            self.SubRowOriginalInvoiceTotalAmount.exportLiteral(outfile, level, name_='SubRowOriginalInvoiceTotalAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowOriginalEpiRemittanceInfoIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowOriginalEpiRemittanceInfoIdentifier=%s,\n' % quote_python(self.SubRowOriginalEpiRemittanceInfoIdentifier).encode(ExternalEncoding))
        if self.SubRowPaidVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPaidVatExcludedAmount=model_.amount(\n')
            self.SubRowPaidVatExcludedAmount.exportLiteral(outfile, level, name_='SubRowPaidVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowPaidVatIncludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPaidVatIncludedAmount=model_.amount(\n')
            self.SubRowPaidVatIncludedAmount.exportLiteral(outfile, level, name_='SubRowPaidVatIncludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowPaidDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPaidDate=model_.date(\n')
            self.SubRowPaidDate.exportLiteral(outfile, level, name_='SubRowPaidDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowUnPaidVatExcludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowUnPaidVatExcludedAmount=model_.amount(\n')
            self.SubRowUnPaidVatExcludedAmount.exportLiteral(outfile, level, name_='SubRowUnPaidVatExcludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowUnPaidVatIncludedAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowUnPaidVatIncludedAmount=model_.amount(\n')
            self.SubRowUnPaidVatIncludedAmount.exportLiteral(outfile, level, name_='SubRowUnPaidVatIncludedAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowCollectionDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowCollectionDate=model_.date(\n')
            self.SubRowCollectionDate.exportLiteral(outfile, level, name_='SubRowCollectionDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowCollectionQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubRowCollectionQuantity=model_.QuantityType0_14(\n')
            self.SubRowCollectionQuantity.exportLiteral(outfile, level, name_='SubRowCollectionQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowCollectionChargeAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowCollectionChargeAmount=model_.amount(\n')
            self.SubRowCollectionChargeAmount.exportLiteral(outfile, level, name_='SubRowCollectionChargeAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowInterestRate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowInterestRate=%s,\n' % quote_python(self.SubRowInterestRate).encode(ExternalEncoding))
        if self.SubRowInterestStartDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowInterestStartDate=model_.date(\n')
            self.SubRowInterestStartDate.exportLiteral(outfile, level, name_='SubRowInterestStartDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowInterestEndDate is not None:
            showIndent(outfile, level)
            outfile.write('SubRowInterestEndDate=model_.date(\n')
            self.SubRowInterestEndDate.exportLiteral(outfile, level, name_='SubRowInterestEndDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowInterestPeriodText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowInterestPeriodText=%s,\n' % quote_python(self.SubRowInterestPeriodText).encode(ExternalEncoding))
        if self.SubRowInterestDateNumber is not None:
            showIndent(outfile, level)
            outfile.write('SubRowInterestDateNumber=%s,\n' % quote_python(self.SubRowInterestDateNumber).encode(ExternalEncoding))
        if self.SubRowInterestChargeAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowInterestChargeAmount=model_.amount(\n')
            self.SubRowInterestChargeAmount.exportLiteral(outfile, level, name_='SubRowInterestChargeAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowInterestChargeVatAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowInterestChargeVatAmount=model_.amount(\n')
            self.SubRowInterestChargeVatAmount.exportLiteral(outfile, level, name_='SubRowInterestChargeVatAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SubRowOriginalInvoiceIdentifier':
            SubRowOriginalInvoiceIdentifier_ = child_.text
            SubRowOriginalInvoiceIdentifier_ = self.gds_validate_string(SubRowOriginalInvoiceIdentifier_, node, 'SubRowOriginalInvoiceIdentifier')
            self.SubRowOriginalInvoiceIdentifier = SubRowOriginalInvoiceIdentifier_
            self.validate_genericStringType0_35(self.SubRowOriginalInvoiceIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowOriginalInvoiceDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowOriginalInvoiceDate = obj_
            obj_.original_tagname_ = 'SubRowOriginalInvoiceDate'
        elif nodeName_ == 'SubRowOriginalDueDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowOriginalDueDate = obj_
            obj_.original_tagname_ = 'SubRowOriginalDueDate'
        elif nodeName_ == 'SubRowOriginalInvoiceTotalAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowOriginalInvoiceTotalAmount = obj_
            obj_.original_tagname_ = 'SubRowOriginalInvoiceTotalAmount'
        elif nodeName_ == 'SubRowOriginalEpiRemittanceInfoIdentifier':
            SubRowOriginalEpiRemittanceInfoIdentifier_ = child_.text
            SubRowOriginalEpiRemittanceInfoIdentifier_ = self.gds_validate_string(SubRowOriginalEpiRemittanceInfoIdentifier_, node, 'SubRowOriginalEpiRemittanceInfoIdentifier')
            self.SubRowOriginalEpiRemittanceInfoIdentifier = SubRowOriginalEpiRemittanceInfoIdentifier_
            self.validate_genericStringType0_35(self.SubRowOriginalEpiRemittanceInfoIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowPaidVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowPaidVatExcludedAmount = obj_
            obj_.original_tagname_ = 'SubRowPaidVatExcludedAmount'
        elif nodeName_ == 'SubRowPaidVatIncludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowPaidVatIncludedAmount = obj_
            obj_.original_tagname_ = 'SubRowPaidVatIncludedAmount'
        elif nodeName_ == 'SubRowPaidDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowPaidDate = obj_
            obj_.original_tagname_ = 'SubRowPaidDate'
        elif nodeName_ == 'SubRowUnPaidVatExcludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowUnPaidVatExcludedAmount = obj_
            obj_.original_tagname_ = 'SubRowUnPaidVatExcludedAmount'
        elif nodeName_ == 'SubRowUnPaidVatIncludedAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowUnPaidVatIncludedAmount = obj_
            obj_.original_tagname_ = 'SubRowUnPaidVatIncludedAmount'
        elif nodeName_ == 'SubRowCollectionDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowCollectionDate = obj_
            obj_.original_tagname_ = 'SubRowCollectionDate'
        elif nodeName_ == 'SubRowCollectionQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowCollectionQuantity = obj_
            obj_.original_tagname_ = 'SubRowCollectionQuantity'
        elif nodeName_ == 'SubRowCollectionChargeAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowCollectionChargeAmount = obj_
            obj_.original_tagname_ = 'SubRowCollectionChargeAmount'
        elif nodeName_ == 'SubRowInterestRate':
            SubRowInterestRate_ = child_.text
            SubRowInterestRate_ = self.gds_validate_string(SubRowInterestRate_, node, 'SubRowInterestRate')
            self.SubRowInterestRate = SubRowInterestRate_
            self.validate_percentage(self.SubRowInterestRate)    # validate type percentage
        elif nodeName_ == 'SubRowInterestStartDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowInterestStartDate = obj_
            obj_.original_tagname_ = 'SubRowInterestStartDate'
        elif nodeName_ == 'SubRowInterestEndDate':
            obj_ = date.factory()
            obj_.build(child_)
            self.SubRowInterestEndDate = obj_
            obj_.original_tagname_ = 'SubRowInterestEndDate'
        elif nodeName_ == 'SubRowInterestPeriodText':
            SubRowInterestPeriodText_ = child_.text
            SubRowInterestPeriodText_ = self.gds_validate_string(SubRowInterestPeriodText_, node, 'SubRowInterestPeriodText')
            self.SubRowInterestPeriodText = SubRowInterestPeriodText_
            self.validate_genericStringType0_35(self.SubRowInterestPeriodText)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowInterestDateNumber':
            SubRowInterestDateNumber_ = child_.text
            SubRowInterestDateNumber_ = re_.sub(String_cleanup_pat_, " ", SubRowInterestDateNumber_).strip()
            SubRowInterestDateNumber_ = self.gds_validate_string(SubRowInterestDateNumber_, node, 'SubRowInterestDateNumber')
            self.SubRowInterestDateNumber = SubRowInterestDateNumber_
            self.validate_genericNMtokenType0_14(self.SubRowInterestDateNumber)    # validate type genericNMtokenType0_14
        elif nodeName_ == 'SubRowInterestChargeAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowInterestChargeAmount = obj_
            obj_.original_tagname_ = 'SubRowInterestChargeAmount'
        elif nodeName_ == 'SubRowInterestChargeVatAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowInterestChargeVatAmount = obj_
            obj_.original_tagname_ = 'SubRowInterestChargeVatAmount'
# end class SubRowOverDuePaymentDetailsType


class SubRowAnyPartyDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SubRowAnyPartyText=None, SubRowAnyPartyIdentifier=None, SubRowAnyPartyOrganisationName=None, SubRowAnyPartyOrganisationDepartment=None, SubRowAnyPartyOrganisationTaxCode=None, SubRowAnyPartyPostalAddressDetails=None, SubRowAnyPartyOrganisationUnitNumber=None, SubRowAnyPartySiteCode=None):
        self.original_tagname_ = None
        self.SubRowAnyPartyText = SubRowAnyPartyText
        self.SubRowAnyPartyIdentifier = SubRowAnyPartyIdentifier
        if SubRowAnyPartyOrganisationName is None:
            self.SubRowAnyPartyOrganisationName = []
        else:
            self.SubRowAnyPartyOrganisationName = SubRowAnyPartyOrganisationName
        if SubRowAnyPartyOrganisationDepartment is None:
            self.SubRowAnyPartyOrganisationDepartment = []
        else:
            self.SubRowAnyPartyOrganisationDepartment = SubRowAnyPartyOrganisationDepartment
        self.SubRowAnyPartyOrganisationTaxCode = SubRowAnyPartyOrganisationTaxCode
        self.SubRowAnyPartyPostalAddressDetails = SubRowAnyPartyPostalAddressDetails
        self.SubRowAnyPartyOrganisationUnitNumber = SubRowAnyPartyOrganisationUnitNumber
        self.SubRowAnyPartySiteCode = SubRowAnyPartySiteCode
    def factory(*args_, **kwargs_):
        if SubRowAnyPartyDetailsType.subclass:
            return SubRowAnyPartyDetailsType.subclass(*args_, **kwargs_)
        else:
            return SubRowAnyPartyDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SubRowAnyPartyText(self): return self.SubRowAnyPartyText
    def set_SubRowAnyPartyText(self, SubRowAnyPartyText): self.SubRowAnyPartyText = SubRowAnyPartyText
    def get_SubRowAnyPartyIdentifier(self): return self.SubRowAnyPartyIdentifier
    def set_SubRowAnyPartyIdentifier(self, SubRowAnyPartyIdentifier): self.SubRowAnyPartyIdentifier = SubRowAnyPartyIdentifier
    def get_SubRowAnyPartyOrganisationName(self): return self.SubRowAnyPartyOrganisationName
    def set_SubRowAnyPartyOrganisationName(self, SubRowAnyPartyOrganisationName): self.SubRowAnyPartyOrganisationName = SubRowAnyPartyOrganisationName
    def add_SubRowAnyPartyOrganisationName(self, value): self.SubRowAnyPartyOrganisationName.append(value)
    def insert_SubRowAnyPartyOrganisationName_at(self, index, value): self.SubRowAnyPartyOrganisationName.insert(index, value)
    def replace_SubRowAnyPartyOrganisationName_at(self, index, value): self.SubRowAnyPartyOrganisationName[index] = value
    def get_SubRowAnyPartyOrganisationDepartment(self): return self.SubRowAnyPartyOrganisationDepartment
    def set_SubRowAnyPartyOrganisationDepartment(self, SubRowAnyPartyOrganisationDepartment): self.SubRowAnyPartyOrganisationDepartment = SubRowAnyPartyOrganisationDepartment
    def add_SubRowAnyPartyOrganisationDepartment(self, value): self.SubRowAnyPartyOrganisationDepartment.append(value)
    def insert_SubRowAnyPartyOrganisationDepartment_at(self, index, value): self.SubRowAnyPartyOrganisationDepartment.insert(index, value)
    def replace_SubRowAnyPartyOrganisationDepartment_at(self, index, value): self.SubRowAnyPartyOrganisationDepartment[index] = value
    def get_SubRowAnyPartyOrganisationTaxCode(self): return self.SubRowAnyPartyOrganisationTaxCode
    def set_SubRowAnyPartyOrganisationTaxCode(self, SubRowAnyPartyOrganisationTaxCode): self.SubRowAnyPartyOrganisationTaxCode = SubRowAnyPartyOrganisationTaxCode
    def get_SubRowAnyPartyPostalAddressDetails(self): return self.SubRowAnyPartyPostalAddressDetails
    def set_SubRowAnyPartyPostalAddressDetails(self, SubRowAnyPartyPostalAddressDetails): self.SubRowAnyPartyPostalAddressDetails = SubRowAnyPartyPostalAddressDetails
    def get_SubRowAnyPartyOrganisationUnitNumber(self): return self.SubRowAnyPartyOrganisationUnitNumber
    def set_SubRowAnyPartyOrganisationUnitNumber(self, SubRowAnyPartyOrganisationUnitNumber): self.SubRowAnyPartyOrganisationUnitNumber = SubRowAnyPartyOrganisationUnitNumber
    def get_SubRowAnyPartySiteCode(self): return self.SubRowAnyPartySiteCode
    def set_SubRowAnyPartySiteCode(self, SubRowAnyPartySiteCode): self.SubRowAnyPartySiteCode = SubRowAnyPartySiteCode
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SubRowAnyPartyText is not None or
            self.SubRowAnyPartyIdentifier is not None or
            self.SubRowAnyPartyOrganisationName or
            self.SubRowAnyPartyOrganisationDepartment or
            self.SubRowAnyPartyOrganisationTaxCode is not None or
            self.SubRowAnyPartyPostalAddressDetails is not None or
            self.SubRowAnyPartyOrganisationUnitNumber is not None or
            self.SubRowAnyPartySiteCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SubRowAnyPartyDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SubRowAnyPartyDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SubRowAnyPartyDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubRowAnyPartyDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SubRowAnyPartyDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SubRowAnyPartyText is not None:
            self.SubRowAnyPartyText.export(outfile, level, namespace_, name_='SubRowAnyPartyText', pretty_print=pretty_print)
        if self.SubRowAnyPartyIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartyIdentifier>%s</%sSubRowAnyPartyIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAnyPartyIdentifier).encode(ExternalEncoding), input_name='SubRowAnyPartyIdentifier'), namespace_, eol_))
        for SubRowAnyPartyOrganisationName_ in self.SubRowAnyPartyOrganisationName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartyOrganisationName>%s</%sSubRowAnyPartyOrganisationName>%s' % (namespace_, self.gds_format_string(quote_xml(SubRowAnyPartyOrganisationName_).encode(ExternalEncoding), input_name='SubRowAnyPartyOrganisationName'), namespace_, eol_))
        for SubRowAnyPartyOrganisationDepartment_ in self.SubRowAnyPartyOrganisationDepartment:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartyOrganisationDepartment>%s</%sSubRowAnyPartyOrganisationDepartment>%s' % (namespace_, self.gds_format_string(quote_xml(SubRowAnyPartyOrganisationDepartment_).encode(ExternalEncoding), input_name='SubRowAnyPartyOrganisationDepartment'), namespace_, eol_))
        if self.SubRowAnyPartyOrganisationTaxCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartyOrganisationTaxCode>%s</%sSubRowAnyPartyOrganisationTaxCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAnyPartyOrganisationTaxCode).encode(ExternalEncoding), input_name='SubRowAnyPartyOrganisationTaxCode'), namespace_, eol_))
        if self.SubRowAnyPartyPostalAddressDetails is not None:
            self.SubRowAnyPartyPostalAddressDetails.export(outfile, level, namespace_, name_='SubRowAnyPartyPostalAddressDetails', pretty_print=pretty_print)
        if self.SubRowAnyPartyOrganisationUnitNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartyOrganisationUnitNumber>%s</%sSubRowAnyPartyOrganisationUnitNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAnyPartyOrganisationUnitNumber).encode(ExternalEncoding), input_name='SubRowAnyPartyOrganisationUnitNumber'), namespace_, eol_))
        if self.SubRowAnyPartySiteCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartySiteCode>%s</%sSubRowAnyPartySiteCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAnyPartySiteCode).encode(ExternalEncoding), input_name='SubRowAnyPartySiteCode'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='SubRowAnyPartyDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SubRowAnyPartyText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAnyPartyText=model_.anypartytexttype0_35(\n')
            self.SubRowAnyPartyText.exportLiteral(outfile, level, name_='SubRowAnyPartyText')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowAnyPartyIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAnyPartyIdentifier=%s,\n' % quote_python(self.SubRowAnyPartyIdentifier).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('SubRowAnyPartyOrganisationName=[\n')
        level += 1
        for SubRowAnyPartyOrganisationName_ in self.SubRowAnyPartyOrganisationName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SubRowAnyPartyOrganisationName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('SubRowAnyPartyOrganisationDepartment=[\n')
        level += 1
        for SubRowAnyPartyOrganisationDepartment_ in self.SubRowAnyPartyOrganisationDepartment:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SubRowAnyPartyOrganisationDepartment_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubRowAnyPartyOrganisationTaxCode is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAnyPartyOrganisationTaxCode=%s,\n' % quote_python(self.SubRowAnyPartyOrganisationTaxCode).encode(ExternalEncoding))
        if self.SubRowAnyPartyPostalAddressDetails is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAnyPartyPostalAddressDetails=model_.SubRowAnyPartyPostalAddressDetailsType(\n')
            self.SubRowAnyPartyPostalAddressDetails.exportLiteral(outfile, level, name_='SubRowAnyPartyPostalAddressDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowAnyPartyOrganisationUnitNumber is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAnyPartyOrganisationUnitNumber=%s,\n' % quote_python(self.SubRowAnyPartyOrganisationUnitNumber).encode(ExternalEncoding))
        if self.SubRowAnyPartySiteCode is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAnyPartySiteCode=%s,\n' % quote_python(self.SubRowAnyPartySiteCode).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SubRowAnyPartyText':
            obj_ = anypartytexttype0_35.factory()
            obj_.build(child_)
            self.SubRowAnyPartyText = obj_
            obj_.original_tagname_ = 'SubRowAnyPartyText'
        elif nodeName_ == 'SubRowAnyPartyIdentifier':
            SubRowAnyPartyIdentifier_ = child_.text
            SubRowAnyPartyIdentifier_ = self.gds_validate_string(SubRowAnyPartyIdentifier_, node, 'SubRowAnyPartyIdentifier')
            self.SubRowAnyPartyIdentifier = SubRowAnyPartyIdentifier_
            self.validate_genericStringType0_35(self.SubRowAnyPartyIdentifier)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowAnyPartyOrganisationName':
            SubRowAnyPartyOrganisationName_ = child_.text
            SubRowAnyPartyOrganisationName_ = self.gds_validate_string(SubRowAnyPartyOrganisationName_, node, 'SubRowAnyPartyOrganisationName')
            self.SubRowAnyPartyOrganisationName.append(SubRowAnyPartyOrganisationName_)
            self.validate_genericStringType2_35(self.SubRowAnyPartyOrganisationName)    # validate type genericStringType2_35
        elif nodeName_ == 'SubRowAnyPartyOrganisationDepartment':
            SubRowAnyPartyOrganisationDepartment_ = child_.text
            SubRowAnyPartyOrganisationDepartment_ = self.gds_validate_string(SubRowAnyPartyOrganisationDepartment_, node, 'SubRowAnyPartyOrganisationDepartment')
            self.SubRowAnyPartyOrganisationDepartment.append(SubRowAnyPartyOrganisationDepartment_)
            self.validate_genericStringType0_35(self.SubRowAnyPartyOrganisationDepartment)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowAnyPartyOrganisationTaxCode':
            SubRowAnyPartyOrganisationTaxCode_ = child_.text
            SubRowAnyPartyOrganisationTaxCode_ = self.gds_validate_string(SubRowAnyPartyOrganisationTaxCode_, node, 'SubRowAnyPartyOrganisationTaxCode')
            self.SubRowAnyPartyOrganisationTaxCode = SubRowAnyPartyOrganisationTaxCode_
            self.validate_genericStringType0_35(self.SubRowAnyPartyOrganisationTaxCode)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowAnyPartyPostalAddressDetails':
            obj_ = SubRowAnyPartyPostalAddressDetailsType.factory()
            obj_.build(child_)
            self.SubRowAnyPartyPostalAddressDetails = obj_
            obj_.original_tagname_ = 'SubRowAnyPartyPostalAddressDetails'
        elif nodeName_ == 'SubRowAnyPartyOrganisationUnitNumber':
            SubRowAnyPartyOrganisationUnitNumber_ = child_.text
            SubRowAnyPartyOrganisationUnitNumber_ = self.gds_validate_string(SubRowAnyPartyOrganisationUnitNumber_, node, 'SubRowAnyPartyOrganisationUnitNumber')
            self.SubRowAnyPartyOrganisationUnitNumber = SubRowAnyPartyOrganisationUnitNumber_
            self.validate_genericStringType0_35(self.SubRowAnyPartyOrganisationUnitNumber)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowAnyPartySiteCode':
            SubRowAnyPartySiteCode_ = child_.text
            SubRowAnyPartySiteCode_ = self.gds_validate_string(SubRowAnyPartySiteCode_, node, 'SubRowAnyPartySiteCode')
            self.SubRowAnyPartySiteCode = SubRowAnyPartySiteCode_
            self.validate_genericStringType0_35(self.SubRowAnyPartySiteCode)    # validate type genericStringType0_35
# end class SubRowAnyPartyDetailsType


class SubRowAnyPartyPostalAddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SubRowAnyPartyStreetName=None, SubRowAnyPartyTownName=None, SubRowAnyPartyPostCodeIdentifier=None, CountryCode=None, CountryName=None, SubRowAnyPartyPostOfficeBoxIdentifier=None):
        self.original_tagname_ = None
        if SubRowAnyPartyStreetName is None:
            self.SubRowAnyPartyStreetName = []
        else:
            self.SubRowAnyPartyStreetName = SubRowAnyPartyStreetName
        self.SubRowAnyPartyTownName = SubRowAnyPartyTownName
        self.SubRowAnyPartyPostCodeIdentifier = SubRowAnyPartyPostCodeIdentifier
        self.CountryCode = CountryCode
        self.CountryName = CountryName
        self.SubRowAnyPartyPostOfficeBoxIdentifier = SubRowAnyPartyPostOfficeBoxIdentifier
    def factory(*args_, **kwargs_):
        if SubRowAnyPartyPostalAddressDetailsType.subclass:
            return SubRowAnyPartyPostalAddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return SubRowAnyPartyPostalAddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SubRowAnyPartyStreetName(self): return self.SubRowAnyPartyStreetName
    def set_SubRowAnyPartyStreetName(self, SubRowAnyPartyStreetName): self.SubRowAnyPartyStreetName = SubRowAnyPartyStreetName
    def add_SubRowAnyPartyStreetName(self, value): self.SubRowAnyPartyStreetName.append(value)
    def insert_SubRowAnyPartyStreetName_at(self, index, value): self.SubRowAnyPartyStreetName.insert(index, value)
    def replace_SubRowAnyPartyStreetName_at(self, index, value): self.SubRowAnyPartyStreetName[index] = value
    def get_SubRowAnyPartyTownName(self): return self.SubRowAnyPartyTownName
    def set_SubRowAnyPartyTownName(self, SubRowAnyPartyTownName): self.SubRowAnyPartyTownName = SubRowAnyPartyTownName
    def get_SubRowAnyPartyPostCodeIdentifier(self): return self.SubRowAnyPartyPostCodeIdentifier
    def set_SubRowAnyPartyPostCodeIdentifier(self, SubRowAnyPartyPostCodeIdentifier): self.SubRowAnyPartyPostCodeIdentifier = SubRowAnyPartyPostCodeIdentifier
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def get_CountryName(self): return self.CountryName
    def set_CountryName(self, CountryName): self.CountryName = CountryName
    def get_SubRowAnyPartyPostOfficeBoxIdentifier(self): return self.SubRowAnyPartyPostOfficeBoxIdentifier
    def set_SubRowAnyPartyPostOfficeBoxIdentifier(self, SubRowAnyPartyPostOfficeBoxIdentifier): self.SubRowAnyPartyPostOfficeBoxIdentifier = SubRowAnyPartyPostOfficeBoxIdentifier
    def validate_genericStringType2_35(self, value):
        # Validate type genericStringType2_35, a restriction on xs:string.
        pass
    def validate_CountryCodeType(self, value):
        # Validate type CountryCodeType, a restriction on xs:NMTOKEN.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SubRowAnyPartyStreetName or
            self.SubRowAnyPartyTownName is not None or
            self.SubRowAnyPartyPostCodeIdentifier is not None or
            self.CountryCode is not None or
            self.CountryName is not None or
            self.SubRowAnyPartyPostOfficeBoxIdentifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SubRowAnyPartyPostalAddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SubRowAnyPartyPostalAddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SubRowAnyPartyPostalAddressDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubRowAnyPartyPostalAddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SubRowAnyPartyPostalAddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SubRowAnyPartyStreetName_ in self.SubRowAnyPartyStreetName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartyStreetName>%s</%sSubRowAnyPartyStreetName>%s' % (namespace_, self.gds_format_string(quote_xml(SubRowAnyPartyStreetName_).encode(ExternalEncoding), input_name='SubRowAnyPartyStreetName'), namespace_, eol_))
        if self.SubRowAnyPartyTownName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartyTownName>%s</%sSubRowAnyPartyTownName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAnyPartyTownName).encode(ExternalEncoding), input_name='SubRowAnyPartyTownName'), namespace_, eol_))
        if self.SubRowAnyPartyPostCodeIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartyPostCodeIdentifier>%s</%sSubRowAnyPartyPostCodeIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAnyPartyPostCodeIdentifier).encode(ExternalEncoding), input_name='SubRowAnyPartyPostCodeIdentifier'), namespace_, eol_))
        if self.CountryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryCode>%s</%sCountryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryCode).encode(ExternalEncoding), input_name='CountryCode'), namespace_, eol_))
        if self.CountryName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryName>%s</%sCountryName>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryName).encode(ExternalEncoding), input_name='CountryName'), namespace_, eol_))
        if self.SubRowAnyPartyPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowAnyPartyPostOfficeBoxIdentifier>%s</%sSubRowAnyPartyPostOfficeBoxIdentifier>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowAnyPartyPostOfficeBoxIdentifier).encode(ExternalEncoding), input_name='SubRowAnyPartyPostOfficeBoxIdentifier'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='SubRowAnyPartyPostalAddressDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('SubRowAnyPartyStreetName=[\n')
        level += 1
        for SubRowAnyPartyStreetName_ in self.SubRowAnyPartyStreetName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(SubRowAnyPartyStreetName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.SubRowAnyPartyTownName is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAnyPartyTownName=%s,\n' % quote_python(self.SubRowAnyPartyTownName).encode(ExternalEncoding))
        if self.SubRowAnyPartyPostCodeIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAnyPartyPostCodeIdentifier=%s,\n' % quote_python(self.SubRowAnyPartyPostCodeIdentifier).encode(ExternalEncoding))
        if self.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.CountryName is not None:
            showIndent(outfile, level)
            outfile.write('CountryName=%s,\n' % quote_python(self.CountryName).encode(ExternalEncoding))
        if self.SubRowAnyPartyPostOfficeBoxIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('SubRowAnyPartyPostOfficeBoxIdentifier=%s,\n' % quote_python(self.SubRowAnyPartyPostOfficeBoxIdentifier).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SubRowAnyPartyStreetName':
            SubRowAnyPartyStreetName_ = child_.text
            SubRowAnyPartyStreetName_ = self.gds_validate_string(SubRowAnyPartyStreetName_, node, 'SubRowAnyPartyStreetName')
            self.SubRowAnyPartyStreetName.append(SubRowAnyPartyStreetName_)
            self.validate_genericStringType2_35(self.SubRowAnyPartyStreetName)    # validate type genericStringType2_35
        elif nodeName_ == 'SubRowAnyPartyTownName':
            SubRowAnyPartyTownName_ = child_.text
            SubRowAnyPartyTownName_ = self.gds_validate_string(SubRowAnyPartyTownName_, node, 'SubRowAnyPartyTownName')
            self.SubRowAnyPartyTownName = SubRowAnyPartyTownName_
            self.validate_genericStringType2_35(self.SubRowAnyPartyTownName)    # validate type genericStringType2_35
        elif nodeName_ == 'SubRowAnyPartyPostCodeIdentifier':
            SubRowAnyPartyPostCodeIdentifier_ = child_.text
            SubRowAnyPartyPostCodeIdentifier_ = self.gds_validate_string(SubRowAnyPartyPostCodeIdentifier_, node, 'SubRowAnyPartyPostCodeIdentifier')
            self.SubRowAnyPartyPostCodeIdentifier = SubRowAnyPartyPostCodeIdentifier_
            self.validate_genericStringType2_35(self.SubRowAnyPartyPostCodeIdentifier)    # validate type genericStringType2_35
        elif nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryCodeType(self.CountryCode)    # validate type CountryCodeType
        elif nodeName_ == 'CountryName':
            CountryName_ = child_.text
            CountryName_ = self.gds_validate_string(CountryName_, node, 'CountryName')
            self.CountryName = CountryName_
            self.validate_genericStringType0_35(self.CountryName)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowAnyPartyPostOfficeBoxIdentifier':
            SubRowAnyPartyPostOfficeBoxIdentifier_ = child_.text
            SubRowAnyPartyPostOfficeBoxIdentifier_ = self.gds_validate_string(SubRowAnyPartyPostOfficeBoxIdentifier_, node, 'SubRowAnyPartyPostOfficeBoxIdentifier')
            self.SubRowAnyPartyPostOfficeBoxIdentifier = SubRowAnyPartyPostOfficeBoxIdentifier_
            self.validate_genericStringType0_35(self.SubRowAnyPartyPostOfficeBoxIdentifier)    # validate type genericStringType0_35
# end class SubRowAnyPartyPostalAddressDetailsType


class SubRowProgressiveDiscountDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SubRowDiscountPercent=None, SubRowDiscountAmount=None, SubRowDiscountTypeCode=None, SubRowDiscountTypeText=None):
        self.original_tagname_ = None
        self.SubRowDiscountPercent = SubRowDiscountPercent
        self.SubRowDiscountAmount = SubRowDiscountAmount
        self.SubRowDiscountTypeCode = SubRowDiscountTypeCode
        self.SubRowDiscountTypeText = SubRowDiscountTypeText
    def factory(*args_, **kwargs_):
        if SubRowProgressiveDiscountDetailsType.subclass:
            return SubRowProgressiveDiscountDetailsType.subclass(*args_, **kwargs_)
        else:
            return SubRowProgressiveDiscountDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SubRowDiscountPercent(self): return self.SubRowDiscountPercent
    def set_SubRowDiscountPercent(self, SubRowDiscountPercent): self.SubRowDiscountPercent = SubRowDiscountPercent
    def get_SubRowDiscountAmount(self): return self.SubRowDiscountAmount
    def set_SubRowDiscountAmount(self, SubRowDiscountAmount): self.SubRowDiscountAmount = SubRowDiscountAmount
    def get_SubRowDiscountTypeCode(self): return self.SubRowDiscountTypeCode
    def set_SubRowDiscountTypeCode(self, SubRowDiscountTypeCode): self.SubRowDiscountTypeCode = SubRowDiscountTypeCode
    def get_SubRowDiscountTypeText(self): return self.SubRowDiscountTypeText
    def set_SubRowDiscountTypeText(self, SubRowDiscountTypeText): self.SubRowDiscountTypeText = SubRowDiscountTypeText
    def validate_percentage(self, value):
        # Validate type percentage, a restriction on xs:string.
        pass
    def validate_genericStringType0_35(self, value):
        # Validate type genericStringType0_35, a restriction on xs:string.
        pass
    def hasContent_(self):
        if (
            self.SubRowDiscountPercent is not None or
            self.SubRowDiscountAmount is not None or
            self.SubRowDiscountTypeCode is not None or
            self.SubRowDiscountTypeText is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SubRowProgressiveDiscountDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SubRowProgressiveDiscountDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SubRowProgressiveDiscountDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubRowProgressiveDiscountDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SubRowProgressiveDiscountDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SubRowDiscountPercent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDiscountPercent>%s</%sSubRowDiscountPercent>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDiscountPercent).encode(ExternalEncoding), input_name='SubRowDiscountPercent'), namespace_, eol_))
        if self.SubRowDiscountAmount is not None:
            self.SubRowDiscountAmount.export(outfile, level, namespace_, name_='SubRowDiscountAmount', pretty_print=pretty_print)
        if self.SubRowDiscountTypeCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDiscountTypeCode>%s</%sSubRowDiscountTypeCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDiscountTypeCode).encode(ExternalEncoding), input_name='SubRowDiscountTypeCode'), namespace_, eol_))
        if self.SubRowDiscountTypeText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubRowDiscountTypeText>%s</%sSubRowDiscountTypeText>%s' % (namespace_, self.gds_format_string(quote_xml(self.SubRowDiscountTypeText).encode(ExternalEncoding), input_name='SubRowDiscountTypeText'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='SubRowProgressiveDiscountDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SubRowDiscountPercent is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDiscountPercent=%s,\n' % quote_python(self.SubRowDiscountPercent).encode(ExternalEncoding))
        if self.SubRowDiscountAmount is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDiscountAmount=model_.amount(\n')
            self.SubRowDiscountAmount.exportLiteral(outfile, level, name_='SubRowDiscountAmount')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowDiscountTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDiscountTypeCode=%s,\n' % quote_python(self.SubRowDiscountTypeCode).encode(ExternalEncoding))
        if self.SubRowDiscountTypeText is not None:
            showIndent(outfile, level)
            outfile.write('SubRowDiscountTypeText=%s,\n' % quote_python(self.SubRowDiscountTypeText).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SubRowDiscountPercent':
            SubRowDiscountPercent_ = child_.text
            SubRowDiscountPercent_ = self.gds_validate_string(SubRowDiscountPercent_, node, 'SubRowDiscountPercent')
            self.SubRowDiscountPercent = SubRowDiscountPercent_
            self.validate_percentage(self.SubRowDiscountPercent)    # validate type percentage
        elif nodeName_ == 'SubRowDiscountAmount':
            obj_ = amount.factory()
            obj_.build(child_)
            self.SubRowDiscountAmount = obj_
            obj_.original_tagname_ = 'SubRowDiscountAmount'
        elif nodeName_ == 'SubRowDiscountTypeCode':
            SubRowDiscountTypeCode_ = child_.text
            SubRowDiscountTypeCode_ = self.gds_validate_string(SubRowDiscountTypeCode_, node, 'SubRowDiscountTypeCode')
            self.SubRowDiscountTypeCode = SubRowDiscountTypeCode_
            self.validate_genericStringType0_35(self.SubRowDiscountTypeCode)    # validate type genericStringType0_35
        elif nodeName_ == 'SubRowDiscountTypeText':
            SubRowDiscountTypeText_ = child_.text
            SubRowDiscountTypeText_ = self.gds_validate_string(SubRowDiscountTypeText_, node, 'SubRowDiscountTypeText')
            self.SubRowDiscountTypeText = SubRowDiscountTypeText_
            self.validate_genericStringType0_35(self.SubRowDiscountTypeText)    # validate type genericStringType0_35
# end class SubRowProgressiveDiscountDetailsType


class SubRowPackageDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SubRowPackageLength=None, SubRowPackageWidth=None, SubRowPackageHeight=None, SubRowPackageWeight=None, SubRowPackageNetWeight=None, SubRowPackageVolume=None, SubRowTransportCarriageQuantity=None):
        self.original_tagname_ = None
        self.SubRowPackageLength = SubRowPackageLength
        self.SubRowPackageWidth = SubRowPackageWidth
        self.SubRowPackageHeight = SubRowPackageHeight
        self.SubRowPackageWeight = SubRowPackageWeight
        self.SubRowPackageNetWeight = SubRowPackageNetWeight
        self.SubRowPackageVolume = SubRowPackageVolume
        self.SubRowTransportCarriageQuantity = SubRowTransportCarriageQuantity
    def factory(*args_, **kwargs_):
        if SubRowPackageDetailsType.subclass:
            return SubRowPackageDetailsType.subclass(*args_, **kwargs_)
        else:
            return SubRowPackageDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SubRowPackageLength(self): return self.SubRowPackageLength
    def set_SubRowPackageLength(self, SubRowPackageLength): self.SubRowPackageLength = SubRowPackageLength
    def get_SubRowPackageWidth(self): return self.SubRowPackageWidth
    def set_SubRowPackageWidth(self, SubRowPackageWidth): self.SubRowPackageWidth = SubRowPackageWidth
    def get_SubRowPackageHeight(self): return self.SubRowPackageHeight
    def set_SubRowPackageHeight(self, SubRowPackageHeight): self.SubRowPackageHeight = SubRowPackageHeight
    def get_SubRowPackageWeight(self): return self.SubRowPackageWeight
    def set_SubRowPackageWeight(self, SubRowPackageWeight): self.SubRowPackageWeight = SubRowPackageWeight
    def get_SubRowPackageNetWeight(self): return self.SubRowPackageNetWeight
    def set_SubRowPackageNetWeight(self, SubRowPackageNetWeight): self.SubRowPackageNetWeight = SubRowPackageNetWeight
    def get_SubRowPackageVolume(self): return self.SubRowPackageVolume
    def set_SubRowPackageVolume(self, SubRowPackageVolume): self.SubRowPackageVolume = SubRowPackageVolume
    def get_SubRowTransportCarriageQuantity(self): return self.SubRowTransportCarriageQuantity
    def set_SubRowTransportCarriageQuantity(self, SubRowTransportCarriageQuantity): self.SubRowTransportCarriageQuantity = SubRowTransportCarriageQuantity
    def hasContent_(self):
        if (
            self.SubRowPackageLength is not None or
            self.SubRowPackageWidth is not None or
            self.SubRowPackageHeight is not None or
            self.SubRowPackageWeight is not None or
            self.SubRowPackageNetWeight is not None or
            self.SubRowPackageVolume is not None or
            self.SubRowTransportCarriageQuantity is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='', name_='SubRowPackageDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SubRowPackageDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='', name_='SubRowPackageDetailsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubRowPackageDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SubRowPackageDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SubRowPackageLength is not None:
            self.SubRowPackageLength.export(outfile, level, namespace_, name_='SubRowPackageLength', pretty_print=pretty_print)
        if self.SubRowPackageWidth is not None:
            self.SubRowPackageWidth.export(outfile, level, namespace_, name_='SubRowPackageWidth', pretty_print=pretty_print)
        if self.SubRowPackageHeight is not None:
            self.SubRowPackageHeight.export(outfile, level, namespace_, name_='SubRowPackageHeight', pretty_print=pretty_print)
        if self.SubRowPackageWeight is not None:
            self.SubRowPackageWeight.export(outfile, level, namespace_, name_='SubRowPackageWeight', pretty_print=pretty_print)
        if self.SubRowPackageNetWeight is not None:
            self.SubRowPackageNetWeight.export(outfile, level, namespace_, name_='SubRowPackageNetWeight', pretty_print=pretty_print)
        if self.SubRowPackageVolume is not None:
            self.SubRowPackageVolume.export(outfile, level, namespace_, name_='SubRowPackageVolume', pretty_print=pretty_print)
        if self.SubRowTransportCarriageQuantity is not None:
            self.SubRowTransportCarriageQuantity.export(outfile, level, namespace_, name_='SubRowTransportCarriageQuantity', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SubRowPackageDetailsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SubRowPackageLength is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPackageLength=model_.QuantityType0_14(\n')
            self.SubRowPackageLength.exportLiteral(outfile, level, name_='SubRowPackageLength')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowPackageWidth is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPackageWidth=model_.QuantityType0_14(\n')
            self.SubRowPackageWidth.exportLiteral(outfile, level, name_='SubRowPackageWidth')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowPackageHeight is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPackageHeight=model_.QuantityType0_14(\n')
            self.SubRowPackageHeight.exportLiteral(outfile, level, name_='SubRowPackageHeight')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowPackageWeight is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPackageWeight=model_.QuantityType0_14(\n')
            self.SubRowPackageWeight.exportLiteral(outfile, level, name_='SubRowPackageWeight')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowPackageNetWeight is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPackageNetWeight=model_.QuantityType0_14(\n')
            self.SubRowPackageNetWeight.exportLiteral(outfile, level, name_='SubRowPackageNetWeight')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowPackageVolume is not None:
            showIndent(outfile, level)
            outfile.write('SubRowPackageVolume=model_.QuantityType0_14(\n')
            self.SubRowPackageVolume.exportLiteral(outfile, level, name_='SubRowPackageVolume')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SubRowTransportCarriageQuantity is not None:
            showIndent(outfile, level)
            outfile.write('SubRowTransportCarriageQuantity=model_.QuantityType0_14(\n')
            self.SubRowTransportCarriageQuantity.exportLiteral(outfile, level, name_='SubRowTransportCarriageQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SubRowPackageLength':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowPackageLength = obj_
            obj_.original_tagname_ = 'SubRowPackageLength'
        elif nodeName_ == 'SubRowPackageWidth':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowPackageWidth = obj_
            obj_.original_tagname_ = 'SubRowPackageWidth'
        elif nodeName_ == 'SubRowPackageHeight':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowPackageHeight = obj_
            obj_.original_tagname_ = 'SubRowPackageHeight'
        elif nodeName_ == 'SubRowPackageWeight':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowPackageWeight = obj_
            obj_.original_tagname_ = 'SubRowPackageWeight'
        elif nodeName_ == 'SubRowPackageNetWeight':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowPackageNetWeight = obj_
            obj_.original_tagname_ = 'SubRowPackageNetWeight'
        elif nodeName_ == 'SubRowPackageVolume':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowPackageVolume = obj_
            obj_.original_tagname_ = 'SubRowPackageVolume'
        elif nodeName_ == 'SubRowTransportCarriageQuantity':
            obj_ = QuantityType0_14.factory()
            obj_.build(child_)
            self.SubRowTransportCarriageQuantity = obj_
            obj_.original_tagname_ = 'SubRowTransportCarriageQuantity'
# end class SubRowPackageDetailsType


GDSClassesMapping = {
    'EpiRemittanceInfoIdentifier': EpiRemittanceInfoIdentifierType,
    'SubRowPackageVolume': QuantityType0_14,
    'RowAveragePriceAmount': amount,
    'RowPreviousMeterReadingDate': date,
    'SubInvoiceRow': SubInvoiceRowType,
    'RowCollectionQuantity': QuantityType0_14,
    'RowOriginalDueDate': date,
    'PaymentOverDueFineDetails': PaymentOverDueFineDetailsType,
    'DefinitionValue': QuantityType0_70,
    'InvoiceTotalVatExcludedAmount': amount,
    'PartialPaymentDetails': PartialPaymentDetailsType,
    'TransportInformationDate': date,
    'SubRowPackageWidth': QuantityType0_14,
    'OrderDate': date,
    'EpiIdentificationDetails': EpiIdentificationDetailsType,
    'SubRowOriginalInvoiceTotalAmount': amount,
    'DeliveryPostalAddressDetails': DeliveryPostalAddressDetailsType,
    'SubRowCalculatedQuantity': QuantityType0_14,
    'MessageDetails': MessageDetailsType,
    'RowOriginalInvoiceDate': date,
    'PackageWeight': QuantityType0_14,
    'SubRowVatExcludedAmount': amount,
    'SubRowIdentifierDate': date,
    'UnPaidVatExcludedAmount': amount,
    'SellerInformationDetails': SellerInformationDetailsType,
    'UnitPriceAmount': unitAmount,
    'RowIdentifierDate': date,
    'OtherCurrencyAmountVatExcludedAmount': amount,
    'InvoiceTotalVatIncludedAmount': amount,
    'SubUnitPriceVatIncludedAmount': unitAmount,
    'RowAnyPartyPostalAddressDetails': RowAnyPartyPostalAddressDetailsType,
    'RowInterestStartDate': date,
    'InvoiceRecipientCode': PartyIdentifierType,
    'RowUnPaidVatIncludedAmount': amount,
    'CashDiscountBaseAmount': amount,
    'SubRowPackageNetWeight': QuantityType0_14,
    'SubRowPaidDate': date,
    'CashDiscountExcludingVatAmount': amount,
    'DeliveryDetails': DeliveryDetailsType,
    'InvoiceSenderPartyDetails': InvoiceSenderPartyDetailsType,
    'PackageWidth': QuantityType0_14,
    'BuyerPartyDetails': BuyerPartyDetailsType,
    'PackageDetails': PackageDetailsType,
    'RowVatAmount': amount,
    'SubRowCollectionDate': date,
    'SubRowDiscountAmount': amount,
    'SellerVatRegistrationDate': date,
    'ReturnedQuantity': QuantityType0_14,
    'ExternalSpecificationDetails': ExternalSpecificationDetailsType,
    'SubRowUsedQuantity': QuantityType0_14,
    'TransportCarriageQuantity': QuantityType0_14,
    'MessageTransmissionDetails': MessageTransmissionDetailsType,
    'RowTransportInformationDate': date,
    'EpiAccountID': EpiAccountIDType,
    'InvoiceSenderCode': PartyIdentifierType,
    'PackageVolume': QuantityType0_14,
    'MessageSenderDetails': MessageSenderDetailsType,
    'SpecificationDetails': SpecificationDetailsType,
    'RowPaidVatExcludedAmount': amount,
    'PaymentStatusDetails': PaymentStatusDetailsType,
    'InvoicedQuantity': QuantityType0_14,
    'RowInterestChargeAmount': amount,
    'SubOfferedQuantity': QuantityType0_14,
    'AnyPartyDetails': AnyPartyDetailsType,
    'RowLatestMeterReadingDate': date,
    'SubEndDate': date,
    'EpiDetails': EpiDetailsType,
    'PackageLength': QuantityType0_14,
    'InvoiceTotalRoundoffAmount': amount,
    'InvoiceRecipientPostalAddressDetails': InvoiceRecipientPostalAddressDetailsType,
    'RowOriginalInvoiceTotalAmount': amount,
    'PartialPaymentVatExcludedAmount': amount,
    'CashDiscountAmount': amount,
    'OrderConfirmationDate': date,
    'InvoicingPeriodStartDate': date,
    'SubRowAveragePriceAmount': amount,
    'SellerCommunicationDetails': SellerCommunicationDetailsType,
    'RowPackageDetails': RowPackageDetailsType,
    'ShipmentPartyDetails': ShipmentPartyDetailsType,
    'SubRowPackageWeight': QuantityType0_14,
    'PaidAmount': amount,
    'DeliveredQuantity': QuantityType0_14,
    'VatBaseAmount': amount,
    'RowProgressiveDiscountDetails': RowProgressiveDiscountDetailsType,
    'RowDefinitionValue': QuantityType0_70,
    'SubStartDate': date,
    'RowCustomsInfo': CustomsInfoType,
    'RowAmount': amount,
    'ControlDate': date,
    'RowInterestChargeVatAmount': amount,
    'SubRowOverDuePaymentDetails': SubRowOverDuePaymentDetailsType,
    'DefinitionHeaderText': DefinitionHeaderTextType,
    'SubRowPackageLength': QuantityType0_14,
    'CashDiscountVatAmount': amount,
    'CashDiscountDate': date,
    'SubRowAnyPartyText': anypartytexttype0_35,
    'BuyerCode': PartyIdentifierType,
    'SubOrderedQuantity': QuantityType0_14,
    'PartialPaymentDueDate': date,
    'EpiBeneficiaryPartyDetails': EpiBeneficiaryPartyDetailsType,
    'EpiPaymentInstructionDetails': EpiPaymentInstructionDetailsType,
    'DeliveryCode': PartyIdentifierType,
    'DiscountDetails': DiscountDetailsType,
    'ExchangeDate': date,
    'OperationLimitAmount': amount,
    'SubRowOrderConfirmationDate': date,
    'RowPackageWidth': QuantityType0_14,
    'RowPaidDate': date,
    'SubRowCollectionChargeAmount': amount,
    'SellerOfficialPostalAddressDetails': SellerOfficialPostalAddressDetailsType,
    'InvoicingPeriodEndDate': date,
    'SubRowOriginalInvoiceDate': date,
    'SubRowOriginalDueDate': date,
    'SubRowDefinitionValue': QuantityType0_70,
    'RowUnPaidVatExcludedAmount': amount,
    'CreditRequestedQuantity': QuantityType0_14,
    'RowUsedQuantity': QuantityType0_14,
    'SubRowPaidVatExcludedAmount': amount,
    'DeliveryPartyDetails': DeliveryPartyDetailsType,
    'RowPaidVatIncludedAmount': amount,
    'BuyerCommunicationDetails': BuyerCommunicationDetailsType,
    'SubUnitPriceBaseQuantity': QuantityType0_14,
    'ReducedInvoiceVatIncludedAmount': amount,
    'SubRowInterestChargeVatAmount': amount,
    'PaidVatExcludedAmount': amount,
    'DeliveryPeriodDetails': DeliveryPeriodDetailsType,
    'RowPackageLength': QuantityType0_14,
    'StartDate': date,
    'PackageHeight': QuantityType0_14,
    'RowCalculatedQuantity': QuantityType0_14,
    'InvoiceDate': date,
    'RowCollectionChargeAmount': amount,
    'SubRowInterestChargeAmount': amount,
    'AnyPartyText': anypartytexttype0_35,
    'EpiDateOptionDate': date,
    'SubDeliveredQuantity': QuantityType0_14,
    'InvoiceRecipientPartyDetails': InvoiceRecipientPartyDetailsType,
    'InvoiceTotalVatAmount': amount,
    'DeliveryDate': date,
    'CreditLimitAmount': amount,
    'RowInterestEndDate': date,
    'SubRowDefinitionHeaderText': SubRowDefinitionHeaderTextType,
    'SubRowAnyPartyPostalAddressDetails': SubRowAnyPartyPostalAddressDetailsType,
    'SubRowPaidVatIncludedAmount': amount,
    'SubRowUnPaidVatIncludedAmount': amount,
    'SubRowVatAmount': amount,
    'VatSpecificationDetails': VatSpecificationDetailsType,
    'InvoiceDueDate': date,
    'InvoiceTypeCode': InvoiceTypeCodeType,
    'RowDefinitionDetails': RowDefinitionDetailsType,
    'SellerBic': SellerBicType,
    'ConfirmedQuantity': QuantityType0_14,
    'SubRowCollectionQuantity': QuantityType0_14,
    'RowVatExcludedAmount': amount,
    'RowAnyPartyText': anypartytexttype0_35,
    'SellerCode': PartyIdentifierType,
    'SubUnitPriceAmount': unitAmount,
    'RowPackageHeight': QuantityType0_14,
    'SubPostDeliveredQuantity': QuantityType0_14,
    'RowDeliveryDetails': RowDeliveryDetailsType,
    'BuyerPostalAddressDetails': BuyerPostalAddressDetailsType,
    'PostDeliveredQuantity': QuantityType0_14,
    'RowPackageVolume': QuantityType0_14,
    'UnitPriceVatIncludedAmount': unitAmount,
    'SellerPartyDetails': SellerPartyDetailsType,
    'RowTransportCarriageQuantity': QuantityType0_14,
    'RowDiscountAmount': amount,
    'SubRowAnyPartyDetails': SubRowAnyPartyDetailsType,
    'SubRowPackageHeight': QuantityType0_14,
    'AttachmentMessageDetails': AttachmentMessageDetailsType,
    'SubRowLatestMeterReadingDate': date,
    'RowDeliveryDate': date,
    'SubConfirmedQuantity': QuantityType0_14,
    'SellerAccountID': SellerAccountIDType,
    'SubRowCustomsInfo': CustomsInfoType,
    'RowOverDuePaymentDetails': RowOverDuePaymentDetailsType,
    'SubRowDefinitionDetails': SubRowDefinitionDetailsType,
    'SubRowPreviousMeterReadingDate': date,
    'SellerAccountDetails': SellerAccountDetailsType,
    'OrderedQuantity': QuantityType0_14,
    'OtherCurrencyAmount': amount,
    'OfferedQuantity': QuantityType0_14,
    'MessageReceiverDetails': MessageReceiverDetailsType,
    'UnPaidAmount': amount,
    'ProsessingCostsAmount': amount,
    'RowDefinitionHeaderText': RowDefinitionHeaderTextType,
    'SubRowUnPaidVatExcludedAmount': amount,
    'SubRowDeliveryDetails': SubRowDeliveryDetailsType,
    'EpiBfiPartyDetails': EpiBfiPartyDetailsType,
    'FactoringAgreementDetails': FactoringAgreementDetailsType,
    'PaymentOverDueFixedAmount': amount,
    'SellerPostalAddressDetails': SellerPostalAddressDetailsType,
    'SubRowInterestStartDate': date,
    'EndDate': date,
    'InvoiceRecipientCommunicationDetails': InvoiceRecipientCommunicationDetailsType,
    'PaymentTermsDetails': PaymentTermsDetailsType,
    'InvoiceRecipientDetails': InvoiceRecipientDetailsType,
    'CashDiscountVatDetails': CashDiscountVatDetailsType,
    'ShipmentCode': PartyIdentifierType,
    'DefinitionDetails': DefinitionDetailsType,
    'SubReturnedQuantity': QuantityType0_14,
    'RowPackageNetWeight': QuantityType0_14,
    'AnyPartyCode': PartyIdentifierType,
    'SubInvoicedQuantity': QuantityType0_14,
    'AnyPartyCommunicationDetails': AnyPartyCommunicationDetailsType,
    'InvoiceRow': InvoiceRowType,
    'UnitPriceBaseQuantity': QuantityType0_14,
    'SubRowTransportCarriageQuantity': QuantityType0_14,
    'SubRowTransactionDetails': TransactionDetailsType,
    'RowTransactionDetails': TransactionDetailsType,
    'VatRateAmount': amount,
    'ShipmentPostalAddressDetails': ShipmentPostalAddressDetailsType,
    'SubRowAmount': amount,
    'FactoringPartyPostalAddressDetails': FactoringPartyPostalAddressDetailsType,
    'EpiPartyDetails': EpiPartyDetailsType,
    'AnyPartyPostalAddressDetails': AnyPartyPostalAddressDetailsType,
    'SubCreditRequestedQuantity': QuantityType0_14,
    'SubRowPackageDetails': SubRowPackageDetailsType,
    'SubRowProgressiveDiscountDetails': SubRowProgressiveDiscountDetailsType,
    'SubRowInterestEndDate': date,
    'SubRowDeliveryDate': date,
    'PartialPaymentVatIncludedAmount': amount,
    'EpiBfiIdentifier': EpiBfiIdentifierType,
    'OtherCurrencyAmountVatIncludedAmount': amount,
    'MonthlyAmount': amount,
    'RowOrderConfirmationDate': date,
    'RowCollectionDate': date,
    'RowAnyPartyDetails': RowAnyPartyDetailsType,
    'Amount': amount,
    'EpiDate': date,
    'EpiCharge': EpiChargeType,
    'RowPackageWeight': QuantityType0_14,
    'EpiInstructedAmount': epiAmount,
    'NotificationDate': date,
    'DeliveryCommunicationDetails': DeliveryCommunicationDetailsType,
    'InvoiceDetails': InvoiceDetailsType,
    'PackageNetWeight': QuantityType0_14,
    'AgreementDate': date,
}


USAGE_TEXT = """
Usage: python <Parser>.py [ -s ] <in_xml_file>
"""


def usage():
    print USAGE_TEXT
    sys.exit(1)


def get_root_tag(node):
    tag = Tag_pattern_.match(node.tag).groups()[-1]
    rootClass = GDSClassesMapping.get(tag)
    if rootClass is None:
        rootClass = globals().get(tag)
    return tag, rootClass


def parse(inFileName, silence=False):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'Finvoice'
        rootClass = Finvoice
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    if not silence:
        sys.stdout.write('<?xml version="1.0" ?>\n')
        rootObj.export(
            sys.stdout, 0, name_=rootTag,
            namespacedef_='',
            pretty_print=True)
    return rootObj


def parseEtree(inFileName, silence=False):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'Finvoice'
        rootClass = Finvoice
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    mapping = {}
    rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping)
    reverse_mapping = rootObj.gds_reverse_node_mapping(mapping)
    if not silence:
        content = etree_.tostring(
            rootElement, pretty_print=True,
            xml_declaration=True, encoding="utf-8")
        sys.stdout.write(content)
        sys.stdout.write('\n')
    return rootObj, rootElement, mapping, reverse_mapping


def parseString(inString, silence=False):
    from StringIO import StringIO
    doc = parsexml_(StringIO(inString))
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'Finvoice'
        rootClass = Finvoice
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    if not silence:
        sys.stdout.write('<?xml version="1.0" ?>\n')
        rootObj.export(
            sys.stdout, 0, name_=rootTag,
            namespacedef_='')
    return rootObj


def parseLiteral(inFileName, silence=False):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'Finvoice'
        rootClass = Finvoice
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    if not silence:
        sys.stdout.write('#from finvoice import *\n\n')
        sys.stdout.write('import finvoice as model_\n\n')
        sys.stdout.write('rootObj = model_.rootClass(\n')
        rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
        sys.stdout.write(')\n')
    return rootObj


def main():
    args = sys.argv[1:]
    if len(args) == 1:
        parse(args[0])
    else:
        usage()


if __name__ == '__main__':
    #import pdb; pdb.set_trace()
    main()


__all__ = [
    "AnyPartyCommunicationDetailsType",
    "AnyPartyDetailsType",
    "AnyPartyPostalAddressDetailsType",
    "AnyPartyTextType",
    "AttachmentMessageDetailsType",
    "BuyerCommunicationDetailsType",
    "BuyerPartyDetailsType",
    "BuyerPostalAddressDetailsType",
    "CashDiscountVatDetailsType",
    "CustomsInfoType",
    "DefinitionDetailsType",
    "DefinitionHeaderTextType",
    "DeliveryCommunicationDetailsType",
    "DeliveryDetailsType",
    "DeliveryPartyDetailsType",
    "DeliveryPeriodDetailsType",
    "DeliveryPostalAddressDetailsType",
    "DiscountDetailsType",
    "EpiAccountIDType",
    "EpiBeneficiaryPartyDetailsType",
    "EpiBfiIdentifierType",
    "EpiBfiPartyDetailsType",
    "EpiChargeType",
    "EpiDetailsType",
    "EpiIdentificationDetailsType",
    "EpiPartyDetailsType",
    "EpiPaymentInstructionDetailsType",
    "EpiRemittanceInfoIdentifierType",
    "ExternalSpecificationDetailsType",
    "FactoringAgreementDetailsType",
    "FactoringPartyPostalAddressDetailsType",
    "Finvoice",
    "InvoiceDetailsType",
    "InvoiceRecipientCommunicationDetailsType",
    "InvoiceRecipientDetailsType",
    "InvoiceRecipientPartyDetailsType",
    "InvoiceRecipientPostalAddressDetailsType",
    "InvoiceRowType",
    "InvoiceSenderPartyDetailsType",
    "InvoiceTypeCodeType",
    "MessageDetailsType",
    "MessageReceiverDetailsType",
    "MessageSenderDetailsType",
    "MessageTransmissionDetailsType",
    "PackageDetailsType",
    "PartialPaymentDetailsType",
    "PartyIdentifierType",
    "PaymentOverDueFineDetailsType",
    "PaymentStatusDetailsType",
    "PaymentTermsDetailsType",
    "QuantityType",
    "QuantityType0_14",
    "QuantityType0_70",
    "RowAnyPartyDetailsType",
    "RowAnyPartyPostalAddressDetailsType",
    "RowDefinitionDetailsType",
    "RowDefinitionHeaderTextType",
    "RowDeliveryDetailsType",
    "RowOverDuePaymentDetailsType",
    "RowPackageDetailsType",
    "RowProgressiveDiscountDetailsType",
    "SellerAccountDetailsType",
    "SellerAccountIDType",
    "SellerBicType",
    "SellerCommunicationDetailsType",
    "SellerInformationDetailsType",
    "SellerOfficialPostalAddressDetailsType",
    "SellerPartyDetailsType",
    "SellerPostalAddressDetailsType",
    "ShipmentPartyDetailsType",
    "ShipmentPostalAddressDetailsType",
    "SpecificationDetailsType",
    "SubInvoiceRowType",
    "SubRowAnyPartyDetailsType",
    "SubRowAnyPartyPostalAddressDetailsType",
    "SubRowDefinitionDetailsType",
    "SubRowDefinitionHeaderTextType",
    "SubRowDeliveryDetailsType",
    "SubRowOverDuePaymentDetailsType",
    "SubRowPackageDetailsType",
    "SubRowProgressiveDiscountDetailsType",
    "TransactionDetailsType",
    "VatSpecificationDetailsType",
    "amount",
    "anypartytexttype0_35",
    "date",
    "epiAmount",
    "unitAmount"
]
