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

#
# Generated Thu Sep 27 12:32:55 2012 by generateDS.py version 2.7c.
#

import sys
import getopt
import re as re_

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):
        def gds_format_string(self, input_data, input_name=''):
            return input_data
        def gds_validate_string(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:
                    fvalue = float(value)
                except (TypeError, ValueError), exp:
                    raise_parse_error(node, 'Requires sequence of integers')
            return input_data
        def gds_format_float(self, input_data, input_name=''):
            return '%f' % input_data
        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:
                    fvalue = float(value)
                except (TypeError, ValueError), exp:
                    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:
                    fvalue = float(value)
                except (TypeError, ValueError), exp:
                    raise_parse_error(node, 'Requires sequence of doubles')
            return input_data
        def gds_format_boolean(self, input_data, input_name=''):
            return '%s' % input_data
        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_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


#
# 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 = 'utf-8'
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):
            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
    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))
    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 QuestionAnswerType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, QuestionID=None, Answer=None):
        self.QuestionID = QuestionID
        if Answer is None:
            self.Answer = []
        else:
            self.Answer = Answer
    def factory(*args_, **kwargs_):
        if QuestionAnswerType.subclass:
            return QuestionAnswerType.subclass(*args_, **kwargs_)
        else:
            return QuestionAnswerType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_QuestionID(self): return self.QuestionID
    def set_QuestionID(self, QuestionID): self.QuestionID = QuestionID
    def get_Answer(self): return self.Answer
    def set_Answer(self, Answer): self.Answer = Answer
    def add_Answer(self, value): self.Answer.append(value)
    def insert_Answer(self, index, value): self.Answer[index] = value
    def export(self, outfile, level, namespace_='', name_='QuestionAnswerType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='QuestionAnswerType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='QuestionAnswerType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='QuestionAnswerType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.QuestionID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sQuestionID>%s</%sQuestionID>%s' % (namespace_, self.gds_format_integer(self.QuestionID, input_name='QuestionID'), namespace_, eol_))
        for Answer_ in self.Answer:
            Answer_.export(outfile, level, namespace_, name_='Answer', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.QuestionID is not None or
            self.Answer
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='QuestionAnswerType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.QuestionID is not None:
            showIndent(outfile, level)
            outfile.write('QuestionID=%d,\n' % self.QuestionID)
        showIndent(outfile, level)
        outfile.write('Answer=[\n')
        level += 1
        for Answer_ in self.Answer:
            showIndent(outfile, level)
            outfile.write('model_.AnswerType(\n')
            Answer_.exportLiteral(outfile, level, name_='AnswerType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'QuestionID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'QuestionID')
            self.QuestionID = ival_
        elif nodeName_ == 'Answer':
            obj_ = AnswerType.factory()
            obj_.build(child_)
            self.Answer.append(obj_)
# end class QuestionAnswerType


class AnswerType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, OptionID=None, ModifyFlag=None, BrandID=None, DrinkCategoryID=None, CommunicationChannel=None, AnswerText=None):
        self.OptionID = OptionID
        self.ModifyFlag = ModifyFlag
        self.BrandID = BrandID
        self.DrinkCategoryID = DrinkCategoryID
        self.CommunicationChannel = CommunicationChannel
        self.AnswerText = AnswerText
    def factory(*args_, **kwargs_):
        if AnswerType.subclass:
            return AnswerType.subclass(*args_, **kwargs_)
        else:
            return AnswerType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_OptionID(self): return self.OptionID
    def set_OptionID(self, OptionID): self.OptionID = OptionID
    def get_ModifyFlag(self): return self.ModifyFlag
    def set_ModifyFlag(self, ModifyFlag): self.ModifyFlag = ModifyFlag
    def validate_ModifyFlag(self, value):
        # Validate type ModifyFlag, a restriction on xs:string.
        pass
    def get_BrandID(self): return self.BrandID
    def set_BrandID(self, BrandID): self.BrandID = BrandID
    def validate_BrandID(self, value):
        # Validate type BrandID, a restriction on xs:long.
        pass
    def get_DrinkCategoryID(self): return self.DrinkCategoryID
    def set_DrinkCategoryID(self, DrinkCategoryID): self.DrinkCategoryID = DrinkCategoryID
    def validate_DrinkCategoryID(self, value):
        # Validate type DrinkCategoryID, a restriction on xs:long.
        pass
    def get_CommunicationChannel(self): return self.CommunicationChannel
    def set_CommunicationChannel(self, CommunicationChannel): self.CommunicationChannel = CommunicationChannel
    def validate_CommunicationChannel(self, value):
        # Validate type CommunicationChannel, a restriction on xs:byte.
        pass
    def get_AnswerText(self): return self.AnswerText
    def set_AnswerText(self, AnswerText): self.AnswerText = AnswerText
    def validate_AnswerText(self, value):
        # Validate type AnswerText, a restriction on xs:string.
        pass
    def export(self, outfile, level, namespace_='', name_='AnswerType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AnswerType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='AnswerType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='AnswerType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.OptionID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOptionID>%s</%sOptionID>%s' % (namespace_, self.gds_format_integer(self.OptionID, input_name='OptionID'), namespace_, eol_))
        if self.ModifyFlag is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sModifyFlag>%s</%sModifyFlag>%s' % (namespace_, self.gds_format_string(quote_xml(self.ModifyFlag).encode(ExternalEncoding), input_name='ModifyFlag'), namespace_, eol_))
        if self.BrandID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBrandID>%s</%sBrandID>%s' % (namespace_, self.gds_format_integer(self.BrandID, input_name='BrandID'), namespace_, eol_))
        if self.DrinkCategoryID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDrinkCategoryID>%s</%sDrinkCategoryID>%s' % (namespace_, self.gds_format_integer(self.DrinkCategoryID, input_name='DrinkCategoryID'), namespace_, eol_))
        if self.CommunicationChannel is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCommunicationChannel>%s</%sCommunicationChannel>%s' % (namespace_, self.gds_format_integer(self.CommunicationChannel, input_name='CommunicationChannel'), namespace_, eol_))
        if self.AnswerText is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAnswerText>%s</%sAnswerText>%s' % (namespace_, self.gds_format_string(quote_xml(self.AnswerText).encode(ExternalEncoding), input_name='AnswerText'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.OptionID is not None or
            self.ModifyFlag is not None or
            self.BrandID is not None or
            self.DrinkCategoryID is not None or
            self.CommunicationChannel is not None or
            self.AnswerText is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='AnswerType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.OptionID is not None:
            showIndent(outfile, level)
            outfile.write('OptionID=%d,\n' % self.OptionID)
        if self.ModifyFlag is not None:
            showIndent(outfile, level)
            outfile.write('ModifyFlag=%s,\n' % quote_python(self.ModifyFlag).encode(ExternalEncoding))
        if self.BrandID is not None:
            showIndent(outfile, level)
            outfile.write('BrandID=%d,\n' % self.BrandID)
        if self.DrinkCategoryID is not None:
            showIndent(outfile, level)
            outfile.write('DrinkCategoryID=%d,\n' % self.DrinkCategoryID)
        if self.CommunicationChannel is not None:
            showIndent(outfile, level)
            outfile.write('CommunicationChannel=%d,\n' % self.CommunicationChannel)
        if self.AnswerText is not None:
            showIndent(outfile, level)
            outfile.write('AnswerText=%s,\n' % quote_python(self.AnswerText).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'OptionID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'OptionID')
            self.OptionID = ival_
        elif nodeName_ == 'ModifyFlag':
            ModifyFlag_ = child_.text
            ModifyFlag_ = self.gds_validate_string(ModifyFlag_, node, 'ModifyFlag')
            self.ModifyFlag = ModifyFlag_
            self.validate_ModifyFlag(self.ModifyFlag)    # validate type ModifyFlag
        elif nodeName_ == 'BrandID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'BrandID')
            self.BrandID = ival_
            self.validate_BrandID(self.BrandID)    # validate type BrandID
        elif nodeName_ == 'DrinkCategoryID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'DrinkCategoryID')
            self.DrinkCategoryID = ival_
            self.validate_DrinkCategoryID(self.DrinkCategoryID)    # validate type DrinkCategoryID
        elif nodeName_ == 'CommunicationChannel':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'CommunicationChannel')
            self.CommunicationChannel = ival_
            self.validate_CommunicationChannel(self.CommunicationChannel)    # validate type CommunicationChannel
        elif nodeName_ == 'AnswerText':
            AnswerText_ = child_.text
            AnswerText_ = self.gds_validate_string(AnswerText_, node, 'AnswerText')
            self.AnswerText = AnswerText_
            self.validate_AnswerText(self.AnswerText)    # validate type AnswerText
# end class AnswerType


class EmailDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Id=None, EmailId=None, EmailCategory=None, IsDefaultFlag=None, ModifyFlag=None):
        self.Id = Id
        self.EmailId = EmailId
        self.EmailCategory = EmailCategory
        self.IsDefaultFlag = IsDefaultFlag
        self.ModifyFlag = ModifyFlag
    def factory(*args_, **kwargs_):
        if EmailDetailsType.subclass:
            return EmailDetailsType.subclass(*args_, **kwargs_)
        else:
            return EmailDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Id(self): return self.Id
    def set_Id(self, Id): self.Id = Id
    def get_EmailId(self): return self.EmailId
    def set_EmailId(self, EmailId): self.EmailId = EmailId
    def validate_EmailId(self, value):
        # Validate type EmailId, a restriction on xs:string.
        pass
    def get_EmailCategory(self): return self.EmailCategory
    def set_EmailCategory(self, EmailCategory): self.EmailCategory = EmailCategory
    def validate_EmailCategory(self, value):
        # Validate type EmailCategory, a restriction on xs:byte.
        pass
    def get_IsDefaultFlag(self): return self.IsDefaultFlag
    def set_IsDefaultFlag(self, IsDefaultFlag): self.IsDefaultFlag = IsDefaultFlag
    def validate_IsDefaultFlagType(self, value):
        # Validate type IsDefaultFlagType, a restriction on xs:byte.
        pass
    def get_ModifyFlag(self): return self.ModifyFlag
    def set_ModifyFlag(self, ModifyFlag): self.ModifyFlag = ModifyFlag
    def export(self, outfile, level, namespace_='', name_='EmailDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EmailDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='EmailDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='EmailDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Id is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sId>%s</%sId>%s' % (namespace_, self.gds_format_integer(self.Id, input_name='Id'), namespace_, eol_))
        if self.EmailId is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEmailId>%s</%sEmailId>%s' % (namespace_, self.gds_format_string(quote_xml(self.EmailId).encode(ExternalEncoding), input_name='EmailId'), namespace_, eol_))
        if self.EmailCategory is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEmailCategory>%s</%sEmailCategory>%s' % (namespace_, self.gds_format_integer(self.EmailCategory, input_name='EmailCategory'), namespace_, eol_))
        if self.IsDefaultFlag is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIsDefaultFlag>%s</%sIsDefaultFlag>%s' % (namespace_, self.gds_format_integer(self.IsDefaultFlag, input_name='IsDefaultFlag'), namespace_, eol_))
        if self.ModifyFlag is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sModifyFlag>%s</%sModifyFlag>%s' % (namespace_, self.gds_format_string(quote_xml(self.ModifyFlag).encode(ExternalEncoding), input_name='ModifyFlag'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.Id is not None or
            self.EmailId is not None or
            self.EmailCategory is not None or
            self.IsDefaultFlag is not None or
            self.ModifyFlag is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='EmailDetailsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.Id is not None:
            showIndent(outfile, level)
            outfile.write('Id=%d,\n' % self.Id)
        if self.EmailId is not None:
            showIndent(outfile, level)
            outfile.write('EmailId=%s,\n' % quote_python(self.EmailId).encode(ExternalEncoding))
        if self.EmailCategory is not None:
            showIndent(outfile, level)
            outfile.write('EmailCategory=%d,\n' % self.EmailCategory)
        if self.IsDefaultFlag is not None:
            showIndent(outfile, level)
            outfile.write('IsDefaultFlag=%d,\n' % self.IsDefaultFlag)
        if self.ModifyFlag is not None:
            showIndent(outfile, level)
            outfile.write('ModifyFlag=%s,\n' % quote_python(self.ModifyFlag).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Id':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'Id')
            self.Id = ival_
        elif nodeName_ == 'EmailId':
            EmailId_ = child_.text
            EmailId_ = self.gds_validate_string(EmailId_, node, 'EmailId')
            self.EmailId = EmailId_
            self.validate_EmailId(self.EmailId)    # validate type EmailId
        elif nodeName_ == 'EmailCategory':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'EmailCategory')
            self.EmailCategory = ival_
            self.validate_EmailCategory(self.EmailCategory)    # validate type EmailCategory
        elif nodeName_ == 'IsDefaultFlag':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'IsDefaultFlag')
            self.IsDefaultFlag = ival_
            self.validate_IsDefaultFlagType(self.IsDefaultFlag)    # validate type IsDefaultFlagType
        elif nodeName_ == 'ModifyFlag':
            ModifyFlag_ = child_.text
            ModifyFlag_ = self.gds_validate_string(ModifyFlag_, node, 'ModifyFlag')
            self.ModifyFlag = ModifyFlag_
# end class EmailDetailsType


class UserAccountType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, LoginCredentials=None, SecretQuestions=None):
        self.LoginCredentials = LoginCredentials
        self.SecretQuestions = SecretQuestions
    def factory(*args_, **kwargs_):
        if UserAccountType.subclass:
            return UserAccountType.subclass(*args_, **kwargs_)
        else:
            return UserAccountType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LoginCredentials(self): return self.LoginCredentials
    def set_LoginCredentials(self, LoginCredentials): self.LoginCredentials = LoginCredentials
    def get_SecretQuestions(self): return self.SecretQuestions
    def set_SecretQuestions(self, SecretQuestions): self.SecretQuestions = SecretQuestions
    def export(self, outfile, level, namespace_='', name_='UserAccountType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UserAccountType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='UserAccountType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='UserAccountType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LoginCredentials is not None:
            self.LoginCredentials.export(outfile, level, namespace_, name_='LoginCredentials', pretty_print=pretty_print)
        if self.SecretQuestions is not None:
            self.SecretQuestions.export(outfile, level, namespace_, name_='SecretQuestions', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.LoginCredentials is not None or
            self.SecretQuestions is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='UserAccountType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.LoginCredentials is not None:
            showIndent(outfile, level)
            outfile.write('LoginCredentials=model_.LoginCredentialsType(\n')
            self.LoginCredentials.exportLiteral(outfile, level, name_='LoginCredentials')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SecretQuestions is not None:
            showIndent(outfile, level)
            outfile.write('SecretQuestions=model_.QuestionAnswerType(\n')
            self.SecretQuestions.exportLiteral(outfile, level, name_='SecretQuestions')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LoginCredentials':
            obj_ = LoginCredentialsType.factory()
            obj_.build(child_)
            self.set_LoginCredentials(obj_)
        elif nodeName_ == 'SecretQuestions':
            obj_ = QuestionAnswerType.factory()
            obj_.build(child_)
            self.set_SecretQuestions(obj_)
# end class UserAccountType


class LoginCredentialsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, LoginName=None, Password=None):
        self.LoginName = LoginName
        self.Password = Password
    def factory(*args_, **kwargs_):
        if LoginCredentialsType.subclass:
            return LoginCredentialsType.subclass(*args_, **kwargs_)
        else:
            return LoginCredentialsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LoginName(self): return self.LoginName
    def set_LoginName(self, LoginName): self.LoginName = LoginName
    def validate_LoginName(self, value):
        # Validate type LoginName, a restriction on Name.
        pass
    def get_Password(self): return self.Password
    def set_Password(self, Password): self.Password = Password
    def validate_Password(self, value):
        # Validate type Password, a restriction on xs:string.
        pass
    def export(self, outfile, level, namespace_='', name_='LoginCredentialsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LoginCredentialsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='LoginCredentialsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='LoginCredentialsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LoginName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLoginName>%s</%sLoginName>%s' % (namespace_, self.gds_format_string(quote_xml(self.LoginName).encode(ExternalEncoding), input_name='LoginName'), namespace_, eol_))
        if self.Password is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPassword>%s</%sPassword>%s' % (namespace_, self.gds_format_string(quote_xml(self.Password).encode(ExternalEncoding), input_name='Password'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.LoginName is not None or
            self.Password is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='LoginCredentialsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.LoginName is not None:
            showIndent(outfile, level)
            outfile.write('LoginName=%s,\n' % quote_python(self.LoginName).encode(ExternalEncoding))
        if self.Password is not None:
            showIndent(outfile, level)
            outfile.write('Password=%s,\n' % quote_python(self.Password).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LoginName':
            LoginName_ = child_.text
            LoginName_ = self.gds_validate_string(LoginName_, node, 'LoginName')
            self.LoginName = LoginName_
            self.validate_LoginName(self.LoginName)    # validate type LoginName
        elif nodeName_ == 'Password':
            Password_ = child_.text
            Password_ = self.gds_validate_string(Password_, node, 'Password')
            self.Password = Password_
            self.validate_Password(self.Password)    # validate type Password
# end class LoginCredentialsType


class UserIdentificationDataType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ConsumerID=None, LoginName=None, EmailID=None, TempToken=None):
        self.ConsumerID = ConsumerID
        self.LoginName = LoginName
        self.EmailID = EmailID
        self.TempToken = TempToken
    def factory(*args_, **kwargs_):
        if UserIdentificationDataType.subclass:
            return UserIdentificationDataType.subclass(*args_, **kwargs_)
        else:
            return UserIdentificationDataType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ConsumerID(self): return self.ConsumerID
    def set_ConsumerID(self, ConsumerID): self.ConsumerID = ConsumerID
    def validate_ConsumerIDType(self, value):
        # Validate type ConsumerIDType, a restriction on xs:long.
        pass
    def get_LoginName(self): return self.LoginName
    def set_LoginName(self, LoginName): self.LoginName = LoginName
    def validate_Name(self, value):
        # Validate type Name, a restriction on xs:string.
        pass
    def get_EmailID(self): return self.EmailID
    def set_EmailID(self, EmailID): self.EmailID = EmailID
    def validate_EmailId(self, value):
        # Validate type EmailId, a restriction on xs:string.
        pass
    def get_TempToken(self): return self.TempToken
    def set_TempToken(self, TempToken): self.TempToken = TempToken
    def validate_Token(self, value):
        # Validate type Token, a restriction on xs:string.
        pass
    def export(self, outfile, level, namespace_='', name_='UserIdentificationDataType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UserIdentificationDataType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='UserIdentificationDataType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='UserIdentificationDataType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ConsumerID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sConsumerID>%s</%sConsumerID>%s' % (namespace_, self.gds_format_integer(self.ConsumerID, input_name='ConsumerID'), namespace_, eol_))
        if self.LoginName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLoginName>%s</%sLoginName>%s' % (namespace_, self.gds_format_string(quote_xml(self.LoginName).encode(ExternalEncoding), input_name='LoginName'), namespace_, eol_))
        if self.EmailID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEmailID>%s</%sEmailID>%s' % (namespace_, self.gds_format_string(quote_xml(self.EmailID).encode(ExternalEncoding), input_name='EmailID'), namespace_, eol_))
        if self.TempToken is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sTempToken>%s</%sTempToken>%s' % (namespace_, self.gds_format_string(quote_xml(self.TempToken).encode(ExternalEncoding), input_name='TempToken'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.ConsumerID is not None or
            self.LoginName is not None or
            self.EmailID is not None or
            self.TempToken is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='UserIdentificationDataType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.ConsumerID is not None:
            showIndent(outfile, level)
            outfile.write('ConsumerID=%d,\n' % self.ConsumerID)
        if self.LoginName is not None:
            showIndent(outfile, level)
            outfile.write('LoginName=%s,\n' % quote_python(self.LoginName).encode(ExternalEncoding))
        if self.EmailID is not None:
            showIndent(outfile, level)
            outfile.write('EmailID=%s,\n' % quote_python(self.EmailID).encode(ExternalEncoding))
        if self.TempToken is not None:
            showIndent(outfile, level)
            outfile.write('TempToken=%s,\n' % quote_python(self.TempToken).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ConsumerID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'ConsumerID')
            self.ConsumerID = ival_
            self.validate_ConsumerIDType(self.ConsumerID)    # validate type ConsumerIDType
        elif nodeName_ == 'LoginName':
            LoginName_ = child_.text
            LoginName_ = self.gds_validate_string(LoginName_, node, 'LoginName')
            self.LoginName = LoginName_
            self.validate_Name(self.LoginName)    # validate type Name
        elif nodeName_ == 'EmailID':
            EmailID_ = child_.text
            EmailID_ = self.gds_validate_string(EmailID_, node, 'EmailID')
            self.EmailID = EmailID_
            self.validate_EmailId(self.EmailID)    # validate type EmailId
        elif nodeName_ == 'TempToken':
            TempToken_ = child_.text
            TempToken_ = self.gds_validate_string(TempToken_, node, 'TempToken')
            self.TempToken = TempToken_
            self.validate_Token(self.TempToken)    # validate type Token
# end class UserIdentificationDataType


class ExtendedOptInPreferencesType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PromoCode=None, AcquisitionSource=None, QuestionCategory=None):
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        if QuestionCategory is None:
            self.QuestionCategory = []
        else:
            self.QuestionCategory = QuestionCategory
    def factory(*args_, **kwargs_):
        if ExtendedOptInPreferencesType.subclass:
            return ExtendedOptInPreferencesType.subclass(*args_, **kwargs_)
        else:
            return ExtendedOptInPreferencesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_QuestionCategory(self): return self.QuestionCategory
    def set_QuestionCategory(self, QuestionCategory): self.QuestionCategory = QuestionCategory
    def add_QuestionCategory(self, value): self.QuestionCategory.append(value)
    def insert_QuestionCategory(self, index, value): self.QuestionCategory[index] = value
    def export(self, outfile, level, namespace_='', name_='ExtendedOptInPreferencesType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ExtendedOptInPreferencesType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ExtendedOptInPreferencesType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ExtendedOptInPreferencesType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        for QuestionCategory_ in self.QuestionCategory:
            QuestionCategory_.export(outfile, level, namespace_, name_='QuestionCategory', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.QuestionCategory
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ExtendedOptInPreferencesType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('QuestionCategory=[\n')
        level += 1
        for QuestionCategory_ in self.QuestionCategory:
            showIndent(outfile, level)
            outfile.write('model_.CategoryType(\n')
            QuestionCategory_.exportLiteral(outfile, level, name_='CategoryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'QuestionCategory':
            obj_ = CategoryType.factory()
            obj_.build(child_)
            self.QuestionCategory.append(obj_)
# end class ExtendedOptInPreferencesType


class HubLifeStylesType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PromoCode=None, AcquisitionSource=None, QuestionCategory=None):
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        if QuestionCategory is None:
            self.QuestionCategory = []
        else:
            self.QuestionCategory = QuestionCategory
    def factory(*args_, **kwargs_):
        if HubLifeStylesType.subclass:
            return HubLifeStylesType.subclass(*args_, **kwargs_)
        else:
            return HubLifeStylesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_QuestionCategory(self): return self.QuestionCategory
    def set_QuestionCategory(self, QuestionCategory): self.QuestionCategory = QuestionCategory
    def add_QuestionCategory(self, value): self.QuestionCategory.append(value)
    def insert_QuestionCategory(self, index, value): self.QuestionCategory[index] = value
    def export(self, outfile, level, namespace_='', name_='HubLifeStylesType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='HubLifeStylesType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='HubLifeStylesType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='HubLifeStylesType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        for QuestionCategory_ in self.QuestionCategory:
            QuestionCategory_.export(outfile, level, namespace_, name_='QuestionCategory', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.QuestionCategory
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='HubLifeStylesType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('QuestionCategory=[\n')
        level += 1
        for QuestionCategory_ in self.QuestionCategory:
            showIndent(outfile, level)
            outfile.write('model_.CategoryType(\n')
            QuestionCategory_.exportLiteral(outfile, level, name_='CategoryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'QuestionCategory':
            obj_ = CategoryType.factory()
            obj_.build(child_)
            self.QuestionCategory.append(obj_)
# end class HubLifeStylesType


class CategoryType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, CategoryID=None, QuestionAnswers=None):
        self.CategoryID = CategoryID
        if QuestionAnswers is None:
            self.QuestionAnswers = []
        else:
            self.QuestionAnswers = QuestionAnswers
    def factory(*args_, **kwargs_):
        if CategoryType.subclass:
            return CategoryType.subclass(*args_, **kwargs_)
        else:
            return CategoryType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CategoryID(self): return self.CategoryID
    def set_CategoryID(self, CategoryID): self.CategoryID = CategoryID
    def validate_QuestionCategory(self, value):
        # Validate type QuestionCategory, a restriction on xs:long.
        pass
    def get_QuestionAnswers(self): return self.QuestionAnswers
    def set_QuestionAnswers(self, QuestionAnswers): self.QuestionAnswers = QuestionAnswers
    def add_QuestionAnswers(self, value): self.QuestionAnswers.append(value)
    def insert_QuestionAnswers(self, index, value): self.QuestionAnswers[index] = value
    def export(self, outfile, level, namespace_='', name_='CategoryType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CategoryType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='CategoryType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='CategoryType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CategoryID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCategoryID>%s</%sCategoryID>%s' % (namespace_, self.gds_format_integer(self.CategoryID, input_name='CategoryID'), namespace_, eol_))
        for QuestionAnswers_ in self.QuestionAnswers:
            QuestionAnswers_.export(outfile, level, namespace_, name_='QuestionAnswers', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.CategoryID is not None or
            self.QuestionAnswers
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='CategoryType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.CategoryID is not None:
            showIndent(outfile, level)
            outfile.write('CategoryID=%d,\n' % self.CategoryID)
        showIndent(outfile, level)
        outfile.write('QuestionAnswers=[\n')
        level += 1
        for QuestionAnswers_ in self.QuestionAnswers:
            showIndent(outfile, level)
            outfile.write('model_.QuestionAnswerType(\n')
            QuestionAnswers_.exportLiteral(outfile, level, name_='QuestionAnswerType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CategoryID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'CategoryID')
            self.CategoryID = ival_
            self.validate_QuestionCategory(self.CategoryID)    # validate type QuestionCategory
        elif nodeName_ == 'QuestionAnswers':
            obj_ = QuestionAnswerType.factory()
            obj_.build(child_)
            self.QuestionAnswers.append(obj_)
# end class CategoryType


class Emails(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Email=None, ConsumerID=None, PromoCode=None, AcquisitionSource=None):
        if Email is None:
            self.Email = []
        else:
            self.Email = Email
        self.ConsumerID = ConsumerID
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
    def factory(*args_, **kwargs_):
        if Emails.subclass:
            return Emails.subclass(*args_, **kwargs_)
        else:
            return Emails(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Email(self): return self.Email
    def set_Email(self, Email): self.Email = Email
    def add_Email(self, value): self.Email.append(value)
    def insert_Email(self, index, value): self.Email[index] = value
    def get_ConsumerID(self): return self.ConsumerID
    def set_ConsumerID(self, ConsumerID): self.ConsumerID = ConsumerID
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def export(self, outfile, level, namespace_='', name_='Emails', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Emails')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='Emails'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='Emails', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Email_ in self.Email:
            Email_.export(outfile, level, namespace_, name_='Email', pretty_print=pretty_print)
        if self.ConsumerID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sConsumerID>%s</%sConsumerID>%s' % (namespace_, self.gds_format_integer(self.ConsumerID, input_name='ConsumerID'), namespace_, eol_))
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.Email or
            self.ConsumerID is not None or
            self.PromoCode is not None or
            self.AcquisitionSource is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='Emails'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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('Email=[\n')
        level += 1
        for Email_ in self.Email:
            showIndent(outfile, level)
            outfile.write('model_.EmailType(\n')
            Email_.exportLiteral(outfile, level, name_='EmailType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.ConsumerID is not None:
            showIndent(outfile, level)
            outfile.write('ConsumerID=%d,\n' % self.ConsumerID)
        if self.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Email':
            obj_ = EmailType.factory()
            obj_.build(child_)
            self.Email.append(obj_)
        elif nodeName_ == 'ConsumerID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'ConsumerID')
            self.ConsumerID = ival_
        elif nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
# end class Emails


class AttachmentType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, FileName=None, FileContent=None):
        self.FileName = FileName
        self.FileContent = FileContent
    def factory(*args_, **kwargs_):
        if AttachmentType.subclass:
            return AttachmentType.subclass(*args_, **kwargs_)
        else:
            return AttachmentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_FileName(self): return self.FileName
    def set_FileName(self, FileName): self.FileName = FileName
    def validate_FileNameType(self, value):
        # Validate type FileNameType, a restriction on xs:string.
        pass
    def get_FileContent(self): return self.FileContent
    def set_FileContent(self, FileContent): self.FileContent = FileContent
    def validate_FileContentType(self, value):
        # Validate type FileContentType, a restriction on xs:base64Binary.
        pass
    def export(self, outfile, level, namespace_='', name_='AttachmentType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AttachmentType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='AttachmentType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='AttachmentType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.FileName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFileName>%s</%sFileName>%s' % (namespace_, self.gds_format_string(quote_xml(self.FileName).encode(ExternalEncoding), input_name='FileName'), namespace_, eol_))
        if self.FileContent is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFileContent>%s</%sFileContent>%s' % (namespace_, self.gds_format_string(quote_xml(self.FileContent).encode(ExternalEncoding), input_name='FileContent'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.FileName is not None or
            self.FileContent is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='AttachmentType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.FileName is not None:
            showIndent(outfile, level)
            outfile.write('FileName=%s,\n' % quote_python(self.FileName).encode(ExternalEncoding))
        if self.FileContent is not None:
            showIndent(outfile, level)
            outfile.write('FileContent=%s,\n' % quote_python(self.FileContent).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'FileName':
            FileName_ = child_.text
            FileName_ = self.gds_validate_string(FileName_, node, 'FileName')
            self.FileName = FileName_
            self.validate_FileNameType(self.FileName)    # validate type FileNameType
        elif nodeName_ == 'FileContent':
            FileContent_ = child_.text
            FileContent_ = self.gds_validate_string(FileContent_, node, 'FileContent')
            self.FileContent = FileContent_
            self.validate_FileContentType(self.FileContent)    # validate type FileContentType
# end class AttachmentType


class EmailType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ToAddress=None, FromAddress=None, Subject=None, EmailBody=None, Attachment=None, UnsolicitedEmailFlag=None):
        if ToAddress is None:
            self.ToAddress = []
        else:
            self.ToAddress = ToAddress
        self.FromAddress = FromAddress
        self.Subject = Subject
        self.EmailBody = EmailBody
        if Attachment is None:
            self.Attachment = []
        else:
            self.Attachment = Attachment
        self.UnsolicitedEmailFlag = UnsolicitedEmailFlag
    def factory(*args_, **kwargs_):
        if EmailType.subclass:
            return EmailType.subclass(*args_, **kwargs_)
        else:
            return EmailType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ToAddress(self): return self.ToAddress
    def set_ToAddress(self, ToAddress): self.ToAddress = ToAddress
    def add_ToAddress(self, value): self.ToAddress.append(value)
    def insert_ToAddress(self, index, value): self.ToAddress[index] = value
    def validate_EmailId(self, value):
        # Validate type EmailId, a restriction on xs:string.
        pass
    def get_FromAddress(self): return self.FromAddress
    def set_FromAddress(self, FromAddress): self.FromAddress = FromAddress
    def get_Subject(self): return self.Subject
    def set_Subject(self, Subject): self.Subject = Subject
    def validate_Subject(self, value):
        # Validate type Subject, a restriction on xs:string.
        pass
    def get_EmailBody(self): return self.EmailBody
    def set_EmailBody(self, EmailBody): self.EmailBody = EmailBody
    def validate_EmailBody(self, value):
        # Validate type EmailBody, a restriction on xs:string.
        pass
    def get_Attachment(self): return self.Attachment
    def set_Attachment(self, Attachment): self.Attachment = Attachment
    def add_Attachment(self, value): self.Attachment.append(value)
    def insert_Attachment(self, index, value): self.Attachment[index] = value
    def get_UnsolicitedEmailFlag(self): return self.UnsolicitedEmailFlag
    def set_UnsolicitedEmailFlag(self, UnsolicitedEmailFlag): self.UnsolicitedEmailFlag = UnsolicitedEmailFlag
    def validate_UnsolicitedEmailFlagType(self, value):
        # Validate type UnsolicitedEmailFlagType, a restriction on xs:byte.
        pass
    def export(self, outfile, level, namespace_='', name_='EmailType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EmailType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='EmailType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='EmailType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for ToAddress_ in self.ToAddress:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sToAddress>%s</%sToAddress>%s' % (namespace_, self.gds_format_string(quote_xml(ToAddress_).encode(ExternalEncoding), input_name='ToAddress'), namespace_, eol_))
        if self.FromAddress is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFromAddress>%s</%sFromAddress>%s' % (namespace_, self.gds_format_string(quote_xml(self.FromAddress).encode(ExternalEncoding), input_name='FromAddress'), namespace_, eol_))
        if self.Subject is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSubject>%s</%sSubject>%s' % (namespace_, self.gds_format_string(quote_xml(self.Subject).encode(ExternalEncoding), input_name='Subject'), namespace_, eol_))
        if self.EmailBody is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEmailBody>%s</%sEmailBody>%s' % (namespace_, self.gds_format_string(quote_xml(self.EmailBody).encode(ExternalEncoding), input_name='EmailBody'), namespace_, eol_))
        for Attachment_ in self.Attachment:
            Attachment_.export(outfile, level, namespace_, name_='Attachment', pretty_print=pretty_print)
        if self.UnsolicitedEmailFlag is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sUnsolicitedEmailFlag>%s</%sUnsolicitedEmailFlag>%s' % (namespace_, self.gds_format_integer(self.UnsolicitedEmailFlag, input_name='UnsolicitedEmailFlag'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.ToAddress or
            self.FromAddress is not None or
            self.Subject is not None or
            self.EmailBody is not None or
            self.Attachment or
            self.UnsolicitedEmailFlag is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='EmailType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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('ToAddress=[\n')
        level += 1
        for ToAddress_ in self.ToAddress:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(ToAddress_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.FromAddress is not None:
            showIndent(outfile, level)
            outfile.write('FromAddress=%s,\n' % quote_python(self.FromAddress).encode(ExternalEncoding))
        if self.Subject is not None:
            showIndent(outfile, level)
            outfile.write('Subject=%s,\n' % quote_python(self.Subject).encode(ExternalEncoding))
        if self.EmailBody is not None:
            showIndent(outfile, level)
            outfile.write('EmailBody=%s,\n' % quote_python(self.EmailBody).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('Attachment=[\n')
        level += 1
        for Attachment_ in self.Attachment:
            showIndent(outfile, level)
            outfile.write('model_.AttachmentType(\n')
            Attachment_.exportLiteral(outfile, level, name_='AttachmentType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.UnsolicitedEmailFlag is not None:
            showIndent(outfile, level)
            outfile.write('UnsolicitedEmailFlag=%d,\n' % self.UnsolicitedEmailFlag)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ToAddress':
            ToAddress_ = child_.text
            ToAddress_ = self.gds_validate_string(ToAddress_, node, 'ToAddress')
            self.ToAddress.append(ToAddress_)
            self.validate_EmailId(self.ToAddress)    # validate type EmailId
        elif nodeName_ == 'FromAddress':
            FromAddress_ = child_.text
            FromAddress_ = self.gds_validate_string(FromAddress_, node, 'FromAddress')
            self.FromAddress = FromAddress_
            self.validate_EmailId(self.FromAddress)    # validate type EmailId
        elif nodeName_ == 'Subject':
            Subject_ = child_.text
            Subject_ = self.gds_validate_string(Subject_, node, 'Subject')
            self.Subject = Subject_
            self.validate_Subject(self.Subject)    # validate type Subject
        elif nodeName_ == 'EmailBody':
            EmailBody_ = child_.text
            EmailBody_ = self.gds_validate_string(EmailBody_, node, 'EmailBody')
            self.EmailBody = EmailBody_
            self.validate_EmailBody(self.EmailBody)    # validate type EmailBody
        elif nodeName_ == 'Attachment':
            obj_ = AttachmentType.factory()
            obj_.build(child_)
            self.Attachment.append(obj_)
        elif nodeName_ == 'UnsolicitedEmailFlag':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'UnsolicitedEmailFlag')
            self.UnsolicitedEmailFlag = ival_
            self.validate_UnsolicitedEmailFlagType(self.UnsolicitedEmailFlag)    # validate type UnsolicitedEmailFlagType
# end class EmailType


class SendToFriendType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, EmailDetails=None, ReferralDetails=None):
        self.EmailDetails = EmailDetails
        self.ReferralDetails = ReferralDetails
    def factory(*args_, **kwargs_):
        if SendToFriendType.subclass:
            return SendToFriendType.subclass(*args_, **kwargs_)
        else:
            return SendToFriendType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EmailDetails(self): return self.EmailDetails
    def set_EmailDetails(self, EmailDetails): self.EmailDetails = EmailDetails
    def get_ReferralDetails(self): return self.ReferralDetails
    def set_ReferralDetails(self, ReferralDetails): self.ReferralDetails = ReferralDetails
    def export(self, outfile, level, namespace_='', name_='SendToFriendType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SendToFriendType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='SendToFriendType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SendToFriendType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EmailDetails is not None:
            self.EmailDetails.export(outfile, level, namespace_, name_='EmailDetails', pretty_print=pretty_print)
        if self.ReferralDetails is not None:
            self.ReferralDetails.export(outfile, level, namespace_, name_='ReferralDetails', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.EmailDetails is not None or
            self.ReferralDetails is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SendToFriendType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.EmailDetails is not None:
            showIndent(outfile, level)
            outfile.write('EmailDetails=model_.EmailType(\n')
            self.EmailDetails.exportLiteral(outfile, level, name_='EmailDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ReferralDetails is not None:
            showIndent(outfile, level)
            outfile.write('ReferralDetails=model_.ReferralType(\n')
            self.ReferralDetails.exportLiteral(outfile, level, name_='ReferralDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EmailDetails':
            obj_ = EmailType.factory()
            obj_.build(child_)
            self.set_EmailDetails(obj_)
        elif nodeName_ == 'ReferralDetails':
            obj_ = ReferralType.factory()
            obj_.build(child_)
            self.set_ReferralDetails(obj_)
# end class SendToFriendType


class ReferralType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SenderFriendName=None, ReferralURL=None, ConsumerID=None, PromoCode=None, AcquisitionSource=None, CommunicationChannel=None):
        self.SenderFriendName = SenderFriendName
        self.ReferralURL = ReferralURL
        self.ConsumerID = ConsumerID
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        self.CommunicationChannel = CommunicationChannel
    def factory(*args_, **kwargs_):
        if ReferralType.subclass:
            return ReferralType.subclass(*args_, **kwargs_)
        else:
            return ReferralType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SenderFriendName(self): return self.SenderFriendName
    def set_SenderFriendName(self, SenderFriendName): self.SenderFriendName = SenderFriendName
    def validate_FullName(self, value):
        # Validate type FullName, a restriction on Name.
        pass
    def get_ReferralURL(self): return self.ReferralURL
    def set_ReferralURL(self, ReferralURL): self.ReferralURL = ReferralURL
    def validate_URL(self, value):
        # Validate type URL, a restriction on xs:string.
        pass
    def get_ConsumerID(self): return self.ConsumerID
    def set_ConsumerID(self, ConsumerID): self.ConsumerID = ConsumerID
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_CommunicationChannel(self): return self.CommunicationChannel
    def set_CommunicationChannel(self, CommunicationChannel): self.CommunicationChannel = CommunicationChannel
    def validate_CommunicationChannel(self, value):
        # Validate type CommunicationChannel, a restriction on xs:byte.
        pass
    def export(self, outfile, level, namespace_='', name_='ReferralType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ReferralType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ReferralType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ReferralType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SenderFriendName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSenderFriendName>%s</%sSenderFriendName>%s' % (namespace_, self.gds_format_string(quote_xml(self.SenderFriendName).encode(ExternalEncoding), input_name='SenderFriendName'), namespace_, eol_))
        if self.ReferralURL is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sReferralURL>%s</%sReferralURL>%s' % (namespace_, self.gds_format_string(quote_xml(self.ReferralURL).encode(ExternalEncoding), input_name='ReferralURL'), namespace_, eol_))
        if self.ConsumerID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sConsumerID>%s</%sConsumerID>%s' % (namespace_, self.gds_format_integer(self.ConsumerID, input_name='ConsumerID'), namespace_, eol_))
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        if self.CommunicationChannel is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCommunicationChannel>%s</%sCommunicationChannel>%s' % (namespace_, self.gds_format_integer(self.CommunicationChannel, input_name='CommunicationChannel'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.SenderFriendName is not None or
            self.ReferralURL is not None or
            self.ConsumerID is not None or
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.CommunicationChannel is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ReferralType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.SenderFriendName is not None:
            showIndent(outfile, level)
            outfile.write('SenderFriendName=%s,\n' % quote_python(self.SenderFriendName).encode(ExternalEncoding))
        if self.ReferralURL is not None:
            showIndent(outfile, level)
            outfile.write('ReferralURL=%s,\n' % quote_python(self.ReferralURL).encode(ExternalEncoding))
        if self.ConsumerID is not None:
            showIndent(outfile, level)
            outfile.write('ConsumerID=%d,\n' % self.ConsumerID)
        if self.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        if self.CommunicationChannel is not None:
            showIndent(outfile, level)
            outfile.write('CommunicationChannel=%d,\n' % self.CommunicationChannel)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SenderFriendName':
            SenderFriendName_ = child_.text
            SenderFriendName_ = self.gds_validate_string(SenderFriendName_, node, 'SenderFriendName')
            self.SenderFriendName = SenderFriendName_
            self.validate_FullName(self.SenderFriendName)    # validate type FullName
        elif nodeName_ == 'ReferralURL':
            ReferralURL_ = child_.text
            ReferralURL_ = self.gds_validate_string(ReferralURL_, node, 'ReferralURL')
            self.ReferralURL = ReferralURL_
            self.validate_URL(self.ReferralURL)    # validate type URL
        elif nodeName_ == 'ConsumerID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'ConsumerID')
            self.ConsumerID = ival_
        elif nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'CommunicationChannel':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'CommunicationChannel')
            self.CommunicationChannel = ival_
            self.validate_CommunicationChannel(self.CommunicationChannel)    # validate type CommunicationChannel
# end class ReferralType


class ContactUsDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ContactUsDetail=None):
        if ContactUsDetail is None:
            self.ContactUsDetail = []
        else:
            self.ContactUsDetail = ContactUsDetail
    def factory(*args_, **kwargs_):
        if ContactUsDetailsType.subclass:
            return ContactUsDetailsType.subclass(*args_, **kwargs_)
        else:
            return ContactUsDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ContactUsDetail(self): return self.ContactUsDetail
    def set_ContactUsDetail(self, ContactUsDetail): self.ContactUsDetail = ContactUsDetail
    def add_ContactUsDetail(self, value): self.ContactUsDetail.append(value)
    def insert_ContactUsDetail(self, index, value): self.ContactUsDetail[index] = value
    def export(self, outfile, level, namespace_='', name_='ContactUsDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ContactUsDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ContactUsDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ContactUsDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for ContactUsDetail_ in self.ContactUsDetail:
            ContactUsDetail_.export(outfile, level, namespace_, name_='ContactUsDetail', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.ContactUsDetail
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ContactUsDetailsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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('ContactUsDetail=[\n')
        level += 1
        for ContactUsDetail_ in self.ContactUsDetail:
            showIndent(outfile, level)
            outfile.write('model_.ContactUsDetailType(\n')
            ContactUsDetail_.exportLiteral(outfile, level, name_='ContactUsDetailType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ContactUsDetail':
            obj_ = ContactUsDetailType.factory()
            obj_.build(child_)
            self.ContactUsDetail.append(obj_)
# end class ContactUsDetailsType


class ContactUsDetailType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ContactUsID=None, Status=None, ConsumerID=None, PromoCode=None, AcquisitionSource=None, Email=None, Remarks=None):
        self.ContactUsID = ContactUsID
        self.Status = Status
        self.ConsumerID = ConsumerID
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        self.Email = Email
        self.Remarks = Remarks
    def factory(*args_, **kwargs_):
        if ContactUsDetailType.subclass:
            return ContactUsDetailType.subclass(*args_, **kwargs_)
        else:
            return ContactUsDetailType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ContactUsID(self): return self.ContactUsID
    def set_ContactUsID(self, ContactUsID): self.ContactUsID = ContactUsID
    def validate_ConsumerIDType(self, value):
        # Validate type ConsumerIDType, a restriction on xs:long.
        pass
    def get_Status(self): return self.Status
    def set_Status(self, Status): self.Status = Status
    def validate_Status(self, value):
        # Validate type Status, a restriction on xs:byte.
        pass
    def get_ConsumerID(self): return self.ConsumerID
    def set_ConsumerID(self, ConsumerID): self.ConsumerID = ConsumerID
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_Email(self): return self.Email
    def set_Email(self, Email): self.Email = Email
    def get_Remarks(self): return self.Remarks
    def set_Remarks(self, Remarks): self.Remarks = Remarks
    def validate_RemarkType(self, value):
        # Validate type RemarkType, a restriction on xs:string.
        pass
    def export(self, outfile, level, namespace_='', name_='ContactUsDetailType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ContactUsDetailType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ContactUsDetailType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ContactUsDetailType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ContactUsID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sContactUsID>%s</%sContactUsID>%s' % (namespace_, self.gds_format_integer(self.ContactUsID, input_name='ContactUsID'), namespace_, eol_))
        if self.Status is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sStatus>%s</%sStatus>%s' % (namespace_, self.gds_format_integer(self.Status, input_name='Status'), namespace_, eol_))
        if self.ConsumerID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sConsumerID>%s</%sConsumerID>%s' % (namespace_, self.gds_format_integer(self.ConsumerID, input_name='ConsumerID'), namespace_, eol_))
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        if self.Email is not None:
            self.Email.export(outfile, level, namespace_, name_='Email', pretty_print=pretty_print)
        if self.Remarks is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRemarks>%s</%sRemarks>%s' % (namespace_, self.gds_format_string(quote_xml(self.Remarks).encode(ExternalEncoding), input_name='Remarks'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.ContactUsID is not None or
            self.Status is not None or
            self.ConsumerID is not None or
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.Email is not None or
            self.Remarks is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ContactUsDetailType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.ContactUsID is not None:
            showIndent(outfile, level)
            outfile.write('ContactUsID=%d,\n' % self.ContactUsID)
        if self.Status is not None:
            showIndent(outfile, level)
            outfile.write('Status=%d,\n' % self.Status)
        if self.ConsumerID is not None:
            showIndent(outfile, level)
            outfile.write('ConsumerID=%d,\n' % self.ConsumerID)
        if self.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        if self.Email is not None:
            showIndent(outfile, level)
            outfile.write('Email=model_.EmailType(\n')
            self.Email.exportLiteral(outfile, level, name_='Email')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Remarks is not None:
            showIndent(outfile, level)
            outfile.write('Remarks=%s,\n' % quote_python(self.Remarks).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ContactUsID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'ContactUsID')
            self.ContactUsID = ival_
            self.validate_ConsumerIDType(self.ContactUsID)    # validate type ConsumerIDType
        elif nodeName_ == 'Status':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'Status')
            self.Status = ival_
            self.validate_Status(self.Status)    # validate type Status
        elif nodeName_ == 'ConsumerID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'ConsumerID')
            self.ConsumerID = ival_
            self.validate_ConsumerIDType(self.ConsumerID)    # validate type ConsumerIDType
        elif nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'Email':
            obj_ = EmailType.factory()
            obj_.build(child_)
            self.set_Email(obj_)
        elif nodeName_ == 'Remarks':
            Remarks_ = child_.text
            Remarks_ = self.gds_validate_string(Remarks_, node, 'Remarks')
            self.Remarks = Remarks_
            self.validate_RemarkType(self.Remarks)    # validate type RemarkType
# end class ContactUsDetailType


class PreferencesType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PromoCode=None, AcquisitionSource=None, QuestionCategory=None):
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        if QuestionCategory is None:
            self.QuestionCategory = []
        else:
            self.QuestionCategory = QuestionCategory
    def factory(*args_, **kwargs_):
        if PreferencesType.subclass:
            return PreferencesType.subclass(*args_, **kwargs_)
        else:
            return PreferencesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_QuestionCategory(self): return self.QuestionCategory
    def set_QuestionCategory(self, QuestionCategory): self.QuestionCategory = QuestionCategory
    def add_QuestionCategory(self, value): self.QuestionCategory.append(value)
    def insert_QuestionCategory(self, index, value): self.QuestionCategory[index] = value
    def export(self, outfile, level, namespace_='', name_='PreferencesType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PreferencesType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='PreferencesType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='PreferencesType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        for QuestionCategory_ in self.QuestionCategory:
            QuestionCategory_.export(outfile, level, namespace_, name_='QuestionCategory', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.QuestionCategory
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='PreferencesType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('QuestionCategory=[\n')
        level += 1
        for QuestionCategory_ in self.QuestionCategory:
            showIndent(outfile, level)
            outfile.write('model_.CategoryType(\n')
            QuestionCategory_.exportLiteral(outfile, level, name_='CategoryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'QuestionCategory':
            obj_ = CategoryType.factory()
            obj_.build(child_)
            self.QuestionCategory.append(obj_)
# end class PreferencesType


class AddressDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AddressID=None, Address1=None, Address2=None, Address3=None, Address4=None, City=None, State=None, Country=None, ZipCode=None, AddressType=None, StateOther=None, ModifyFlag=None):
        self.AddressID = AddressID
        self.Address1 = Address1
        self.Address2 = Address2
        self.Address3 = Address3
        self.Address4 = Address4
        self.City = City
        self.State = State
        self.Country = Country
        self.ZipCode = ZipCode
        self.AddressType = AddressType
        self.StateOther = StateOther
        self.ModifyFlag = ModifyFlag
    def factory(*args_, **kwargs_):
        if AddressDetailsType.subclass:
            return AddressDetailsType.subclass(*args_, **kwargs_)
        else:
            return AddressDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AddressID(self): return self.AddressID
    def set_AddressID(self, AddressID): self.AddressID = AddressID
    def get_Address1(self): return self.Address1
    def set_Address1(self, Address1): self.Address1 = Address1
    def validate_Address1(self, value):
        # Validate type Address1, a restriction on Address.
        pass
    def get_Address2(self): return self.Address2
    def set_Address2(self, Address2): self.Address2 = Address2
    def validate_Address2(self, value):
        # Validate type Address2, a restriction on Address.
        pass
    def get_Address3(self): return self.Address3
    def set_Address3(self, Address3): self.Address3 = Address3
    def validate_Address3(self, value):
        # Validate type Address3, a restriction on Address.
        pass
    def get_Address4(self): return self.Address4
    def set_Address4(self, Address4): self.Address4 = Address4
    def validate_Address4(self, value):
        # Validate type Address4, a restriction on Address.
        pass
    def get_City(self): return self.City
    def set_City(self, City): self.City = City
    def validate_CityName(self, value):
        # Validate type CityName, a restriction on Name.
        pass
    def get_State(self): return self.State
    def set_State(self, State): self.State = State
    def validate_StateName(self, value):
        # Validate type StateName, a restriction on Name.
        pass
    def get_Country(self): return self.Country
    def set_Country(self, Country): self.Country = Country
    def validate_CountryName(self, value):
        # Validate type CountryName, a restriction on Name.
        pass
    def get_ZipCode(self): return self.ZipCode
    def set_ZipCode(self, ZipCode): self.ZipCode = ZipCode
    def validate_ZipCode(self, value):
        # Validate type ZipCode, a restriction on Name.
        pass
    def get_AddressType(self): return self.AddressType
    def set_AddressType(self, AddressType): self.AddressType = AddressType
    def validate_AddressType(self, value):
        # Validate type AddressType, a restriction on xs:byte.
        pass
    def get_StateOther(self): return self.StateOther
    def set_StateOther(self, StateOther): self.StateOther = StateOther
    def get_ModifyFlag(self): return self.ModifyFlag
    def set_ModifyFlag(self, ModifyFlag): self.ModifyFlag = ModifyFlag
    def export(self, outfile, level, namespace_='', name_='AddressDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AddressDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='AddressDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='AddressDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AddressID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAddressID>%s</%sAddressID>%s' % (namespace_, self.gds_format_integer(self.AddressID, input_name='AddressID'), namespace_, eol_))
        if self.Address1 is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAddress1>%s</%sAddress1>%s' % (namespace_, self.gds_format_string(quote_xml(self.Address1).encode(ExternalEncoding), input_name='Address1'), namespace_, eol_))
        if self.Address2 is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAddress2>%s</%sAddress2>%s' % (namespace_, self.gds_format_string(quote_xml(self.Address2).encode(ExternalEncoding), input_name='Address2'), namespace_, eol_))
        if self.Address3 is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAddress3>%s</%sAddress3>%s' % (namespace_, self.gds_format_string(quote_xml(self.Address3).encode(ExternalEncoding), input_name='Address3'), namespace_, eol_))
        if self.Address4 is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAddress4>%s</%sAddress4>%s' % (namespace_, self.gds_format_string(quote_xml(self.Address4).encode(ExternalEncoding), input_name='Address4'), namespace_, eol_))
        if self.City is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCity>%s</%sCity>%s' % (namespace_, self.gds_format_string(quote_xml(self.City).encode(ExternalEncoding), input_name='City'), namespace_, eol_))
        if self.State is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sState>%s</%sState>%s' % (namespace_, self.gds_format_string(quote_xml(self.State).encode(ExternalEncoding), input_name='State'), namespace_, eol_))
        if self.Country is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountry>%s</%sCountry>%s' % (namespace_, self.gds_format_string(quote_xml(self.Country).encode(ExternalEncoding), input_name='Country'), namespace_, eol_))
        if self.ZipCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sZipCode>%s</%sZipCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.ZipCode).encode(ExternalEncoding), input_name='ZipCode'), namespace_, eol_))
        if self.AddressType is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAddressType>%s</%sAddressType>%s' % (namespace_, self.gds_format_integer(self.AddressType, input_name='AddressType'), namespace_, eol_))
        if self.StateOther is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sStateOther>%s</%sStateOther>%s' % (namespace_, self.gds_format_string(quote_xml(self.StateOther).encode(ExternalEncoding), input_name='StateOther'), namespace_, eol_))
        if self.ModifyFlag is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sModifyFlag>%s</%sModifyFlag>%s' % (namespace_, self.gds_format_string(quote_xml(self.ModifyFlag).encode(ExternalEncoding), input_name='ModifyFlag'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.AddressID is not None or
            self.Address1 is not None or
            self.Address2 is not None or
            self.Address3 is not None or
            self.Address4 is not None or
            self.City is not None or
            self.State is not None or
            self.Country is not None or
            self.ZipCode is not None or
            self.AddressType is not None or
            self.StateOther is not None or
            self.ModifyFlag is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='AddressDetailsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.AddressID is not None:
            showIndent(outfile, level)
            outfile.write('AddressID=%d,\n' % self.AddressID)
        if self.Address1 is not None:
            showIndent(outfile, level)
            outfile.write('Address1=%s,\n' % quote_python(self.Address1).encode(ExternalEncoding))
        if self.Address2 is not None:
            showIndent(outfile, level)
            outfile.write('Address2=%s,\n' % quote_python(self.Address2).encode(ExternalEncoding))
        if self.Address3 is not None:
            showIndent(outfile, level)
            outfile.write('Address3=%s,\n' % quote_python(self.Address3).encode(ExternalEncoding))
        if self.Address4 is not None:
            showIndent(outfile, level)
            outfile.write('Address4=%s,\n' % quote_python(self.Address4).encode(ExternalEncoding))
        if self.City is not None:
            showIndent(outfile, level)
            outfile.write('City=%s,\n' % quote_python(self.City).encode(ExternalEncoding))
        if self.State is not None:
            showIndent(outfile, level)
            outfile.write('State=%s,\n' % quote_python(self.State).encode(ExternalEncoding))
        if self.Country is not None:
            showIndent(outfile, level)
            outfile.write('Country=%s,\n' % quote_python(self.Country).encode(ExternalEncoding))
        if self.ZipCode is not None:
            showIndent(outfile, level)
            outfile.write('ZipCode=%s,\n' % quote_python(self.ZipCode).encode(ExternalEncoding))
        if self.AddressType is not None:
            showIndent(outfile, level)
            outfile.write('AddressType=%d,\n' % self.AddressType)
        if self.StateOther is not None:
            showIndent(outfile, level)
            outfile.write('StateOther=%s,\n' % quote_python(self.StateOther).encode(ExternalEncoding))
        if self.ModifyFlag is not None:
            showIndent(outfile, level)
            outfile.write('ModifyFlag=%s,\n' % quote_python(self.ModifyFlag).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AddressID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'AddressID')
            self.AddressID = ival_
        elif nodeName_ == 'Address1':
            Address1_ = child_.text
            Address1_ = self.gds_validate_string(Address1_, node, 'Address1')
            self.Address1 = Address1_
            self.validate_Address1(self.Address1)    # validate type Address1
        elif nodeName_ == 'Address2':
            Address2_ = child_.text
            Address2_ = self.gds_validate_string(Address2_, node, 'Address2')
            self.Address2 = Address2_
            self.validate_Address2(self.Address2)    # validate type Address2
        elif nodeName_ == 'Address3':
            Address3_ = child_.text
            Address3_ = self.gds_validate_string(Address3_, node, 'Address3')
            self.Address3 = Address3_
            self.validate_Address3(self.Address3)    # validate type Address3
        elif nodeName_ == 'Address4':
            Address4_ = child_.text
            Address4_ = self.gds_validate_string(Address4_, node, 'Address4')
            self.Address4 = Address4_
            self.validate_Address4(self.Address4)    # validate type Address4
        elif nodeName_ == 'City':
            City_ = child_.text
            City_ = self.gds_validate_string(City_, node, 'City')
            self.City = City_
            self.validate_CityName(self.City)    # validate type CityName
        elif nodeName_ == 'State':
            State_ = child_.text
            State_ = self.gds_validate_string(State_, node, 'State')
            self.State = State_
            self.validate_StateName(self.State)    # validate type StateName
        elif nodeName_ == 'Country':
            Country_ = child_.text
            Country_ = self.gds_validate_string(Country_, node, 'Country')
            self.Country = Country_
            self.validate_CountryName(self.Country)    # validate type CountryName
        elif nodeName_ == 'ZipCode':
            ZipCode_ = child_.text
            ZipCode_ = self.gds_validate_string(ZipCode_, node, 'ZipCode')
            self.ZipCode = ZipCode_
            self.validate_ZipCode(self.ZipCode)    # validate type ZipCode
        elif nodeName_ == 'AddressType':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'AddressType')
            self.AddressType = ival_
            self.validate_AddressType(self.AddressType)    # validate type AddressType
        elif nodeName_ == 'StateOther':
            StateOther_ = child_.text
            StateOther_ = self.gds_validate_string(StateOther_, node, 'StateOther')
            self.StateOther = StateOther_
            self.validate_StateName(self.StateOther)    # validate type StateName
        elif nodeName_ == 'ModifyFlag':
            ModifyFlag_ = child_.text
            ModifyFlag_ = self.gds_validate_string(ModifyFlag_, node, 'ModifyFlag')
            self.ModifyFlag = ModifyFlag_
# end class AddressDetailsType


class ConsumerProfileType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Title=None, FirstName=None, LastName=None, AlternateFirstName=None, AlternateLastName=None, DOB=None, Gender=None, MaritalStatus=None, NationalID=None, PassportNumber=None, Education=None, Profession=None, Suffix=None, Company=None, MiddleName=None, AlternateMiddleName=None, MaternalLastName=None, AlternateMaternalLastName=None, AlternateTitle=None, AlternateSuffix=None, Address=None, Phone=None, PromoCode=None, AcquisitionSource=None, Email=None):
        self.Title = Title
        self.FirstName = FirstName
        self.LastName = LastName
        self.AlternateFirstName = AlternateFirstName
        self.AlternateLastName = AlternateLastName
        self.DOB = DOB
        self.Gender = Gender
        self.MaritalStatus = MaritalStatus
        self.NationalID = NationalID
        self.PassportNumber = PassportNumber
        self.Education = Education
        self.Profession = Profession
        self.Suffix = Suffix
        self.Company = Company
        self.MiddleName = MiddleName
        self.AlternateMiddleName = AlternateMiddleName
        self.MaternalLastName = MaternalLastName
        self.AlternateMaternalLastName = AlternateMaternalLastName
        self.AlternateTitle = AlternateTitle
        self.AlternateSuffix = AlternateSuffix
        if Address is None:
            self.Address = []
        else:
            self.Address = Address
        if Phone is None:
            self.Phone = []
        else:
            self.Phone = Phone
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        if Email is None:
            self.Email = []
        else:
            self.Email = Email
    def factory(*args_, **kwargs_):
        if ConsumerProfileType.subclass:
            return ConsumerProfileType.subclass(*args_, **kwargs_)
        else:
            return ConsumerProfileType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Title(self): return self.Title
    def set_Title(self, Title): self.Title = Title
    def validate_Title(self, value):
        # Validate type Title, a restriction on Consumer.
        pass
    def get_FirstName(self): return self.FirstName
    def set_FirstName(self, FirstName): self.FirstName = FirstName
    def validate_FirstName(self, value):
        # Validate type FirstName, a restriction on Name.
        pass
    def get_LastName(self): return self.LastName
    def set_LastName(self, LastName): self.LastName = LastName
    def validate_LastName(self, value):
        # Validate type LastName, a restriction on Name.
        pass
    def get_AlternateFirstName(self): return self.AlternateFirstName
    def set_AlternateFirstName(self, AlternateFirstName): self.AlternateFirstName = AlternateFirstName
    def get_AlternateLastName(self): return self.AlternateLastName
    def set_AlternateLastName(self, AlternateLastName): self.AlternateLastName = AlternateLastName
    def get_DOB(self): return self.DOB
    def set_DOB(self, DOB): self.DOB = DOB
    def validate_Date(self, value):
        # Validate type Date, a restriction on xs:date.
        pass
    def get_Gender(self): return self.Gender
    def set_Gender(self, Gender): self.Gender = Gender
    def validate_Gender(self, value):
        # Validate type Gender, a restriction on Flag.
        pass
    def get_MaritalStatus(self): return self.MaritalStatus
    def set_MaritalStatus(self, MaritalStatus): self.MaritalStatus = MaritalStatus
    def validate_MaritalStatus(self, value):
        # Validate type MaritalStatus, a restriction on xs:byte.
        pass
    def get_NationalID(self): return self.NationalID
    def set_NationalID(self, NationalID): self.NationalID = NationalID
    def validate_NationalID(self, value):
        # Validate type NationalID, a restriction on Consumer.
        pass
    def get_PassportNumber(self): return self.PassportNumber
    def set_PassportNumber(self, PassportNumber): self.PassportNumber = PassportNumber
    def validate_PassportNumber(self, value):
        # Validate type PassportNumber, a restriction on Consumer.
        pass
    def get_Education(self): return self.Education
    def set_Education(self, Education): self.Education = Education
    def validate_Education(self, value):
        # Validate type Education, a restriction on Consumer.
        pass
    def get_Profession(self): return self.Profession
    def set_Profession(self, Profession): self.Profession = Profession
    def validate_Profession(self, value):
        # Validate type Profession, a restriction on Consumer.
        pass
    def get_Suffix(self): return self.Suffix
    def set_Suffix(self, Suffix): self.Suffix = Suffix
    def validate_Suffix(self, value):
        # Validate type Suffix, a restriction on xs:string.
        pass
    def get_Company(self): return self.Company
    def set_Company(self, Company): self.Company = Company
    def validate_Company(self, value):
        # Validate type Company, a restriction on Consumer.
        pass
    def get_MiddleName(self): return self.MiddleName
    def set_MiddleName(self, MiddleName): self.MiddleName = MiddleName
    def validate_MiddleName(self, value):
        # Validate type MiddleName, a restriction on Name.
        pass
    def get_AlternateMiddleName(self): return self.AlternateMiddleName
    def set_AlternateMiddleName(self, AlternateMiddleName): self.AlternateMiddleName = AlternateMiddleName
    def get_MaternalLastName(self): return self.MaternalLastName
    def set_MaternalLastName(self, MaternalLastName): self.MaternalLastName = MaternalLastName
    def get_AlternateMaternalLastName(self): return self.AlternateMaternalLastName
    def set_AlternateMaternalLastName(self, AlternateMaternalLastName): self.AlternateMaternalLastName = AlternateMaternalLastName
    def get_AlternateTitle(self): return self.AlternateTitle
    def set_AlternateTitle(self, AlternateTitle): self.AlternateTitle = AlternateTitle
    def get_AlternateSuffix(self): return self.AlternateSuffix
    def set_AlternateSuffix(self, AlternateSuffix): self.AlternateSuffix = AlternateSuffix
    def get_Address(self): return self.Address
    def set_Address(self, Address): self.Address = Address
    def add_Address(self, value): self.Address.append(value)
    def insert_Address(self, index, value): self.Address[index] = value
    def get_Phone(self): return self.Phone
    def set_Phone(self, Phone): self.Phone = Phone
    def add_Phone(self, value): self.Phone.append(value)
    def insert_Phone(self, index, value): self.Phone[index] = value
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_Email(self): return self.Email
    def set_Email(self, Email): self.Email = Email
    def add_Email(self, value): self.Email.append(value)
    def insert_Email(self, index, value): self.Email[index] = value
    def export(self, outfile, level, namespace_='', name_='ConsumerProfileType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConsumerProfileType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ConsumerProfileType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ConsumerProfileType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Title is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sTitle>%s</%sTitle>%s' % (namespace_, self.gds_format_string(quote_xml(self.Title).encode(ExternalEncoding), input_name='Title'), namespace_, eol_))
        if self.FirstName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFirstName>%s</%sFirstName>%s' % (namespace_, self.gds_format_string(quote_xml(self.FirstName).encode(ExternalEncoding), input_name='FirstName'), namespace_, eol_))
        if self.LastName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLastName>%s</%sLastName>%s' % (namespace_, self.gds_format_string(quote_xml(self.LastName).encode(ExternalEncoding), input_name='LastName'), namespace_, eol_))
        if self.AlternateFirstName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAlternateFirstName>%s</%sAlternateFirstName>%s' % (namespace_, self.gds_format_string(quote_xml(self.AlternateFirstName).encode(ExternalEncoding), input_name='AlternateFirstName'), namespace_, eol_))
        if self.AlternateLastName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAlternateLastName>%s</%sAlternateLastName>%s' % (namespace_, self.gds_format_string(quote_xml(self.AlternateLastName).encode(ExternalEncoding), input_name='AlternateLastName'), namespace_, eol_))
        if self.DOB is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDOB>%s</%sDOB>%s' % (namespace_, self.gds_format_string(quote_xml(self.DOB).encode(ExternalEncoding), input_name='DOB'), namespace_, eol_))
        if self.Gender is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sGender>%s</%sGender>%s' % (namespace_, self.gds_format_integer(self.Gender, input_name='Gender'), namespace_, eol_))
        if self.MaritalStatus is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMaritalStatus>%s</%sMaritalStatus>%s' % (namespace_, self.gds_format_integer(self.MaritalStatus, input_name='MaritalStatus'), namespace_, eol_))
        if self.NationalID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNationalID>%s</%sNationalID>%s' % (namespace_, self.gds_format_string(quote_xml(self.NationalID).encode(ExternalEncoding), input_name='NationalID'), namespace_, eol_))
        if self.PassportNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPassportNumber>%s</%sPassportNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.PassportNumber).encode(ExternalEncoding), input_name='PassportNumber'), namespace_, eol_))
        if self.Education is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEducation>%s</%sEducation>%s' % (namespace_, self.gds_format_string(quote_xml(self.Education).encode(ExternalEncoding), input_name='Education'), namespace_, eol_))
        if self.Profession is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sProfession>%s</%sProfession>%s' % (namespace_, self.gds_format_string(quote_xml(self.Profession).encode(ExternalEncoding), input_name='Profession'), namespace_, eol_))
        if self.Suffix is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSuffix>%s</%sSuffix>%s' % (namespace_, self.gds_format_string(quote_xml(self.Suffix).encode(ExternalEncoding), input_name='Suffix'), namespace_, eol_))
        if self.Company is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCompany>%s</%sCompany>%s' % (namespace_, self.gds_format_string(quote_xml(self.Company).encode(ExternalEncoding), input_name='Company'), namespace_, eol_))
        if self.MiddleName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMiddleName>%s</%sMiddleName>%s' % (namespace_, self.gds_format_string(quote_xml(self.MiddleName).encode(ExternalEncoding), input_name='MiddleName'), namespace_, eol_))
        if self.AlternateMiddleName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAlternateMiddleName>%s</%sAlternateMiddleName>%s' % (namespace_, self.gds_format_string(quote_xml(self.AlternateMiddleName).encode(ExternalEncoding), input_name='AlternateMiddleName'), namespace_, eol_))
        if self.MaternalLastName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMaternalLastName>%s</%sMaternalLastName>%s' % (namespace_, self.gds_format_string(quote_xml(self.MaternalLastName).encode(ExternalEncoding), input_name='MaternalLastName'), namespace_, eol_))
        if self.AlternateMaternalLastName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAlternateMaternalLastName>%s</%sAlternateMaternalLastName>%s' % (namespace_, self.gds_format_string(quote_xml(self.AlternateMaternalLastName).encode(ExternalEncoding), input_name='AlternateMaternalLastName'), namespace_, eol_))
        if self.AlternateTitle is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAlternateTitle>%s</%sAlternateTitle>%s' % (namespace_, self.gds_format_string(quote_xml(self.AlternateTitle).encode(ExternalEncoding), input_name='AlternateTitle'), namespace_, eol_))
        if self.AlternateSuffix is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAlternateSuffix>%s</%sAlternateSuffix>%s' % (namespace_, self.gds_format_string(quote_xml(self.AlternateSuffix).encode(ExternalEncoding), input_name='AlternateSuffix'), namespace_, eol_))
        for Address_ in self.Address:
            Address_.export(outfile, level, namespace_, name_='Address', pretty_print=pretty_print)
        for Phone_ in self.Phone:
            Phone_.export(outfile, level, namespace_, name_='Phone', pretty_print=pretty_print)
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        for Email_ in self.Email:
            Email_.export(outfile, level, namespace_, name_='Email', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.Title is not None or
            self.FirstName is not None or
            self.LastName is not None or
            self.AlternateFirstName is not None or
            self.AlternateLastName is not None or
            self.DOB is not None or
            self.Gender is not None or
            self.MaritalStatus is not None or
            self.NationalID is not None or
            self.PassportNumber is not None or
            self.Education is not None or
            self.Profession is not None or
            self.Suffix is not None or
            self.Company is not None or
            self.MiddleName is not None or
            self.AlternateMiddleName is not None or
            self.MaternalLastName is not None or
            self.AlternateMaternalLastName is not None or
            self.AlternateTitle is not None or
            self.AlternateSuffix is not None or
            self.Address or
            self.Phone or
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.Email
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ConsumerProfileType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.Title is not None:
            showIndent(outfile, level)
            outfile.write('Title=%s,\n' % quote_python(self.Title).encode(ExternalEncoding))
        if self.FirstName is not None:
            showIndent(outfile, level)
            outfile.write('FirstName=%s,\n' % quote_python(self.FirstName).encode(ExternalEncoding))
        if self.LastName is not None:
            showIndent(outfile, level)
            outfile.write('LastName=%s,\n' % quote_python(self.LastName).encode(ExternalEncoding))
        if self.AlternateFirstName is not None:
            showIndent(outfile, level)
            outfile.write('AlternateFirstName=%s,\n' % quote_python(self.AlternateFirstName).encode(ExternalEncoding))
        if self.AlternateLastName is not None:
            showIndent(outfile, level)
            outfile.write('AlternateLastName=%s,\n' % quote_python(self.AlternateLastName).encode(ExternalEncoding))
        if self.DOB is not None:
            showIndent(outfile, level)
            outfile.write('DOB=%s,\n' % quote_python(self.DOB).encode(ExternalEncoding))
        if self.Gender is not None:
            showIndent(outfile, level)
            outfile.write('Gender=%d,\n' % self.Gender)
        if self.MaritalStatus is not None:
            showIndent(outfile, level)
            outfile.write('MaritalStatus=%d,\n' % self.MaritalStatus)
        if self.NationalID is not None:
            showIndent(outfile, level)
            outfile.write('NationalID=%s,\n' % quote_python(self.NationalID).encode(ExternalEncoding))
        if self.PassportNumber is not None:
            showIndent(outfile, level)
            outfile.write('PassportNumber=%s,\n' % quote_python(self.PassportNumber).encode(ExternalEncoding))
        if self.Education is not None:
            showIndent(outfile, level)
            outfile.write('Education=%s,\n' % quote_python(self.Education).encode(ExternalEncoding))
        if self.Profession is not None:
            showIndent(outfile, level)
            outfile.write('Profession=%s,\n' % quote_python(self.Profession).encode(ExternalEncoding))
        if self.Suffix is not None:
            showIndent(outfile, level)
            outfile.write('Suffix=%s,\n' % quote_python(self.Suffix).encode(ExternalEncoding))
        if self.Company is not None:
            showIndent(outfile, level)
            outfile.write('Company=%s,\n' % quote_python(self.Company).encode(ExternalEncoding))
        if self.MiddleName is not None:
            showIndent(outfile, level)
            outfile.write('MiddleName=%s,\n' % quote_python(self.MiddleName).encode(ExternalEncoding))
        if self.AlternateMiddleName is not None:
            showIndent(outfile, level)
            outfile.write('AlternateMiddleName=%s,\n' % quote_python(self.AlternateMiddleName).encode(ExternalEncoding))
        if self.MaternalLastName is not None:
            showIndent(outfile, level)
            outfile.write('MaternalLastName=%s,\n' % quote_python(self.MaternalLastName).encode(ExternalEncoding))
        if self.AlternateMaternalLastName is not None:
            showIndent(outfile, level)
            outfile.write('AlternateMaternalLastName=%s,\n' % quote_python(self.AlternateMaternalLastName).encode(ExternalEncoding))
        if self.AlternateTitle is not None:
            showIndent(outfile, level)
            outfile.write('AlternateTitle=%s,\n' % quote_python(self.AlternateTitle).encode(ExternalEncoding))
        if self.AlternateSuffix is not None:
            showIndent(outfile, level)
            outfile.write('AlternateSuffix=%s,\n' % quote_python(self.AlternateSuffix).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('Address=[\n')
        level += 1
        for Address_ in self.Address:
            showIndent(outfile, level)
            outfile.write('model_.AddressDetailsType(\n')
            Address_.exportLiteral(outfile, level, name_='AddressDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('Phone=[\n')
        level += 1
        for Phone_ in self.Phone:
            showIndent(outfile, level)
            outfile.write('model_.PhoneDetailsType(\n')
            Phone_.exportLiteral(outfile, level, name_='PhoneDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('Email=[\n')
        level += 1
        for Email_ in self.Email:
            showIndent(outfile, level)
            outfile.write('model_.EmailDetailsType(\n')
            Email_.exportLiteral(outfile, level, name_='EmailDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Title':
            Title_ = child_.text
            Title_ = self.gds_validate_string(Title_, node, 'Title')
            self.Title = Title_
            self.validate_Title(self.Title)    # validate type Title
        elif nodeName_ == 'FirstName':
            FirstName_ = child_.text
            FirstName_ = self.gds_validate_string(FirstName_, node, 'FirstName')
            self.FirstName = FirstName_
            self.validate_FirstName(self.FirstName)    # validate type FirstName
        elif nodeName_ == 'LastName':
            LastName_ = child_.text
            LastName_ = self.gds_validate_string(LastName_, node, 'LastName')
            self.LastName = LastName_
            self.validate_LastName(self.LastName)    # validate type LastName
        elif nodeName_ == 'AlternateFirstName':
            AlternateFirstName_ = child_.text
            AlternateFirstName_ = self.gds_validate_string(AlternateFirstName_, node, 'AlternateFirstName')
            self.AlternateFirstName = AlternateFirstName_
            self.validate_FirstName(self.AlternateFirstName)    # validate type FirstName
        elif nodeName_ == 'AlternateLastName':
            AlternateLastName_ = child_.text
            AlternateLastName_ = self.gds_validate_string(AlternateLastName_, node, 'AlternateLastName')
            self.AlternateLastName = AlternateLastName_
            self.validate_LastName(self.AlternateLastName)    # validate type LastName
        elif nodeName_ == 'DOB':
            DOB_ = child_.text
            DOB_ = self.gds_validate_string(DOB_, node, 'DOB')
            self.DOB = DOB_
            self.validate_Date(self.DOB)    # validate type Date
        elif nodeName_ == 'Gender':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'Gender')
            self.Gender = ival_
            self.validate_Gender(self.Gender)    # validate type Gender
        elif nodeName_ == 'MaritalStatus':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'MaritalStatus')
            self.MaritalStatus = ival_
            self.validate_MaritalStatus(self.MaritalStatus)    # validate type MaritalStatus
        elif nodeName_ == 'NationalID':
            NationalID_ = child_.text
            NationalID_ = self.gds_validate_string(NationalID_, node, 'NationalID')
            self.NationalID = NationalID_
            self.validate_NationalID(self.NationalID)    # validate type NationalID
        elif nodeName_ == 'PassportNumber':
            PassportNumber_ = child_.text
            PassportNumber_ = self.gds_validate_string(PassportNumber_, node, 'PassportNumber')
            self.PassportNumber = PassportNumber_
            self.validate_PassportNumber(self.PassportNumber)    # validate type PassportNumber
        elif nodeName_ == 'Education':
            Education_ = child_.text
            Education_ = self.gds_validate_string(Education_, node, 'Education')
            self.Education = Education_
            self.validate_Education(self.Education)    # validate type Education
        elif nodeName_ == 'Profession':
            Profession_ = child_.text
            Profession_ = self.gds_validate_string(Profession_, node, 'Profession')
            self.Profession = Profession_
            self.validate_Profession(self.Profession)    # validate type Profession
        elif nodeName_ == 'Suffix':
            Suffix_ = child_.text
            Suffix_ = self.gds_validate_string(Suffix_, node, 'Suffix')
            self.Suffix = Suffix_
            self.validate_Suffix(self.Suffix)    # validate type Suffix
        elif nodeName_ == 'Company':
            Company_ = child_.text
            Company_ = self.gds_validate_string(Company_, node, 'Company')
            self.Company = Company_
            self.validate_Company(self.Company)    # validate type Company
        elif nodeName_ == 'MiddleName':
            MiddleName_ = child_.text
            MiddleName_ = self.gds_validate_string(MiddleName_, node, 'MiddleName')
            self.MiddleName = MiddleName_
            self.validate_MiddleName(self.MiddleName)    # validate type MiddleName
        elif nodeName_ == 'AlternateMiddleName':
            AlternateMiddleName_ = child_.text
            AlternateMiddleName_ = self.gds_validate_string(AlternateMiddleName_, node, 'AlternateMiddleName')
            self.AlternateMiddleName = AlternateMiddleName_
            self.validate_MiddleName(self.AlternateMiddleName)    # validate type MiddleName
        elif nodeName_ == 'MaternalLastName':
            MaternalLastName_ = child_.text
            MaternalLastName_ = self.gds_validate_string(MaternalLastName_, node, 'MaternalLastName')
            self.MaternalLastName = MaternalLastName_
            self.validate_LastName(self.MaternalLastName)    # validate type LastName
        elif nodeName_ == 'AlternateMaternalLastName':
            AlternateMaternalLastName_ = child_.text
            AlternateMaternalLastName_ = self.gds_validate_string(AlternateMaternalLastName_, node, 'AlternateMaternalLastName')
            self.AlternateMaternalLastName = AlternateMaternalLastName_
            self.validate_LastName(self.AlternateMaternalLastName)    # validate type LastName
        elif nodeName_ == 'AlternateTitle':
            AlternateTitle_ = child_.text
            AlternateTitle_ = self.gds_validate_string(AlternateTitle_, node, 'AlternateTitle')
            self.AlternateTitle = AlternateTitle_
            self.validate_Title(self.AlternateTitle)    # validate type Title
        elif nodeName_ == 'AlternateSuffix':
            AlternateSuffix_ = child_.text
            AlternateSuffix_ = self.gds_validate_string(AlternateSuffix_, node, 'AlternateSuffix')
            self.AlternateSuffix = AlternateSuffix_
            self.validate_Suffix(self.AlternateSuffix)    # validate type Suffix
        elif nodeName_ == 'Address':
            obj_ = AddressDetailsType.factory()
            obj_.build(child_)
            self.Address.append(obj_)
        elif nodeName_ == 'Phone':
            obj_ = PhoneDetailsType.factory()
            obj_.build(child_)
            self.Phone.append(obj_)
        elif nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'Email':
            obj_ = EmailDetailsType.factory()
            obj_.build(child_)
            self.Email.append(obj_)
# end class ConsumerProfileType


class PhoneDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PhoneID=None, InternationalCode=None, AreaCode=None, PhoneNumber=None, PhoneType=None, Extension=None, ModifyFlag=None):
        self.PhoneID = PhoneID
        self.InternationalCode = InternationalCode
        self.AreaCode = AreaCode
        self.PhoneNumber = PhoneNumber
        self.PhoneType = PhoneType
        self.Extension = Extension
        self.ModifyFlag = ModifyFlag
    def factory(*args_, **kwargs_):
        if PhoneDetailsType.subclass:
            return PhoneDetailsType.subclass(*args_, **kwargs_)
        else:
            return PhoneDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PhoneID(self): return self.PhoneID
    def set_PhoneID(self, PhoneID): self.PhoneID = PhoneID
    def get_InternationalCode(self): return self.InternationalCode
    def set_InternationalCode(self, InternationalCode): self.InternationalCode = InternationalCode
    def validate_AreaCode(self, value):
        # Validate type AreaCode, a restriction on Name.
        pass
    def get_AreaCode(self): return self.AreaCode
    def set_AreaCode(self, AreaCode): self.AreaCode = AreaCode
    def get_PhoneNumber(self): return self.PhoneNumber
    def set_PhoneNumber(self, PhoneNumber): self.PhoneNumber = PhoneNumber
    def validate_PhoneNumber(self, value):
        # Validate type PhoneNumber, a restriction on Name.
        pass
    def get_PhoneType(self): return self.PhoneType
    def set_PhoneType(self, PhoneType): self.PhoneType = PhoneType
    def validate_PhoneType(self, value):
        # Validate type PhoneType, a restriction on xs:byte.
        pass
    def get_Extension(self): return self.Extension
    def set_Extension(self, Extension): self.Extension = Extension
    def get_ModifyFlag(self): return self.ModifyFlag
    def set_ModifyFlag(self, ModifyFlag): self.ModifyFlag = ModifyFlag
    def export(self, outfile, level, namespace_='', name_='PhoneDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PhoneDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='PhoneDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='PhoneDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PhoneID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPhoneID>%s</%sPhoneID>%s' % (namespace_, self.gds_format_integer(self.PhoneID, input_name='PhoneID'), namespace_, eol_))
        if self.InternationalCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInternationalCode>%s</%sInternationalCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.InternationalCode).encode(ExternalEncoding), input_name='InternationalCode'), namespace_, eol_))
        if self.AreaCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAreaCode>%s</%sAreaCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.AreaCode).encode(ExternalEncoding), input_name='AreaCode'), namespace_, eol_))
        if self.PhoneNumber is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPhoneNumber>%s</%sPhoneNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.PhoneNumber).encode(ExternalEncoding), input_name='PhoneNumber'), namespace_, eol_))
        if self.PhoneType is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPhoneType>%s</%sPhoneType>%s' % (namespace_, self.gds_format_integer(self.PhoneType, input_name='PhoneType'), namespace_, eol_))
        if self.Extension is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sExtension>%s</%sExtension>%s' % (namespace_, self.gds_format_string(quote_xml(self.Extension).encode(ExternalEncoding), input_name='Extension'), namespace_, eol_))
        if self.ModifyFlag is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sModifyFlag>%s</%sModifyFlag>%s' % (namespace_, self.gds_format_string(quote_xml(self.ModifyFlag).encode(ExternalEncoding), input_name='ModifyFlag'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.PhoneID is not None or
            self.InternationalCode is not None or
            self.AreaCode is not None or
            self.PhoneNumber is not None or
            self.PhoneType is not None or
            self.Extension is not None or
            self.ModifyFlag is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='PhoneDetailsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.PhoneID is not None:
            showIndent(outfile, level)
            outfile.write('PhoneID=%d,\n' % self.PhoneID)
        if self.InternationalCode is not None:
            showIndent(outfile, level)
            outfile.write('InternationalCode=%s,\n' % quote_python(self.InternationalCode).encode(ExternalEncoding))
        if self.AreaCode is not None:
            showIndent(outfile, level)
            outfile.write('AreaCode=%s,\n' % quote_python(self.AreaCode).encode(ExternalEncoding))
        if self.PhoneNumber is not None:
            showIndent(outfile, level)
            outfile.write('PhoneNumber=%s,\n' % quote_python(self.PhoneNumber).encode(ExternalEncoding))
        if self.PhoneType is not None:
            showIndent(outfile, level)
            outfile.write('PhoneType=%d,\n' % self.PhoneType)
        if self.Extension is not None:
            showIndent(outfile, level)
            outfile.write('Extension=%s,\n' % quote_python(self.Extension).encode(ExternalEncoding))
        if self.ModifyFlag is not None:
            showIndent(outfile, level)
            outfile.write('ModifyFlag=%s,\n' % quote_python(self.ModifyFlag).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PhoneID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'PhoneID')
            self.PhoneID = ival_
        elif nodeName_ == 'InternationalCode':
            InternationalCode_ = child_.text
            InternationalCode_ = self.gds_validate_string(InternationalCode_, node, 'InternationalCode')
            self.InternationalCode = InternationalCode_
            self.validate_AreaCode(self.InternationalCode)    # validate type AreaCode
        elif nodeName_ == 'AreaCode':
            AreaCode_ = child_.text
            AreaCode_ = self.gds_validate_string(AreaCode_, node, 'AreaCode')
            self.AreaCode = AreaCode_
            self.validate_AreaCode(self.AreaCode)    # validate type AreaCode
        elif nodeName_ == 'PhoneNumber':
            PhoneNumber_ = child_.text
            PhoneNumber_ = self.gds_validate_string(PhoneNumber_, node, 'PhoneNumber')
            self.PhoneNumber = PhoneNumber_
            self.validate_PhoneNumber(self.PhoneNumber)    # validate type PhoneNumber
        elif nodeName_ == 'PhoneType':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'PhoneType')
            self.PhoneType = ival_
            self.validate_PhoneType(self.PhoneType)    # validate type PhoneType
        elif nodeName_ == 'Extension':
            Extension_ = child_.text
            Extension_ = self.gds_validate_string(Extension_, node, 'Extension')
            self.Extension = Extension_
            self.validate_AreaCode(self.Extension)    # validate type AreaCode
        elif nodeName_ == 'ModifyFlag':
            ModifyFlag_ = child_.text
            ModifyFlag_ = self.gds_validate_string(ModifyFlag_, node, 'ModifyFlag')
            self.ModifyFlag = ModifyFlag_
# end class PhoneDetailsType


class SocialNetworksType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PromoCode=None, AcquisitionSource=None, QuestionCategory=None):
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        if QuestionCategory is None:
            self.QuestionCategory = []
        else:
            self.QuestionCategory = QuestionCategory
    def factory(*args_, **kwargs_):
        if SocialNetworksType.subclass:
            return SocialNetworksType.subclass(*args_, **kwargs_)
        else:
            return SocialNetworksType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_QuestionCategory(self): return self.QuestionCategory
    def set_QuestionCategory(self, QuestionCategory): self.QuestionCategory = QuestionCategory
    def add_QuestionCategory(self, value): self.QuestionCategory.append(value)
    def insert_QuestionCategory(self, index, value): self.QuestionCategory[index] = value
    def export(self, outfile, level, namespace_='', name_='SocialNetworksType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SocialNetworksType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='SocialNetworksType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SocialNetworksType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        for QuestionCategory_ in self.QuestionCategory:
            QuestionCategory_.export(outfile, level, namespace_, name_='QuestionCategory', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.QuestionCategory
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SocialNetworksType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('QuestionCategory=[\n')
        level += 1
        for QuestionCategory_ in self.QuestionCategory:
            showIndent(outfile, level)
            outfile.write('model_.CategoryType(\n')
            QuestionCategory_.exportLiteral(outfile, level, name_='CategoryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'QuestionCategory':
            obj_ = CategoryType.factory()
            obj_.build(child_)
            self.QuestionCategory.append(obj_)
# end class SocialNetworksType


class ConversionLocationsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PromoCode=None, AcquisitionSource=None, QuestionCategory=None):
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        if QuestionCategory is None:
            self.QuestionCategory = []
        else:
            self.QuestionCategory = QuestionCategory
    def factory(*args_, **kwargs_):
        if ConversionLocationsType.subclass:
            return ConversionLocationsType.subclass(*args_, **kwargs_)
        else:
            return ConversionLocationsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_QuestionCategory(self): return self.QuestionCategory
    def set_QuestionCategory(self, QuestionCategory): self.QuestionCategory = QuestionCategory
    def add_QuestionCategory(self, value): self.QuestionCategory.append(value)
    def insert_QuestionCategory(self, index, value): self.QuestionCategory[index] = value
    def export(self, outfile, level, namespace_='', name_='ConversionLocationsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConversionLocationsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ConversionLocationsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ConversionLocationsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        for QuestionCategory_ in self.QuestionCategory:
            QuestionCategory_.export(outfile, level, namespace_, name_='QuestionCategory', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.QuestionCategory
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ConversionLocationsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('QuestionCategory=[\n')
        level += 1
        for QuestionCategory_ in self.QuestionCategory:
            showIndent(outfile, level)
            outfile.write('model_.CategoryType(\n')
            QuestionCategory_.exportLiteral(outfile, level, name_='CategoryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'QuestionCategory':
            obj_ = CategoryType.factory()
            obj_.build(child_)
            self.QuestionCategory.append(obj_)
# end class ConversionLocationsType


class FacebookConnectType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PromoCode=None, AcquisitionSource=None, QuestionCategory=None):
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        if QuestionCategory is None:
            self.QuestionCategory = []
        else:
            self.QuestionCategory = QuestionCategory
    def factory(*args_, **kwargs_):
        if FacebookConnectType.subclass:
            return FacebookConnectType.subclass(*args_, **kwargs_)
        else:
            return FacebookConnectType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_QuestionCategory(self): return self.QuestionCategory
    def set_QuestionCategory(self, QuestionCategory): self.QuestionCategory = QuestionCategory
    def add_QuestionCategory(self, value): self.QuestionCategory.append(value)
    def insert_QuestionCategory(self, index, value): self.QuestionCategory[index] = value
    def export(self, outfile, level, namespace_='', name_='FacebookConnectType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FacebookConnectType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='FacebookConnectType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='FacebookConnectType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        for QuestionCategory_ in self.QuestionCategory:
            QuestionCategory_.export(outfile, level, namespace_, name_='QuestionCategory', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.QuestionCategory
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='FacebookConnectType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('QuestionCategory=[\n')
        level += 1
        for QuestionCategory_ in self.QuestionCategory:
            showIndent(outfile, level)
            outfile.write('model_.CategoryType(\n')
            QuestionCategory_.exportLiteral(outfile, level, name_='CategoryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'QuestionCategory':
            obj_ = CategoryType.factory()
            obj_.build(child_)
            self.QuestionCategory.append(obj_)
# end class FacebookConnectType


class DigitalInteractionsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PromoCode=None, AcquisitionSource=None, QuestionCategory=None):
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        if QuestionCategory is None:
            self.QuestionCategory = []
        else:
            self.QuestionCategory = QuestionCategory
    def factory(*args_, **kwargs_):
        if DigitalInteractionsType.subclass:
            return DigitalInteractionsType.subclass(*args_, **kwargs_)
        else:
            return DigitalInteractionsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_QuestionCategory(self): return self.QuestionCategory
    def set_QuestionCategory(self, QuestionCategory): self.QuestionCategory = QuestionCategory
    def add_QuestionCategory(self, value): self.QuestionCategory.append(value)
    def insert_QuestionCategory(self, index, value): self.QuestionCategory[index] = value
    def export(self, outfile, level, namespace_='', name_='DigitalInteractionsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DigitalInteractionsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='DigitalInteractionsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='DigitalInteractionsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        for QuestionCategory_ in self.QuestionCategory:
            QuestionCategory_.export(outfile, level, namespace_, name_='QuestionCategory', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.QuestionCategory
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='DigitalInteractionsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('QuestionCategory=[\n')
        level += 1
        for QuestionCategory_ in self.QuestionCategory:
            showIndent(outfile, level)
            outfile.write('model_.CategoryType(\n')
            QuestionCategory_.exportLiteral(outfile, level, name_='CategoryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'QuestionCategory':
            obj_ = CategoryType.factory()
            obj_.build(child_)
            self.QuestionCategory.append(obj_)
# end class DigitalInteractionsType


class ExtendedProfileType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, PromoCode=None, AcquisitionSource=None, QuestionCategory=None):
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
        if QuestionCategory is None:
            self.QuestionCategory = []
        else:
            self.QuestionCategory = QuestionCategory
    def factory(*args_, **kwargs_):
        if ExtendedProfileType.subclass:
            return ExtendedProfileType.subclass(*args_, **kwargs_)
        else:
            return ExtendedProfileType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def get_QuestionCategory(self): return self.QuestionCategory
    def set_QuestionCategory(self, QuestionCategory): self.QuestionCategory = QuestionCategory
    def add_QuestionCategory(self, value): self.QuestionCategory.append(value)
    def insert_QuestionCategory(self, index, value): self.QuestionCategory[index] = value
    def export(self, outfile, level, namespace_='', name_='ExtendedProfileType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ExtendedProfileType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ExtendedProfileType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ExtendedProfileType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
        for QuestionCategory_ in self.QuestionCategory:
            QuestionCategory_.export(outfile, level, namespace_, name_='QuestionCategory', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.PromoCode is not None or
            self.AcquisitionSource is not None or
            self.QuestionCategory
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ExtendedProfileType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('QuestionCategory=[\n')
        level += 1
        for QuestionCategory_ in self.QuestionCategory:
            showIndent(outfile, level)
            outfile.write('model_.CategoryType(\n')
            QuestionCategory_.exportLiteral(outfile, level, name_='CategoryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
        elif nodeName_ == 'QuestionCategory':
            obj_ = CategoryType.factory()
            obj_.build(child_)
            self.QuestionCategory.append(obj_)
# end class ExtendedProfileType


class Consumer(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ConsumerProfile=None, Preferences=None, SocialNetworks=None, ConversionLocations=None, FacebookConnect=None, DigitalInteractions=None, ExtendedProfile=None, ExtendedOptInPreferences=None, HubLifeStyles=None, UserAccount=None):
        self.ConsumerProfile = ConsumerProfile
        self.Preferences = Preferences
        self.SocialNetworks = SocialNetworks
        self.ConversionLocations = ConversionLocations
        self.FacebookConnect = FacebookConnect
        self.DigitalInteractions = DigitalInteractions
        self.ExtendedProfile = ExtendedProfile
        self.ExtendedOptInPreferences = ExtendedOptInPreferences
        self.HubLifeStyles = HubLifeStyles
        self.UserAccount = UserAccount
    def factory(*args_, **kwargs_):
        if Consumer.subclass:
            return Consumer.subclass(*args_, **kwargs_)
        else:
            return Consumer(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ConsumerProfile(self): return self.ConsumerProfile
    def set_ConsumerProfile(self, ConsumerProfile): self.ConsumerProfile = ConsumerProfile
    def get_Preferences(self): return self.Preferences
    def set_Preferences(self, Preferences): self.Preferences = Preferences
    def get_SocialNetworks(self): return self.SocialNetworks
    def set_SocialNetworks(self, SocialNetworks): self.SocialNetworks = SocialNetworks
    def get_ConversionLocations(self): return self.ConversionLocations
    def set_ConversionLocations(self, ConversionLocations): self.ConversionLocations = ConversionLocations
    def get_FacebookConnect(self): return self.FacebookConnect
    def set_FacebookConnect(self, FacebookConnect): self.FacebookConnect = FacebookConnect
    def get_DigitalInteractions(self): return self.DigitalInteractions
    def set_DigitalInteractions(self, DigitalInteractions): self.DigitalInteractions = DigitalInteractions
    def get_ExtendedProfile(self): return self.ExtendedProfile
    def set_ExtendedProfile(self, ExtendedProfile): self.ExtendedProfile = ExtendedProfile
    def get_ExtendedOptInPreferences(self): return self.ExtendedOptInPreferences
    def set_ExtendedOptInPreferences(self, ExtendedOptInPreferences): self.ExtendedOptInPreferences = ExtendedOptInPreferences
    def get_HubLifeStyles(self): return self.HubLifeStyles
    def set_HubLifeStyles(self, HubLifeStyles): self.HubLifeStyles = HubLifeStyles
    def get_UserAccount(self): return self.UserAccount
    def set_UserAccount(self, UserAccount): self.UserAccount = UserAccount
    def export(self, outfile, level, namespace_='', name_='Consumer', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Consumer')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='Consumer'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='Consumer', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ConsumerProfile is not None:
            self.ConsumerProfile.export(outfile, level, namespace_, name_='ConsumerProfile', pretty_print=pretty_print)
        if self.Preferences is not None:
            self.Preferences.export(outfile, level, namespace_, name_='Preferences', pretty_print=pretty_print)
        if self.SocialNetworks is not None:
            self.SocialNetworks.export(outfile, level, namespace_, name_='SocialNetworks', pretty_print=pretty_print)
        if self.ConversionLocations is not None:
            self.ConversionLocations.export(outfile, level, namespace_, name_='ConversionLocations', pretty_print=pretty_print)
        if self.FacebookConnect is not None:
            self.FacebookConnect.export(outfile, level, namespace_, name_='FacebookConnect', pretty_print=pretty_print)
        if self.DigitalInteractions is not None:
            self.DigitalInteractions.export(outfile, level, namespace_, name_='DigitalInteractions', pretty_print=pretty_print)
        if self.ExtendedProfile is not None:
            self.ExtendedProfile.export(outfile, level, namespace_, name_='ExtendedProfile', pretty_print=pretty_print)
        if self.ExtendedOptInPreferences is not None:
            self.ExtendedOptInPreferences.export(outfile, level, namespace_, name_='ExtendedOptInPreferences', pretty_print=pretty_print)
        if self.HubLifeStyles is not None:
            self.HubLifeStyles.export(outfile, level, namespace_, name_='HubLifeStyles', pretty_print=pretty_print)
        if self.UserAccount is not None:
            self.UserAccount.export(outfile, level, namespace_, name_='UserAccount', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.ConsumerProfile is not None or
            self.Preferences is not None or
            self.SocialNetworks is not None or
            self.ConversionLocations is not None or
            self.FacebookConnect is not None or
            self.DigitalInteractions is not None or
            self.ExtendedProfile is not None or
            self.ExtendedOptInPreferences is not None or
            self.HubLifeStyles is not None or
            self.UserAccount is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='Consumer'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.ConsumerProfile is not None:
            showIndent(outfile, level)
            outfile.write('ConsumerProfile=model_.ConsumerProfileType(\n')
            self.ConsumerProfile.exportLiteral(outfile, level, name_='ConsumerProfile')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Preferences is not None:
            showIndent(outfile, level)
            outfile.write('Preferences=model_.PreferencesType(\n')
            self.Preferences.exportLiteral(outfile, level, name_='Preferences')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SocialNetworks is not None:
            showIndent(outfile, level)
            outfile.write('SocialNetworks=model_.SocialNetworksType(\n')
            self.SocialNetworks.exportLiteral(outfile, level, name_='SocialNetworks')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ConversionLocations is not None:
            showIndent(outfile, level)
            outfile.write('ConversionLocations=model_.ConversionLocationsType(\n')
            self.ConversionLocations.exportLiteral(outfile, level, name_='ConversionLocations')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.FacebookConnect is not None:
            showIndent(outfile, level)
            outfile.write('FacebookConnect=model_.FacebookConnectType(\n')
            self.FacebookConnect.exportLiteral(outfile, level, name_='FacebookConnect')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DigitalInteractions is not None:
            showIndent(outfile, level)
            outfile.write('DigitalInteractions=model_.DigitalInteractionsType(\n')
            self.DigitalInteractions.exportLiteral(outfile, level, name_='DigitalInteractions')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ExtendedProfile is not None:
            showIndent(outfile, level)
            outfile.write('ExtendedProfile=model_.ExtendedProfileType(\n')
            self.ExtendedProfile.exportLiteral(outfile, level, name_='ExtendedProfile')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ExtendedOptInPreferences is not None:
            showIndent(outfile, level)
            outfile.write('ExtendedOptInPreferences=model_.ExtendedOptInPreferencesType(\n')
            self.ExtendedOptInPreferences.exportLiteral(outfile, level, name_='ExtendedOptInPreferences')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.HubLifeStyles is not None:
            showIndent(outfile, level)
            outfile.write('HubLifeStyles=model_.HubLifeStylesType(\n')
            self.HubLifeStyles.exportLiteral(outfile, level, name_='HubLifeStyles')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.UserAccount is not None:
            showIndent(outfile, level)
            outfile.write('UserAccount=model_.UserAccountType(\n')
            self.UserAccount.exportLiteral(outfile, level, name_='UserAccount')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ConsumerProfile':
            obj_ = ConsumerProfileType.factory()
            obj_.build(child_)
            self.set_ConsumerProfile(obj_)
        elif nodeName_ == 'Preferences':
            obj_ = PreferencesType.factory()
            obj_.build(child_)
            self.set_Preferences(obj_)
        elif nodeName_ == 'SocialNetworks':
            obj_ = SocialNetworksType.factory()
            obj_.build(child_)
            self.set_SocialNetworks(obj_)
        elif nodeName_ == 'ConversionLocations':
            obj_ = ConversionLocationsType.factory()
            obj_.build(child_)
            self.set_ConversionLocations(obj_)
        elif nodeName_ == 'FacebookConnect':
            obj_ = FacebookConnectType.factory()
            obj_.build(child_)
            self.set_FacebookConnect(obj_)
        elif nodeName_ == 'DigitalInteractions':
            obj_ = DigitalInteractionsType.factory()
            obj_.build(child_)
            self.set_DigitalInteractions(obj_)
        elif nodeName_ == 'ExtendedProfile':
            obj_ = ExtendedProfileType.factory()
            obj_.build(child_)
            self.set_ExtendedProfile(obj_)
        elif nodeName_ == 'ExtendedOptInPreferences':
            obj_ = ExtendedOptInPreferencesType.factory()
            obj_.build(child_)
            self.set_ExtendedOptInPreferences(obj_)
        elif nodeName_ == 'HubLifeStyles':
            obj_ = HubLifeStylesType.factory()
            obj_.build(child_)
            self.set_HubLifeStyles(obj_)
        elif nodeName_ == 'UserAccount':
            obj_ = UserAccountType.factory()
            obj_.build(child_)
            self.set_UserAccount(obj_)
# end class Consumer


class ConsumerSearchProfileType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DOB=None, CountryOfResidence=None, SearchBy_EmailOrMobile=None, EmailOrMobile=None):
        self.DOB = DOB
        self.CountryOfResidence = CountryOfResidence
        self.SearchBy_EmailOrMobile = SearchBy_EmailOrMobile
        self.EmailOrMobile = EmailOrMobile
    def factory(*args_, **kwargs_):
        if ConsumerSearchProfileType.subclass:
            return ConsumerSearchProfileType.subclass(*args_, **kwargs_)
        else:
            return ConsumerSearchProfileType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DOB(self): return self.DOB
    def set_DOB(self, DOB): self.DOB = DOB
    def validate_Date(self, value):
        # Validate type Date, a restriction on xs:date.
        pass
    def get_CountryOfResidence(self): return self.CountryOfResidence
    def set_CountryOfResidence(self, CountryOfResidence): self.CountryOfResidence = CountryOfResidence
    def get_SearchBy_EmailOrMobile(self): return self.SearchBy_EmailOrMobile
    def set_SearchBy_EmailOrMobile(self, SearchBy_EmailOrMobile): self.SearchBy_EmailOrMobile = SearchBy_EmailOrMobile
    def get_EmailOrMobile(self): return self.EmailOrMobile
    def set_EmailOrMobile(self, EmailOrMobile): self.EmailOrMobile = EmailOrMobile
    def export(self, outfile, level, namespace_='', name_='ConsumerSearchProfileType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConsumerSearchProfileType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ConsumerSearchProfileType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ConsumerSearchProfileType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DOB is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDOB>%s</%sDOB>%s' % (namespace_, self.gds_format_string(quote_xml(self.DOB).encode(ExternalEncoding), input_name='DOB'), namespace_, eol_))
        if self.CountryOfResidence is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryOfResidence>%s</%sCountryOfResidence>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryOfResidence).encode(ExternalEncoding), input_name='CountryOfResidence'), namespace_, eol_))
        if self.SearchBy_EmailOrMobile is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSearchBy_EmailOrMobile>%s</%sSearchBy_EmailOrMobile>%s' % (namespace_, self.gds_format_string(quote_xml(self.SearchBy_EmailOrMobile).encode(ExternalEncoding), input_name='SearchBy_EmailOrMobile'), namespace_, eol_))
        if self.EmailOrMobile is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEmailOrMobile>%s</%sEmailOrMobile>%s' % (namespace_, self.gds_format_string(quote_xml(self.EmailOrMobile).encode(ExternalEncoding), input_name='EmailOrMobile'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.DOB is not None or
            self.CountryOfResidence is not None or
            self.SearchBy_EmailOrMobile is not None or
            self.EmailOrMobile is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ConsumerSearchProfileType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.DOB is not None:
            showIndent(outfile, level)
            outfile.write('DOB=%s,\n' % quote_python(self.DOB).encode(ExternalEncoding))
        if self.CountryOfResidence is not None:
            showIndent(outfile, level)
            outfile.write('CountryOfResidence=%s,\n' % quote_python(self.CountryOfResidence).encode(ExternalEncoding))
        if self.SearchBy_EmailOrMobile is not None:
            showIndent(outfile, level)
            outfile.write('SearchBy_EmailOrMobile=%s,\n' % quote_python(self.SearchBy_EmailOrMobile).encode(ExternalEncoding))
        if self.EmailOrMobile is not None:
            showIndent(outfile, level)
            outfile.write('EmailOrMobile=%s,\n' % quote_python(self.EmailOrMobile).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DOB':
            DOB_ = child_.text
            DOB_ = self.gds_validate_string(DOB_, node, 'DOB')
            self.DOB = DOB_
            self.validate_Date(self.DOB)    # validate type Date
        elif nodeName_ == 'CountryOfResidence':
            CountryOfResidence_ = child_.text
            CountryOfResidence_ = self.gds_validate_string(CountryOfResidence_, node, 'CountryOfResidence')
            self.CountryOfResidence = CountryOfResidence_
        elif nodeName_ == 'SearchBy_EmailOrMobile':
            SearchBy_EmailOrMobile_ = child_.text
            SearchBy_EmailOrMobile_ = self.gds_validate_string(SearchBy_EmailOrMobile_, node, 'SearchBy_EmailOrMobile')
            self.SearchBy_EmailOrMobile = SearchBy_EmailOrMobile_
        elif nodeName_ == 'EmailOrMobile':
            EmailOrMobile_ = child_.text
            EmailOrMobile_ = self.gds_validate_string(EmailOrMobile_, node, 'EmailOrMobile')
            self.EmailOrMobile = EmailOrMobile_
# end class ConsumerSearchProfileType


class LoginDetails(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ConsumerID=None, LoginName=None, LastLoginSuccess=None, LastLoginTime=None):
        self.ConsumerID = ConsumerID
        self.LoginName = LoginName
        self.LastLoginSuccess = LastLoginSuccess
        self.LastLoginTime = LastLoginTime
    def factory(*args_, **kwargs_):
        if LoginDetails.subclass:
            return LoginDetails.subclass(*args_, **kwargs_)
        else:
            return LoginDetails(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ConsumerID(self): return self.ConsumerID
    def set_ConsumerID(self, ConsumerID): self.ConsumerID = ConsumerID
    def validate_ConsumerIDType(self, value):
        # Validate type ConsumerIDType, a restriction on xs:long.
        pass
    def get_LoginName(self): return self.LoginName
    def set_LoginName(self, LoginName): self.LoginName = LoginName
    def validate_LoginName(self, value):
        # Validate type LoginName, a restriction on Name.
        pass
    def get_LastLoginSuccess(self): return self.LastLoginSuccess
    def set_LastLoginSuccess(self, LastLoginSuccess): self.LastLoginSuccess = LastLoginSuccess
    def validate_LoginSuccessFlagType(self, value):
        # Validate type LoginSuccessFlagType, a restriction on xs:boolean.
        pass
    def get_LastLoginTime(self): return self.LastLoginTime
    def set_LastLoginTime(self, LastLoginTime): self.LastLoginTime = LastLoginTime
    def validate_LoginTimeType(self, value):
        # Validate type LoginTimeType, a restriction on xs:dateTime.
        pass
    def export(self, outfile, level, namespace_='', name_='LoginDetails', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LoginDetails')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='LoginDetails'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='LoginDetails', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ConsumerID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sConsumerID>%s</%sConsumerID>%s' % (namespace_, self.gds_format_integer(self.ConsumerID, input_name='ConsumerID'), namespace_, eol_))
        if self.LoginName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLoginName>%s</%sLoginName>%s' % (namespace_, self.gds_format_string(quote_xml(self.LoginName).encode(ExternalEncoding), input_name='LoginName'), namespace_, eol_))
        if self.LastLoginSuccess is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLastLoginSuccess>%s</%sLastLoginSuccess>%s' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.LastLoginSuccess)), input_name='LastLoginSuccess'), namespace_, eol_))
        if self.LastLoginTime is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLastLoginTime>%s</%sLastLoginTime>%s' % (namespace_, self.gds_format_string(quote_xml(self.LastLoginTime).encode(ExternalEncoding), input_name='LastLoginTime'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.ConsumerID is not None or
            self.LoginName is not None or
            self.LastLoginSuccess is not None or
            self.LastLoginTime is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='LoginDetails'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.ConsumerID is not None:
            showIndent(outfile, level)
            outfile.write('ConsumerID=%d,\n' % self.ConsumerID)
        if self.LoginName is not None:
            showIndent(outfile, level)
            outfile.write('LoginName=%s,\n' % quote_python(self.LoginName).encode(ExternalEncoding))
        if self.LastLoginSuccess is not None:
            showIndent(outfile, level)
            outfile.write('LastLoginSuccess=%s,\n' % self.LastLoginSuccess)
        if self.LastLoginTime is not None:
            showIndent(outfile, level)
            outfile.write('LastLoginTime=%s,\n' % quote_python(self.LastLoginTime).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ConsumerID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'ConsumerID')
            self.ConsumerID = ival_
            self.validate_ConsumerIDType(self.ConsumerID)    # validate type ConsumerIDType
        elif nodeName_ == 'LoginName':
            LoginName_ = child_.text
            LoginName_ = self.gds_validate_string(LoginName_, node, 'LoginName')
            self.LoginName = LoginName_
            self.validate_LoginName(self.LoginName)    # validate type LoginName
        elif nodeName_ == 'LastLoginSuccess':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'LastLoginSuccess')
            self.LastLoginSuccess = ival_
            self.validate_LoginSuccessFlagType(self.LastLoginSuccess)    # validate type LoginSuccessFlagType
        elif nodeName_ == 'LastLoginTime':
            LastLoginTime_ = child_.text
            LastLoginTime_ = self.gds_validate_string(LastLoginTime_, node, 'LastLoginTime')
            self.LastLoginTime = LastLoginTime_
            self.validate_LoginTimeType(self.LastLoginTime)    # validate type LoginTimeType
# end class LoginDetails


class UnsubscribePreferencesType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ConsumerDetails=None, Preference=None):
        self.ConsumerDetails = ConsumerDetails
        if Preference is None:
            self.Preference = []
        else:
            self.Preference = Preference
    def factory(*args_, **kwargs_):
        if UnsubscribePreferencesType.subclass:
            return UnsubscribePreferencesType.subclass(*args_, **kwargs_)
        else:
            return UnsubscribePreferencesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ConsumerDetails(self): return self.ConsumerDetails
    def set_ConsumerDetails(self, ConsumerDetails): self.ConsumerDetails = ConsumerDetails
    def get_Preference(self): return self.Preference
    def set_Preference(self, Preference): self.Preference = Preference
    def add_Preference(self, value): self.Preference.append(value)
    def insert_Preference(self, index, value): self.Preference[index] = value
    def export(self, outfile, level, namespace_='', name_='UnsubscribePreferencesType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UnsubscribePreferencesType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='UnsubscribePreferencesType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='UnsubscribePreferencesType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ConsumerDetails is not None:
            self.ConsumerDetails.export(outfile, level, namespace_, name_='ConsumerDetails', pretty_print=pretty_print)
        for Preference_ in self.Preference:
            Preference_.export(outfile, level, namespace_, name_='Preference', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.ConsumerDetails is not None or
            self.Preference
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='UnsubscribePreferencesType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.ConsumerDetails is not None:
            showIndent(outfile, level)
            outfile.write('ConsumerDetails=model_.ConsumerDetailsType(\n')
            self.ConsumerDetails.exportLiteral(outfile, level, name_='ConsumerDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('Preference=[\n')
        level += 1
        for Preference_ in self.Preference:
            showIndent(outfile, level)
            outfile.write('model_.UnsubscribePreferenceType(\n')
            Preference_.exportLiteral(outfile, level, name_='UnsubscribePreferenceType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ConsumerDetails':
            obj_ = ConsumerDetailsType.factory()
            obj_.build(child_)
            self.set_ConsumerDetails(obj_)
        elif nodeName_ == 'Preference':
            obj_ = UnsubscribePreferenceType.factory()
            obj_.build(child_)
            self.Preference.append(obj_)
# end class UnsubscribePreferencesType


class UnsubscribePreferenceType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, QuestionID=None, OptionID=None, OptionDetails=None, BrandID=None, CommunicationChannel=None):
        self.QuestionID = QuestionID
        self.OptionID = OptionID
        self.OptionDetails = OptionDetails
        self.BrandID = BrandID
        self.CommunicationChannel = CommunicationChannel
    def factory(*args_, **kwargs_):
        if UnsubscribePreferenceType.subclass:
            return UnsubscribePreferenceType.subclass(*args_, **kwargs_)
        else:
            return UnsubscribePreferenceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_QuestionID(self): return self.QuestionID
    def set_QuestionID(self, QuestionID): self.QuestionID = QuestionID
    def get_OptionID(self): return self.OptionID
    def set_OptionID(self, OptionID): self.OptionID = OptionID
    def get_OptionDetails(self): return self.OptionDetails
    def set_OptionDetails(self, OptionDetails): self.OptionDetails = OptionDetails
    def get_BrandID(self): return self.BrandID
    def set_BrandID(self, BrandID): self.BrandID = BrandID
    def validate_BrandID(self, value):
        # Validate type BrandID, a restriction on xs:long.
        pass
    def get_CommunicationChannel(self): return self.CommunicationChannel
    def set_CommunicationChannel(self, CommunicationChannel): self.CommunicationChannel = CommunicationChannel
    def validate_CommunicationChannel(self, value):
        # Validate type CommunicationChannel, a restriction on xs:byte.
        pass
    def export(self, outfile, level, namespace_='', name_='UnsubscribePreferenceType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UnsubscribePreferenceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='UnsubscribePreferenceType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='UnsubscribePreferenceType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.QuestionID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sQuestionID>%s</%sQuestionID>%s' % (namespace_, self.gds_format_integer(self.QuestionID, input_name='QuestionID'), namespace_, eol_))
        if self.OptionID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOptionID>%s</%sOptionID>%s' % (namespace_, self.gds_format_integer(self.OptionID, input_name='OptionID'), namespace_, eol_))
        if self.OptionDetails is not None:
            self.OptionDetails.export(outfile, level, namespace_, name_='OptionDetails', pretty_print=pretty_print)
        if self.BrandID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBrandID>%s</%sBrandID>%s' % (namespace_, self.gds_format_integer(self.BrandID, input_name='BrandID'), namespace_, eol_))
        if self.CommunicationChannel is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCommunicationChannel>%s</%sCommunicationChannel>%s' % (namespace_, self.gds_format_integer(self.CommunicationChannel, input_name='CommunicationChannel'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.QuestionID is not None or
            self.OptionID is not None or
            self.OptionDetails is not None or
            self.BrandID is not None or
            self.CommunicationChannel is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='UnsubscribePreferenceType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.QuestionID is not None:
            showIndent(outfile, level)
            outfile.write('QuestionID=%d,\n' % self.QuestionID)
        if self.OptionID is not None:
            showIndent(outfile, level)
            outfile.write('OptionID=%d,\n' % self.OptionID)
        if self.OptionDetails is not None:
            showIndent(outfile, level)
            outfile.write('OptionDetails=model_.CommunicationChannelDetailsType(\n')
            self.OptionDetails.exportLiteral(outfile, level, name_='OptionDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.BrandID is not None:
            showIndent(outfile, level)
            outfile.write('BrandID=%d,\n' % self.BrandID)
        if self.CommunicationChannel is not None:
            showIndent(outfile, level)
            outfile.write('CommunicationChannel=%d,\n' % self.CommunicationChannel)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'QuestionID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'QuestionID')
            self.QuestionID = ival_
        elif nodeName_ == 'OptionID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'OptionID')
            self.OptionID = ival_
        elif nodeName_ == 'OptionDetails':
            obj_ = CommunicationChannelDetailsType.factory()
            obj_.build(child_)
            self.set_OptionDetails(obj_)
        elif nodeName_ == 'BrandID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'BrandID')
            self.BrandID = ival_
            self.validate_BrandID(self.BrandID)    # validate type BrandID
        elif nodeName_ == 'CommunicationChannel':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'CommunicationChannel')
            self.CommunicationChannel = ival_
            self.validate_CommunicationChannel(self.CommunicationChannel)    # validate type CommunicationChannel
# end class UnsubscribePreferenceType


class CommunicationChannelDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Postal=None, Email=None, Phone=None):
        if Postal is None:
            self.Postal = []
        else:
            self.Postal = Postal
        if Email is None:
            self.Email = []
        else:
            self.Email = Email
        if Phone is None:
            self.Phone = []
        else:
            self.Phone = Phone
    def factory(*args_, **kwargs_):
        if CommunicationChannelDetailsType.subclass:
            return CommunicationChannelDetailsType.subclass(*args_, **kwargs_)
        else:
            return CommunicationChannelDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Postal(self): return self.Postal
    def set_Postal(self, Postal): self.Postal = Postal
    def add_Postal(self, value): self.Postal.append(value)
    def insert_Postal(self, index, value): self.Postal[index] = value
    def get_Email(self): return self.Email
    def set_Email(self, Email): self.Email = Email
    def add_Email(self, value): self.Email.append(value)
    def insert_Email(self, index, value): self.Email[index] = value
    def get_Phone(self): return self.Phone
    def set_Phone(self, Phone): self.Phone = Phone
    def add_Phone(self, value): self.Phone.append(value)
    def insert_Phone(self, index, value): self.Phone[index] = value
    def export(self, outfile, level, namespace_='', name_='CommunicationChannelDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CommunicationChannelDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='CommunicationChannelDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='CommunicationChannelDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Postal_ in self.Postal:
            Postal_.export(outfile, level, namespace_, name_='Postal', pretty_print=pretty_print)
        for Email_ in self.Email:
            Email_.export(outfile, level, namespace_, name_='Email', pretty_print=pretty_print)
        for Phone_ in self.Phone:
            Phone_.export(outfile, level, namespace_, name_='Phone', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.Postal or
            self.Email or
            self.Phone
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='CommunicationChannelDetailsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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('Postal=[\n')
        level += 1
        for Postal_ in self.Postal:
            showIndent(outfile, level)
            outfile.write('model_.AddressDetailsType(\n')
            Postal_.exportLiteral(outfile, level, name_='AddressDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('Email=[\n')
        level += 1
        for Email_ in self.Email:
            showIndent(outfile, level)
            outfile.write('model_.EmailDetailsType(\n')
            Email_.exportLiteral(outfile, level, name_='EmailDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('Phone=[\n')
        level += 1
        for Phone_ in self.Phone:
            showIndent(outfile, level)
            outfile.write('model_.PhoneDetailsType(\n')
            Phone_.exportLiteral(outfile, level, name_='PhoneDetailsType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Postal':
            obj_ = AddressDetailsType.factory()
            obj_.build(child_)
            self.Postal.append(obj_)
        elif nodeName_ == 'Email':
            obj_ = EmailDetailsType.factory()
            obj_.build(child_)
            self.Email.append(obj_)
        elif nodeName_ == 'Phone':
            obj_ = PhoneDetailsType.factory()
            obj_.build(child_)
            self.Phone.append(obj_)
# end class CommunicationChannelDetailsType


class ConsumerDetailsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Title=None, Suffix=None, FirstName=None, MiddleName=None, LastName=None, MaternalLastName=None, DOB=None, CountryOfResidence=None, PromoCode=None, AcquisitionSource=None):
        self.Title = Title
        self.Suffix = Suffix
        self.FirstName = FirstName
        self.MiddleName = MiddleName
        self.LastName = LastName
        self.MaternalLastName = MaternalLastName
        self.DOB = DOB
        self.CountryOfResidence = CountryOfResidence
        self.PromoCode = PromoCode
        self.AcquisitionSource = AcquisitionSource
    def factory(*args_, **kwargs_):
        if ConsumerDetailsType.subclass:
            return ConsumerDetailsType.subclass(*args_, **kwargs_)
        else:
            return ConsumerDetailsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Title(self): return self.Title
    def set_Title(self, Title): self.Title = Title
    def validate_Title(self, value):
        # Validate type Title, a restriction on Consumer.
        pass
    def get_Suffix(self): return self.Suffix
    def set_Suffix(self, Suffix): self.Suffix = Suffix
    def validate_Suffix(self, value):
        # Validate type Suffix, a restriction on xs:string.
        pass
    def get_FirstName(self): return self.FirstName
    def set_FirstName(self, FirstName): self.FirstName = FirstName
    def validate_FirstName(self, value):
        # Validate type FirstName, a restriction on Name.
        pass
    def get_MiddleName(self): return self.MiddleName
    def set_MiddleName(self, MiddleName): self.MiddleName = MiddleName
    def validate_MiddleName(self, value):
        # Validate type MiddleName, a restriction on Name.
        pass
    def get_LastName(self): return self.LastName
    def set_LastName(self, LastName): self.LastName = LastName
    def validate_LastName(self, value):
        # Validate type LastName, a restriction on Name.
        pass
    def get_MaternalLastName(self): return self.MaternalLastName
    def set_MaternalLastName(self, MaternalLastName): self.MaternalLastName = MaternalLastName
    def get_DOB(self): return self.DOB
    def set_DOB(self, DOB): self.DOB = DOB
    def validate_Date(self, value):
        # Validate type Date, a restriction on xs:date.
        pass
    def get_CountryOfResidence(self): return self.CountryOfResidence
    def set_CountryOfResidence(self, CountryOfResidence): self.CountryOfResidence = CountryOfResidence
    def validate_CountryName(self, value):
        # Validate type CountryName, a restriction on Name.
        pass
    def get_PromoCode(self): return self.PromoCode
    def set_PromoCode(self, PromoCode): self.PromoCode = PromoCode
    def validate_PromoCodeDesc(self, value):
        # Validate type PromoCodeDesc, a restriction on Name.
        pass
    def get_AcquisitionSource(self): return self.AcquisitionSource
    def set_AcquisitionSource(self, AcquisitionSource): self.AcquisitionSource = AcquisitionSource
    def validate_AcquisitionSourceType(self, value):
        # Validate type AcquisitionSourceType, a restriction on Name.
        pass
    def export(self, outfile, level, namespace_='', name_='ConsumerDetailsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConsumerDetailsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ConsumerDetailsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ConsumerDetailsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Title is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sTitle>%s</%sTitle>%s' % (namespace_, self.gds_format_string(quote_xml(self.Title).encode(ExternalEncoding), input_name='Title'), namespace_, eol_))
        if self.Suffix is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSuffix>%s</%sSuffix>%s' % (namespace_, self.gds_format_string(quote_xml(self.Suffix).encode(ExternalEncoding), input_name='Suffix'), namespace_, eol_))
        if self.FirstName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFirstName>%s</%sFirstName>%s' % (namespace_, self.gds_format_string(quote_xml(self.FirstName).encode(ExternalEncoding), input_name='FirstName'), namespace_, eol_))
        if self.MiddleName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMiddleName>%s</%sMiddleName>%s' % (namespace_, self.gds_format_string(quote_xml(self.MiddleName).encode(ExternalEncoding), input_name='MiddleName'), namespace_, eol_))
        if self.LastName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLastName>%s</%sLastName>%s' % (namespace_, self.gds_format_string(quote_xml(self.LastName).encode(ExternalEncoding), input_name='LastName'), namespace_, eol_))
        if self.MaternalLastName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMaternalLastName>%s</%sMaternalLastName>%s' % (namespace_, self.gds_format_string(quote_xml(self.MaternalLastName).encode(ExternalEncoding), input_name='MaternalLastName'), namespace_, eol_))
        if self.DOB is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDOB>%s</%sDOB>%s' % (namespace_, self.gds_format_string(quote_xml(self.DOB).encode(ExternalEncoding), input_name='DOB'), namespace_, eol_))
        if self.CountryOfResidence is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCountryOfResidence>%s</%sCountryOfResidence>%s' % (namespace_, self.gds_format_string(quote_xml(self.CountryOfResidence).encode(ExternalEncoding), input_name='CountryOfResidence'), namespace_, eol_))
        if self.PromoCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPromoCode>%s</%sPromoCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.PromoCode).encode(ExternalEncoding), input_name='PromoCode'), namespace_, eol_))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAcquisitionSource>%s</%sAcquisitionSource>%s' % (namespace_, self.gds_format_string(quote_xml(self.AcquisitionSource).encode(ExternalEncoding), input_name='AcquisitionSource'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.Title is not None or
            self.Suffix is not None or
            self.FirstName is not None or
            self.MiddleName is not None or
            self.LastName is not None or
            self.MaternalLastName is not None or
            self.DOB is not None or
            self.CountryOfResidence is not None or
            self.PromoCode is not None or
            self.AcquisitionSource is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ConsumerDetailsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.Title is not None:
            showIndent(outfile, level)
            outfile.write('Title=%s,\n' % quote_python(self.Title).encode(ExternalEncoding))
        if self.Suffix is not None:
            showIndent(outfile, level)
            outfile.write('Suffix=%s,\n' % quote_python(self.Suffix).encode(ExternalEncoding))
        if self.FirstName is not None:
            showIndent(outfile, level)
            outfile.write('FirstName=%s,\n' % quote_python(self.FirstName).encode(ExternalEncoding))
        if self.MiddleName is not None:
            showIndent(outfile, level)
            outfile.write('MiddleName=%s,\n' % quote_python(self.MiddleName).encode(ExternalEncoding))
        if self.LastName is not None:
            showIndent(outfile, level)
            outfile.write('LastName=%s,\n' % quote_python(self.LastName).encode(ExternalEncoding))
        if self.MaternalLastName is not None:
            showIndent(outfile, level)
            outfile.write('MaternalLastName=%s,\n' % quote_python(self.MaternalLastName).encode(ExternalEncoding))
        if self.DOB is not None:
            showIndent(outfile, level)
            outfile.write('DOB=%s,\n' % quote_python(self.DOB).encode(ExternalEncoding))
        if self.CountryOfResidence is not None:
            showIndent(outfile, level)
            outfile.write('CountryOfResidence=%s,\n' % quote_python(self.CountryOfResidence).encode(ExternalEncoding))
        if self.PromoCode is not None:
            showIndent(outfile, level)
            outfile.write('PromoCode=%s,\n' % quote_python(self.PromoCode).encode(ExternalEncoding))
        if self.AcquisitionSource is not None:
            showIndent(outfile, level)
            outfile.write('AcquisitionSource=%s,\n' % quote_python(self.AcquisitionSource).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Title':
            Title_ = child_.text
            Title_ = self.gds_validate_string(Title_, node, 'Title')
            self.Title = Title_
            self.validate_Title(self.Title)    # validate type Title
        elif nodeName_ == 'Suffix':
            Suffix_ = child_.text
            Suffix_ = self.gds_validate_string(Suffix_, node, 'Suffix')
            self.Suffix = Suffix_
            self.validate_Suffix(self.Suffix)    # validate type Suffix
        elif nodeName_ == 'FirstName':
            FirstName_ = child_.text
            FirstName_ = self.gds_validate_string(FirstName_, node, 'FirstName')
            self.FirstName = FirstName_
            self.validate_FirstName(self.FirstName)    # validate type FirstName
        elif nodeName_ == 'MiddleName':
            MiddleName_ = child_.text
            MiddleName_ = self.gds_validate_string(MiddleName_, node, 'MiddleName')
            self.MiddleName = MiddleName_
            self.validate_MiddleName(self.MiddleName)    # validate type MiddleName
        elif nodeName_ == 'LastName':
            LastName_ = child_.text
            LastName_ = self.gds_validate_string(LastName_, node, 'LastName')
            self.LastName = LastName_
            self.validate_LastName(self.LastName)    # validate type LastName
        elif nodeName_ == 'MaternalLastName':
            MaternalLastName_ = child_.text
            MaternalLastName_ = self.gds_validate_string(MaternalLastName_, node, 'MaternalLastName')
            self.MaternalLastName = MaternalLastName_
            self.validate_LastName(self.MaternalLastName)    # validate type LastName
        elif nodeName_ == 'DOB':
            DOB_ = child_.text
            DOB_ = self.gds_validate_string(DOB_, node, 'DOB')
            self.DOB = DOB_
            self.validate_Date(self.DOB)    # validate type Date
        elif nodeName_ == 'CountryOfResidence':
            CountryOfResidence_ = child_.text
            CountryOfResidence_ = self.gds_validate_string(CountryOfResidence_, node, 'CountryOfResidence')
            self.CountryOfResidence = CountryOfResidence_
            self.validate_CountryName(self.CountryOfResidence)    # validate type CountryName
        elif nodeName_ == 'PromoCode':
            PromoCode_ = child_.text
            PromoCode_ = self.gds_validate_string(PromoCode_, node, 'PromoCode')
            self.PromoCode = PromoCode_
            self.validate_PromoCodeDesc(self.PromoCode)    # validate type PromoCodeDesc
        elif nodeName_ == 'AcquisitionSource':
            AcquisitionSource_ = child_.text
            AcquisitionSource_ = self.gds_validate_string(AcquisitionSource_, node, 'AcquisitionSource')
            self.AcquisitionSource = AcquisitionSource_
            self.validate_AcquisitionSourceType(self.AcquisitionSource)    # validate type AcquisitionSourceType
# end class ConsumerDetailsType


class ResponseType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ResponseCode=None, ResponseMessage=None):
        self.ResponseCode = ResponseCode
        self.ResponseMessage = ResponseMessage
    def factory(*args_, **kwargs_):
        if ResponseType.subclass:
            return ResponseType.subclass(*args_, **kwargs_)
        else:
            return ResponseType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ResponseCode(self): return self.ResponseCode
    def set_ResponseCode(self, ResponseCode): self.ResponseCode = ResponseCode
    def validate_ResponseCode(self, value):
        # Validate type ResponseCode, a restriction on xs:string.
        pass
    def get_ResponseMessage(self): return self.ResponseMessage
    def set_ResponseMessage(self, ResponseMessage): self.ResponseMessage = ResponseMessage
    def validate_ResponseMessage(self, value):
        # Validate type ResponseMessage, a restriction on xs:string.
        pass
    def export(self, outfile, level, namespace_='', name_='ResponseType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ResponseType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ResponseType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ResponseType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ResponseCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sResponseCode>%s</%sResponseCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.ResponseCode).encode(ExternalEncoding), input_name='ResponseCode'), namespace_, eol_))
        if self.ResponseMessage is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sResponseMessage>%s</%sResponseMessage>%s' % (namespace_, self.gds_format_string(quote_xml(self.ResponseMessage).encode(ExternalEncoding), input_name='ResponseMessage'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.ResponseCode is not None or
            self.ResponseMessage is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ResponseType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.ResponseCode is not None:
            showIndent(outfile, level)
            outfile.write('ResponseCode=%s,\n' % quote_python(self.ResponseCode).encode(ExternalEncoding))
        if self.ResponseMessage is not None:
            showIndent(outfile, level)
            outfile.write('ResponseMessage=%s,\n' % quote_python(self.ResponseMessage).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ResponseCode':
            ResponseCode_ = child_.text
            ResponseCode_ = self.gds_validate_string(ResponseCode_, node, 'ResponseCode')
            self.ResponseCode = ResponseCode_
            self.validate_ResponseCode(self.ResponseCode)    # validate type ResponseCode
        elif nodeName_ == 'ResponseMessage':
            ResponseMessage_ = child_.text
            ResponseMessage_ = self.gds_validate_string(ResponseMessage_, node, 'ResponseMessage')
            self.ResponseMessage = ResponseMessage_
            self.validate_ResponseMessage(self.ResponseMessage)    # validate type ResponseMessage
# end class ResponseType


class ResponseListType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Response=None):
        if Response is None:
            self.Response = []
        else:
            self.Response = Response
    def factory(*args_, **kwargs_):
        if ResponseListType.subclass:
            return ResponseListType.subclass(*args_, **kwargs_)
        else:
            return ResponseListType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Response(self): return self.Response
    def set_Response(self, Response): self.Response = Response
    def add_Response(self, value): self.Response.append(value)
    def insert_Response(self, index, value): self.Response[index] = value
    def export(self, outfile, level, namespace_='', name_='ResponseListType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ResponseListType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ResponseListType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ResponseListType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Response_ in self.Response:
            Response_.export(outfile, level, namespace_, name_='Response', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.Response
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ResponseListType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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('Response=[\n')
        level += 1
        for Response_ in self.Response:
            showIndent(outfile, level)
            outfile.write('model_.ResponseType(\n')
            Response_.exportLiteral(outfile, level, name_='ResponseType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Response':
            obj_ = ResponseType.factory()
            obj_.build(child_)
            self.Response.append(obj_)
# end class ResponseListType


class ConsumerIDAndApplicationsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Consumer=None):
        if Consumer is None:
            self.Consumer = []
        else:
            self.Consumer = Consumer
    def factory(*args_, **kwargs_):
        if ConsumerIDAndApplicationsType.subclass:
            return ConsumerIDAndApplicationsType.subclass(*args_, **kwargs_)
        else:
            return ConsumerIDAndApplicationsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Consumer(self): return self.Consumer
    def set_Consumer(self, Consumer): self.Consumer = Consumer
    def add_Consumer(self, value): self.Consumer.append(value)
    def insert_Consumer(self, index, value): self.Consumer[index] = value
    def export(self, outfile, level, namespace_='', name_='ConsumerIDAndApplicationsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConsumerIDAndApplicationsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ConsumerIDAndApplicationsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ConsumerIDAndApplicationsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Consumer_ in self.Consumer:
            Consumer_.export(outfile, level, namespace_, name_='Consumer', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.Consumer
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ConsumerIDAndApplicationsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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('Consumer=[\n')
        level += 1
        for Consumer_ in self.Consumer:
            showIndent(outfile, level)
            outfile.write('model_.ConsumerIDAndApplicationType(\n')
            Consumer_.exportLiteral(outfile, level, name_='ConsumerIDAndApplicationType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Consumer':
            obj_ = ConsumerIDAndApplicationType.factory()
            obj_.build(child_)
            self.Consumer.append(obj_)
# end class ConsumerIDAndApplicationsType


class ConsumerIDAndApplicationType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ConsumerID=None, LoginName=None, ApplicationName=None):
        self.ConsumerID = ConsumerID
        self.LoginName = LoginName
        self.ApplicationName = ApplicationName
    def factory(*args_, **kwargs_):
        if ConsumerIDAndApplicationType.subclass:
            return ConsumerIDAndApplicationType.subclass(*args_, **kwargs_)
        else:
            return ConsumerIDAndApplicationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ConsumerID(self): return self.ConsumerID
    def set_ConsumerID(self, ConsumerID): self.ConsumerID = ConsumerID
    def validate_ConsumerIDType(self, value):
        # Validate type ConsumerIDType, a restriction on xs:long.
        pass
    def get_LoginName(self): return self.LoginName
    def set_LoginName(self, LoginName): self.LoginName = LoginName
    def validate_LoginName(self, value):
        # Validate type LoginName, a restriction on Name.
        pass
    def get_ApplicationName(self): return self.ApplicationName
    def set_ApplicationName(self, ApplicationName): self.ApplicationName = ApplicationName
    def validate_ApplicationNameType(self, value):
        # Validate type ApplicationNameType, a restriction on xs:string.
        pass
    def export(self, outfile, level, namespace_='', name_='ConsumerIDAndApplicationType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConsumerIDAndApplicationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ConsumerIDAndApplicationType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ConsumerIDAndApplicationType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ConsumerID is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sConsumerID>%s</%sConsumerID>%s' % (namespace_, self.gds_format_integer(self.ConsumerID, input_name='ConsumerID'), namespace_, eol_))
        if self.LoginName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLoginName>%s</%sLoginName>%s' % (namespace_, self.gds_format_string(quote_xml(self.LoginName).encode(ExternalEncoding), input_name='LoginName'), namespace_, eol_))
        if self.ApplicationName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sApplicationName>%s</%sApplicationName>%s' % (namespace_, self.gds_format_string(quote_xml(self.ApplicationName).encode(ExternalEncoding), input_name='ApplicationName'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.ConsumerID is not None or
            self.LoginName is not None or
            self.ApplicationName is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ConsumerIDAndApplicationType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.ConsumerID is not None:
            showIndent(outfile, level)
            outfile.write('ConsumerID=%d,\n' % self.ConsumerID)
        if self.LoginName is not None:
            showIndent(outfile, level)
            outfile.write('LoginName=%s,\n' % quote_python(self.LoginName).encode(ExternalEncoding))
        if self.ApplicationName is not None:
            showIndent(outfile, level)
            outfile.write('ApplicationName=%s,\n' % quote_python(self.ApplicationName).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ConsumerID':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'ConsumerID')
            self.ConsumerID = ival_
            self.validate_ConsumerIDType(self.ConsumerID)    # validate type ConsumerIDType
        elif nodeName_ == 'LoginName':
            LoginName_ = child_.text
            LoginName_ = self.gds_validate_string(LoginName_, node, 'LoginName')
            self.LoginName = LoginName_
            self.validate_LoginName(self.LoginName)    # validate type LoginName
        elif nodeName_ == 'ApplicationName':
            ApplicationName_ = child_.text
            ApplicationName_ = self.gds_validate_string(ApplicationName_, node, 'ApplicationName')
            self.ApplicationName = ApplicationName_
            self.validate_ApplicationNameType(self.ApplicationName)    # validate type ApplicationNameType
# end class ConsumerIDAndApplicationType


class ProfanityCheckType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Locale=None, Language=None, EmailBody=None):
        self.Locale = Locale
        self.Language = Language
        self.EmailBody = EmailBody
    def factory(*args_, **kwargs_):
        if ProfanityCheckType.subclass:
            return ProfanityCheckType.subclass(*args_, **kwargs_)
        else:
            return ProfanityCheckType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Locale(self): return self.Locale
    def set_Locale(self, Locale): self.Locale = Locale
    def validate_LocaleCode(self, value):
        # Validate type LocaleCode, a restriction on xs:string.
        pass
    def get_Language(self): return self.Language
    def set_Language(self, Language): self.Language = Language
    def validate_LanguageCode(self, value):
        # Validate type LanguageCode, a restriction on xs:string.
        pass
    def get_EmailBody(self): return self.EmailBody
    def set_EmailBody(self, EmailBody): self.EmailBody = EmailBody
    def validate_EmailBody(self, value):
        # Validate type EmailBody, a restriction on xs:string.
        pass
    def export(self, outfile, level, namespace_='', name_='ProfanityCheckType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ProfanityCheckType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='ProfanityCheckType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='ProfanityCheckType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Locale is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLocale>%s</%sLocale>%s' % (namespace_, self.gds_format_string(quote_xml(self.Locale).encode(ExternalEncoding), input_name='Locale'), namespace_, eol_))
        if self.Language is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLanguage>%s</%sLanguage>%s' % (namespace_, self.gds_format_string(quote_xml(self.Language).encode(ExternalEncoding), input_name='Language'), namespace_, eol_))
        if self.EmailBody is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sEmailBody>%s</%sEmailBody>%s' % (namespace_, self.gds_format_string(quote_xml(self.EmailBody).encode(ExternalEncoding), input_name='EmailBody'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.Locale is not None or
            self.Language is not None or
            self.EmailBody is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='ProfanityCheckType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.Locale is not None:
            showIndent(outfile, level)
            outfile.write('Locale=%s,\n' % quote_python(self.Locale).encode(ExternalEncoding))
        if self.Language is not None:
            showIndent(outfile, level)
            outfile.write('Language=%s,\n' % quote_python(self.Language).encode(ExternalEncoding))
        if self.EmailBody is not None:
            showIndent(outfile, level)
            outfile.write('EmailBody=%s,\n' % quote_python(self.EmailBody).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Locale':
            Locale_ = child_.text
            Locale_ = self.gds_validate_string(Locale_, node, 'Locale')
            self.Locale = Locale_
            self.validate_LocaleCode(self.Locale)    # validate type LocaleCode
        elif nodeName_ == 'Language':
            Language_ = child_.text
            Language_ = self.gds_validate_string(Language_, node, 'Language')
            self.Language = Language_
            self.validate_LanguageCode(self.Language)    # validate type LanguageCode
        elif nodeName_ == 'EmailBody':
            EmailBody_ = child_.text
            EmailBody_ = self.gds_validate_string(EmailBody_, node, 'EmailBody')
            self.EmailBody = EmailBody_
            self.validate_EmailBody(self.EmailBody)    # validate type EmailBody
# end class ProfanityCheckType


class SearchDataType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, QuestionCategory=None):
        if QuestionCategory is None:
            self.QuestionCategory = []
        else:
            self.QuestionCategory = QuestionCategory
    def factory(*args_, **kwargs_):
        if SearchDataType.subclass:
            return SearchDataType.subclass(*args_, **kwargs_)
        else:
            return SearchDataType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_QuestionCategory(self): return self.QuestionCategory
    def set_QuestionCategory(self, QuestionCategory): self.QuestionCategory = QuestionCategory
    def add_QuestionCategory(self, value): self.QuestionCategory.append(value)
    def insert_QuestionCategory(self, index, value): self.QuestionCategory[index] = value
    def export(self, outfile, level, namespace_='', name_='SearchDataType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SearchDataType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='SearchDataType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SearchDataType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for QuestionCategory_ in self.QuestionCategory:
            QuestionCategory_.export(outfile, level, namespace_, name_='QuestionCategory', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.QuestionCategory
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SearchDataType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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('QuestionCategory=[\n')
        level += 1
        for QuestionCategory_ in self.QuestionCategory:
            showIndent(outfile, level)
            outfile.write('model_.CategoryType(\n')
            QuestionCategory_.exportLiteral(outfile, level, name_='CategoryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'QuestionCategory':
            obj_ = CategoryType.factory()
            obj_.build(child_)
            self.QuestionCategory.append(obj_)
# end class SearchDataType


class CountryType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, CountryCode=None, DefaultLanguageCode=None, OtherLanguageCode=None, CurrencyCode=None, DefaultTimeZone=None, OtherTimeZones=None, RedirectURL=None):
        self.CountryCode = CountryCode
        self.DefaultLanguageCode = DefaultLanguageCode
        if OtherLanguageCode is None:
            self.OtherLanguageCode = []
        else:
            self.OtherLanguageCode = OtherLanguageCode
        self.CurrencyCode = CurrencyCode
        self.DefaultTimeZone = DefaultTimeZone
        if OtherTimeZones is None:
            self.OtherTimeZones = []
        else:
            self.OtherTimeZones = OtherTimeZones
        self.RedirectURL = RedirectURL
    def factory(*args_, **kwargs_):
        if CountryType.subclass:
            return CountryType.subclass(*args_, **kwargs_)
        else:
            return CountryType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CountryCode(self): return self.CountryCode
    def set_CountryCode(self, CountryCode): self.CountryCode = CountryCode
    def validate_CountryName(self, value):
        # Validate type CountryName, a restriction on Name.
        pass
    def get_DefaultLanguageCode(self): return self.DefaultLanguageCode
    def set_DefaultLanguageCode(self, DefaultLanguageCode): self.DefaultLanguageCode = DefaultLanguageCode
    def validate_LanguageCode(self, value):
        # Validate type LanguageCode, a restriction on xs:string.
        pass
    def get_OtherLanguageCode(self): return self.OtherLanguageCode
    def set_OtherLanguageCode(self, OtherLanguageCode): self.OtherLanguageCode = OtherLanguageCode
    def add_OtherLanguageCode(self, value): self.OtherLanguageCode.append(value)
    def insert_OtherLanguageCode(self, index, value): self.OtherLanguageCode[index] = value
    def get_CurrencyCode(self): return self.CurrencyCode
    def set_CurrencyCode(self, CurrencyCode): self.CurrencyCode = CurrencyCode
    def validate_CurrencyCode(self, value):
        # Validate type CurrencyCode, a restriction on xs:string.
        pass
    def get_DefaultTimeZone(self): return self.DefaultTimeZone
    def set_DefaultTimeZone(self, DefaultTimeZone): self.DefaultTimeZone = DefaultTimeZone
    def get_OtherTimeZones(self): return self.OtherTimeZones
    def set_OtherTimeZones(self, OtherTimeZones): self.OtherTimeZones = OtherTimeZones
    def add_OtherTimeZones(self, value): self.OtherTimeZones.append(value)
    def insert_OtherTimeZones(self, index, value): self.OtherTimeZones[index] = value
    def get_RedirectURL(self): return self.RedirectURL
    def set_RedirectURL(self, RedirectURL): self.RedirectURL = RedirectURL
    def export(self, outfile, level, namespace_='', name_='CountryType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CountryType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='CountryType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='CountryType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            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.DefaultLanguageCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDefaultLanguageCode>%s</%sDefaultLanguageCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.DefaultLanguageCode).encode(ExternalEncoding), input_name='DefaultLanguageCode'), namespace_, eol_))
        for OtherLanguageCode_ in self.OtherLanguageCode:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOtherLanguageCode>%s</%sOtherLanguageCode>%s' % (namespace_, self.gds_format_string(quote_xml(OtherLanguageCode_).encode(ExternalEncoding), input_name='OtherLanguageCode'), namespace_, eol_))
        if self.CurrencyCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCurrencyCode>%s</%sCurrencyCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.CurrencyCode).encode(ExternalEncoding), input_name='CurrencyCode'), namespace_, eol_))
        if self.DefaultTimeZone is not None:
            self.DefaultTimeZone.export(outfile, level, namespace_, name_='DefaultTimeZone', pretty_print=pretty_print)
        for OtherTimeZones_ in self.OtherTimeZones:
            OtherTimeZones_.export(outfile, level, namespace_, name_='OtherTimeZones', pretty_print=pretty_print)
        if self.RedirectURL is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRedirectURL>%s</%sRedirectURL>%s' % (namespace_, self.gds_format_string(quote_xml(self.RedirectURL).encode(ExternalEncoding), input_name='RedirectURL'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.CountryCode is not None or
            self.DefaultLanguageCode is not None or
            self.OtherLanguageCode or
            self.CurrencyCode is not None or
            self.DefaultTimeZone is not None or
            self.OtherTimeZones or
            self.RedirectURL is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='CountryType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.CountryCode is not None:
            showIndent(outfile, level)
            outfile.write('CountryCode=%s,\n' % quote_python(self.CountryCode).encode(ExternalEncoding))
        if self.DefaultLanguageCode is not None:
            showIndent(outfile, level)
            outfile.write('DefaultLanguageCode=%s,\n' % quote_python(self.DefaultLanguageCode).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('OtherLanguageCode=[\n')
        level += 1
        for OtherLanguageCode_ in self.OtherLanguageCode:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(OtherLanguageCode_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.CurrencyCode is not None:
            showIndent(outfile, level)
            outfile.write('CurrencyCode=%s,\n' % quote_python(self.CurrencyCode).encode(ExternalEncoding))
        if self.DefaultTimeZone is not None:
            showIndent(outfile, level)
            outfile.write('DefaultTimeZone=model_.TimeZonesType(\n')
            self.DefaultTimeZone.exportLiteral(outfile, level, name_='DefaultTimeZone')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('OtherTimeZones=[\n')
        level += 1
        for OtherTimeZones_ in self.OtherTimeZones:
            showIndent(outfile, level)
            outfile.write('model_.TimeZonesType(\n')
            OtherTimeZones_.exportLiteral(outfile, level, name_='TimeZonesType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.RedirectURL is not None:
            showIndent(outfile, level)
            outfile.write('RedirectURL=%s,\n' % quote_python(self.RedirectURL).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CountryCode':
            CountryCode_ = child_.text
            CountryCode_ = self.gds_validate_string(CountryCode_, node, 'CountryCode')
            self.CountryCode = CountryCode_
            self.validate_CountryName(self.CountryCode)    # validate type CountryName
        elif nodeName_ == 'DefaultLanguageCode':
            DefaultLanguageCode_ = child_.text
            DefaultLanguageCode_ = self.gds_validate_string(DefaultLanguageCode_, node, 'DefaultLanguageCode')
            self.DefaultLanguageCode = DefaultLanguageCode_
            self.validate_LanguageCode(self.DefaultLanguageCode)    # validate type LanguageCode
        elif nodeName_ == 'OtherLanguageCode':
            OtherLanguageCode_ = child_.text
            OtherLanguageCode_ = self.gds_validate_string(OtherLanguageCode_, node, 'OtherLanguageCode')
            self.OtherLanguageCode.append(OtherLanguageCode_)
            self.validate_LanguageCode(self.OtherLanguageCode)    # validate type LanguageCode
        elif nodeName_ == 'CurrencyCode':
            CurrencyCode_ = child_.text
            CurrencyCode_ = self.gds_validate_string(CurrencyCode_, node, 'CurrencyCode')
            self.CurrencyCode = CurrencyCode_
            self.validate_CurrencyCode(self.CurrencyCode)    # validate type CurrencyCode
        elif nodeName_ == 'DefaultTimeZone':
            obj_ = TimeZonesType.factory()
            obj_.build(child_)
            self.set_DefaultTimeZone(obj_)
        elif nodeName_ == 'OtherTimeZones':
            obj_ = TimeZonesType.factory()
            obj_.build(child_)
            self.OtherTimeZones.append(obj_)
        elif nodeName_ == 'RedirectURL':
            RedirectURL_ = child_.text
            RedirectURL_ = self.gds_validate_string(RedirectURL_, node, 'RedirectURL')
            self.RedirectURL = RedirectURL_
# end class CountryType


class TimeZonesType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, TimeZone=None, Offset=None):
        self.TimeZone = TimeZone
        self.Offset = Offset
    def factory(*args_, **kwargs_):
        if TimeZonesType.subclass:
            return TimeZonesType.subclass(*args_, **kwargs_)
        else:
            return TimeZonesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeZone(self): return self.TimeZone
    def set_TimeZone(self, TimeZone): self.TimeZone = TimeZone
    def validate_TimeZoneType(self, value):
        # Validate type TimeZoneType, a restriction on xs:string.
        pass
    def get_Offset(self): return self.Offset
    def set_Offset(self, Offset): self.Offset = Offset
    def validate_OffsetType(self, value):
        # Validate type OffsetType, a restriction on xs:string.
        pass
    def export(self, outfile, level, namespace_='', name_='TimeZonesType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeZonesType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='TimeZonesType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='TimeZonesType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeZone is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sTimeZone>%s</%sTimeZone>%s' % (namespace_, self.gds_format_string(quote_xml(self.TimeZone).encode(ExternalEncoding), input_name='TimeZone'), namespace_, eol_))
        if self.Offset is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOffset>%s</%sOffset>%s' % (namespace_, self.gds_format_string(quote_xml(self.Offset).encode(ExternalEncoding), input_name='Offset'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.TimeZone is not None or
            self.Offset is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='TimeZonesType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.TimeZone is not None:
            showIndent(outfile, level)
            outfile.write('TimeZone=%s,\n' % quote_python(self.TimeZone).encode(ExternalEncoding))
        if self.Offset is not None:
            showIndent(outfile, level)
            outfile.write('Offset=%s,\n' % quote_python(self.Offset).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeZone':
            TimeZone_ = child_.text
            TimeZone_ = self.gds_validate_string(TimeZone_, node, 'TimeZone')
            self.TimeZone = TimeZone_
            self.validate_TimeZoneType(self.TimeZone)    # validate type TimeZoneType
        elif nodeName_ == 'Offset':
            Offset_ = child_.text
            Offset_ = self.gds_validate_string(Offset_, node, 'Offset')
            self.Offset = Offset_
            self.validate_OffsetType(self.Offset)    # validate type OffsetType
# end class TimeZonesType


class SecretQuestionsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, SecretQuestion=None):
        if SecretQuestion is None:
            self.SecretQuestion = []
        else:
            self.SecretQuestion = SecretQuestion
    def factory(*args_, **kwargs_):
        if SecretQuestionsType.subclass:
            return SecretQuestionsType.subclass(*args_, **kwargs_)
        else:
            return SecretQuestionsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SecretQuestion(self): return self.SecretQuestion
    def set_SecretQuestion(self, SecretQuestion): self.SecretQuestion = SecretQuestion
    def add_SecretQuestion(self, value): self.SecretQuestion.append(value)
    def insert_SecretQuestion(self, index, value): self.SecretQuestion[index] = value
    def export(self, outfile, level, namespace_='', name_='SecretQuestionsType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SecretQuestionsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='SecretQuestionsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SecretQuestionsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SecretQuestion_ in self.SecretQuestion:
            SecretQuestion_.export(outfile, level, namespace_, name_='SecretQuestion', pretty_print=pretty_print)
    def hasContent_(self):
        if (
            self.SecretQuestion
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SecretQuestionsType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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('SecretQuestion=[\n')
        level += 1
        for SecretQuestion_ in self.SecretQuestion:
            showIndent(outfile, level)
            outfile.write('model_.QuestionAnswerType(\n')
            SecretQuestion_.exportLiteral(outfile, level, name_='QuestionAnswerType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SecretQuestion':
            obj_ = QuestionAnswerType.factory()
            obj_.build(child_)
            self.SecretQuestion.append(obj_)
# end class SecretQuestionsType


class SearchResultType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ConsumerFound=None, Gender=None):
        self.ConsumerFound = ConsumerFound
        self.Gender = Gender
    def factory(*args_, **kwargs_):
        if SearchResultType.subclass:
            return SearchResultType.subclass(*args_, **kwargs_)
        else:
            return SearchResultType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ConsumerFound(self): return self.ConsumerFound
    def set_ConsumerFound(self, ConsumerFound): self.ConsumerFound = ConsumerFound
    def get_Gender(self): return self.Gender
    def set_Gender(self, Gender): self.Gender = Gender
    def validate_Gender(self, value):
        # Validate type Gender, a restriction on Flag.
        pass
    def export(self, outfile, level, namespace_='', name_='SearchResultType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SearchResultType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_, name_, 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_='SearchResultType'):
        pass
    def exportChildren(self, outfile, level, namespace_='', name_='SearchResultType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ConsumerFound is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sConsumerFound>%s</%sConsumerFound>%s' % (namespace_, self.gds_format_string(quote_xml(self.ConsumerFound).encode(ExternalEncoding), input_name='ConsumerFound'), namespace_, eol_))
        if self.Gender is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sGender>%s</%sGender>%s' % (namespace_, self.gds_format_integer(self.Gender, input_name='Gender'), namespace_, eol_))
    def hasContent_(self):
        if (
            self.ConsumerFound is not None or
            self.Gender is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SearchResultType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], 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.ConsumerFound is not None:
            showIndent(outfile, level)
            outfile.write('ConsumerFound=%s,\n' % quote_python(self.ConsumerFound).encode(ExternalEncoding))
        if self.Gender is not None:
            showIndent(outfile, level)
            outfile.write('Gender=%d,\n' % self.Gender)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ConsumerFound':
            ConsumerFound_ = child_.text
            ConsumerFound_ = self.gds_validate_string(ConsumerFound_, node, 'ConsumerFound')
            self.ConsumerFound = ConsumerFound_
        elif nodeName_ == 'Gender':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'Gender')
            self.Gender = ival_
            self.validate_Gender(self.Gender)    # validate type Gender
# end class SearchResultType


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 = globals().get(tag)
    if not rootClass:
        if tag == 'Responses':
            rootClass = ResponseListType
        else:
            rootClass = globals().get(tag + "Type")
    return tag, rootClass


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


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


def parseLiteral(inFileName):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'QuestionAnswerType'
        rootClass = QuestionAnswerType
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    #sys.stdout.write('#from xml import *\n\n')
    #sys.stdout.write('import xml as model_\n\n')
    #sys.stdout.write('rootObj = model_.rootTag(\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__ = [
    "AddressDetailsType",
    "AnswerType",
    "AttachmentType",
    "CategoryType",
    "CommunicationChannelDetailsType",
    "Consumer",
    "ConsumerDetailsType",
    "ConsumerIDAndApplicationType",
    "ConsumerIDAndApplicationsType",
    "ConsumerProfileType",
    "ConsumerSearchProfileType",
    "ContactUsDetailType",
    "ContactUsDetailsType",
    "ConversionLocationsType",
    "CountryType",
    "DigitalInteractionsType",
    "EmailDetailsType",
    "EmailType",
    "Emails",
    "ExtendedOptInPreferencesType",
    "ExtendedProfileType",
    "FacebookConnectType",
    "HubLifeStylesType",
    "LoginCredentialsType",
    "LoginDetails",
    "PhoneDetailsType",
    "PreferencesType",
    "ProfanityCheckType",
    "QuestionAnswerType",
    "ReferralType",
    "ResponseListType",
    "ResponseType",
    "SearchDataType",
    "SearchResultType",
    "SecretQuestionsType",
    "SendToFriendType",
    "SocialNetworksType",
    "TimeZonesType",
    "UnsubscribePreferenceType",
    "UnsubscribePreferencesType",
    "UserAccountType",
    "UserIdentificationDataType"
    ]
