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

#
# Generated Tue Apr 10 13:54:51 2012 by generateDS.py version 2.7b.
#

import sys
import getopt
import re as re_
import common_types_1_0 as common
import network_packet_object_1_0 as network_packet_object
import address_object_1_1 as address_object
import port_object_1_2 as port_object

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 = 'ascii'
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')

#
# Support/utility functions.
#

def showIndent(outfile, level):
    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):
        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)
    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 NetworkFlowObjectType(common.DefinedObjectType):
    """Defines the fields necessary to summarize network traffic, expressed
    as flows of multiple packets. Does not include the packet
    payload data (i.e. the actual data that was uploaded/downloaded
    to and from the Dest IP to Source IP as included in packet
    monitoring tools, such as Wireshark)."""
    subclass = None
    superclass = common.DefinedObjectType
    def __init__(self, Network_Flow_Label=None, Unidirectional_Flow_Record=None, Bidirectional_Flow_Record=None):
        super(NetworkFlowObjectType, self).__init__(None)
        self.Network_Flow_Label = Network_Flow_Label
        self.Unidirectional_Flow_Record = Unidirectional_Flow_Record
        self.Bidirectional_Flow_Record = Bidirectional_Flow_Record
    def factory(*args_, **kwargs_):
        if NetworkFlowObjectType.subclass:
            return NetworkFlowObjectType.subclass(*args_, **kwargs_)
        else:
            return NetworkFlowObjectType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Network_Flow_Label(self): return self.Network_Flow_Label
    def set_Network_Flow_Label(self, Network_Flow_Label): self.Network_Flow_Label = Network_Flow_Label
    def get_Unidirectional_Flow_Record(self): return self.Unidirectional_Flow_Record
    def set_Unidirectional_Flow_Record(self, Unidirectional_Flow_Record): self.Unidirectional_Flow_Record = Unidirectional_Flow_Record
    def get_Bidirectional_Flow_Record(self): return self.Bidirectional_Flow_Record
    def set_Bidirectional_Flow_Record(self, Bidirectional_Flow_Record): self.Bidirectional_Flow_Record = Bidirectional_Flow_Record
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetworkFlowObjectType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetworkFlowObjectType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetworkFlowObjectType'):
        super(NetworkFlowObjectType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='NetworkFlowObjectType')
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetworkFlowObjectType', fromsubclass_=False):
        if self.Network_Flow_Label is not None:
            self.Network_Flow_Label.export(outfile, level, 'NetFlowObj:', name_='Network_Flow_Label')
        if self.Unidirectional_Flow_Record is not None:
            self.Unidirectional_Flow_Record.export(outfile, level, 'NetFlowObj:', name_='Unidirectional_Flow_Record')
        if self.Bidirectional_Flow_Record is not None:
            self.Bidirectional_Flow_Record.export(outfile, level, 'NetFlowObj:', name_='Bidirectional_Flow_Record')
    def hasContent_(self):
        if (
            self.Network_Flow_Label is not None or
            self.Unidirectional_Flow_Record is not None or
            self.Bidirectional_Flow_Record is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetworkFlowObjectType'):
        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.Network_Flow_Label is not None:
            showIndent(outfile, level)
            outfile.write('Network_Flow_Label=model_.NetworkFlowLabelType(\n')
            self.Network_Flow_Label.exportLiteral(outfile, level, name_='Network_Flow_Label')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Unidirectional_Flow_Record is not None:
            showIndent(outfile, level)
            outfile.write('Unidirectional_Flow_Record=model_.UnidirectionalRecordType(\n')
            self.Unidirectional_Flow_Record.exportLiteral(outfile, level, name_='Unidirectional_Flow_Record')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Bidirectional_Flow_Record is not None:
            showIndent(outfile, level)
            outfile.write('Bidirectional_Flow_Record=model_.BidirectionalRecordType(\n')
            self.Bidirectional_Flow_Record.exportLiteral(outfile, level, name_='Bidirectional_Flow_Record')
            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_ == 'Network_Flow_Label':
            obj_ = NetworkFlowLabelType.factory()
            obj_.build(child_)
            self.set_Network_Flow_Label(obj_)
        elif nodeName_ == 'Unidirectional_Flow_Record':
            obj_ = UnidirectionalRecordType.factory()
            obj_.build(child_)
            self.set_Unidirectional_Flow_Record(obj_)
        elif nodeName_ == 'Bidirectional_Flow_Record':
            obj_ = BidirectionalRecordType.factory()
            obj_.build(child_)
            self.set_Bidirectional_Flow_Record(obj_)
        super(NetworkFlowObjectType, self).buildChildren(child_, node, nodeName_, True)
# end class NetworkFlowObjectType


class NetworkLayerInfoType(GeneratedsSuper):
    """Network layer information (relative to the OSI network model) which
    is typically captured all types of network flow records."""
    subclass = None
    superclass = None
    def __init__(self, Src_IP=None, Dest_IP=None, Src_Port=None, Dest_Port=None, IP_Protocol=None, extensiontype_=None):
        self.Src_IP = Src_IP
        self.Dest_IP = Dest_IP
        self.Src_Port = Src_Port
        self.Dest_Port = Dest_Port
        self.IP_Protocol = IP_Protocol
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if NetworkLayerInfoType.subclass:
            return NetworkLayerInfoType.subclass(*args_, **kwargs_)
        else:
            return NetworkLayerInfoType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Src_IP(self): return self.Src_IP
    def set_Src_IP(self, Src_IP): self.Src_IP = Src_IP
    def get_Dest_IP(self): return self.Dest_IP
    def set_Dest_IP(self, Dest_IP): self.Dest_IP = Dest_IP
    def get_Src_Port(self): return self.Src_Port
    def set_Src_Port(self, Src_Port): self.Src_Port = Src_Port
    def get_Dest_Port(self): return self.Dest_Port
    def set_Dest_Port(self, Dest_Port): self.Dest_Port = Dest_Port
    def get_IP_Protocol(self): return self.IP_Protocol
    def set_IP_Protocol(self, IP_Protocol): self.IP_Protocol = IP_Protocol
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetworkLayerInfoType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetworkLayerInfoType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetworkLayerInfoType'):
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.append('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetworkLayerInfoType', fromsubclass_=False):
        if self.Src_IP is not None:
            self.Src_IP.export(outfile, level, 'NetFlowObj:', name_='Src_IP')
        if self.Dest_IP is not None:
            self.Dest_IP.export(outfile, level, 'NetFlowObj:', name_='Dest_IP')
        if self.Src_Port is not None:
            self.Src_Port.export(outfile, level, 'NetFlowObj:', name_='Src_Port')
        if self.Dest_Port is not None:
            self.Dest_Port.export(outfile, level, 'NetFlowObj:', name_='Dest_Port')
        if self.IP_Protocol is not None:
            self.IP_Protocol.export(outfile, level, 'NetFlowObj:', name_='IP_Protocol')
    def hasContent_(self):
        if (
            self.Src_IP is not None or
            self.Dest_IP is not None or
            self.Src_Port is not None or
            self.Dest_Port is not None or
            self.IP_Protocol is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetworkLayerInfoType'):
        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.Src_IP is not None:
            showIndent(outfile, level)
            outfile.write('Src_IP=%s,\n' % quote_python(self.Src_IP).encode(ExternalEncoding))
        if self.Dest_IP is not None:
            showIndent(outfile, level)
            outfile.write('Dest_IP=%s,\n' % quote_python(self.Dest_IP).encode(ExternalEncoding))
        if self.Src_Port is not None:
            showIndent(outfile, level)
            outfile.write('Src_Port=%s,\n' % quote_python(self.Src_Port).encode(ExternalEncoding))
        if self.Dest_Port is not None:
            showIndent(outfile, level)
            outfile.write('Dest_Port=%s,\n' % quote_python(self.Dest_Port).encode(ExternalEncoding))
        if self.IP_Protocol is not None:
            showIndent(outfile, level)
            outfile.write('IP_Protocol=%s,\n' % quote_python(self.IP_Protocol).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):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.append('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Src_IP':
            Src_IP_ = child_.text
            Src_IP_ = self.gds_validate_string(Src_IP_, node, 'Src_IP')
            self.Src_IP = Src_IP_
        elif nodeName_ == 'Dest_IP':
            Dest_IP_ = child_.text
            Dest_IP_ = self.gds_validate_string(Dest_IP_, node, 'Dest_IP')
            self.Dest_IP = Dest_IP_
        elif nodeName_ == 'Src_Port':
            Src_Port_ = child_.text
            Src_Port_ = self.gds_validate_string(Src_Port_, node, 'Src_Port')
            self.Src_Port = Src_Port_
        elif nodeName_ == 'Dest_Port':
            Dest_Port_ = child_.text
            Dest_Port_ = self.gds_validate_string(Dest_Port_, node, 'Dest_Port')
            self.Dest_Port = Dest_Port_
        elif nodeName_ == 'IP_Protocol':
            IP_Protocol_ = child_.text
            IP_Protocol_ = self.gds_validate_string(IP_Protocol_, node, 'IP_Protocol')
            self.IP_Protocol = IP_Protocol_
# end class NetworkLayerInfoType


class NetworkFlowLabelType(common.NetworkLayerInfoType):
    """The NetworkFlowLabelType contains elements that are common to all
    flow record formats. It builds off of network layer information
    (a 5-tuple that commonly defines a flow) and includes ingress
    and egress interface indexes and IP protocol information (not
    present if all flow record formats). Egress information is
    usually not thought of as part of the extended 7-tuple, but we
    include it for organizational purposes. Because these fields are
    defined here, they are excluded from the fields associated
    directly with each different flow record format type."""
    subclass = None
    superclass = common.NetworkLayerInfoType
    def __init__(self, Src_IP=None, Dest_IP=None, Src_Port=None, Dest_Port=None, IP_Protocol=None, Ingress_Interface_Index=None, Egress_Interface_Index=None, IP_Type_Of_Service=None):
        super(NetworkFlowLabelType, self).__init__(Src_IP, Dest_IP, Src_Port, Dest_Port, IP_Protocol, )
        self.Ingress_Interface_Index = Ingress_Interface_Index
        self.Egress_Interface_Index = Egress_Interface_Index
        self.IP_Type_Of_Service = IP_Type_Of_Service
    def factory(*args_, **kwargs_):
        if NetworkFlowLabelType.subclass:
            return NetworkFlowLabelType.subclass(*args_, **kwargs_)
        else:
            return NetworkFlowLabelType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Ingress_Interface_Index(self): return self.Ingress_Interface_Index
    def set_Ingress_Interface_Index(self, Ingress_Interface_Index): self.Ingress_Interface_Index = Ingress_Interface_Index
    def get_Egress_Interface_Index(self): return self.Egress_Interface_Index
    def set_Egress_Interface_Index(self, Egress_Interface_Index): self.Egress_Interface_Index = Egress_Interface_Index
    def get_IP_Type_Of_Service(self): return self.IP_Type_Of_Service
    def set_IP_Type_Of_Service(self, IP_Type_Of_Service): self.IP_Type_Of_Service = IP_Type_Of_Service
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetworkFlowLabelType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetworkFlowLabelType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetworkFlowLabelType'):
        super(NetworkFlowLabelType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='NetworkFlowLabelType')
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetworkFlowLabelType', fromsubclass_=False):
        super(NetworkFlowLabelType, self).exportChildren(outfile, level, namespace_, name_, True)
        if self.Ingress_Interface_Index is not None:
            self.Ingress_Interface_Index.export(outfile, level, 'NetFlowObj:', name_='Ingress_Interface_Index')
        if self.Egress_Interface_Index is not None:
            self.Egress_Interface_Index.export(outfile, level, 'NetFlowObj:', name_='Egress_Interface_Index')
        if self.IP_Type_Of_Service is not None:
            self.IP_Type_Of_Service.export(outfile, level, 'NetFlowObj:', name_='IP_Type_Of_Service')
    def hasContent_(self):
        if (
            self.Ingress_Interface_Index is not None or
            self.Egress_Interface_Index is not None or
            self.IP_Type_Of_Service is not None or
            super(NetworkFlowLabelType, self).hasContent_()
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetworkFlowLabelType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(NetworkFlowLabelType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(NetworkFlowLabelType, self).exportLiteralChildren(outfile, level, name_)
        if self.Ingress_Interface_Index is not None:
            showIndent(outfile, level)
            outfile.write('Ingress_Interface_Index=%s,\n' % quote_python(self.Ingress_Interface_Index).encode(ExternalEncoding))
        if self.Egress_Interface_Index is not None:
            showIndent(outfile, level)
            outfile.write('Egress_Interface_Index=%s,\n' % quote_python(self.Egress_Interface_Index).encode(ExternalEncoding))
        if self.IP_Type_Of_Service is not None:
            showIndent(outfile, level)
            outfile.write('IP_Type_Of_Service=%s,\n' % quote_python(self.IP_Type_Of_Service).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):
        super(NetworkFlowLabelType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Ingress_Interface_Index':
            Ingress_Interface_Index_ = child_.text
            Ingress_Interface_Index_ = self.gds_validate_string(Ingress_Interface_Index_, node, 'Ingress_Interface_Index')
            self.Ingress_Interface_Index = Ingress_Interface_Index_
        elif nodeName_ == 'Egress_Interface_Index':
            Egress_Interface_Index_ = child_.text
            Egress_Interface_Index_ = self.gds_validate_string(Egress_Interface_Index_, node, 'Egress_Interface_Index')
            self.Egress_Interface_Index = Egress_Interface_Index_
        elif nodeName_ == 'IP_Type_Of_Service':
            IP_Type_Of_Service_ = child_.text
            IP_Type_Of_Service_ = self.gds_validate_string(IP_Type_Of_Service_, node, 'IP_Type_Of_Service')
            self.IP_Type_Of_Service = IP_Type_Of_Service_
        super(NetworkFlowLabelType, self).buildChildren(child_, node, nodeName_, True)
# end class NetworkFlowLabelType


class UnidirectionalRecordType(GeneratedsSuper):
    """Netflow record formats that capture traffic in one direction."""
    subclass = None
    superclass = None
    def __init__(self, IPFIX_Message=None, NetflowV9_Export_Packet=None, NetflowV5_Packet=None, SiLK_Record=None):
        self.IPFIX_Message = IPFIX_Message
        self.NetflowV9_Export_Packet = NetflowV9_Export_Packet
        self.NetflowV5_Packet = NetflowV5_Packet
        self.SiLK_Record = SiLK_Record
    def factory(*args_, **kwargs_):
        if UnidirectionalRecordType.subclass:
            return UnidirectionalRecordType.subclass(*args_, **kwargs_)
        else:
            return UnidirectionalRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_IPFIX_Message(self): return self.IPFIX_Message
    def set_IPFIX_Message(self, IPFIX_Message): self.IPFIX_Message = IPFIX_Message
    def get_NetflowV9_Export_Packet(self): return self.NetflowV9_Export_Packet
    def set_NetflowV9_Export_Packet(self, NetflowV9_Export_Packet): self.NetflowV9_Export_Packet = NetflowV9_Export_Packet
    def get_NetflowV5_Packet(self): return self.NetflowV5_Packet
    def set_NetflowV5_Packet(self, NetflowV5_Packet): self.NetflowV5_Packet = NetflowV5_Packet
    def get_SiLK_Record(self): return self.SiLK_Record
    def set_SiLK_Record(self, SiLK_Record): self.SiLK_Record = SiLK_Record
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='UnidirectionalRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UnidirectionalRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='UnidirectionalRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='UnidirectionalRecordType', fromsubclass_=False):
        if self.IPFIX_Message is not None:
            self.IPFIX_Message.export(outfile, level, 'NetFlowObj:', name_='IPFIX_Message')
        if self.NetflowV9_Export_Packet is not None:
            self.NetflowV9_Export_Packet.export(outfile, level, 'NetFlowObj:', name_='NetflowV9_Export_Packet')
        if self.NetflowV5_Packet is not None:
            self.NetflowV5_Packet.export(outfile, level, 'NetFlowObj:', name_='NetflowV5_Packet')
        if self.SiLK_Record is not None:
            self.SiLK_Record.export(outfile, level, 'NetFlowObj:', name_='SiLK_Record')
    def hasContent_(self):
        if (
            self.IPFIX_Message is not None or
            self.NetflowV9_Export_Packet is not None or
            self.NetflowV5_Packet is not None or
            self.SiLK_Record is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='UnidirectionalRecordType'):
        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.IPFIX_Message is not None:
            showIndent(outfile, level)
            outfile.write('IPFIX_Message=model_.IPFIXMessageType(\n')
            self.IPFIX_Message.exportLiteral(outfile, level, name_='IPFIX_Message')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.NetflowV9_Export_Packet is not None:
            showIndent(outfile, level)
            outfile.write('NetflowV9_Export_Packet=model_.NetflowV9ExportPacketType(\n')
            self.NetflowV9_Export_Packet.exportLiteral(outfile, level, name_='NetflowV9_Export_Packet')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.NetflowV5_Packet is not None:
            showIndent(outfile, level)
            outfile.write('NetflowV5_Packet=model_.NetflowV5PacketType(\n')
            self.NetflowV5_Packet.exportLiteral(outfile, level, name_='NetflowV5_Packet')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.SiLK_Record is not None:
            showIndent(outfile, level)
            outfile.write('SiLK_Record=model_.SiLKRecordType(\n')
            self.SiLK_Record.exportLiteral(outfile, level, name_='SiLK_Record')
            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_ == 'IPFIX_Message':
            obj_ = IPFIXMessageType.factory()
            obj_.build(child_)
            self.set_IPFIX_Message(obj_)
        elif nodeName_ == 'NetflowV9_Export_Packet':
            obj_ = NetflowV9ExportPacketType.factory()
            obj_.build(child_)
            self.set_NetflowV9_Export_Packet(obj_)
        elif nodeName_ == 'NetflowV5_Packet':
            obj_ = NetflowV5PacketType.factory()
            obj_.build(child_)
            self.set_NetflowV5_Packet(obj_)
        elif nodeName_ == 'SiLK_Record':
            obj_ = SiLKRecordType.factory()
            obj_.build(child_)
            self.set_SiLK_Record(obj_)
# end class UnidirectionalRecordType


class BidirectionalRecordType(GeneratedsSuper):
    """Network record formats that capture traffic in both directions.
    Later, we plan to add Argus as a network flow format type. Argus
    supports bidirectional flows, and as such, is usually used as an
    alternative to NetFlow v5 analysis via SiLK
    (http://www.qosient.com/argus/)."""
    subclass = None
    superclass = None
    def __init__(self, YAF_Record=None):
        self.YAF_Record = YAF_Record
    def factory(*args_, **kwargs_):
        if BidirectionalRecordType.subclass:
            return BidirectionalRecordType.subclass(*args_, **kwargs_)
        else:
            return BidirectionalRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_YAF_Record(self): return self.YAF_Record
    def set_YAF_Record(self, YAF_Record): self.YAF_Record = YAF_Record
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='BidirectionalRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BidirectionalRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='BidirectionalRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='BidirectionalRecordType', fromsubclass_=False):
        if self.YAF_Record is not None:
            self.YAF_Record.export(outfile, level, 'AddressObj:', name_='YAF_Record')
    def hasContent_(self):
        if (
            self.YAF_Record is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='BidirectionalRecordType'):
        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.YAF_Record is not None:
            showIndent(outfile, level)
            outfile.write('YAF_Record=model_.YAFRecordType(\n')
            self.YAF_Record.exportLiteral(outfile, level, name_='YAF_Record')
            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_ == 'YAF_Record':
            obj_ = YAFRecordType.factory()
            obj_.build(child_)
            self.set_YAF_Record(obj_)
# end class BidirectionalRecordType


class IPFIXMessageType(GeneratedsSuper):
    """The IPFIX protocol provides IP flow information.
    http://tools.ietf.org/html/rfc5101"""
    subclass = None
    superclass = None
    def __init__(self, Message_Header=None, Set=None):
        self.Message_Header = Message_Header
        if Set is None:
            self.Set = []
        else:
            self.Set = Set
    def factory(*args_, **kwargs_):
        if IPFIXMessageType.subclass:
            return IPFIXMessageType.subclass(*args_, **kwargs_)
        else:
            return IPFIXMessageType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Message_Header(self): return self.Message_Header
    def set_Message_Header(self, Message_Header): self.Message_Header = Message_Header
    def get_Set(self): return self.Set
    def set_Set(self, Set): self.Set = Set
    def add_Set(self, value): self.Set.append(value)
    def insert_Set(self, index, value): self.Set[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXMessageType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXMessageType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXMessageType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXMessageType', fromsubclass_=False):
        if self.Message_Header is not None:
            self.Message_Header.export(outfile, level, 'NetFlowObj:', name_='Message_Header')
        for Set_ in self.Set:
            self.Set_.export(outfile, level, 'NetFlowObj:', name_='Set_')
    def hasContent_(self):
        if (
            self.Message_Header is not None or
            self.Set
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXMessageType'):
        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.Message_Header is not None:
            showIndent(outfile, level)
            outfile.write('Message_Header=model_.IPFIXMessageHeaderType(\n')
            self.Message_Header.exportLiteral(outfile, level, name_='Message_Header')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('Set=[\n')
        level += 1
        for Set_ in self.Set:
            showIndent(outfile, level)
            outfile.write('model_.IPFIXSetType(\n')
            Set_.exportLiteral(outfile, level, name_='IPFIXSetType')
            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_ == 'Message_Header':
            obj_ = IPFIXMessageHeaderType.factory()
            obj_.build(child_)
            self.set_Message_Header(obj_)
        elif nodeName_ == 'Set':
            obj_ = IPFIXSetType.factory()
            obj_.build(child_)
            self.Set.append(obj_)
# end class IPFIXMessageType


class IPFIXMessageHeaderType(GeneratedsSuper):
    """This type represents the message header for the IPFIX format. For
    more information about each of the fields, please refer to RFC
    5101 (http://tools.ietf.org/html/rfc5101) under the heading,
    "Message Header Field Descriptions." Note that common elements
    are included in the Network_Flow_Label."""
    subclass = None
    superclass = None
    def __init__(self, Version=None, Byte_Length=None, Export_Timestamp=None, Sequence_Number=None, Observation_Domain_ID=None):
        self.Version = Version
        self.Byte_Length = Byte_Length
        self.Export_Timestamp = Export_Timestamp
        self.Sequence_Number = Sequence_Number
        self.Observation_Domain_ID = Observation_Domain_ID
    def factory(*args_, **kwargs_):
        if IPFIXMessageHeaderType.subclass:
            return IPFIXMessageHeaderType.subclass(*args_, **kwargs_)
        else:
            return IPFIXMessageHeaderType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Version(self): return self.Version
    def set_Version(self, Version): self.Version = Version
    def get_Byte_Length(self): return self.Byte_Length
    def set_Byte_Length(self, Byte_Length): self.Byte_Length = Byte_Length
    def get_Export_Timestamp(self): return self.Export_Timestamp
    def set_Export_Timestamp(self, Export_Timestamp): self.Export_Timestamp = Export_Timestamp
    def get_Sequence_Number(self): return self.Sequence_Number
    def set_Sequence_Number(self, Sequence_Number): self.Sequence_Number = Sequence_Number
    def get_Observation_Domain_ID(self): return self.Observation_Domain_ID
    def set_Observation_Domain_ID(self, Observation_Domain_ID): self.Observation_Domain_ID = Observation_Domain_ID
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXMessageHeaderType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXMessageHeaderType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXMessageHeaderType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXMessageHeaderType', fromsubclass_=False):
        if self.Version is not None:
            self.Version.export(outfile, level, 'NetFlowObj:', name_='Version')
        if self.Byte_Length is not None:
            self.Byte_Length.export(outfile, level, 'NetFlowObj:', name_='Byte_Length')
        if self.Export_Timestamp is not None:
            self.Export_Timestamp.export(outfile, level, 'NetFlowObj:', name_='Export_Timestamp')
        if self.Sequence_Number is not None:
            self.Sequence_Number.export(outfile, level, 'NetFlowObj:', name_='Sequence_Number')
        if self.Observation_Domain_ID is not None:
            self.Observation_Domain_ID.export(outfile, level, 'NetFlowObj:', name_='Observation_Domain_ID')
    def hasContent_(self):
        if (
            self.Version is not None or
            self.Byte_Length is not None or
            self.Export_Timestamp is not None or
            self.Sequence_Number is not None or
            self.Observation_Domain_ID is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXMessageHeaderType'):
        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.Version is not None:
            showIndent(outfile, level)
            outfile.write('Version=%s,\n' % quote_python(self.Version).encode(ExternalEncoding))
        if self.Byte_Length is not None:
            showIndent(outfile, level)
            outfile.write('Byte_Length=%s,\n' % quote_python(self.Byte_Length).encode(ExternalEncoding))
        if self.Export_Timestamp is not None:
            showIndent(outfile, level)
            outfile.write('Export_Timestamp=%s,\n' % quote_python(self.Export_Timestamp).encode(ExternalEncoding))
        if self.Sequence_Number is not None:
            showIndent(outfile, level)
            outfile.write('Sequence_Number=%s,\n' % quote_python(self.Sequence_Number).encode(ExternalEncoding))
        if self.Observation_Domain_ID is not None:
            showIndent(outfile, level)
            outfile.write('Observation_Domain_ID=%s,\n' % quote_python(self.Observation_Domain_ID).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_ == 'Version':
            Version_ = child_.text
            Version_ = self.gds_validate_string(Version_, node, 'Version')
            self.Version = Version_
        elif nodeName_ == 'Byte_Length':
            Byte_Length_ = child_.text
            Byte_Length_ = self.gds_validate_string(Byte_Length_, node, 'Byte_Length')
            self.Byte_Length = Byte_Length_
        elif nodeName_ == 'Export_Timestamp':
            Export_Timestamp_ = child_.text
            Export_Timestamp_ = self.gds_validate_string(Export_Timestamp_, node, 'Export_Timestamp')
            self.Export_Timestamp = Export_Timestamp_
        elif nodeName_ == 'Sequence_Number':
            Sequence_Number_ = child_.text
            Sequence_Number_ = self.gds_validate_string(Sequence_Number_, node, 'Sequence_Number')
            self.Sequence_Number = Sequence_Number_
        elif nodeName_ == 'Observation_Domain_ID':
            Observation_Domain_ID_ = child_.text
            Observation_Domain_ID_ = self.gds_validate_string(Observation_Domain_ID_, node, 'Observation_Domain_ID')
            self.Observation_Domain_ID = Observation_Domain_ID_
# end class IPFIXMessageHeaderType


class IPFIXSetType(GeneratedsSuper):
    """Represents the possible sets of records that can be represented in
    an IPFIX message. See RFC 5101 and look for the terms "Template
    Set", "Options Template Set", and "Data Set", for more
    information."""
    subclass = None
    superclass = None
    def __init__(self, Template_Set=None, Options_Template_Set=None, Data_Set=None):
        self.Template_Set = Template_Set
        self.Options_Template_Set = Options_Template_Set
        self.Data_Set = Data_Set
    def factory(*args_, **kwargs_):
        if IPFIXSetType.subclass:
            return IPFIXSetType.subclass(*args_, **kwargs_)
        else:
            return IPFIXSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Template_Set(self): return self.Template_Set
    def set_Template_Set(self, Template_Set): self.Template_Set = Template_Set
    def get_Options_Template_Set(self): return self.Options_Template_Set
    def set_Options_Template_Set(self, Options_Template_Set): self.Options_Template_Set = Options_Template_Set
    def get_Data_Set(self): return self.Data_Set
    def set_Data_Set(self, Data_Set): self.Data_Set = Data_Set
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXSetType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXSetType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXSetType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXSetType', fromsubclass_=False):
        if self.Template_Set is not None:
            self.Template_Set.export(outfile, level, 'NetFlowObj:', name_='Template_Set')
        if self.Options_Template_Set is not None:
            self.Options_Template_Set.export(outfile, level, 'NetFlowObj:', name_='Options_Template_Set')
        if self.Data_Set is not None:
            self.Data_Set.export(outfile, level, 'NetFlowObj:', name_='Data_Set')
    def hasContent_(self):
        if (
            self.Template_Set is not None or
            self.Options_Template_Set is not None or
            self.Data_Set is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXSetType'):
        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.Template_Set is not None:
            showIndent(outfile, level)
            outfile.write('Template_Set=model_.IPFIXTemplateSetType(\n')
            self.Template_Set.exportLiteral(outfile, level, name_='Template_Set')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Options_Template_Set is not None:
            showIndent(outfile, level)
            outfile.write('Options_Template_Set=model_.IPFIXOptionsTemplateSetType(\n')
            self.Options_Template_Set.exportLiteral(outfile, level, name_='Options_Template_Set')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Data_Set is not None:
            showIndent(outfile, level)
            outfile.write('Data_Set=model_.IPFIXDataSetType(\n')
            self.Data_Set.exportLiteral(outfile, level, name_='Data_Set')
            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_ == 'Template_Set':
            obj_ = IPFIXTemplateSetType.factory()
            obj_.build(child_)
            self.set_Template_Set(obj_)
        elif nodeName_ == 'Options_Template_Set':
            obj_ = IPFIXOptionsTemplateSetType.factory()
            obj_.build(child_)
            self.set_Options_Template_Set(obj_)
        elif nodeName_ == 'Data_Set':
            obj_ = IPFIXDataSetType.factory()
            obj_.build(child_)
            self.set_Data_Set(obj_)
# end class IPFIXSetType


class IPFIXTemplateSetType(GeneratedsSuper):
    """Specifies the regions of a Template Set, of which there are three:
    the Set Header, the collection of Template Records, and the
    optional padding at the end of the Template Set. See RFC 5101
    under Set Format, which is section 3.3.1, for more information."""
    subclass = None
    superclass = None
    def __init__(self, Set_Header=None, Template_Record=None, Padding=None):
        self.Set_Header = Set_Header
        if Template_Record is None:
            self.Template_Record = []
        else:
            self.Template_Record = Template_Record
        self.Padding = Padding
    def factory(*args_, **kwargs_):
        if IPFIXTemplateSetType.subclass:
            return IPFIXTemplateSetType.subclass(*args_, **kwargs_)
        else:
            return IPFIXTemplateSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Set_Header(self): return self.Set_Header
    def set_Set_Header(self, Set_Header): self.Set_Header = Set_Header
    def get_Template_Record(self): return self.Template_Record
    def set_Template_Record(self, Template_Record): self.Template_Record = Template_Record
    def add_Template_Record(self, value): self.Template_Record.append(value)
    def insert_Template_Record(self, index, value): self.Template_Record[index] = value
    def get_Padding(self): return self.Padding
    def set_Padding(self, Padding): self.Padding = Padding
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXTemplateSetType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXTemplateSetType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXTemplateSetType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXTemplateSetType', fromsubclass_=False):
        if self.Set_Header is not None:
            self.Set_Header.export(outfile, level, 'NetFlowObj:', name_='Set_Header')
        for Template_Record_ in self.Template_Record:
            self.Template_Record_.export(outfile, level, 'NetFlowObj:', name_='Template_Record_')
        if self.Padding is not None:
            self.Padding.export(outfile, level, 'NetFlowObj:', name_='Padding')
    def hasContent_(self):
        if (
            self.Set_Header is not None or
            self.Template_Record or
            self.Padding is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXTemplateSetType'):
        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.Set_Header is not None:
            showIndent(outfile, level)
            outfile.write('Set_Header=model_.IPFIXSetHeaderType(\n')
            self.Set_Header.exportLiteral(outfile, level, name_='Set_Header')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('Template_Record=[\n')
        level += 1
        for Template_Record_ in self.Template_Record:
            showIndent(outfile, level)
            outfile.write('model_.IPFIXTemplateRecordType(\n')
            Template_Record_.exportLiteral(outfile, level, name_='IPFIXTemplateRecordType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.Padding is not None:
            showIndent(outfile, level)
            outfile.write('Padding=%s,\n' % quote_python(self.Padding).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_ == 'Set_Header':
            obj_ = IPFIXSetHeaderType.factory()
            obj_.build(child_)
            self.set_Set_Header(obj_)
        elif nodeName_ == 'Template_Record':
            obj_ = IPFIXTemplateRecordType.factory()
            obj_.build(child_)
            self.Template_Record.append(obj_)
        elif nodeName_ == 'Padding':
            Padding_ = child_.text
            Padding_ = self.gds_validate_string(Padding_, node, 'Padding')
            self.Padding = Padding_
# end class IPFIXTemplateSetType


class IPFIXOptionsTemplateSetType(GeneratedsSuper):
    """Specifies the regions of an Options Template Set, of which there are
    three: the Set Header, the collection of Options Template
    Records, and the optional padding at the end of the Options
    Template Set. See RFC 5101 under Set Format, which is section
    3.3.1, for more information."""
    subclass = None
    superclass = None
    def __init__(self, Set_Header=None, Options_Template_Record=None, Padding=None):
        self.Set_Header = Set_Header
        if Options_Template_Record is None:
            self.Options_Template_Record = []
        else:
            self.Options_Template_Record = Options_Template_Record
        self.Padding = Padding
    def factory(*args_, **kwargs_):
        if IPFIXOptionsTemplateSetType.subclass:
            return IPFIXOptionsTemplateSetType.subclass(*args_, **kwargs_)
        else:
            return IPFIXOptionsTemplateSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Set_Header(self): return self.Set_Header
    def set_Set_Header(self, Set_Header): self.Set_Header = Set_Header
    def get_Options_Template_Record(self): return self.Options_Template_Record
    def set_Options_Template_Record(self, Options_Template_Record): self.Options_Template_Record = Options_Template_Record
    def add_Options_Template_Record(self, value): self.Options_Template_Record.append(value)
    def insert_Options_Template_Record(self, index, value): self.Options_Template_Record[index] = value
    def get_Padding(self): return self.Padding
    def set_Padding(self, Padding): self.Padding = Padding
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateSetType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXOptionsTemplateSetType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateSetType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateSetType', fromsubclass_=False):
        if self.Set_Header is not None:
            self.Set_Header.export(outfile, level, 'NetFlowObj:', name_='Set_Header')
        for Options_Template_Record_ in self.Options_Template_Record:
            self.Options_Template_Record_.export(outfile, level, 'NetFlowObj:', name_='Options_Template_Record_')
        if self.Padding is not None:
            self.Padding.export(outfile, level, 'NetFlowObj:', name_='Padding')
    def hasContent_(self):
        if (
            self.Set_Header is not None or
            self.Options_Template_Record or
            self.Padding is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXOptionsTemplateSetType'):
        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.Set_Header is not None:
            showIndent(outfile, level)
            outfile.write('Set_Header=model_.IPFIXSetHeaderType(\n')
            self.Set_Header.exportLiteral(outfile, level, name_='Set_Header')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('Options_Template_Record=[\n')
        level += 1
        for Options_Template_Record_ in self.Options_Template_Record:
            showIndent(outfile, level)
            outfile.write('model_.IPFIXOptionsTemplateRecordType(\n')
            Options_Template_Record_.exportLiteral(outfile, level, name_='IPFIXOptionsTemplateRecordType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.Padding is not None:
            showIndent(outfile, level)
            outfile.write('Padding=%s,\n' % quote_python(self.Padding).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_ == 'Set_Header':
            obj_ = IPFIXSetHeaderType.factory()
            obj_.build(child_)
            self.set_Set_Header(obj_)
        elif nodeName_ == 'Options_Template_Record':
            obj_ = IPFIXOptionsTemplateRecordType.factory()
            obj_.build(child_)
            self.Options_Template_Record.append(obj_)
        elif nodeName_ == 'Padding':
            Padding_ = child_.text
            Padding_ = self.gds_validate_string(Padding_, node, 'Padding')
            self.Padding = Padding_
# end class IPFIXOptionsTemplateSetType


class IPFIXDataSetType(GeneratedsSuper):
    """Specifies the regions of a Data Set, of which there are three: the
    Set Header, the collection of Data Records, and the optional
    padding at the end of the Data Set. See RFC 5101 under Set
    Format, which is section 3.3.1, for more information."""
    subclass = None
    superclass = None
    def __init__(self, Set_Header=None, Data_Record=None, Padding=None):
        self.Set_Header = Set_Header
        if Data_Record is None:
            self.Data_Record = []
        else:
            self.Data_Record = Data_Record
        self.Padding = Padding
    def factory(*args_, **kwargs_):
        if IPFIXDataSetType.subclass:
            return IPFIXDataSetType.subclass(*args_, **kwargs_)
        else:
            return IPFIXDataSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Set_Header(self): return self.Set_Header
    def set_Set_Header(self, Set_Header): self.Set_Header = Set_Header
    def get_Data_Record(self): return self.Data_Record
    def set_Data_Record(self, Data_Record): self.Data_Record = Data_Record
    def add_Data_Record(self, value): self.Data_Record.append(value)
    def insert_Data_Record(self, index, value): self.Data_Record[index] = value
    def get_Padding(self): return self.Padding
    def set_Padding(self, Padding): self.Padding = Padding
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXDataSetType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXDataSetType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXDataSetType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXDataSetType', fromsubclass_=False):
        if self.Set_Header is not None:
            self.Set_Header.export(outfile, level, 'NetFlowObj:', name_='Set_Header')
        for Data_Record_ in self.Data_Record:
            self.Data_Record_.export(outfile, level, 'NetFlowObj:', name_='Data_Record_')
        if self.Padding is not None:
            self.Padding.export(outfile, level, 'NetFlowObj:', name_='Padding')
    def hasContent_(self):
        if (
            self.Set_Header is not None or
            self.Data_Record or
            self.Padding is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXDataSetType'):
        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.Set_Header is not None:
            showIndent(outfile, level)
            outfile.write('Set_Header=model_.IPFIXSetHeaderType(\n')
            self.Set_Header.exportLiteral(outfile, level, name_='Set_Header')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('Data_Record=[\n')
        level += 1
        for Data_Record_ in self.Data_Record:
            showIndent(outfile, level)
            outfile.write('model_.IPFIXDataRecordType(\n')
            Data_Record_.exportLiteral(outfile, level, name_='IPFIXDataRecordType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.Padding is not None:
            showIndent(outfile, level)
            outfile.write('Padding=%s,\n' % quote_python(self.Padding).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_ == 'Set_Header':
            obj_ = IPFIXSetHeaderType.factory()
            obj_.build(child_)
            self.set_Set_Header(obj_)
        elif nodeName_ == 'Data_Record':
            obj_ = IPFIXDataRecordType.factory()
            obj_.build(child_)
            self.Data_Record.append(obj_)
        elif nodeName_ == 'Padding':
            Padding_ = child_.text
            Padding_ = self.gds_validate_string(Padding_, node, 'Padding')
            self.Padding = Padding_
# end class IPFIXDataSetType


class IPFIXSetHeaderType(GeneratedsSuper):
    """Defines the elements of the IPFIX set header."""
    subclass = None
    superclass = None
    def __init__(self, Set_ID=None, Length=None):
        self.Set_ID = Set_ID
        self.Length = Length
    def factory(*args_, **kwargs_):
        if IPFIXSetHeaderType.subclass:
            return IPFIXSetHeaderType.subclass(*args_, **kwargs_)
        else:
            return IPFIXSetHeaderType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Set_ID(self): return self.Set_ID
    def set_Set_ID(self, Set_ID): self.Set_ID = Set_ID
    def get_Length(self): return self.Length
    def set_Length(self, Length): self.Length = Length
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXSetHeaderType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXSetHeaderType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXSetHeaderType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXSetHeaderType', fromsubclass_=False):
        if self.Set_ID is not None:
            self.Set_ID.export(outfile, level, 'NetFlowObj:', name_='Set_ID')
        if self.Length is not None:
            sself.Length.export(outfile, level, 'NetFlowObj:', name_='Length')
    def hasContent_(self):
        if (
            self.Set_ID is not None or
            self.Length is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXSetHeaderType'):
        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.Set_ID is not None:
            showIndent(outfile, level)
            outfile.write('Set_ID=%s,\n' % quote_python(self.Set_ID).encode(ExternalEncoding))
        if self.Length is not None:
            showIndent(outfile, level)
            outfile.write('Length=%s,\n' % quote_python(self.Length).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_ == 'Set_ID':
            Set_ID_ = child_.text
            Set_ID_ = self.gds_validate_string(Set_ID_, node, 'Set_ID')
            self.Set_ID = Set_ID_
        elif nodeName_ == 'Length':
            Length_ = child_.text
            Length_ = self.gds_validate_string(Length_, node, 'Length')
            self.Length = Length_
# end class IPFIXSetHeaderType


class IPFIXTemplateRecordType(GeneratedsSuper):
    """Specifies the regions of a Template Record, of which there are two:
    the Template Record Header, and the Field Specifiers. See RFC
    5101 under Template Record Format, section 3.4.1, for more
    information."""
    subclass = None
    superclass = None
    def __init__(self, Template_Record_Header=None, Field_Specifier=None):
        self.Template_Record_Header = Template_Record_Header
        if Field_Specifier is None:
            self.Field_Specifier = []
        else:
            self.Field_Specifier = Field_Specifier
    def factory(*args_, **kwargs_):
        if IPFIXTemplateRecordType.subclass:
            return IPFIXTemplateRecordType.subclass(*args_, **kwargs_)
        else:
            return IPFIXTemplateRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Template_Record_Header(self): return self.Template_Record_Header
    def set_Template_Record_Header(self, Template_Record_Header): self.Template_Record_Header = Template_Record_Header
    def get_Field_Specifier(self): return self.Field_Specifier
    def set_Field_Specifier(self, Field_Specifier): self.Field_Specifier = Field_Specifier
    def add_Field_Specifier(self, value): self.Field_Specifier.append(value)
    def insert_Field_Specifier(self, index, value): self.Field_Specifier[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXTemplateRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXTemplateRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXTemplateRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXTemplateRecordType', fromsubclass_=False):
        if self.Template_Record_Header is not None:
            self.Template_Record_Header.export(outfile, level, 'NetFlowObj:', name_='Template_Record_Header')
        for Field_Specifier_ in self.Field_Specifier:
            self.Field_Specifier_.export(outfile, level, 'NetFlowObj:', name_='Field_Specifier_')
    def hasContent_(self):
        if (
            self.Template_Record_Header is not None or
            self.Field_Specifier
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXTemplateRecordType'):
        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.Template_Record_Header is not None:
            showIndent(outfile, level)
            outfile.write('Template_Record_Header=model_.IPFIXTemplateRecordHeaderType(\n')
            self.Template_Record_Header.exportLiteral(outfile, level, name_='Template_Record_Header')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('Field_Specifier=[\n')
        level += 1
        for Field_Specifier_ in self.Field_Specifier:
            showIndent(outfile, level)
            outfile.write('model_.IPFIXTemplateRecordFieldSpecifiersType(\n')
            Field_Specifier_.exportLiteral(outfile, level, name_='IPFIXTemplateRecordFieldSpecifiersType')
            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_ == 'Template_Record_Header':
            obj_ = IPFIXTemplateRecordHeaderType.factory()
            obj_.build(child_)
            self.set_Template_Record_Header(obj_)
        elif nodeName_ == 'Field_Specifier':
            obj_ = IPFIXTemplateRecordFieldSpecifiersType.factory()
            obj_.build(child_)
            self.Field_Specifier.append(obj_)
# end class IPFIXTemplateRecordType


class IPFIXTemplateRecordHeaderType(GeneratedsSuper):
    """Specifies the fields in a Template Record Header, Template_ID and
    Field_Count, as explained in RFC 5101, section 3.4.1."""
    subclass = None
    superclass = None
    def __init__(self, Template_ID=None, Field_Count=None):
        self.Template_ID = Template_ID
        self.Field_Count = Field_Count
    def factory(*args_, **kwargs_):
        if IPFIXTemplateRecordHeaderType.subclass:
            return IPFIXTemplateRecordHeaderType.subclass(*args_, **kwargs_)
        else:
            return IPFIXTemplateRecordHeaderType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Template_ID(self): return self.Template_ID
    def set_Template_ID(self, Template_ID): self.Template_ID = Template_ID
    def get_Field_Count(self): return self.Field_Count
    def set_Field_Count(self, Field_Count): self.Field_Count = Field_Count
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXTemplateRecordHeaderType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXTemplateRecordHeaderType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXTemplateRecordHeaderType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXTemplateRecordHeaderType', fromsubclass_=False):
        if self.Template_ID is not None:
            self.Template_ID.export(outfile, level, 'NetFlowObj:', name_='Template_ID')
        if self.Field_Count is not None:
            self.Field_Count.export(outfile, level, 'NetFlowObj:', name_='Field_Count')
    def hasContent_(self):
        if (
            self.Template_ID is not None or
            self.Field_Count is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXTemplateRecordHeaderType'):
        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.Template_ID is not None:
            showIndent(outfile, level)
            outfile.write('Template_ID=%s,\n' % quote_python(self.Template_ID).encode(ExternalEncoding))
        if self.Field_Count is not None:
            showIndent(outfile, level)
            outfile.write('Field_Count=%s,\n' % quote_python(self.Field_Count).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_ == 'Template_ID':
            Template_ID_ = child_.text
            Template_ID_ = self.gds_validate_string(Template_ID_, node, 'Template_ID')
            self.Template_ID = Template_ID_
        elif nodeName_ == 'Field_Count':
            Field_Count_ = child_.text
            Field_Count_ = self.gds_validate_string(Field_Count_, node, 'Field_Count')
            self.Field_Count = Field_Count_
# end class IPFIXTemplateRecordHeaderType


class IPFIXTemplateRecordFieldSpecifiersType(GeneratedsSuper):
    """Specifies the fields in a Template Record Field Specifier, as
    explained in RFC 5101, section 3.2."""
    subclass = None
    superclass = None
    def __init__(self, Enterprise_Bit=None, Information_Element_ID=None, Field_Length=None, Enterprise_Number=None):
        self.Enterprise_Bit = Enterprise_Bit
        self.Information_Element_ID = Information_Element_ID
        self.Field_Length = Field_Length
        self.Enterprise_Number = Enterprise_Number
    def factory(*args_, **kwargs_):
        if IPFIXTemplateRecordFieldSpecifiersType.subclass:
            return IPFIXTemplateRecordFieldSpecifiersType.subclass(*args_, **kwargs_)
        else:
            return IPFIXTemplateRecordFieldSpecifiersType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Enterprise_Bit(self): return self.Enterprise_Bit
    def set_Enterprise_Bit(self, Enterprise_Bit): self.Enterprise_Bit = Enterprise_Bit
    def get_Information_Element_ID(self): return self.Information_Element_ID
    def set_Information_Element_ID(self, Information_Element_ID): self.Information_Element_ID = Information_Element_ID
    def get_Field_Length(self): return self.Field_Length
    def set_Field_Length(self, Field_Length): self.Field_Length = Field_Length
    def get_Enterprise_Number(self): return self.Enterprise_Number
    def set_Enterprise_Number(self, Enterprise_Number): self.Enterprise_Number = Enterprise_Number
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXTemplateRecordFieldSpecifiersType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXTemplateRecordFieldSpecifiersType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXTemplateRecordFieldSpecifiersType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXTemplateRecordFieldSpecifiersType', fromsubclass_=False):
        if self.Enterprise_Bit is not None:
            self.Enterprise_Bit.export(outfile, level, 'NetFlowObj:', name_='Enterprise_Bit')
        if self.Information_Element_ID is not None:
            self.Information_Element_ID.export(outfile, level, 'NetFlowObj:', name_='Information_Element_ID')
        if self.Field_Length is not None:
            self.Field_Length.export(outfile, level, 'NetFlowObj:', name_='Field_Length')
        if self.Enterprise_Number is not None:
            self.Enterprise_Number.export(outfile, level, 'NetFlowObj:', name_='Enterprise_Number')
    def hasContent_(self):
        if (
            self.Enterprise_Bit is not None or
            self.Information_Element_ID is not None or
            self.Field_Length is not None or
            self.Enterprise_Number is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXTemplateRecordFieldSpecifiersType'):
        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.Enterprise_Bit is not None:
            showIndent(outfile, level)
            outfile.write('Enterprise_Bit=%s,\n' % self.Enterprise_Bit)
        if self.Information_Element_ID is not None:
            showIndent(outfile, level)
            outfile.write('Information_Element_ID=%s,\n' % quote_python(self.Information_Element_ID).encode(ExternalEncoding))
        if self.Field_Length is not None:
            showIndent(outfile, level)
            outfile.write('Field_Length=%s,\n' % quote_python(self.Field_Length).encode(ExternalEncoding))
        if self.Enterprise_Number is not None:
            showIndent(outfile, level)
            outfile.write('Enterprise_Number=%s,\n' % quote_python(self.Enterprise_Number).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_ == 'Enterprise_Bit':
            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, 'Enterprise_Bit')
            self.Enterprise_Bit = ival_
        elif nodeName_ == 'Information_Element_ID':
            Information_Element_ID_ = child_.text
            Information_Element_ID_ = self.gds_validate_string(Information_Element_ID_, node, 'Information_Element_ID')
            self.Information_Element_ID = Information_Element_ID_
        elif nodeName_ == 'Field_Length':
            Field_Length_ = child_.text
            Field_Length_ = self.gds_validate_string(Field_Length_, node, 'Field_Length')
            self.Field_Length = Field_Length_
        elif nodeName_ == 'Enterprise_Number':
            Enterprise_Number_ = child_.text
            Enterprise_Number_ = self.gds_validate_string(Enterprise_Number_, node, 'Enterprise_Number')
            self.Enterprise_Number = Enterprise_Number_
# end class IPFIXTemplateRecordFieldSpecifiersType


class IPFIXOptionsTemplateRecordType(GeneratedsSuper):
    """Specifies the regions of an Options Template Record, of which there
    are two: the Options Template Record Header, and the Field
    Specifiers. See RFC 5101 under Options Template Record Format,
    section 3.4.2.2, for more information."""
    subclass = None
    superclass = None
    def __init__(self, Options_Template_Record_Header=None, Field_Specifier=None):
        self.Options_Template_Record_Header = Options_Template_Record_Header
        if Field_Specifier is None:
            self.Field_Specifier = []
        else:
            self.Field_Specifier = Field_Specifier
    def factory(*args_, **kwargs_):
        if IPFIXOptionsTemplateRecordType.subclass:
            return IPFIXOptionsTemplateRecordType.subclass(*args_, **kwargs_)
        else:
            return IPFIXOptionsTemplateRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Options_Template_Record_Header(self): return self.Options_Template_Record_Header
    def set_Options_Template_Record_Header(self, Options_Template_Record_Header): self.Options_Template_Record_Header = Options_Template_Record_Header
    def get_Field_Specifier(self): return self.Field_Specifier
    def set_Field_Specifier(self, Field_Specifier): self.Field_Specifier = Field_Specifier
    def add_Field_Specifier(self, value): self.Field_Specifier.append(value)
    def insert_Field_Specifier(self, index, value): self.Field_Specifier[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXOptionsTemplateRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateRecordType', fromsubclass_=False):
        if self.Options_Template_Record_Header is not None:
            self.Options_Template_Record_Header.export(outfile, level, 'NetFlowObj:', name_='Options_Template_Record_Header')
        for Field_Specifier_ in self.Field_Specifier:
            Field_Specifier_.export(outfile, level, 'NetFlowObj:', name_='Field_Specifier')
    def hasContent_(self):
        if (
            self.Options_Template_Record_Header is not None or
            self.Field_Specifier
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXOptionsTemplateRecordType'):
        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.Options_Template_Record_Header is not None:
            showIndent(outfile, level)
            outfile.write('Options_Template_Record_Header=model_.IPFIXOptionsTemplateRecordHeaderType(\n')
            self.Options_Template_Record_Header.exportLiteral(outfile, level, name_='Options_Template_Record_Header')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('Field_Specifier=[\n')
        level += 1
        for Field_Specifier_ in self.Field_Specifier:
            showIndent(outfile, level)
            outfile.write('model_.IPFIXOptionsTemplateRecordFieldSpecifiersType(\n')
            Field_Specifier_.exportLiteral(outfile, level, name_='IPFIXOptionsTemplateRecordFieldSpecifiersType')
            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_ == 'Options_Template_Record_Header':
            obj_ = IPFIXOptionsTemplateRecordHeaderType.factory()
            obj_.build(child_)
            self.set_Options_Template_Record_Header(obj_)
        elif nodeName_ == 'Field_Specifier':
            obj_ = IPFIXOptionsTemplateRecordFieldSpecifiersType.factory()
            obj_.build(child_)
            self.Field_Specifier.append(obj_)
# end class IPFIXOptionsTemplateRecordType


class IPFIXOptionsTemplateRecordHeaderType(GeneratedsSuper):
    """Defines the ehader of an options template record."""
    subclass = None
    superclass = None
    def __init__(self, Template_ID=None, Field_Count=None, Scope_Field_Count=None):
        self.Template_ID = Template_ID
        self.Field_Count = Field_Count
        self.Scope_Field_Count = Scope_Field_Count
    def factory(*args_, **kwargs_):
        if IPFIXOptionsTemplateRecordHeaderType.subclass:
            return IPFIXOptionsTemplateRecordHeaderType.subclass(*args_, **kwargs_)
        else:
            return IPFIXOptionsTemplateRecordHeaderType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Template_ID(self): return self.Template_ID
    def set_Template_ID(self, Template_ID): self.Template_ID = Template_ID
    def get_Field_Count(self): return self.Field_Count
    def set_Field_Count(self, Field_Count): self.Field_Count = Field_Count
    def get_Scope_Field_Count(self): return self.Scope_Field_Count
    def set_Scope_Field_Count(self, Scope_Field_Count): self.Scope_Field_Count = Scope_Field_Count
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateRecordHeaderType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXOptionsTemplateRecordHeaderType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateRecordHeaderType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateRecordHeaderType', fromsubclass_=False):
        if self.Template_ID is not None:
            self.Template_ID.export(outfile, level, 'NetFlowObj:', name_='Template_ID')
        if self.Field_Count is not None:
            self.Field_Count.export(outfile, level, 'NetFlowObj:', name_='Field_Count')
        if self.Scope_Field_Count is not None:
            self.Scope_Field_Count.export(outfile, level, 'NetFlowObj:', name_='Scope_Field_Count')
    def hasContent_(self):
        if (
            self.Template_ID is not None or
            self.Field_Count is not None or
            self.Scope_Field_Count is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXOptionsTemplateRecordHeaderType'):
        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.Template_ID is not None:
            showIndent(outfile, level)
            outfile.write('Template_ID=%s,\n' % quote_python(self.Template_ID).encode(ExternalEncoding))
        if self.Field_Count is not None:
            showIndent(outfile, level)
            outfile.write('Field_Count=%s,\n' % quote_python(self.Field_Count).encode(ExternalEncoding))
        if self.Scope_Field_Count is not None:
            showIndent(outfile, level)
            outfile.write('Scope_Field_Count=%s,\n' % quote_python(self.Scope_Field_Count).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_ == 'Template_ID':
            Template_ID_ = child_.text
            Template_ID_ = self.gds_validate_string(Template_ID_, node, 'Template_ID')
            self.Template_ID = Template_ID_
        elif nodeName_ == 'Field_Count':
            Field_Count_ = child_.text
            Field_Count_ = self.gds_validate_string(Field_Count_, node, 'Field_Count')
            self.Field_Count = Field_Count_
        elif nodeName_ == 'Scope_Field_Count':
            Scope_Field_Count_ = child_.text
            Scope_Field_Count_ = self.gds_validate_string(Scope_Field_Count_, node, 'Scope_Field_Count')
            self.Scope_Field_Count = Scope_Field_Count_
# end class IPFIXOptionsTemplateRecordHeaderType


class IPFIXOptionsTemplateRecordFieldSpecifiersType(GeneratedsSuper):
    """Specifies the fields in an Options Template Record Field Specifier,
    as explained in RFC 5101, sections 3.2 and 3.4.2.2. It consists
    of two sequences: Scope Fields and Option Fields, appended
    together."""
    subclass = None
    superclass = None
    def __init__(self, Scope_Enterprise_Bit=None, Scope_Information_Element_ID=None, Scope_Field_Length=None, Scope_Enterprise_Number=None, Option_Enterprise_Bit=None, Option_Information_Element_ID=None, Option_Field_Length=None, Option_Enterprise_Number=None):
        self.Scope_Enterprise_Bit = Scope_Enterprise_Bit
        self.Scope_Information_Element_ID = Scope_Information_Element_ID
        self.Scope_Field_Length = Scope_Field_Length
        self.Scope_Enterprise_Number = Scope_Enterprise_Number
        self.Option_Enterprise_Bit = Option_Enterprise_Bit
        self.Option_Information_Element_ID = Option_Information_Element_ID
        self.Option_Field_Length = Option_Field_Length
        self.Option_Enterprise_Number = Option_Enterprise_Number
    def factory(*args_, **kwargs_):
        if IPFIXOptionsTemplateRecordFieldSpecifiersType.subclass:
            return IPFIXOptionsTemplateRecordFieldSpecifiersType.subclass(*args_, **kwargs_)
        else:
            return IPFIXOptionsTemplateRecordFieldSpecifiersType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Scope_Enterprise_Bit(self): return self.Scope_Enterprise_Bit
    def set_Scope_Enterprise_Bit(self, Scope_Enterprise_Bit): self.Scope_Enterprise_Bit = Scope_Enterprise_Bit
    def get_Scope_Information_Element_ID(self): return self.Scope_Information_Element_ID
    def set_Scope_Information_Element_ID(self, Scope_Information_Element_ID): self.Scope_Information_Element_ID = Scope_Information_Element_ID
    def get_Scope_Field_Length(self): return self.Scope_Field_Length
    def set_Scope_Field_Length(self, Scope_Field_Length): self.Scope_Field_Length = Scope_Field_Length
    def get_Scope_Enterprise_Number(self): return self.Scope_Enterprise_Number
    def set_Scope_Enterprise_Number(self, Scope_Enterprise_Number): self.Scope_Enterprise_Number = Scope_Enterprise_Number
    def get_Option_Enterprise_Bit(self): return self.Option_Enterprise_Bit
    def set_Option_Enterprise_Bit(self, Option_Enterprise_Bit): self.Option_Enterprise_Bit = Option_Enterprise_Bit
    def get_Option_Information_Element_ID(self): return self.Option_Information_Element_ID
    def set_Option_Information_Element_ID(self, Option_Information_Element_ID): self.Option_Information_Element_ID = Option_Information_Element_ID
    def get_Option_Field_Length(self): return self.Option_Field_Length
    def set_Option_Field_Length(self, Option_Field_Length): self.Option_Field_Length = Option_Field_Length
    def get_Option_Enterprise_Number(self): return self.Option_Enterprise_Number
    def set_Option_Enterprise_Number(self, Option_Enterprise_Number): self.Option_Enterprise_Number = Option_Enterprise_Number
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateRecordFieldSpecifiersType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXOptionsTemplateRecordFieldSpecifiersType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateRecordFieldSpecifiersType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXOptionsTemplateRecordFieldSpecifiersType', fromsubclass_=False):
        if self.Scope_Enterprise_Bit is not None:
            self.Scope_Enterprise_Bit.export(outfile, level, 'NetFlowObj:', name_='Scope_Enterprise_Bit')
        if self.Scope_Information_Element_ID is not None:
            self.Scope_Information_Element_ID.export(outfile, level, 'NetFlowObj:', name_='Scope_Information_Element_ID')
        if self.Scope_Field_Length is not None:
            self.Scope_Field_Length.export(outfile, level, 'NetFlowObj:', name_='Scope_Field_Length')
        if self.Scope_Enterprise_Number is not None:
            self.Scope_Enterprise_Number.export(outfile, level, 'NetFlowObj:', name_='Scope_Enterprise_Number')
        if self.Option_Enterprise_Bit is not None:
            self.Option_Enterprise_Bit.export(outfile, level, 'NetFlowObj:', name_='Option_Enterprise_Bit')
        if self.Option_Information_Element_ID is not None:
            self.Option_Information_Element_ID.export(outfile, level, 'NetFlowObj:', name_='Option_Information_Element_ID')
        if self.Option_Field_Length is not None:
            self.Option_Field_Length.export(outfile, level, 'NetFlowObj:', name_='Option_Field_Length')
        if self.Option_Enterprise_Number is not None:
            self.Option_Enterprise_Number.export(outfile, level, 'NetFlowObj:', name_='Option_Enterprise_Number')
    def hasContent_(self):
        if (
            self.Scope_Enterprise_Bit is not None or
            self.Scope_Information_Element_ID is not None or
            self.Scope_Field_Length is not None or
            self.Scope_Enterprise_Number is not None or
            self.Option_Enterprise_Bit is not None or
            self.Option_Information_Element_ID is not None or
            self.Option_Field_Length is not None or
            self.Option_Enterprise_Number is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXOptionsTemplateRecordFieldSpecifiersType'):
        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.Scope_Enterprise_Bit is not None:
            showIndent(outfile, level)
            outfile.write('Scope_Enterprise_Bit=%s,\n' % self.Scope_Enterprise_Bit)
        if self.Scope_Information_Element_ID is not None:
            showIndent(outfile, level)
            outfile.write('Scope_Information_Element_ID=%s,\n' % quote_python(self.Scope_Information_Element_ID).encode(ExternalEncoding))
        if self.Scope_Field_Length is not None:
            showIndent(outfile, level)
            outfile.write('Scope_Field_Length=%s,\n' % quote_python(self.Scope_Field_Length).encode(ExternalEncoding))
        if self.Scope_Enterprise_Number is not None:
            showIndent(outfile, level)
            outfile.write('Scope_Enterprise_Number=%s,\n' % quote_python(self.Scope_Enterprise_Number).encode(ExternalEncoding))
        if self.Option_Enterprise_Bit is not None:
            showIndent(outfile, level)
            outfile.write('Option_Enterprise_Bit=%s,\n' % self.Option_Enterprise_Bit)
        if self.Option_Information_Element_ID is not None:
            showIndent(outfile, level)
            outfile.write('Option_Information_Element_ID=%s,\n' % quote_python(self.Option_Information_Element_ID).encode(ExternalEncoding))
        if self.Option_Field_Length is not None:
            showIndent(outfile, level)
            outfile.write('Option_Field_Length=%s,\n' % quote_python(self.Option_Field_Length).encode(ExternalEncoding))
        if self.Option_Enterprise_Number is not None:
            showIndent(outfile, level)
            outfile.write('Option_Enterprise_Number=%s,\n' % quote_python(self.Option_Enterprise_Number).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_ == 'Scope_Enterprise_Bit':
            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, 'Scope_Enterprise_Bit')
            self.Scope_Enterprise_Bit = ival_
        elif nodeName_ == 'Scope_Information_Element_ID':
            Scope_Information_Element_ID_ = child_.text
            Scope_Information_Element_ID_ = self.gds_validate_string(Scope_Information_Element_ID_, node, 'Scope_Information_Element_ID')
            self.Scope_Information_Element_ID = Scope_Information_Element_ID_
        elif nodeName_ == 'Scope_Field_Length':
            Scope_Field_Length_ = child_.text
            Scope_Field_Length_ = self.gds_validate_string(Scope_Field_Length_, node, 'Scope_Field_Length')
            self.Scope_Field_Length = Scope_Field_Length_
        elif nodeName_ == 'Scope_Enterprise_Number':
            Scope_Enterprise_Number_ = child_.text
            Scope_Enterprise_Number_ = self.gds_validate_string(Scope_Enterprise_Number_, node, 'Scope_Enterprise_Number')
            self.Scope_Enterprise_Number = Scope_Enterprise_Number_
        elif nodeName_ == 'Option_Enterprise_Bit':
            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, 'Option_Enterprise_Bit')
            self.Option_Enterprise_Bit = ival_
        elif nodeName_ == 'Option_Information_Element_ID':
            Option_Information_Element_ID_ = child_.text
            Option_Information_Element_ID_ = self.gds_validate_string(Option_Information_Element_ID_, node, 'Option_Information_Element_ID')
            self.Option_Information_Element_ID = Option_Information_Element_ID_
        elif nodeName_ == 'Option_Field_Length':
            Option_Field_Length_ = child_.text
            Option_Field_Length_ = self.gds_validate_string(Option_Field_Length_, node, 'Option_Field_Length')
            self.Option_Field_Length = Option_Field_Length_
        elif nodeName_ == 'Option_Enterprise_Number':
            Option_Enterprise_Number_ = child_.text
            Option_Enterprise_Number_ = self.gds_validate_string(Option_Enterprise_Number_, node, 'Option_Enterprise_Number')
            self.Option_Enterprise_Number = Option_Enterprise_Number_
# end class IPFIXOptionsTemplateRecordFieldSpecifiersType


class IPFIXDataRecordType(GeneratedsSuper):
    """Data records are sent in data sets. A data record consists of only
    one more more Field values."""
    subclass = None
    superclass = None
    def __init__(self, Field_Value=None):
        if Field_Value is None:
            self.Field_Value = []
        else:
            self.Field_Value = Field_Value
    def factory(*args_, **kwargs_):
        if IPFIXDataRecordType.subclass:
            return IPFIXDataRecordType.subclass(*args_, **kwargs_)
        else:
            return IPFIXDataRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Field_Value(self): return self.Field_Value
    def set_Field_Value(self, Field_Value): self.Field_Value = Field_Value
    def add_Field_Value(self, value): self.Field_Value.append(value)
    def insert_Field_Value(self, index, value): self.Field_Value[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXDataRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IPFIXDataRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='IPFIXDataRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='IPFIXDataRecordType', fromsubclass_=False):
        for Field_Value_ in self.Field_Value:
            Field_Value_.export(outfile, level, 'NetFlowObj:', name_='Field_Value')
    def hasContent_(self):
        if (
            self.Field_Value
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='IPFIXDataRecordType'):
        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('Field_Value=[\n')
        level += 1
        for Field_Value_ in self.Field_Value:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(Field_Value_).encode(ExternalEncoding))
        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_ == 'Field_Value':
            Field_Value_ = child_.text
            Field_Value_ = self.gds_validate_string(Field_Value_, node, 'Field_Value')
            self.Field_Value.append(Field_Value_)
# end class IPFIXDataRecordType


class NetflowV9ExportPacketType(GeneratedsSuper):
    """Netflow v9 was developed by Cisco and provides acess to IP flow
    information. http://www.ietf.org/rfc/rfc3954.txt"""
    subclass = None
    superclass = None
    def __init__(self, Packet_Header=None, Flow_Set=None):
        self.Packet_Header = Packet_Header
        if Flow_Set is None:
            self.Flow_Set = []
        else:
            self.Flow_Set = Flow_Set
    def factory(*args_, **kwargs_):
        if NetflowV9ExportPacketType.subclass:
            return NetflowV9ExportPacketType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9ExportPacketType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Packet_Header(self): return self.Packet_Header
    def set_Packet_Header(self, Packet_Header): self.Packet_Header = Packet_Header
    def get_Flow_Set(self): return self.Flow_Set
    def set_Flow_Set(self, Flow_Set): self.Flow_Set = Flow_Set
    def add_Flow_Set(self, value): self.Flow_Set.append(value)
    def insert_Flow_Set(self, index, value): self.Flow_Set[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9ExportPacketType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9ExportPacketType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9ExportPacketType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9ExportPacketType', fromsubclass_=False):
        if self.Packet_Header is not None:
            self.Packet_Header.export(outfile, level, 'NetFlowObj:', name_='Packet_Header')
        for Flow_Set_ in self.Flow_Set:
            Flow_Set_.export(outfile, level, namespace_, name_='Flow_Set')
    def hasContent_(self):
        if (
            self.Packet_Header is not None or
            self.Flow_Set
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9ExportPacketType'):
        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.Packet_Header is not None:
            showIndent(outfile, level)
            outfile.write('Packet_Header=model_.NetflowV9PacketHeaderType(\n')
            self.Packet_Header.exportLiteral(outfile, level, name_='Packet_Header')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('Flow_Set=[\n')
        level += 1
        for Flow_Set_ in self.Flow_Set:
            showIndent(outfile, level)
            outfile.write('model_.NetflowV9FlowSetType(\n')
            Flow_Set_.exportLiteral(outfile, level, name_='NetflowV9FlowSetType')
            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_ == 'Packet_Header':
            obj_ = NetflowV9PacketHeaderType.factory()
            obj_.build(child_)
            self.set_Packet_Header(obj_)
        elif nodeName_ == 'Flow_Set':
            obj_ = NetflowV9FlowSetType.factory()
            obj_.build(child_)
            self.Flow_Set.append(obj_)
# end class NetflowV9ExportPacketType


class NetflowV9PacketHeaderType(GeneratedsSuper):
    """Header fields defined for Netflow v9. Note that common elements are
    included in the Network_Flow_Label.
    http://www.ietf.org/rfc/rfc3954.txt"""
    subclass = None
    superclass = None
    def __init__(self, Version=None, Record_Count=None, Sys_Up_Time=None, Unix_Secs=None, Sequence_Number=None, Source_ID=None):
        self.Version = Version
        self.Record_Count = Record_Count
        self.Sys_Up_Time = Sys_Up_Time
        self.Unix_Secs = Unix_Secs
        self.Sequence_Number = Sequence_Number
        self.Source_ID = Source_ID
    def factory(*args_, **kwargs_):
        if NetflowV9PacketHeaderType.subclass:
            return NetflowV9PacketHeaderType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9PacketHeaderType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Version(self): return self.Version
    def set_Version(self, Version): self.Version = Version
    def get_Record_Count(self): return self.Record_Count
    def set_Record_Count(self, Record_Count): self.Record_Count = Record_Count
    def get_Sys_Up_Time(self): return self.Sys_Up_Time
    def set_Sys_Up_Time(self, Sys_Up_Time): self.Sys_Up_Time = Sys_Up_Time
    def get_Unix_Secs(self): return self.Unix_Secs
    def set_Unix_Secs(self, Unix_Secs): self.Unix_Secs = Unix_Secs
    def get_Sequence_Number(self): return self.Sequence_Number
    def set_Sequence_Number(self, Sequence_Number): self.Sequence_Number = Sequence_Number
    def get_Source_ID(self): return self.Source_ID
    def set_Source_ID(self, Source_ID): self.Source_ID = Source_ID
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9PacketHeaderType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9PacketHeaderType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9PacketHeaderType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9PacketHeaderType', fromsubclass_=False):
        if self.Version is not None:
            self.Version.export(outfile, level, 'NetFlowObj:', name_='Version')
        if self.Record_Count is not None:
            self.Record_Count.export(outfile, level, 'NetFlowObj:', name_='Record_Count')
        if self.Sys_Up_Time is not None:
            self.Sys_Up_Time.export(outfile, level, 'NetFlowObj:', name_='Sys_Up_Time')
        if self.Unix_Secs is not None:
            self.Unix_Secs.export(outfile, level, 'NetFlowObj:', name_='Unix_Secs')
        if self.Sequence_Number is not None:
            self.Sequence_Number.export(outfile, level, 'NetFlowObj:', name_='Sequence_Number')
        if self.Source_ID is not None:
            self.Source_ID.export(outfile, level, 'NetFlowObj:', name_='Source_ID')
    def hasContent_(self):
        if (
            self.Version is not None or
            self.Record_Count is not None or
            self.Sys_Up_Time is not None or
            self.Unix_Secs is not None or
            self.Sequence_Number is not None or
            self.Source_ID is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9PacketHeaderType'):
        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.Version is not None:
            showIndent(outfile, level)
            outfile.write('Version=%s,\n' % quote_python(self.Version).encode(ExternalEncoding))
        if self.Record_Count is not None:
            showIndent(outfile, level)
            outfile.write('Record_Count=%s,\n' % quote_python(self.Record_Count).encode(ExternalEncoding))
        if self.Sys_Up_Time is not None:
            showIndent(outfile, level)
            outfile.write('Sys_Up_Time=%s,\n' % quote_python(self.Sys_Up_Time).encode(ExternalEncoding))
        if self.Unix_Secs is not None:
            showIndent(outfile, level)
            outfile.write('Unix_Secs=%s,\n' % quote_python(self.Unix_Secs).encode(ExternalEncoding))
        if self.Sequence_Number is not None:
            showIndent(outfile, level)
            outfile.write('Sequence_Number=%s,\n' % quote_python(self.Sequence_Number).encode(ExternalEncoding))
        if self.Source_ID is not None:
            showIndent(outfile, level)
            outfile.write('Source_ID=%s,\n' % quote_python(self.Source_ID).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_ == 'Version':
            Version_ = child_.text
            Version_ = self.gds_validate_string(Version_, node, 'Version')
            self.Version = Version_
        elif nodeName_ == 'Record_Count':
            Record_Count_ = child_.text
            Record_Count_ = self.gds_validate_string(Record_Count_, node, 'Record_Count')
            self.Record_Count = Record_Count_
        elif nodeName_ == 'Sys_Up_Time':
            Sys_Up_Time_ = child_.text
            Sys_Up_Time_ = self.gds_validate_string(Sys_Up_Time_, node, 'Sys_Up_Time')
            self.Sys_Up_Time = Sys_Up_Time_
        elif nodeName_ == 'Unix_Secs':
            Unix_Secs_ = child_.text
            Unix_Secs_ = self.gds_validate_string(Unix_Secs_, node, 'Unix_Secs')
            self.Unix_Secs = Unix_Secs_
        elif nodeName_ == 'Sequence_Number':
            Sequence_Number_ = child_.text
            Sequence_Number_ = self.gds_validate_string(Sequence_Number_, node, 'Sequence_Number')
            self.Sequence_Number = Sequence_Number_
        elif nodeName_ == 'Source_ID':
            Source_ID_ = child_.text
            Source_ID_ = self.gds_validate_string(Source_ID_, node, 'Source_ID')
            self.Source_ID = Source_ID_
# end class NetflowV9PacketHeaderType


class NetflowV9FlowSetType(GeneratedsSuper):
    """In an Export Packet, one or more FlowSets follow the Packet Header.
    There are three differnet types of FlowSets, as defined in RFC
    3954: a Template FlowSet, Options Template FlowSet and Data
    FlowSet."""
    subclass = None
    superclass = None
    def __init__(self, Template_Flow_Set=None, Options_Template_Flow_Set=None, Data_Flow_Set=None):
        self.Template_Flow_Set = Template_Flow_Set
        self.Options_Template_Flow_Set = Options_Template_Flow_Set
        self.Data_Flow_Set = Data_Flow_Set
    def factory(*args_, **kwargs_):
        if NetflowV9FlowSetType.subclass:
            return NetflowV9FlowSetType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9FlowSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Template_Flow_Set(self): return self.Template_Flow_Set
    def set_Template_Flow_Set(self, Template_Flow_Set): self.Template_Flow_Set = Template_Flow_Set
    def get_Options_Template_Flow_Set(self): return self.Options_Template_Flow_Set
    def set_Options_Template_Flow_Set(self, Options_Template_Flow_Set): self.Options_Template_Flow_Set = Options_Template_Flow_Set
    def get_Data_Flow_Set(self): return self.Data_Flow_Set
    def set_Data_Flow_Set(self, Data_Flow_Set): self.Data_Flow_Set = Data_Flow_Set
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9FlowSetType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9FlowSetType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9FlowSetType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9FlowSetType', fromsubclass_=False):
        if self.Template_Flow_Set is not None:
            self.Template_Flow_Set.export(outfile, level, 'NetFlowObj:', name_='Template_Flow_Set')
        if self.Options_Template_Flow_Set is not None:
            self.Options_Template_Flow_Set.export(outfile, level, 'NetFlowObj:', name_='Options_Template_Flow_Set')
        if self.Data_Flow_Set is not None:
            self.Data_Flow_Set.export(outfile, level, 'NetFlowObj:', name_='Data_Flow_Set')
    def hasContent_(self):
        if (
            self.Template_Flow_Set is not None or
            self.Options_Template_Flow_Set is not None or
            self.Data_Flow_Set is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9FlowSetType'):
        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.Template_Flow_Set is not None:
            showIndent(outfile, level)
            outfile.write('Template_Flow_Set=model_.NetflowV9TemplateFlowSetType(\n')
            self.Template_Flow_Set.exportLiteral(outfile, level, name_='Template_Flow_Set')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Options_Template_Flow_Set is not None:
            showIndent(outfile, level)
            outfile.write('Options_Template_Flow_Set=model_.NetflowV9OptionsTemplateFlowSetType(\n')
            self.Options_Template_Flow_Set.exportLiteral(outfile, level, name_='Options_Template_Flow_Set')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Data_Flow_Set is not None:
            showIndent(outfile, level)
            outfile.write('Data_Flow_Set=model_.NetflowV9DataFlowSetType(\n')
            self.Data_Flow_Set.exportLiteral(outfile, level, name_='Data_Flow_Set')
            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_ == 'Template_Flow_Set':
            obj_ = NetflowV9TemplateFlowSetType.factory()
            obj_.build(child_)
            self.set_Template_Flow_Set(obj_)
        elif nodeName_ == 'Options_Template_Flow_Set':
            obj_ = NetflowV9OptionsTemplateFlowSetType.factory()
            obj_.build(child_)
            self.set_Options_Template_Flow_Set(obj_)
        elif nodeName_ == 'Data_Flow_Set':
            obj_ = NetflowV9DataFlowSetType.factory()
            obj_.build(child_)
            self.set_Data_Flow_Set(obj_)
# end class NetflowV9FlowSetType


class NetflowV9TemplateFlowSetType(GeneratedsSuper):
    """Provides the format of the Template FlowSet."""
    subclass = None
    superclass = None
    def __init__(self, Flow_Set_ID=None, Length=None, Template_Record=None):
        self.Flow_Set_ID = Flow_Set_ID
        self.Length = Length
        if Template_Record is None:
            self.Template_Record = []
        else:
            self.Template_Record = Template_Record
    def factory(*args_, **kwargs_):
        if NetflowV9TemplateFlowSetType.subclass:
            return NetflowV9TemplateFlowSetType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9TemplateFlowSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Flow_Set_ID(self): return self.Flow_Set_ID
    def set_Flow_Set_ID(self, Flow_Set_ID): self.Flow_Set_ID = Flow_Set_ID
    def get_Length(self): return self.Length
    def set_Length(self, Length): self.Length = Length
    def get_Template_Record(self): return self.Template_Record
    def set_Template_Record(self, Template_Record): self.Template_Record = Template_Record
    def add_Template_Record(self, value): self.Template_Record.append(value)
    def insert_Template_Record(self, index, value): self.Template_Record[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9TemplateFlowSetType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9TemplateFlowSetType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9TemplateFlowSetType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9TemplateFlowSetType', fromsubclass_=False):
        if self.Flow_Set_ID is not None:
            self.Flow_Set_ID.export(outfile, level, 'NetFlowObj:', name_='Flow_Set_ID')
        if self.Length is not None:
            self.Length.export(outfile, level, 'NetFlowObj:', name_='Length')
        for Template_Record_ in self.Template_Record:
            Template_Record_.export(outfile, level, 'NetFlowObj:', name_='Template_Record')
    def hasContent_(self):
        if (
            self.Flow_Set_ID is not None or
            self.Length is not None or
            self.Template_Record
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9TemplateFlowSetType'):
        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.Flow_Set_ID is not None:
            showIndent(outfile, level)
            outfile.write('Flow_Set_ID=%s,\n' % quote_python(self.Flow_Set_ID).encode(ExternalEncoding))
        if self.Length is not None:
            showIndent(outfile, level)
            outfile.write('Length=%s,\n' % quote_python(self.Length).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('Template_Record=[\n')
        level += 1
        for Template_Record_ in self.Template_Record:
            showIndent(outfile, level)
            outfile.write('model_.NetflowV9TemplateRecordType(\n')
            Template_Record_.exportLiteral(outfile, level, name_='NetflowV9TemplateRecordType')
            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_ == 'Flow_Set_ID':
            Flow_Set_ID_ = child_.text
            Flow_Set_ID_ = self.gds_validate_string(Flow_Set_ID_, node, 'Flow_Set_ID')
            self.Flow_Set_ID = Flow_Set_ID_
        elif nodeName_ == 'Length':
            Length_ = child_.text
            Length_ = self.gds_validate_string(Length_, node, 'Length')
            self.Length = Length_
        elif nodeName_ == 'Template_Record':
            obj_ = NetflowV9TemplateRecordType.factory()
            obj_.build(child_)
            self.Template_Record.append(obj_)
# end class NetflowV9TemplateFlowSetType


class NetflowV9TemplateRecordType(GeneratedsSuper):
    """Specifies the Template Record region, which includes the template
    ID, field count, field type, and field length.Number of fields
    corresponds to Count element."""
    subclass = None
    superclass = None
    def __init__(self, Template_ID=None, Field_Count=None, Field_Type=None, Field_Length=None):
        self.Template_ID = Template_ID
        self.Field_Count = Field_Count
        self.Field_Type = Field_Type
        self.Field_Length = Field_Length
    def factory(*args_, **kwargs_):
        if NetflowV9TemplateRecordType.subclass:
            return NetflowV9TemplateRecordType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9TemplateRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Template_ID(self): return self.Template_ID
    def set_Template_ID(self, Template_ID): self.Template_ID = Template_ID
    def get_Field_Count(self): return self.Field_Count
    def set_Field_Count(self, Field_Count): self.Field_Count = Field_Count
    def get_Field_Type(self): return self.Field_Type
    def set_Field_Type(self, Field_Type): self.Field_Type = Field_Type
    def validate_NetflowV9FieldType(self, value):
        # Validate type NetflowV9FieldType, a restriction on None.
        pass
    def get_Field_Length(self): return self.Field_Length
    def set_Field_Length(self, Field_Length): self.Field_Length = Field_Length
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9TemplateRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9TemplateRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9TemplateRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9TemplateRecordType', fromsubclass_=False):
        if self.Template_ID is not None:
            self.Template_ID.export(outfile, level, 'NetFlowObj:', name_='Template_ID')
        if self.Field_Count is not None:
            self.Field_Count.export(outfile, level, 'NetFlowObj:', name_='Field_Count')
        if self.Field_Type is not None:
            self.Field_Type.export(outfile, level, 'NetFlowObj:', name_='Field_Type')
        if self.Field_Length is not None:
            self.Field_Length.export(outfile, level, 'NetFlowObj:', name_='Field_Length')
    def hasContent_(self):
        if (
            self.Template_ID is not None or
            self.Field_Count is not None or
            self.Field_Type is not None or
            self.Field_Length is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9TemplateRecordType'):
        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.Template_ID is not None:
            showIndent(outfile, level)
            outfile.write('Template_ID=%s,\n' % quote_python(self.Template_ID).encode(ExternalEncoding))
        if self.Field_Count is not None:
            showIndent(outfile, level)
            outfile.write('Field_Count=%s,\n' % quote_python(self.Field_Count).encode(ExternalEncoding))
        if self.Field_Type is not None:
            showIndent(outfile, level)
            outfile.write('Field_Type=model_.NetflowV9FieldType(\n')
            self.Field_Type.exportLiteral(outfile, level, name_='Field_Type')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Field_Length is not None:
            showIndent(outfile, level)
            outfile.write('Field_Length=%s,\n' % quote_python(self.Field_Length).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_ == 'Template_ID':
            Template_ID_ = child_.text
            Template_ID_ = self.gds_validate_string(Template_ID_, node, 'Template_ID')
            self.Template_ID = Template_ID_
        elif nodeName_ == 'Field_Count':
            Field_Count_ = child_.text
            Field_Count_ = self.gds_validate_string(Field_Count_, node, 'Field_Count')
            self.Field_Count = Field_Count_
        elif nodeName_ == 'Field_Type':
            obj_ = None
            self.set_Field_Type(obj_)
            self.validate_NetflowV9FieldType(self.Field_Type)    # validate type NetflowV9FieldType
        elif nodeName_ == 'Field_Length':
            Field_Length_ = child_.text
            Field_Length_ = self.gds_validate_string(Field_Length_, node, 'Field_Length')
            self.Field_Length = Field_Length_
# end class NetflowV9TemplateRecordType


class NetflowV9FieldType(GeneratedsSuper):
    """NetflowV9FieldType specifies possible fields types for Netflow v9,
    via a union of the NetflowV9FieldTypeEnum type and the atomic
    xs:string type. Its base type is the CybOX Core
    BaseObjectAttributeType, for permitting complex (i.e. regular-
    expression based) specifications.This attribute is optional and
    specifies the expected type for the value of the specified
    element."""
    subclass = None
    superclass = None
    def __init__(self, datatype=None, valueOf_=None):
        self.datatype = _cast(None, datatype)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if NetflowV9FieldType.subclass:
            return NetflowV9FieldType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9FieldType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_datatype(self): return self.datatype
    def set_datatype(self, datatype): self.datatype = datatype
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9FieldType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9FieldType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9FieldType'):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            outfile.write(' datatype=%s' % (quote_attrib(self.datatype), ))
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9FieldType', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (
            self.valueOf_
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9FieldType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            showIndent(outfile, level)
            outfile.write('datatype = %s,\n' % (self.datatype,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('datatype', node)
        if value is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            self.datatype = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class NetflowV9FieldType


class NetflowV9OptionsTemplateFlowSetType(GeneratedsSuper):
    """Specifies an Options Template FlowSet, which is one or more Options
    Template Records that have been grouped together in an Export
    Packet."""
    subclass = None
    superclass = None
    def __init__(self, Flow_Set_ID=None, Length=None, Options_Template_Record=None, Padding=None):
        self.Flow_Set_ID = Flow_Set_ID
        self.Length = Length
        if Options_Template_Record is None:
            self.Options_Template_Record = []
        else:
            self.Options_Template_Record = Options_Template_Record
        self.Padding = Padding
    def factory(*args_, **kwargs_):
        if NetflowV9OptionsTemplateFlowSetType.subclass:
            return NetflowV9OptionsTemplateFlowSetType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9OptionsTemplateFlowSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Flow_Set_ID(self): return self.Flow_Set_ID
    def set_Flow_Set_ID(self, Flow_Set_ID): self.Flow_Set_ID = Flow_Set_ID
    def get_Length(self): return self.Length
    def set_Length(self, Length): self.Length = Length
    def get_Options_Template_Record(self): return self.Options_Template_Record
    def set_Options_Template_Record(self, Options_Template_Record): self.Options_Template_Record = Options_Template_Record
    def add_Options_Template_Record(self, value): self.Options_Template_Record.append(value)
    def insert_Options_Template_Record(self, index, value): self.Options_Template_Record[index] = value
    def get_Padding(self): return self.Padding
    def set_Padding(self, Padding): self.Padding = Padding
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9OptionsTemplateFlowSetType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9OptionsTemplateFlowSetType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9OptionsTemplateFlowSetType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9OptionsTemplateFlowSetType', fromsubclass_=False):
        if self.Flow_Set_ID is not None:
            self.Flow_Set_ID.export(outfile, level, 'NetFlowObj:', name_='Flow_Set_ID')
        if self.Length is not None:
            self.Length.export(outfile, level, 'NetFlowObj:', name_='Length')
        for Options_Template_Record_ in self.Options_Template_Record:
            Options_Template_Record_.export(outfile, level, 'NetFlowObj:', name_='Options_Template_Record')
        if self.Padding is not None:
            self.Padding.export(outfile, level, 'NetFlowObj:', name_='Padding')
    def hasContent_(self):
        if (
            self.Flow_Set_ID is not None or
            self.Length is not None or
            self.Options_Template_Record or
            self.Padding is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9OptionsTemplateFlowSetType'):
        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.Flow_Set_ID is not None:
            showIndent(outfile, level)
            outfile.write('Flow_Set_ID=%s,\n' % quote_python(self.Flow_Set_ID).encode(ExternalEncoding))
        if self.Length is not None:
            showIndent(outfile, level)
            outfile.write('Length=%s,\n' % quote_python(self.Length).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('Options_Template_Record=[\n')
        level += 1
        for Options_Template_Record_ in self.Options_Template_Record:
            showIndent(outfile, level)
            outfile.write('model_.NetflowV9OptionsTemplateRecordType(\n')
            Options_Template_Record_.exportLiteral(outfile, level, name_='NetflowV9OptionsTemplateRecordType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.Padding is not None:
            showIndent(outfile, level)
            outfile.write('Padding=%s,\n' % quote_python(self.Padding).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_ == 'Flow_Set_ID':
            Flow_Set_ID_ = child_.text
            Flow_Set_ID_ = self.gds_validate_string(Flow_Set_ID_, node, 'Flow_Set_ID')
            self.Flow_Set_ID = Flow_Set_ID_
        elif nodeName_ == 'Length':
            Length_ = child_.text
            Length_ = self.gds_validate_string(Length_, node, 'Length')
            self.Length = Length_
        elif nodeName_ == 'Options_Template_Record':
            obj_ = NetflowV9OptionsTemplateRecordType.factory()
            obj_.build(child_)
            self.Options_Template_Record.append(obj_)
        elif nodeName_ == 'Padding':
            Padding_ = child_.text
            Padding_ = self.gds_validate_string(Padding_, node, 'Padding')
            self.Padding = Padding_
# end class NetflowV9OptionsTemplateFlowSetType


class NetflowV9OptionsTemplateRecordType(GeneratedsSuper):
    """Specifies the Options Template Record region, which includes the
    Option Scope Length, Option Length, and fields specifying the
    Scope field type and Scope field length."""
    subclass = None
    superclass = None
    def __init__(self, Template_ID=None, Option_Scope_Length=None, Option_Length=None, Scope_Field_Type=None, Scope_Field_Length=None, Option_Field_Type=None, Option_Field_Length=None):
        self.Template_ID = Template_ID
        self.Option_Scope_Length = Option_Scope_Length
        self.Option_Length = Option_Length
        self.Scope_Field_Type = Scope_Field_Type
        self.Scope_Field_Length = Scope_Field_Length
        self.Option_Field_Type = Option_Field_Type
        self.Option_Field_Length = Option_Field_Length
    def factory(*args_, **kwargs_):
        if NetflowV9OptionsTemplateRecordType.subclass:
            return NetflowV9OptionsTemplateRecordType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9OptionsTemplateRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Template_ID(self): return self.Template_ID
    def set_Template_ID(self, Template_ID): self.Template_ID = Template_ID
    def get_Option_Scope_Length(self): return self.Option_Scope_Length
    def set_Option_Scope_Length(self, Option_Scope_Length): self.Option_Scope_Length = Option_Scope_Length
    def get_Option_Length(self): return self.Option_Length
    def set_Option_Length(self, Option_Length): self.Option_Length = Option_Length
    def get_Scope_Field_Type(self): return self.Scope_Field_Type
    def set_Scope_Field_Type(self, Scope_Field_Type): self.Scope_Field_Type = Scope_Field_Type
    def validate_NetflowV9ScopeFieldType(self, value):
        # Validate type NetflowV9ScopeFieldType, a restriction on None.
        pass
    def get_Scope_Field_Length(self): return self.Scope_Field_Length
    def set_Scope_Field_Length(self, Scope_Field_Length): self.Scope_Field_Length = Scope_Field_Length
    def get_Option_Field_Type(self): return self.Option_Field_Type
    def set_Option_Field_Type(self, Option_Field_Type): self.Option_Field_Type = Option_Field_Type
    def validate_NetflowV9FieldType(self, value):
        # Validate type NetflowV9FieldType, a restriction on None.
        pass
    def get_Option_Field_Length(self): return self.Option_Field_Length
    def set_Option_Field_Length(self, Option_Field_Length): self.Option_Field_Length = Option_Field_Length
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9OptionsTemplateRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9OptionsTemplateRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9OptionsTemplateRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9OptionsTemplateRecordType', fromsubclass_=False):
        if self.Template_ID is not None:
            self.Template_ID.export(outfile, level, 'NetFlowObj:', name_='Template_ID')
        if self.Option_Scope_Length is not None:
            self.Option_Scope_Length.export(outfile, level, 'NetFlowObj:', name_='Option_Scope_Length')
        if self.Option_Length is not None:
            self.Option_Length.export(outfile, level, 'NetFlowObj:', name_='Option_Length')
        if self.Scope_Field_Type is not None:
            self.Scope_Field_Type.export(outfile, level, 'NetFlowObj:', name_='Scope_Field_Type')
        if self.Scope_Field_Length is not None:
            self.Scope_Field_Length.export(outfile, level, 'NetFlowObj:', name_='Scope_Field_Length')
        if self.Option_Field_Type is not None:
            self.Option_Field_Type.export(outfile, level, 'NetFlowObj:', name_='Option_Field_Type')
        if self.Option_Field_Length is not None:
            self.Option_Field_Length.export(outfile, level, 'NetFlowObj:', name_='Option_Field_Length')
    def hasContent_(self):
        if (
            self.Template_ID is not None or
            self.Option_Scope_Length is not None or
            self.Option_Length is not None or
            self.Scope_Field_Type is not None or
            self.Scope_Field_Length is not None or
            self.Option_Field_Type is not None or
            self.Option_Field_Length is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9OptionsTemplateRecordType'):
        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.Template_ID is not None:
            showIndent(outfile, level)
            outfile.write('Template_ID=%s,\n' % quote_python(self.Template_ID).encode(ExternalEncoding))
        if self.Option_Scope_Length is not None:
            showIndent(outfile, level)
            outfile.write('Option_Scope_Length=%s,\n' % quote_python(self.Option_Scope_Length).encode(ExternalEncoding))
        if self.Option_Length is not None:
            showIndent(outfile, level)
            outfile.write('Option_Length=%s,\n' % quote_python(self.Option_Length).encode(ExternalEncoding))
        if self.Scope_Field_Type is not None:
            showIndent(outfile, level)
            outfile.write('Scope_Field_Type=model_.NetflowV9ScopeFieldType(\n')
            self.Scope_Field_Type.exportLiteral(outfile, level, name_='Scope_Field_Type')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Scope_Field_Length is not None:
            showIndent(outfile, level)
            outfile.write('Scope_Field_Length=%s,\n' % quote_python(self.Scope_Field_Length).encode(ExternalEncoding))
        if self.Option_Field_Type is not None:
            showIndent(outfile, level)
            outfile.write('Option_Field_Type=model_.NetflowV9FieldType(\n')
            self.Option_Field_Type.exportLiteral(outfile, level, name_='Option_Field_Type')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Option_Field_Length is not None:
            showIndent(outfile, level)
            outfile.write('Option_Field_Length=%s,\n' % quote_python(self.Option_Field_Length).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_ == 'Template_ID':
            Template_ID_ = child_.text
            Template_ID_ = self.gds_validate_string(Template_ID_, node, 'Template_ID')
            self.Template_ID = Template_ID_
        elif nodeName_ == 'Option_Scope_Length':
            Option_Scope_Length_ = child_.text
            Option_Scope_Length_ = self.gds_validate_string(Option_Scope_Length_, node, 'Option_Scope_Length')
            self.Option_Scope_Length = Option_Scope_Length_
        elif nodeName_ == 'Option_Length':
            Option_Length_ = child_.text
            Option_Length_ = self.gds_validate_string(Option_Length_, node, 'Option_Length')
            self.Option_Length = Option_Length_
        elif nodeName_ == 'Scope_Field_Type':
            obj_ = None
            self.set_Scope_Field_Type(obj_)
            self.validate_NetflowV9ScopeFieldType(self.Scope_Field_Type)    # validate type NetflowV9ScopeFieldType
        elif nodeName_ == 'Scope_Field_Length':
            Scope_Field_Length_ = child_.text
            Scope_Field_Length_ = self.gds_validate_string(Scope_Field_Length_, node, 'Scope_Field_Length')
            self.Scope_Field_Length = Scope_Field_Length_
        elif nodeName_ == 'Option_Field_Type':
            obj_ = None
            self.set_Option_Field_Type(obj_)
            self.validate_NetflowV9FieldType(self.Option_Field_Type)    # validate type NetflowV9FieldType
        elif nodeName_ == 'Option_Field_Length':
            Option_Field_Length_ = child_.text
            Option_Field_Length_ = self.gds_validate_string(Option_Field_Length_, node, 'Option_Field_Length')
            self.Option_Field_Length = Option_Field_Length_
# end class NetflowV9OptionsTemplateRecordType


class NetflowV9ScopeFieldType(GeneratedsSuper):
    """NetflowV9ScopeFieldType specifies scope field types for Netflow v9,
    via a union of the NetflowV9ScopeFieldTypeEnum type and the
    atomic xs:string type. Its base type is the CybOX Core
    BaseObjectAttributeType, for permitting complex (i.e. regular-
    expression based) specifications.This attribute is optional and
    specifies the expected type for the value of the specified
    element."""
    subclass = None
    superclass = None
    def __init__(self, datatype=None, valueOf_=None):
        self.datatype = _cast(None, datatype)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if NetflowV9ScopeFieldType.subclass:
            return NetflowV9ScopeFieldType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9ScopeFieldType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_datatype(self): return self.datatype
    def set_datatype(self, datatype): self.datatype = datatype
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9ScopeFieldType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9ScopeFieldType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9ScopeFieldType'):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            outfile.write(' datatype=%s' % (quote_attrib(self.datatype), ))
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9ScopeFieldType', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (
            self.valueOf_
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9ScopeFieldType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            showIndent(outfile, level)
            outfile.write('datatype = %s,\n' % (self.datatype,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('datatype', node)
        if value is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            self.datatype = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class NetflowV9ScopeFieldType


class NetflowV9DataFlowSetType(GeneratedsSuper):
    """Specifies a Data FlowSet, which is one or more records, of the same
    type, that are grouped together in an Export Packet. Each record
    is either a Flow Data Record or an Options Data Record
    previously defined by a Template Record or an Options Template
    Record. http://www.ietf.org/rfc/rfc3954.txt"""
    subclass = None
    superclass = None
    def __init__(self, Flow_Set_ID_Template_ID=None, Length=None, Data_Record=None, Padding=None):
        self.Flow_Set_ID_Template_ID = Flow_Set_ID_Template_ID
        self.Length = Length
        if Data_Record is None:
            self.Data_Record = []
        else:
            self.Data_Record = Data_Record
        self.Padding = Padding
    def factory(*args_, **kwargs_):
        if NetflowV9DataFlowSetType.subclass:
            return NetflowV9DataFlowSetType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9DataFlowSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Flow_Set_ID_Template_ID(self): return self.Flow_Set_ID_Template_ID
    def set_Flow_Set_ID_Template_ID(self, Flow_Set_ID_Template_ID): self.Flow_Set_ID_Template_ID = Flow_Set_ID_Template_ID
    def get_Length(self): return self.Length
    def set_Length(self, Length): self.Length = Length
    def get_Data_Record(self): return self.Data_Record
    def set_Data_Record(self, Data_Record): self.Data_Record = Data_Record
    def add_Data_Record(self, value): self.Data_Record.append(value)
    def insert_Data_Record(self, index, value): self.Data_Record[index] = value
    def get_Padding(self): return self.Padding
    def set_Padding(self, Padding): self.Padding = Padding
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9DataFlowSetType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9DataFlowSetType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9DataFlowSetType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9DataFlowSetType', fromsubclass_=False):
        if self.Flow_Set_ID_Template_ID is not None:
            self.Flow_Set_ID_Template_ID.export(outfile, level, 'NetFlowObj:', name_='Flow_Set_ID_Template_ID')
        if self.Length is not None:
            self.Length.export(outfile, level, 'NetFlowObj:', name_='Length')
        for Data_Record_ in self.Data_Record:
            Data_Record_.export(outfile, level, 'NetFlowObj:', name_='Data_Record')
        if self.Padding is not None:
            self.Padding.export(outfile, level, 'NetFlowObj:', name_='Padding')
    def hasContent_(self):
        if (
            self.Flow_Set_ID_Template_ID is not None or
            self.Length is not None or
            self.Data_Record or
            self.Padding is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9DataFlowSetType'):
        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.Flow_Set_ID_Template_ID is not None:
            showIndent(outfile, level)
            outfile.write('Flow_Set_ID_Template_ID=%s,\n' % quote_python(self.Flow_Set_ID_Template_ID).encode(ExternalEncoding))
        if self.Length is not None:
            showIndent(outfile, level)
            outfile.write('Length=%s,\n' % quote_python(self.Length).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('Data_Record=[\n')
        level += 1
        for Data_Record_ in self.Data_Record:
            showIndent(outfile, level)
            outfile.write('model_.NetflowV9DataRecordType(\n')
            Data_Record_.exportLiteral(outfile, level, name_='NetflowV9DataRecordType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.Padding is not None:
            showIndent(outfile, level)
            outfile.write('Padding=%s,\n' % quote_python(self.Padding).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_ == 'Flow_Set_ID_Template_ID':
            Flow_Set_ID_Template_ID_ = child_.text
            Flow_Set_ID_Template_ID_ = self.gds_validate_string(Flow_Set_ID_Template_ID_, node, 'Flow_Set_ID_Template_ID')
            self.Flow_Set_ID_Template_ID = Flow_Set_ID_Template_ID_
        elif nodeName_ == 'Length':
            Length_ = child_.text
            Length_ = self.gds_validate_string(Length_, node, 'Length')
            self.Length = Length_
        elif nodeName_ == 'Data_Record':
            obj_ = NetflowV9DataRecordType.factory()
            obj_.build(child_)
            self.Data_Record.append(obj_)
        elif nodeName_ == 'Padding':
            Padding_ = child_.text
            Padding_ = self.gds_validate_string(Padding_, node, 'Padding')
            self.Padding = Padding_
# end class NetflowV9DataFlowSetType


class NetflowV9DataRecordType(GeneratedsSuper):
    """A Data FlowSet is one or more records, of the same type, that are
    grouped together in an Export Packet. Each record is either a
    Flow Data Record or an Options Data Record previously defined by
    a Template Record or an Options Template Record.
    http://www.ietf.org/rfc/rfc3954.txt"""
    subclass = None
    superclass = None
    def __init__(self, Flow_Data_Record=None, Options_Data_Record=None):
        if Flow_Data_Record is None:
            self.Flow_Data_Record = []
        else:
            self.Flow_Data_Record = Flow_Data_Record
        if Options_Data_Record is None:
            self.Options_Data_Record = []
        else:
            self.Options_Data_Record = Options_Data_Record
    def factory(*args_, **kwargs_):
        if NetflowV9DataRecordType.subclass:
            return NetflowV9DataRecordType.subclass(*args_, **kwargs_)
        else:
            return NetflowV9DataRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Flow_Data_Record(self): return self.Flow_Data_Record
    def set_Flow_Data_Record(self, Flow_Data_Record): self.Flow_Data_Record = Flow_Data_Record
    def add_Flow_Data_Record(self, value): self.Flow_Data_Record.append(value)
    def insert_Flow_Data_Record(self, index, value): self.Flow_Data_Record[index] = value
    def get_Options_Data_Record(self): return self.Options_Data_Record
    def set_Options_Data_Record(self, Options_Data_Record): self.Options_Data_Record = Options_Data_Record
    def add_Options_Data_Record(self, value): self.Options_Data_Record.append(value)
    def insert_Options_Data_Record(self, index, value): self.Options_Data_Record[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9DataRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV9DataRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV9DataRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV9DataRecordType', fromsubclass_=False):
        for Flow_Data_Record_ in self.Flow_Data_Record:
            Flow_Data_Record_.export(outfile, level, 'NetFlowObj:', name_='Flow_Data_Record')
        for Options_Data_Record_ in self.Options_Data_Record:
            Options_Data_Record_.export(outfile, level, 'NetFlowObj:', name_='Options_Data_Record')
    def hasContent_(self):
        if (
            self.Flow_Data_Record or
            self.Options_Data_Record
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV9DataRecordType'):
        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('Flow_Data_Record=[\n')
        level += 1
        for Flow_Data_Record_ in self.Flow_Data_Record:
            showIndent(outfile, level)
            outfile.write('model_.FlowDataRecordType(\n')
            Flow_Data_Record_.exportLiteral(outfile, level, name_='FlowDataRecordType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('Options_Data_Record=[\n')
        level += 1
        for Options_Data_Record_ in self.Options_Data_Record:
            showIndent(outfile, level)
            outfile.write('model_.OptionsDataRecordType(\n')
            Options_Data_Record_.exportLiteral(outfile, level, name_='OptionsDataRecordType')
            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_ == 'Flow_Data_Record':
            obj_ = FlowDataRecordType.factory()
            obj_.build(child_)
            self.Flow_Data_Record.append(obj_)
        elif nodeName_ == 'Options_Data_Record':
            obj_ = OptionsDataRecordType.factory()
            obj_.build(child_)
            self.Options_Data_Record.append(obj_)
# end class NetflowV9DataRecordType


class FlowDataRecordType(GeneratedsSuper):
    """A Flow Data Record is a data record that contains values of the Flow
    parameters corresponding to a Template Record."""
    subclass = None
    superclass = None
    def __init__(self, Flow_Record_Collection_Element=None):
        if Flow_Record_Collection_Element is None:
            self.Flow_Record_Collection_Element = []
        else:
            self.Flow_Record_Collection_Element = Flow_Record_Collection_Element
    def factory(*args_, **kwargs_):
        if FlowDataRecordType.subclass:
            return FlowDataRecordType.subclass(*args_, **kwargs_)
        else:
            return FlowDataRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Flow_Record_Collection_Element(self): return self.Flow_Record_Collection_Element
    def set_Flow_Record_Collection_Element(self, Flow_Record_Collection_Element): self.Flow_Record_Collection_Element = Flow_Record_Collection_Element
    def add_Flow_Record_Collection_Element(self, value): self.Flow_Record_Collection_Element.append(value)
    def insert_Flow_Record_Collection_Element(self, index, value): self.Flow_Record_Collection_Element[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='FlowDataRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FlowDataRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='FlowDataRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='FlowDataRecordType', fromsubclass_=False):
        for Flow_Record_Collection_Element_ in self.Flow_Record_Collection_Element:
            Flow_Record_Collection_Element_.export(outfile, level, 'NetFlowObj', name_='Flow_Record_Collection_Element')
    def hasContent_(self):
        if (
            self.Flow_Record_Collection_Element
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='FlowDataRecordType'):
        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('Flow_Record_Collection_Element=[\n')
        level += 1
        for Flow_Record_Collection_Element_ in self.Flow_Record_Collection_Element:
            showIndent(outfile, level)
            outfile.write('model_.FlowCollectionElementType(\n')
            Flow_Record_Collection_Element_.exportLiteral(outfile, level, name_='FlowCollectionElementType')
            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_ == 'Flow_Record_Collection_Element':
            obj_ = FlowCollectionElementType.factory()
            obj_.build(child_)
            self.Flow_Record_Collection_Element.append(obj_)
# end class FlowDataRecordType


class FlowCollectionElementType(GeneratedsSuper):
    """Field values are associated with each record in the collection of a
    flow data record."""
    subclass = None
    superclass = None
    def __init__(self, Flow_Record_Field_Value=None):
        if Flow_Record_Field_Value is None:
            self.Flow_Record_Field_Value = []
        else:
            self.Flow_Record_Field_Value = Flow_Record_Field_Value
    def factory(*args_, **kwargs_):
        if FlowCollectionElementType.subclass:
            return FlowCollectionElementType.subclass(*args_, **kwargs_)
        else:
            return FlowCollectionElementType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Flow_Record_Field_Value(self): return self.Flow_Record_Field_Value
    def set_Flow_Record_Field_Value(self, Flow_Record_Field_Value): self.Flow_Record_Field_Value = Flow_Record_Field_Value
    def add_Flow_Record_Field_Value(self, value): self.Flow_Record_Field_Value.append(value)
    def insert_Flow_Record_Field_Value(self, index, value): self.Flow_Record_Field_Value[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='FlowCollectionElementType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FlowCollectionElementType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='FlowCollectionElementType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='FlowCollectionElementType', fromsubclass_=False):
        for Flow_Record_Field_Value_ in self.Flow_Record_Field_Value:
            Flow_Record_Field_Value_.export(outfile, level, 'NetFlowObj:', name_='Flow_Record_Field_Value')
    def hasContent_(self):
        if (
            self.Flow_Record_Field_Value
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='FlowCollectionElementType'):
        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('Flow_Record_Field_Value=[\n')
        level += 1
        for Flow_Record_Field_Value_ in self.Flow_Record_Field_Value:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(Flow_Record_Field_Value_).encode(ExternalEncoding))
        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_ == 'Flow_Record_Field_Value':
            Flow_Record_Field_Value_ = child_.text
            Flow_Record_Field_Value_ = self.gds_validate_string(Flow_Record_Field_Value_, node, 'Flow_Record_Field_Value')
            self.Flow_Record_Field_Value.append(Flow_Record_Field_Value_)
# end class FlowCollectionElementType


class OptionsDataRecordType(GeneratedsSuper):
    """The data record that contains values and scope information of the
    Flow measurement parameters, corresponding to an Options
    Template Record."""
    subclass = None
    superclass = None
    def __init__(self, Scope_Field_Value=None, Option_Record_Collection_Element=None):
        self.Scope_Field_Value = Scope_Field_Value
        if Option_Record_Collection_Element is None:
            self.Option_Record_Collection_Element = []
        else:
            self.Option_Record_Collection_Element = Option_Record_Collection_Element
    def factory(*args_, **kwargs_):
        if OptionsDataRecordType.subclass:
            return OptionsDataRecordType.subclass(*args_, **kwargs_)
        else:
            return OptionsDataRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Scope_Field_Value(self): return self.Scope_Field_Value
    def set_Scope_Field_Value(self, Scope_Field_Value): self.Scope_Field_Value = Scope_Field_Value
    def get_Option_Record_Collection_Element(self): return self.Option_Record_Collection_Element
    def set_Option_Record_Collection_Element(self, Option_Record_Collection_Element): self.Option_Record_Collection_Element = Option_Record_Collection_Element
    def add_Option_Record_Collection_Element(self, value): self.Option_Record_Collection_Element.append(value)
    def insert_Option_Record_Collection_Element(self, index, value): self.Option_Record_Collection_Element[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='OptionsDataRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OptionsDataRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='OptionsDataRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='OptionsDataRecordType', fromsubclass_=False):
        if self.Scope_Field_Value is not None:
            self.Scope_Field_Value.export(outfile, level, 'NetFlowObj:', name_='Scope_Field_Value')
        for Option_Record_Collection_Element_ in self.Option_Record_Collection_Element:
            Option_Record_Collection_Element_.export(outfile, level, 'NetFlowObj:', name_='Option_Record_Collection_Element')
    def hasContent_(self):
        if (
            self.Scope_Field_Value is not None or
            self.Option_Record_Collection_Element
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='OptionsDataRecordType'):
        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.Scope_Field_Value is not None:
            showIndent(outfile, level)
            outfile.write('Scope_Field_Value=%s,\n' % quote_python(self.Scope_Field_Value).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('Option_Record_Collection_Element=[\n')
        level += 1
        for Option_Record_Collection_Element_ in self.Option_Record_Collection_Element:
            showIndent(outfile, level)
            outfile.write('model_.OptionCollectionElementType(\n')
            Option_Record_Collection_Element_.exportLiteral(outfile, level, name_='OptionCollectionElementType')
            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_ == 'Scope_Field_Value':
            Scope_Field_Value_ = child_.text
            Scope_Field_Value_ = self.gds_validate_string(Scope_Field_Value_, node, 'Scope_Field_Value')
            self.Scope_Field_Value = Scope_Field_Value_
        elif nodeName_ == 'Option_Record_Collection_Element':
            obj_ = OptionCollectionElementType.factory()
            obj_.build(child_)
            self.Option_Record_Collection_Element.append(obj_)
# end class OptionsDataRecordType


class OptionCollectionElementType(GeneratedsSuper):
    """Field values are associatedwith each option in the collection of an
    option data record."""
    subclass = None
    superclass = None
    def __init__(self, Option_Record_Field_Value=None):
        if Option_Record_Field_Value is None:
            self.Option_Record_Field_Value = []
        else:
            self.Option_Record_Field_Value = Option_Record_Field_Value
    def factory(*args_, **kwargs_):
        if OptionCollectionElementType.subclass:
            return OptionCollectionElementType.subclass(*args_, **kwargs_)
        else:
            return OptionCollectionElementType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Option_Record_Field_Value(self): return self.Option_Record_Field_Value
    def set_Option_Record_Field_Value(self, Option_Record_Field_Value): self.Option_Record_Field_Value = Option_Record_Field_Value
    def add_Option_Record_Field_Value(self, value): self.Option_Record_Field_Value.append(value)
    def insert_Option_Record_Field_Value(self, index, value): self.Option_Record_Field_Value[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='OptionCollectionElementType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OptionCollectionElementType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='OptionCollectionElementType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='OptionCollectionElementType', fromsubclass_=False):
        for Option_Record_Field_Value_ in self.Option_Record_Field_Value:
            Option_Record_Field_Value_.export(outfile, level, 'NetFlowObj:', name_='Option_Record_Field_Value')
    def hasContent_(self):
        if (
            self.Option_Record_Field_Value
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='OptionCollectionElementType'):
        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('Option_Record_Field_Value=[\n')
        level += 1
        for Option_Record_Field_Value_ in self.Option_Record_Field_Value:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(Option_Record_Field_Value_).encode(ExternalEncoding))
        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_ == 'Option_Record_Field_Value':
            Option_Record_Field_Value_ = child_.text
            Option_Record_Field_Value_ = self.gds_validate_string(Option_Record_Field_Value_, node, 'Option_Record_Field_Value')
            self.Option_Record_Field_Value.append(Option_Record_Field_Value_)
# end class OptionCollectionElementType


class NetflowV5PacketType(GeneratedsSuper):
    """Defines the contents of a Netflow v5 packet. As of 2012, Netflow v5
    is still the most commonly used network flow format. Netflow v5
    was developed by Cisco.
    http://netflow.caligare.com/netflow_v5.htm"""
    subclass = None
    superclass = None
    def __init__(self, Flow_Header=None, Flow_Record=None):
        self.Flow_Header = Flow_Header
        if Flow_Record is None:
            self.Flow_Record = []
        else:
            self.Flow_Record = Flow_Record
    def factory(*args_, **kwargs_):
        if NetflowV5PacketType.subclass:
            return NetflowV5PacketType.subclass(*args_, **kwargs_)
        else:
            return NetflowV5PacketType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Flow_Header(self): return self.Flow_Header
    def set_Flow_Header(self, Flow_Header): self.Flow_Header = Flow_Header
    def get_Flow_Record(self): return self.Flow_Record
    def set_Flow_Record(self, Flow_Record): self.Flow_Record = Flow_Record
    def add_Flow_Record(self, value): self.Flow_Record.append(value)
    def insert_Flow_Record(self, index, value): self.Flow_Record[index] = value
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV5PacketType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV5PacketType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV5PacketType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV5PacketType', fromsubclass_=False):
        if self.Flow_Header is not None:
            self.NetFlowObj.export(outfile, level, 'NetFlowObj:', name_='NetFlowObj')
        for Flow_Record_ in self.Flow_Record:
            Flow_Record_.export(outfile, level, 'NetFlowObj:', name_='Flow_Record')
    def hasContent_(self):
        if (
            self.Flow_Header is not None or
            self.Flow_Record
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV5PacketType'):
        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.Flow_Header is not None:
            showIndent(outfile, level)
            outfile.write('Flow_Header=model_.NetflowV5FlowHeaderType(\n')
            self.Flow_Header.exportLiteral(outfile, level, name_='Flow_Header')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('Flow_Record=[\n')
        level += 1
        for Flow_Record_ in self.Flow_Record:
            showIndent(outfile, level)
            outfile.write('model_.NetflowV5FlowRecordType(\n')
            Flow_Record_.exportLiteral(outfile, level, name_='NetflowV5FlowRecordType')
            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_ == 'Flow_Header':
            obj_ = NetflowV5FlowHeaderType.factory()
            obj_.build(child_)
            self.set_Flow_Header(obj_)
        elif nodeName_ == 'Flow_Record':
            obj_ = NetflowV5FlowRecordType.factory()
            obj_.build(child_)
            self.Flow_Record.append(obj_)
# end class NetflowV5PacketType


class NetflowV5FlowHeaderType(GeneratedsSuper):
    """Defines elements of a netflow v5 header.
    http://netflow.caligare.com/netflow_v5.htm"""
    subclass = None
    superclass = None
    def __init__(self, Version='05', Count=None, Sys_Up_Time=None, Unix_Secs=None, Unix_Nsecs=None, Flow_Sequence=None, Engine_Type=None, Engine_ID=None, Sampling_Interval=None):
        self.Version = Version
        self.Count = Count
        self.Sys_Up_Time = Sys_Up_Time
        self.Unix_Secs = Unix_Secs
        self.Unix_Nsecs = Unix_Nsecs
        self.Flow_Sequence = Flow_Sequence
        self.Engine_Type = Engine_Type
        self.Engine_ID = Engine_ID
        self.Sampling_Interval = Sampling_Interval
    def factory(*args_, **kwargs_):
        if NetflowV5FlowHeaderType.subclass:
            return NetflowV5FlowHeaderType.subclass(*args_, **kwargs_)
        else:
            return NetflowV5FlowHeaderType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Version(self): return self.Version
    def set_Version(self, Version): self.Version = Version
    def get_Count(self): return self.Count
    def set_Count(self, Count): self.Count = Count
    def get_Sys_Up_Time(self): return self.Sys_Up_Time
    def set_Sys_Up_Time(self, Sys_Up_Time): self.Sys_Up_Time = Sys_Up_Time
    def get_Unix_Secs(self): return self.Unix_Secs
    def set_Unix_Secs(self, Unix_Secs): self.Unix_Secs = Unix_Secs
    def get_Unix_Nsecs(self): return self.Unix_Nsecs
    def set_Unix_Nsecs(self, Unix_Nsecs): self.Unix_Nsecs = Unix_Nsecs
    def get_Flow_Sequence(self): return self.Flow_Sequence
    def set_Flow_Sequence(self, Flow_Sequence): self.Flow_Sequence = Flow_Sequence
    def get_Engine_Type(self): return self.Engine_Type
    def set_Engine_Type(self, Engine_Type): self.Engine_Type = Engine_Type
    def get_Engine_ID(self): return self.Engine_ID
    def set_Engine_ID(self, Engine_ID): self.Engine_ID = Engine_ID
    def get_Sampling_Interval(self): return self.Sampling_Interval
    def set_Sampling_Interval(self, Sampling_Interval): self.Sampling_Interval = Sampling_Interval
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV5FlowHeaderType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV5FlowHeaderType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV5FlowHeaderType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV5FlowHeaderType', fromsubclass_=False):
        if self.Version is not None:
            self.Version.export(outfile, level, 'NetFlowObj:', name_='Version')
        if self.Count is not None:
            self.Count.export(outfile, level, 'NetFlowObj:', name_='Count')
        if self.Sys_Up_Time is not None:
            self.Sys_Up_Time.export(outfile, level, 'NetFlowObj:', name_='Sys_Up_Time')
        if self.Unix_Secs is not None:
            self.Unix_Secs.export(outfile, level, 'NetFlowObj:', name_='Unix_Secs')
        if self.Unix_Nsecs is not None:
            self.Unix_Nsecs.export(outfile, level, 'NetFlowObj:', name_='Unix_Nsecs')
        if self.Flow_Sequence is not None:
            self.Flow_Sequence.export(outfile, level, 'NetFlowObj:', name_='Flow_Sequence')
        if self.Engine_Type is not None:
            self.Engine_Type.export(outfile, level, 'NetFlowObj:', name_='Engine_Type')
        if self.Engine_ID is not None:
            self.Engine_ID.export(outfile, level, 'NetFlowObj:', name_='Engine_ID')
        if self.Sampling_Interval is not None:
            self.Sampling_Interval.export(outfile, level, 'NetFlowObj:', name_='Sampling_Interval')
    def hasContent_(self):
        if (
            self.Version is not None or
            self.Count is not None or
            self.Sys_Up_Time is not None or
            self.Unix_Secs is not None or
            self.Unix_Nsecs is not None or
            self.Flow_Sequence is not None or
            self.Engine_Type is not None or
            self.Engine_ID is not None or
            self.Sampling_Interval is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV5FlowHeaderType'):
        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.Version is not None:
            showIndent(outfile, level)
            outfile.write('Version=%s,\n' % quote_python(self.Version).encode(ExternalEncoding))
        if self.Count is not None:
            showIndent(outfile, level)
            outfile.write('Count=%s,\n' % quote_python(self.Count).encode(ExternalEncoding))
        if self.Sys_Up_Time is not None:
            showIndent(outfile, level)
            outfile.write('Sys_Up_Time=%s,\n' % quote_python(self.Sys_Up_Time).encode(ExternalEncoding))
        if self.Unix_Secs is not None:
            showIndent(outfile, level)
            outfile.write('Unix_Secs=%s,\n' % quote_python(self.Unix_Secs).encode(ExternalEncoding))
        if self.Unix_Nsecs is not None:
            showIndent(outfile, level)
            outfile.write('Unix_Nsecs=%s,\n' % quote_python(self.Unix_Nsecs).encode(ExternalEncoding))
        if self.Flow_Sequence is not None:
            showIndent(outfile, level)
            outfile.write('Flow_Sequence=%s,\n' % quote_python(self.Flow_Sequence).encode(ExternalEncoding))
        if self.Engine_Type is not None:
            showIndent(outfile, level)
            outfile.write('Engine_Type=%s,\n' % quote_python(self.Engine_Type).encode(ExternalEncoding))
        if self.Engine_ID is not None:
            showIndent(outfile, level)
            outfile.write('Engine_ID=%s,\n' % quote_python(self.Engine_ID).encode(ExternalEncoding))
        if self.Sampling_Interval is not None:
            showIndent(outfile, level)
            outfile.write('Sampling_Interval=%s,\n' % quote_python(self.Sampling_Interval).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_ == 'Version':
            Version_ = child_.text
            Version_ = self.gds_validate_string(Version_, node, 'Version')
            self.Version = Version_
        elif nodeName_ == 'Count':
            Count_ = child_.text
            Count_ = self.gds_validate_string(Count_, node, 'Count')
            self.Count = Count_
        elif nodeName_ == 'Sys_Up_Time':
            Sys_Up_Time_ = child_.text
            Sys_Up_Time_ = self.gds_validate_string(Sys_Up_Time_, node, 'Sys_Up_Time')
            self.Sys_Up_Time = Sys_Up_Time_
        elif nodeName_ == 'Unix_Secs':
            Unix_Secs_ = child_.text
            Unix_Secs_ = self.gds_validate_string(Unix_Secs_, node, 'Unix_Secs')
            self.Unix_Secs = Unix_Secs_
        elif nodeName_ == 'Unix_Nsecs':
            Unix_Nsecs_ = child_.text
            Unix_Nsecs_ = self.gds_validate_string(Unix_Nsecs_, node, 'Unix_Nsecs')
            self.Unix_Nsecs = Unix_Nsecs_
        elif nodeName_ == 'Flow_Sequence':
            Flow_Sequence_ = child_.text
            Flow_Sequence_ = self.gds_validate_string(Flow_Sequence_, node, 'Flow_Sequence')
            self.Flow_Sequence = Flow_Sequence_
        elif nodeName_ == 'Engine_Type':
            Engine_Type_ = child_.text
            Engine_Type_ = self.gds_validate_string(Engine_Type_, node, 'Engine_Type')
            self.Engine_Type = Engine_Type_
        elif nodeName_ == 'Engine_ID':
            Engine_ID_ = child_.text
            Engine_ID_ = self.gds_validate_string(Engine_ID_, node, 'Engine_ID')
            self.Engine_ID = Engine_ID_
        elif nodeName_ == 'Sampling_Interval':
            Sampling_Interval_ = child_.text
            Sampling_Interval_ = self.gds_validate_string(Sampling_Interval_, node, 'Sampling_Interval')
            self.Sampling_Interval = Sampling_Interval_
# end class NetflowV5FlowHeaderType


class NetflowV5FlowRecordType(GeneratedsSuper):
    """Defines elements of a Netflow v5 flow record. Recall that the seven
    elements that define the flow itself (e.g., source IP address)
    are provided in NetworkFlowLabelType. https://bto.bluecoat.com/p
    acketguide/8.6/info/netflow5-records.htm"""
    subclass = None
    superclass = None
    def __init__(self, Nexthop_IPv4_Addr=None, Packet_Count=None, Byte_Count=None, SysUpTime_Start=None, SysUpTime_End=None, Padding1=None, TCP_Flags=None, Src_Autonomous_System=None, Dest_Autonomous_System=None, Src_IP_Mask_Bit_Count=None, Dest_IP_Mask_Bit_Count=None, Padding2=None):
        self.Nexthop_IPv4_Addr = Nexthop_IPv4_Addr
        self.Packet_Count = Packet_Count
        self.Byte_Count = Byte_Count
        self.SysUpTime_Start = SysUpTime_Start
        self.SysUpTime_End = SysUpTime_End
        self.Padding1 = Padding1
        self.TCP_Flags = TCP_Flags
        self.Src_Autonomous_System = Src_Autonomous_System
        self.Dest_Autonomous_System = Dest_Autonomous_System
        self.Src_IP_Mask_Bit_Count = Src_IP_Mask_Bit_Count
        self.Dest_IP_Mask_Bit_Count = Dest_IP_Mask_Bit_Count
        self.Padding2 = Padding2
    def factory(*args_, **kwargs_):
        if NetflowV5FlowRecordType.subclass:
            return NetflowV5FlowRecordType.subclass(*args_, **kwargs_)
        else:
            return NetflowV5FlowRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Nexthop_IPv4_Addr(self): return self.Nexthop_IPv4_Addr
    def set_Nexthop_IPv4_Addr(self, Nexthop_IPv4_Addr): self.Nexthop_IPv4_Addr = Nexthop_IPv4_Addr
    def get_Packet_Count(self): return self.Packet_Count
    def set_Packet_Count(self, Packet_Count): self.Packet_Count = Packet_Count
    def get_Byte_Count(self): return self.Byte_Count
    def set_Byte_Count(self, Byte_Count): self.Byte_Count = Byte_Count
    def get_SysUpTime_Start(self): return self.SysUpTime_Start
    def set_SysUpTime_Start(self, SysUpTime_Start): self.SysUpTime_Start = SysUpTime_Start
    def get_SysUpTime_End(self): return self.SysUpTime_End
    def set_SysUpTime_End(self, SysUpTime_End): self.SysUpTime_End = SysUpTime_End
    def get_Padding1(self): return self.Padding1
    def set_Padding1(self, Padding1): self.Padding1 = Padding1
    def get_TCP_Flags(self): return self.TCP_Flags
    def set_TCP_Flags(self, TCP_Flags): self.TCP_Flags = TCP_Flags
    def get_Src_Autonomous_System(self): return self.Src_Autonomous_System
    def set_Src_Autonomous_System(self, Src_Autonomous_System): self.Src_Autonomous_System = Src_Autonomous_System
    def get_Dest_Autonomous_System(self): return self.Dest_Autonomous_System
    def set_Dest_Autonomous_System(self, Dest_Autonomous_System): self.Dest_Autonomous_System = Dest_Autonomous_System
    def get_Src_IP_Mask_Bit_Count(self): return self.Src_IP_Mask_Bit_Count
    def set_Src_IP_Mask_Bit_Count(self, Src_IP_Mask_Bit_Count): self.Src_IP_Mask_Bit_Count = Src_IP_Mask_Bit_Count
    def get_Dest_IP_Mask_Bit_Count(self): return self.Dest_IP_Mask_Bit_Count
    def set_Dest_IP_Mask_Bit_Count(self, Dest_IP_Mask_Bit_Count): self.Dest_IP_Mask_Bit_Count = Dest_IP_Mask_Bit_Count
    def get_Padding2(self): return self.Padding2
    def set_Padding2(self, Padding2): self.Padding2 = Padding2
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV5FlowRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NetflowV5FlowRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='NetflowV5FlowRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='NetflowV5FlowRecordType', fromsubclass_=False):
        if self.Nexthop_IPv4_Addr is not None:
            self.Nexthop_IPv4_Addr.export(outfile, level, 'NetFlowObj:', name_='Nexthop_IPv4_Addr')
        if self.Packet_Count is not None:
            self.Packet_Count.export(outfile, level, 'NetFlowObj:', name_='Packet_Count')
        if self.Byte_Count is not None:
            self.Byte_Count.export(outfile, level, 'NetFlowObj:', name_='Byte_Count')
        if self.SysUpTime_Start is not None:
            self.SysUpTime_Start.export(outfile, level, 'NetFlowObj:', name_='SysUpTime_Start')
        if self.SysUpTime_End is not None:
            self.SysUpTime_End.export(outfile, level, 'NetFlowObj:', name_='SysUpTime_End')
        if self.Padding1 is not None:
            self.Padding1.export(outfile, level, 'NetFlowObj:', name_='Padding1')
        if self.TCP_Flags is not None:
            self.TCP_Flags.export(outfile, level, 'NetFlowObj:', name_='TCP_Flags')
        if self.Src_Autonomous_System is not None:
            self.Src_Autonomous_System.export(outfile, level, 'NetFlowObj:', name_='Src_Autonomous_System')
        if self.Dest_Autonomous_System is not None:
            self.Dest_Autonomous_System.export(outfile, level, 'NetFlowObj:', name_='Dest_Autonomous_System')
        if self.Src_IP_Mask_Bit_Count is not None:
            self.Src_IP_Mask_Bit_Count.export(outfile, level, 'NetFlowObj:', name_='Src_IP_Mask_Bit_Count')
        if self.Dest_IP_Mask_Bit_Count is not None:
            self.Dest_IP_Mask_Bit_Count.export(outfile, level, 'NetFlowObj:', name_='Dest_IP_Mask_Bit_Count')
        if self.Padding2 is not None:
            self.Padding2.export(outfile, level, 'NetFlowObj:', name_='Padding2')
    def hasContent_(self):
        if (
            self.Nexthop_IPv4_Addr is not None or
            self.Packet_Count is not None or
            self.Byte_Count is not None or
            self.SysUpTime_Start is not None or
            self.SysUpTime_End is not None or
            self.Padding1 is not None or
            self.TCP_Flags is not None or
            self.Src_Autonomous_System is not None or
            self.Dest_Autonomous_System is not None or
            self.Src_IP_Mask_Bit_Count is not None or
            self.Dest_IP_Mask_Bit_Count is not None or
            self.Padding2 is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='NetflowV5FlowRecordType'):
        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.Nexthop_IPv4_Addr is not None:
            showIndent(outfile, level)
            outfile.write('Nexthop_IPv4_Addr=%s,\n' % quote_python(self.Nexthop_IPv4_Addr).encode(ExternalEncoding))
        if self.Packet_Count is not None:
            showIndent(outfile, level)
            outfile.write('Packet_Count=%s,\n' % quote_python(self.Packet_Count).encode(ExternalEncoding))
        if self.Byte_Count is not None:
            showIndent(outfile, level)
            outfile.write('Byte_Count=%s,\n' % quote_python(self.Byte_Count).encode(ExternalEncoding))
        if self.SysUpTime_Start is not None:
            showIndent(outfile, level)
            outfile.write('SysUpTime_Start=%s,\n' % quote_python(self.SysUpTime_Start).encode(ExternalEncoding))
        if self.SysUpTime_End is not None:
            showIndent(outfile, level)
            outfile.write('SysUpTime_End=%s,\n' % quote_python(self.SysUpTime_End).encode(ExternalEncoding))
        if self.Padding1 is not None:
            showIndent(outfile, level)
            outfile.write('Padding1=%s,\n' % quote_python(self.Padding1).encode(ExternalEncoding))
        if self.TCP_Flags is not None:
            showIndent(outfile, level)
            outfile.write('TCP_Flags=%s,\n' % quote_python(self.TCP_Flags).encode(ExternalEncoding))
        if self.Src_Autonomous_System is not None:
            showIndent(outfile, level)
            outfile.write('Src_Autonomous_System=%s,\n' % quote_python(self.Src_Autonomous_System).encode(ExternalEncoding))
        if self.Dest_Autonomous_System is not None:
            showIndent(outfile, level)
            outfile.write('Dest_Autonomous_System=%s,\n' % quote_python(self.Dest_Autonomous_System).encode(ExternalEncoding))
        if self.Src_IP_Mask_Bit_Count is not None:
            showIndent(outfile, level)
            outfile.write('Src_IP_Mask_Bit_Count=%s,\n' % quote_python(self.Src_IP_Mask_Bit_Count).encode(ExternalEncoding))
        if self.Dest_IP_Mask_Bit_Count is not None:
            showIndent(outfile, level)
            outfile.write('Dest_IP_Mask_Bit_Count=%s,\n' % quote_python(self.Dest_IP_Mask_Bit_Count).encode(ExternalEncoding))
        if self.Padding2 is not None:
            showIndent(outfile, level)
            outfile.write('Padding2=%s,\n' % quote_python(self.Padding2).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_ == 'Nexthop_IPv4_Addr':
            Nexthop_IPv4_Addr_ = child_.text
            Nexthop_IPv4_Addr_ = self.gds_validate_string(Nexthop_IPv4_Addr_, node, 'Nexthop_IPv4_Addr')
            self.Nexthop_IPv4_Addr = Nexthop_IPv4_Addr_
        elif nodeName_ == 'Packet_Count':
            Packet_Count_ = child_.text
            Packet_Count_ = self.gds_validate_string(Packet_Count_, node, 'Packet_Count')
            self.Packet_Count = Packet_Count_
        elif nodeName_ == 'Byte_Count':
            Byte_Count_ = child_.text
            Byte_Count_ = self.gds_validate_string(Byte_Count_, node, 'Byte_Count')
            self.Byte_Count = Byte_Count_
        elif nodeName_ == 'SysUpTime_Start':
            SysUpTime_Start_ = child_.text
            SysUpTime_Start_ = self.gds_validate_string(SysUpTime_Start_, node, 'SysUpTime_Start')
            self.SysUpTime_Start = SysUpTime_Start_
        elif nodeName_ == 'SysUpTime_End':
            SysUpTime_End_ = child_.text
            SysUpTime_End_ = self.gds_validate_string(SysUpTime_End_, node, 'SysUpTime_End')
            self.SysUpTime_End = SysUpTime_End_
        elif nodeName_ == 'Padding1':
            Padding1_ = child_.text
            Padding1_ = self.gds_validate_string(Padding1_, node, 'Padding1')
            self.Padding1 = Padding1_
        elif nodeName_ == 'TCP_Flags':
            TCP_Flags_ = child_.text
            TCP_Flags_ = self.gds_validate_string(TCP_Flags_, node, 'TCP_Flags')
            self.TCP_Flags = TCP_Flags_
        elif nodeName_ == 'Src_Autonomous_System':
            Src_Autonomous_System_ = child_.text
            Src_Autonomous_System_ = self.gds_validate_string(Src_Autonomous_System_, node, 'Src_Autonomous_System')
            self.Src_Autonomous_System = Src_Autonomous_System_
        elif nodeName_ == 'Dest_Autonomous_System':
            Dest_Autonomous_System_ = child_.text
            Dest_Autonomous_System_ = self.gds_validate_string(Dest_Autonomous_System_, node, 'Dest_Autonomous_System')
            self.Dest_Autonomous_System = Dest_Autonomous_System_
        elif nodeName_ == 'Src_IP_Mask_Bit_Count':
            Src_IP_Mask_Bit_Count_ = child_.text
            Src_IP_Mask_Bit_Count_ = self.gds_validate_string(Src_IP_Mask_Bit_Count_, node, 'Src_IP_Mask_Bit_Count')
            self.Src_IP_Mask_Bit_Count = Src_IP_Mask_Bit_Count_
        elif nodeName_ == 'Dest_IP_Mask_Bit_Count':
            Dest_IP_Mask_Bit_Count_ = child_.text
            Dest_IP_Mask_Bit_Count_ = self.gds_validate_string(Dest_IP_Mask_Bit_Count_, node, 'Dest_IP_Mask_Bit_Count')
            self.Dest_IP_Mask_Bit_Count = Dest_IP_Mask_Bit_Count_
        elif nodeName_ == 'Padding2':
            Padding2_ = child_.text
            Padding2_ = self.gds_validate_string(Padding2_, node, 'Padding2')
            self.Padding2 = Padding2_
# end class NetflowV5FlowRecordType


class SiLKRecordType(GeneratedsSuper):
    """System for Internet-Level Knowledge (CMU/SEI). The fields are taken
    from a list shown in
    http://tools.netsa.cert.org/silk/rwcut.html. Fields common to
    all network flows are defined in NetworkFlowLabelType (e.g.,
    source IP, SNMP ingress, etc.). For additional references, see
    http://tools.netsa.cert.org/silk/analysis-handbook.pdf,
    http://tools.netsa.cert.org/silk/faq.html#ipfix-fields."""
    subclass = None
    superclass = None
    def __init__(self, Packet_Count=None, Byte_Count=None, TCP_Flags=None, Start_Time=None, Duration=None, End_Time=None, Sensor_Info=None, ICMP_Type=None, ICMP_Code=None, Router_Next_Hop_IP=None, Initial_TCP_Flags=None, Session_TCP_Flags=None, Flow_Attributes=None, Flow_Application=None, Src_IP_Type=None, Dest_IP_Type=None, Src_Country_Code=None, Dest_Country_Code=None, Src_MAPNAME=None, Dest_MAPNAME=None):
        self.Packet_Count = Packet_Count
        self.Byte_Count = Byte_Count
        self.TCP_Flags = TCP_Flags
        self.Start_Time = Start_Time
        self.Duration = Duration
        self.End_Time = End_Time
        self.Sensor_Info = Sensor_Info
        self.ICMP_Type = ICMP_Type
        self.ICMP_Code = ICMP_Code
        self.Router_Next_Hop_IP = Router_Next_Hop_IP
        self.Initial_TCP_Flags = Initial_TCP_Flags
        self.Session_TCP_Flags = Session_TCP_Flags
        self.Flow_Attributes = Flow_Attributes
        self.Flow_Application = Flow_Application
        self.Src_IP_Type = Src_IP_Type
        self.Dest_IP_Type = Dest_IP_Type
        self.Src_Country_Code = Src_Country_Code
        self.Dest_Country_Code = Dest_Country_Code
        self.Src_MAPNAME = Src_MAPNAME
        self.Dest_MAPNAME = Dest_MAPNAME
    def factory(*args_, **kwargs_):
        if SiLKRecordType.subclass:
            return SiLKRecordType.subclass(*args_, **kwargs_)
        else:
            return SiLKRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Packet_Count(self): return self.Packet_Count
    def set_Packet_Count(self, Packet_Count): self.Packet_Count = Packet_Count
    def get_Byte_Count(self): return self.Byte_Count
    def set_Byte_Count(self, Byte_Count): self.Byte_Count = Byte_Count
    def get_TCP_Flags(self): return self.TCP_Flags
    def set_TCP_Flags(self, TCP_Flags): self.TCP_Flags = TCP_Flags
    def get_Start_Time(self): return self.Start_Time
    def set_Start_Time(self, Start_Time): self.Start_Time = Start_Time
    def get_Duration(self): return self.Duration
    def set_Duration(self, Duration): self.Duration = Duration
    def get_End_Time(self): return self.End_Time
    def set_End_Time(self, End_Time): self.End_Time = End_Time
    def get_Sensor_Info(self): return self.Sensor_Info
    def set_Sensor_Info(self, Sensor_Info): self.Sensor_Info = Sensor_Info
    def get_ICMP_Type(self): return self.ICMP_Type
    def set_ICMP_Type(self, ICMP_Type): self.ICMP_Type = ICMP_Type
    def get_ICMP_Code(self): return self.ICMP_Code
    def set_ICMP_Code(self, ICMP_Code): self.ICMP_Code = ICMP_Code
    def get_Router_Next_Hop_IP(self): return self.Router_Next_Hop_IP
    def set_Router_Next_Hop_IP(self, Router_Next_Hop_IP): self.Router_Next_Hop_IP = Router_Next_Hop_IP
    def get_Initial_TCP_Flags(self): return self.Initial_TCP_Flags
    def set_Initial_TCP_Flags(self, Initial_TCP_Flags): self.Initial_TCP_Flags = Initial_TCP_Flags
    def get_Session_TCP_Flags(self): return self.Session_TCP_Flags
    def set_Session_TCP_Flags(self, Session_TCP_Flags): self.Session_TCP_Flags = Session_TCP_Flags
    def get_Flow_Attributes(self): return self.Flow_Attributes
    def set_Flow_Attributes(self, Flow_Attributes): self.Flow_Attributes = Flow_Attributes
    def validate_SiLKFlowAttributesType(self, value):
        # Validate type SiLKFlowAttributesType, a restriction on None.
        pass
    def get_Flow_Application(self): return self.Flow_Application
    def set_Flow_Application(self, Flow_Application): self.Flow_Application = Flow_Application
    def get_Src_IP_Type(self): return self.Src_IP_Type
    def set_Src_IP_Type(self, Src_IP_Type): self.Src_IP_Type = Src_IP_Type
    def validate_SiLKAddressType(self, value):
        # Validate type SiLKAddressType, a restriction on None.
        pass
    def get_Dest_IP_Type(self): return self.Dest_IP_Type
    def set_Dest_IP_Type(self, Dest_IP_Type): self.Dest_IP_Type = Dest_IP_Type
    def get_Src_Country_Code(self): return self.Src_Country_Code
    def set_Src_Country_Code(self, Src_Country_Code): self.Src_Country_Code = Src_Country_Code
    def validate_SiLKCountryCodeType(self, value):
        # Validate type SiLKCountryCodeType, a restriction on None.
        pass
    def get_Dest_Country_Code(self): return self.Dest_Country_Code
    def set_Dest_Country_Code(self, Dest_Country_Code): self.Dest_Country_Code = Dest_Country_Code
    def get_Src_MAPNAME(self): return self.Src_MAPNAME
    def set_Src_MAPNAME(self, Src_MAPNAME): self.Src_MAPNAME = Src_MAPNAME
    def get_Dest_MAPNAME(self): return self.Dest_MAPNAME
    def set_Dest_MAPNAME(self, Dest_MAPNAME): self.Dest_MAPNAME = Dest_MAPNAME
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SiLKRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='SiLKRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKRecordType', fromsubclass_=False):
        if self.Packet_Count is not None:
            self.Packet_Count.export(outfile, level, 'NetFlowObj:', name_='Packet_Count')
        if self.Byte_Count is not None:
            self.Byte_Count.export(outfile, level, 'NetFlowObj:', name_='Byte_Count')
        if self.TCP_Flags is not None:
            self.TCP_Flags.export(outfile, level, 'NetFlowObj:', name_='TCP_Flags')
        if self.Start_Time is not None:
            self.Start_Time.export(outfile, level, 'NetFlowObj:', name_='Start_Time')
        if self.Duration is not None:
            self.Duration.export(outfile, level, 'NetFlowObj:', name_='Duration')
        if self.End_Time is not None:
            self.End_Time.export(outfile, level, 'NetFlowObj:', name_='End_Time')
        if self.Sensor_Info is not None:
            self.Sensor_Info.export(outfile, level, 'NetFlowObj:', name_='Sensor_Info')
        if self.ICMP_Type is not None:
            self.ICMP_Type.export(outfile, level, 'NetFlowObj:', name_='ICMP_Type')
        if self.ICMP_Code is not None:
            self.ICMP_Code.export(outfile, level, 'NetFlowObj:', name_='ICMP_Code')
        if self.Router_Next_Hop_IP is not None:
            self.Router_Next_Hop_IP.export(outfile, level, 'NetFlowObj:', name_='Router_Next_Hop_IP')
        if self.Initial_TCP_Flags is not None:
            self.Initial_TCP_Flags.export(outfile, level, 'NetFlowObj:', name_='Initial_TCP_Flags')
        if self.Session_TCP_Flags is not None:
            self.Session_TCP_Flags.export(outfile, level, 'NetFlowObj:', name_='Session_TCP_Flags')
        if self.Flow_Attributes is not None:
            self.Flow_Attributes.export(outfile, level, 'NetFlowObj:', name_='Flow_Attributes')
        if self.Flow_Application is not None:
            self.Flow_Application.export(outfile, level, 'NetFlowObj:', name_='Flow_Application')
        if self.Src_IP_Type is not None:
            self.Src_IP_Type.export(outfile, level, 'NetFlowObj:', name_='Src_IP_Type')
        if self.Dest_IP_Type is not None:
            self.Dest_IP_Type.export(outfile, level, 'NetFlowObj:', name_='Dest_IP_Type')
        if self.Src_Country_Code is not None:
            self.Src_Country_Code.export(outfile, level, 'NetFlowObj:', name_='Src_Country_Code')
        if self.Dest_Country_Code is not None:
            self.Dest_Country_Code.export(outfile, level, 'NetFlowObj:', name_='Dest_Country_Code')
        if self.Src_MAPNAME is not None:
            self.Src_MAPNAME.export(outfile, level, 'NetFlowObj:', name_='Src_MAPNAME')
        if self.Dest_MAPNAME is not None:
            self.Dest_MAPNAME.export(outfile, level, 'NetFlowObj:', name_='Dest_MAPNAME')
    def hasContent_(self):
        if (
            self.Packet_Count is not None or
            self.Byte_Count is not None or
            self.TCP_Flags is not None or
            self.Start_Time is not None or
            self.Duration is not None or
            self.End_Time is not None or
            self.Sensor_Info is not None or
            self.ICMP_Type is not None or
            self.ICMP_Code is not None or
            self.Router_Next_Hop_IP is not None or
            self.Initial_TCP_Flags is not None or
            self.Session_TCP_Flags is not None or
            self.Flow_Attributes is not None or
            self.Flow_Application is not None or
            self.Src_IP_Type is not None or
            self.Dest_IP_Type is not None or
            self.Src_Country_Code is not None or
            self.Dest_Country_Code is not None or
            self.Src_MAPNAME is not None or
            self.Dest_MAPNAME is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SiLKRecordType'):
        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.Packet_Count is not None:
            showIndent(outfile, level)
            outfile.write('Packet_Count=%s,\n' % quote_python(self.Packet_Count).encode(ExternalEncoding))
        if self.Byte_Count is not None:
            showIndent(outfile, level)
            outfile.write('Byte_Count=%s,\n' % quote_python(self.Byte_Count).encode(ExternalEncoding))
        if self.TCP_Flags is not None:
            showIndent(outfile, level)
            outfile.write('TCP_Flags=%s,\n' % quote_python(self.TCP_Flags).encode(ExternalEncoding))
        if self.Start_Time is not None:
            showIndent(outfile, level)
            outfile.write('Start_Time=%s,\n' % quote_python(self.Start_Time).encode(ExternalEncoding))
        if self.Duration is not None:
            showIndent(outfile, level)
            outfile.write('Duration=%s,\n' % quote_python(self.Duration).encode(ExternalEncoding))
        if self.End_Time is not None:
            showIndent(outfile, level)
            outfile.write('End_Time=%s,\n' % quote_python(self.End_Time).encode(ExternalEncoding))
        if self.Sensor_Info is not None:
            showIndent(outfile, level)
            outfile.write('Sensor_Info=model_.SiLKSensorInfoType(\n')
            self.Sensor_Info.exportLiteral(outfile, level, name_='Sensor_Info')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ICMP_Type is not None:
            showIndent(outfile, level)
            outfile.write('ICMP_Type=%s,\n' % quote_python(self.ICMP_Type).encode(ExternalEncoding))
        if self.ICMP_Code is not None:
            showIndent(outfile, level)
            outfile.write('ICMP_Code=%s,\n' % quote_python(self.ICMP_Code).encode(ExternalEncoding))
        if self.Router_Next_Hop_IP is not None:
            showIndent(outfile, level)
            outfile.write('Router_Next_Hop_IP=%s,\n' % quote_python(self.Router_Next_Hop_IP).encode(ExternalEncoding))
        if self.Initial_TCP_Flags is not None:
            showIndent(outfile, level)
            outfile.write('Initial_TCP_Flags=%s,\n' % quote_python(self.Initial_TCP_Flags).encode(ExternalEncoding))
        if self.Session_TCP_Flags is not None:
            showIndent(outfile, level)
            outfile.write('Session_TCP_Flags=%s,\n' % quote_python(self.Session_TCP_Flags).encode(ExternalEncoding))
        if self.Flow_Attributes is not None:
            showIndent(outfile, level)
            outfile.write('Flow_Attributes=model_.SiLKFlowAttributesType(\n')
            self.Flow_Attributes.exportLiteral(outfile, level, name_='Flow_Attributes')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Flow_Application is not None:
            showIndent(outfile, level)
            outfile.write('Flow_Application=%s,\n' % quote_python(self.Flow_Application).encode(ExternalEncoding))
        if self.Src_IP_Type is not None:
            showIndent(outfile, level)
            outfile.write('Src_IP_Type=model_.SiLKAddressType(\n')
            self.Src_IP_Type.exportLiteral(outfile, level, name_='Src_IP_Type')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Dest_IP_Type is not None:
            showIndent(outfile, level)
            outfile.write('Dest_IP_Type=model_.SiLKAddressType(\n')
            self.Dest_IP_Type.exportLiteral(outfile, level, name_='Dest_IP_Type')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Src_Country_Code is not None:
            showIndent(outfile, level)
            outfile.write('Src_Country_Code=model_.SiLKCountryCodeType(\n')
            self.Src_Country_Code.exportLiteral(outfile, level, name_='Src_Country_Code')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Dest_Country_Code is not None:
            showIndent(outfile, level)
            outfile.write('Dest_Country_Code=model_.SiLKCountryCodeType(\n')
            self.Dest_Country_Code.exportLiteral(outfile, level, name_='Dest_Country_Code')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Src_MAPNAME is not None:
            showIndent(outfile, level)
            outfile.write('Src_MAPNAME=%s,\n' % quote_python(self.Src_MAPNAME).encode(ExternalEncoding))
        if self.Dest_MAPNAME is not None:
            showIndent(outfile, level)
            outfile.write('Dest_MAPNAME=%s,\n' % quote_python(self.Dest_MAPNAME).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_ == 'Packet_Count':
            Packet_Count_ = child_.text
            Packet_Count_ = self.gds_validate_string(Packet_Count_, node, 'Packet_Count')
            self.Packet_Count = Packet_Count_
        elif nodeName_ == 'Byte_Count':
            Byte_Count_ = child_.text
            Byte_Count_ = self.gds_validate_string(Byte_Count_, node, 'Byte_Count')
            self.Byte_Count = Byte_Count_
        elif nodeName_ == 'TCP_Flags':
            TCP_Flags_ = child_.text
            TCP_Flags_ = self.gds_validate_string(TCP_Flags_, node, 'TCP_Flags')
            self.TCP_Flags = TCP_Flags_
        elif nodeName_ == 'Start_Time':
            Start_Time_ = child_.text
            Start_Time_ = self.gds_validate_string(Start_Time_, node, 'Start_Time')
            self.Start_Time = Start_Time_
        elif nodeName_ == 'Duration':
            Duration_ = child_.text
            Duration_ = self.gds_validate_string(Duration_, node, 'Duration')
            self.Duration = Duration_
        elif nodeName_ == 'End_Time':
            End_Time_ = child_.text
            End_Time_ = self.gds_validate_string(End_Time_, node, 'End_Time')
            self.End_Time = End_Time_
        elif nodeName_ == 'Sensor_Info':
            obj_ = SiLKSensorInfoType.factory()
            obj_.build(child_)
            self.set_Sensor_Info(obj_)
        elif nodeName_ == 'ICMP_Type':
            ICMP_Type_ = child_.text
            ICMP_Type_ = self.gds_validate_string(ICMP_Type_, node, 'ICMP_Type')
            self.ICMP_Type = ICMP_Type_
        elif nodeName_ == 'ICMP_Code':
            ICMP_Code_ = child_.text
            ICMP_Code_ = self.gds_validate_string(ICMP_Code_, node, 'ICMP_Code')
            self.ICMP_Code = ICMP_Code_
        elif nodeName_ == 'Router_Next_Hop_IP':
            Router_Next_Hop_IP_ = child_.text
            Router_Next_Hop_IP_ = self.gds_validate_string(Router_Next_Hop_IP_, node, 'Router_Next_Hop_IP')
            self.Router_Next_Hop_IP = Router_Next_Hop_IP_
        elif nodeName_ == 'Initial_TCP_Flags':
            Initial_TCP_Flags_ = child_.text
            Initial_TCP_Flags_ = self.gds_validate_string(Initial_TCP_Flags_, node, 'Initial_TCP_Flags')
            self.Initial_TCP_Flags = Initial_TCP_Flags_
        elif nodeName_ == 'Session_TCP_Flags':
            Session_TCP_Flags_ = child_.text
            Session_TCP_Flags_ = self.gds_validate_string(Session_TCP_Flags_, node, 'Session_TCP_Flags')
            self.Session_TCP_Flags = Session_TCP_Flags_
        elif nodeName_ == 'Flow_Attributes':
            obj_ = None
            self.set_Flow_Attributes(obj_)
            self.validate_SiLKFlowAttributesType(self.Flow_Attributes)    # validate type SiLKFlowAttributesType
        elif nodeName_ == 'Flow_Application':
            Flow_Application_ = child_.text
            Flow_Application_ = self.gds_validate_string(Flow_Application_, node, 'Flow_Application')
            self.Flow_Application = Flow_Application_
        elif nodeName_ == 'Src_IP_Type':
            obj_ = None
            self.set_Src_IP_Type(obj_)
            self.validate_SiLKAddressType(self.Src_IP_Type)    # validate type SiLKAddressType
        elif nodeName_ == 'Dest_IP_Type':
            obj_ = None
            self.set_Dest_IP_Type(obj_)
            self.validate_SiLKAddressType(self.Dest_IP_Type)    # validate type SiLKAddressType
        elif nodeName_ == 'Src_Country_Code':
            obj_ = None
            self.set_Src_Country_Code(obj_)
            self.validate_SiLKCountryCodeType(self.Src_Country_Code)    # validate type SiLKCountryCodeType
        elif nodeName_ == 'Dest_Country_Code':
            obj_ = None
            self.set_Dest_Country_Code(obj_)
            self.validate_SiLKCountryCodeType(self.Dest_Country_Code)    # validate type SiLKCountryCodeType
        elif nodeName_ == 'Src_MAPNAME':
            Src_MAPNAME_ = child_.text
            Src_MAPNAME_ = self.gds_validate_string(Src_MAPNAME_, node, 'Src_MAPNAME')
            self.Src_MAPNAME = Src_MAPNAME_
        elif nodeName_ == 'Dest_MAPNAME':
            Dest_MAPNAME_ = child_.text
            Dest_MAPNAME_ = self.gds_validate_string(Dest_MAPNAME_, node, 'Dest_MAPNAME')
            self.Dest_MAPNAME = Dest_MAPNAME_
# end class SiLKRecordType


class SiLKFlowAttributesType(GeneratedsSuper):
    """SiLKFlowAttributesType specifies SiLK flow attributes, via a union
    of the SiLKFlowAttributesTypeEnum type and the atomic xs:string
    type. Its base type is the CybOX Core BaseObjectAttributeType,
    for permitting complex (i.e. regular-expression based)
    specifications.This attribute is optional and specifies the
    expected type for the value of the specified element."""
    subclass = None
    superclass = None
    def __init__(self, datatype=None, valueOf_=None):
        self.datatype = _cast(None, datatype)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SiLKFlowAttributesType.subclass:
            return SiLKFlowAttributesType.subclass(*args_, **kwargs_)
        else:
            return SiLKFlowAttributesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_datatype(self): return self.datatype
    def set_datatype(self, datatype): self.datatype = datatype
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKFlowAttributesType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SiLKFlowAttributesType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='SiLKFlowAttributesType'):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            outfile.write(' datatype=%s' % (quote_attrib(self.datatype), ))
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKFlowAttributesType', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (
            self.valueOf_
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SiLKFlowAttributesType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            showIndent(outfile, level)
            outfile.write('datatype = %s,\n' % (self.datatype,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('datatype', node)
        if value is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            self.datatype = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SiLKFlowAttributesType


class SiLKAddressType(GeneratedsSuper):
    """SiLKAddressType specifies SiLK address types, via a union of the
    SiLKAddressTypeEnum type and the atomic xs:string type. Its base
    type is the CybOX Core BaseObjectAttributeType, for permitting
    complex (i.e. regular-expression based) specifications.This
    attribute is optional and specifies the expected type for the
    value of the specified element."""
    subclass = None
    superclass = None
    def __init__(self, datatype=None, valueOf_=None):
        self.datatype = _cast(None, datatype)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SiLKAddressType.subclass:
            return SiLKAddressType.subclass(*args_, **kwargs_)
        else:
            return SiLKAddressType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_datatype(self): return self.datatype
    def set_datatype(self, datatype): self.datatype = datatype
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKAddressType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SiLKAddressType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='SiLKAddressType'):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            outfile.write(' datatype=%s' % (quote_attrib(self.datatype), ))
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKAddressType', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (
            self.valueOf_
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SiLKAddressType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            showIndent(outfile, level)
            outfile.write('datatype = %s,\n' % (self.datatype,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('datatype', node)
        if value is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            self.datatype = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SiLKAddressType


class SiLKCountryCodeType(GeneratedsSuper):
    """SiLKCountryCodeType specifies country codes used by SiLK, via a
    union of the SiLKCountryCodeTypeEnum type and the atomic
    xs:string type. Its base type is the CybOX Core
    BaseObjectAttributeType, for permitting complex (i.e. regular-
    expression based) specifications.This attribute is optional and
    specifies the expected type for the value of the specified
    element."""
    subclass = None
    superclass = None
    def __init__(self, datatype=None, valueOf_=None):
        self.datatype = _cast(None, datatype)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SiLKCountryCodeType.subclass:
            return SiLKCountryCodeType.subclass(*args_, **kwargs_)
        else:
            return SiLKCountryCodeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_datatype(self): return self.datatype
    def set_datatype(self, datatype): self.datatype = datatype
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKCountryCodeType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SiLKCountryCodeType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='SiLKCountryCodeType'):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            outfile.write(' datatype=%s' % (quote_attrib(self.datatype), ))
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKCountryCodeType', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (
            self.valueOf_
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SiLKCountryCodeType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            showIndent(outfile, level)
            outfile.write('datatype = %s,\n' % (self.datatype,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('datatype', node)
        if value is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            self.datatype = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SiLKCountryCodeType


class SiLKSensorInfoType(GeneratedsSuper):
    """Defines elements associated with a SiLK sensor."""
    subclass = None
    superclass = None
    def __init__(self, Sensor_ID=None, Class=None, Type=None):
        self.Sensor_ID = Sensor_ID
        self.Class = Class
        self.Type = Type
    def factory(*args_, **kwargs_):
        if SiLKSensorInfoType.subclass:
            return SiLKSensorInfoType.subclass(*args_, **kwargs_)
        else:
            return SiLKSensorInfoType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Sensor_ID(self): return self.Sensor_ID
    def set_Sensor_ID(self, Sensor_ID): self.Sensor_ID = Sensor_ID
    def get_Class(self): return self.Class
    def set_Class(self, Class): self.Class = Class
    def validate_SiLKSensorClassType(self, value):
        # Validate type SiLKSensorClassType, a restriction on None.
        pass
    def get_Type(self): return self.Type
    def set_Type(self, Type): self.Type = Type
    def validate_SiLKDirectionType(self, value):
        # Validate type SiLKDirectionType, a restriction on None.
        pass
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKSensorInfoType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SiLKSensorInfoType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='SiLKSensorInfoType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKSensorInfoType', fromsubclass_=False):
        if self.Sensor_ID is not None:
            self.Sensor_ID.export(outfile, level, 'NetFlowObj:', name_='Sensor_ID')
        if self.Class is not None:
            self.Class.export(outfile, level, 'NetFlowObj:', name_='Class')
        if self.Type is not None:
            self.Type.export(outfile, level, 'NetFlowObj:', name_='Type')
    def hasContent_(self):
        if (
            self.Sensor_ID is not None or
            self.Class is not None or
            self.Type is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SiLKSensorInfoType'):
        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.Sensor_ID is not None:
            showIndent(outfile, level)
            outfile.write('Sensor_ID=%s,\n' % quote_python(self.Sensor_ID).encode(ExternalEncoding))
        if self.Class is not None:
            showIndent(outfile, level)
            outfile.write('Class=model_.SiLKSensorClassType(\n')
            self.Class.exportLiteral(outfile, level, name_='Class')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Type is not None:
            showIndent(outfile, level)
            outfile.write('Type=model_.SiLKDirectionType(\n')
            self.Type.exportLiteral(outfile, level, name_='Type')
            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_ == 'Sensor_ID':
            Sensor_ID_ = child_.text
            Sensor_ID_ = self.gds_validate_string(Sensor_ID_, node, 'Sensor_ID')
            self.Sensor_ID = Sensor_ID_
        elif nodeName_ == 'Class':
            obj_ = None
            self.set_Class(obj_)
            self.validate_SiLKSensorClassType(self.Class)    # validate type SiLKSensorClassType
        elif nodeName_ == 'Type':
            obj_ = None
            self.set_Type(obj_)
            self.validate_SiLKDirectionType(self.Type)    # validate type SiLKDirectionType
# end class SiLKSensorInfoType


class SiLKDirectionType(GeneratedsSuper):
    """SiLKType specifies direction of SiLK traffic, via a union of the
    SiLKDirectionTypeEnum type and the atomic xs:string type. Its
    base type is the CybOX Core BaseObjectAttributeType, for
    permitting complex (i.e. regular-expression based)
    specifications.This attribute is optional and specifies the
    expected type for the value of the specified element."""
    subclass = None
    superclass = None
    def __init__(self, datatype=None, valueOf_=None):
        self.datatype = _cast(None, datatype)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SiLKDirectionType.subclass:
            return SiLKDirectionType.subclass(*args_, **kwargs_)
        else:
            return SiLKDirectionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_datatype(self): return self.datatype
    def set_datatype(self, datatype): self.datatype = datatype
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKDirectionType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SiLKDirectionType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='SiLKDirectionType'):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            outfile.write(' datatype=%s' % (quote_attrib(self.datatype), ))
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKDirectionType', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (
            self.valueOf_
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SiLKDirectionType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            showIndent(outfile, level)
            outfile.write('datatype = %s,\n' % (self.datatype,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('datatype', node)
        if value is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            self.datatype = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SiLKDirectionType


class SiLKSensorClassType(GeneratedsSuper):
    """SiLKSensorClassType specifies the sensor class, via a union of the
    SiLKSensorClassTypeEnum type and the atomic xs:string type. Its
    base type is the CybOX Core BaseObjectAttributeType, for
    permitting complex (i.e. regular-expression based)
    specifications.This attribute is optional and specifies the
    expected type for the value of the specified element."""
    subclass = None
    superclass = None
    def __init__(self, datatype=None, valueOf_=None):
        self.datatype = _cast(None, datatype)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SiLKSensorClassType.subclass:
            return SiLKSensorClassType.subclass(*args_, **kwargs_)
        else:
            return SiLKSensorClassType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_datatype(self): return self.datatype
    def set_datatype(self, datatype): self.datatype = datatype
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKSensorClassType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SiLKSensorClassType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='SiLKSensorClassType'):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            outfile.write(' datatype=%s' % (quote_attrib(self.datatype), ))
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='SiLKSensorClassType', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (
            self.valueOf_
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='SiLKSensorClassType'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.datatype is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            showIndent(outfile, level)
            outfile.write('datatype = %s,\n' % (self.datatype,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('datatype', node)
        if value is not None and 'datatype' not in already_processed:
            already_processed.append('datatype')
            self.datatype = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SiLKSensorClassType


class YAFRecordType(GeneratedsSuper):
    """YAF (Yet Another Flowmeter) is bidirectional network flow meter. It
    processes packet data from pcap(3) dumpfiles as generated by
    tcpdump(1) or via live capture from an interface using pcap(3)
    into bidirectional flows, then exports those flows to IPFIX.
    (REF:
    http://www.usenix.org/event/lisa10/tech/full_papers/Inacio.pdf)"""
    subclass = None
    superclass = None
    def __init__(self, Flow=None, Reverse_Flow=None):
        self.Flow = Flow
        self.Reverse_Flow = Reverse_Flow
    def factory(*args_, **kwargs_):
        if YAFRecordType.subclass:
            return YAFRecordType.subclass(*args_, **kwargs_)
        else:
            return YAFRecordType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Flow(self): return self.Flow
    def set_Flow(self, Flow): self.Flow = Flow
    def get_Reverse_Flow(self): return self.Reverse_Flow
    def set_Reverse_Flow(self, Reverse_Flow): self.Reverse_Flow = Reverse_Flow
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='YAFRecordType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='YAFRecordType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='YAFRecordType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='YAFRecordType', fromsubclass_=False):
        if self.Flow is not None:
            self.Flow.export(outfile, level, 'NetFlowObj:', name_='Flow')
        if self.Reverse_Flow is not None:
            self.Reverse_Flow.export(outfile, level, 'NetFlowObj:', name_='Reverse_Flow')
    def hasContent_(self):
        if (
            self.Flow is not None or
            self.Reverse_Flow is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='YAFRecordType'):
        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.Flow is not None:
            showIndent(outfile, level)
            outfile.write('Flow=model_.YAFFlowType(\n')
            self.Flow.exportLiteral(outfile, level, name_='Flow')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Reverse_Flow is not None:
            showIndent(outfile, level)
            outfile.write('Reverse_Flow=model_.YAFReverseFlowType(\n')
            self.Reverse_Flow.exportLiteral(outfile, level, name_='Reverse_Flow')
            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_ == 'Flow':
            obj_ = YAFFlowType.factory()
            obj_.build(child_)
            self.set_Flow(obj_)
        elif nodeName_ == 'Reverse_Flow':
            obj_ = YAFReverseFlowType.factory()
            obj_.build(child_)
            self.set_Reverse_Flow(obj_)
# end class YAFRecordType


class YAFFlowType(GeneratedsSuper):
    """These elements of a YAF record correspond to the flow generally or
    to the forward portion of the flow. Elements common to all
    network flow objects are defined in the NetworkFlowLabelType
    (src ip address, ingress/egress interface)."""
    subclass = None
    superclass = None
    def __init__(self, Flow_Start_Milliseconds=None, Flow_End_Milliseconds=None, Octet_Total_Count=None, Packet_Total_Count=None, Flow_End_Reason=None, SiLK_App_Label=None, Payload_Entropy=None, ML_App_Label=None, TCP_Flow=None, Vlan_ID_MAC_Addr=None, Passive_OS_FIngerprinting=None, First_Packet_Banner=None, Second_Packet_Banner=None, N_Bytes_Payload=None):
        self.Flow_Start_Milliseconds = Flow_Start_Milliseconds
        self.Flow_End_Milliseconds = Flow_End_Milliseconds
        self.Octet_Total_Count = Octet_Total_Count
        self.Packet_Total_Count = Packet_Total_Count
        self.Flow_End_Reason = Flow_End_Reason
        self.SiLK_App_Label = SiLK_App_Label
        self.Payload_Entropy = Payload_Entropy
        self.ML_App_Label = ML_App_Label
        self.TCP_Flow = TCP_Flow
        self.Vlan_ID_MAC_Addr = Vlan_ID_MAC_Addr
        self.Passive_OS_FIngerprinting = Passive_OS_FIngerprinting
        self.First_Packet_Banner = First_Packet_Banner
        self.Second_Packet_Banner = Second_Packet_Banner
        self.N_Bytes_Payload = N_Bytes_Payload
    def factory(*args_, **kwargs_):
        if YAFFlowType.subclass:
            return YAFFlowType.subclass(*args_, **kwargs_)
        else:
            return YAFFlowType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Flow_Start_Milliseconds(self): return self.Flow_Start_Milliseconds
    def set_Flow_Start_Milliseconds(self, Flow_Start_Milliseconds): self.Flow_Start_Milliseconds = Flow_Start_Milliseconds
    def get_Flow_End_Milliseconds(self): return self.Flow_End_Milliseconds
    def set_Flow_End_Milliseconds(self, Flow_End_Milliseconds): self.Flow_End_Milliseconds = Flow_End_Milliseconds
    def get_Octet_Total_Count(self): return self.Octet_Total_Count
    def set_Octet_Total_Count(self, Octet_Total_Count): self.Octet_Total_Count = Octet_Total_Count
    def get_Packet_Total_Count(self): return self.Packet_Total_Count
    def set_Packet_Total_Count(self, Packet_Total_Count): self.Packet_Total_Count = Packet_Total_Count
    def get_Flow_End_Reason(self): return self.Flow_End_Reason
    def set_Flow_End_Reason(self, Flow_End_Reason): self.Flow_End_Reason = Flow_End_Reason
    def get_SiLK_App_Label(self): return self.SiLK_App_Label
    def set_SiLK_App_Label(self, SiLK_App_Label): self.SiLK_App_Label = SiLK_App_Label
    def get_Payload_Entropy(self): return self.Payload_Entropy
    def set_Payload_Entropy(self, Payload_Entropy): self.Payload_Entropy = Payload_Entropy
    def get_ML_App_Label(self): return self.ML_App_Label
    def set_ML_App_Label(self, ML_App_Label): self.ML_App_Label = ML_App_Label
    def get_TCP_Flow(self): return self.TCP_Flow
    def set_TCP_Flow(self, TCP_Flow): self.TCP_Flow = TCP_Flow
    def get_Vlan_ID_MAC_Addr(self): return self.Vlan_ID_MAC_Addr
    def set_Vlan_ID_MAC_Addr(self, Vlan_ID_MAC_Addr): self.Vlan_ID_MAC_Addr = Vlan_ID_MAC_Addr
    def get_Passive_OS_FIngerprinting(self): return self.Passive_OS_FIngerprinting
    def set_Passive_OS_FIngerprinting(self, Passive_OS_FIngerprinting): self.Passive_OS_FIngerprinting = Passive_OS_FIngerprinting
    def get_First_Packet_Banner(self): return self.First_Packet_Banner
    def set_First_Packet_Banner(self, First_Packet_Banner): self.First_Packet_Banner = First_Packet_Banner
    def get_Second_Packet_Banner(self): return self.Second_Packet_Banner
    def set_Second_Packet_Banner(self, Second_Packet_Banner): self.Second_Packet_Banner = Second_Packet_Banner
    def get_N_Bytes_Payload(self): return self.N_Bytes_Payload
    def set_N_Bytes_Payload(self, N_Bytes_Payload): self.N_Bytes_Payload = N_Bytes_Payload
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='YAFFlowType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='YAFFlowType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='YAFFlowType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='YAFFlowType', fromsubclass_=False):
        if self.Flow_Start_Milliseconds is not None:
            self.Flow_Start_Milliseconds.export(outfile, level, 'NetFlowObj:', name_='Flow_Start_Milliseconds')
        if self.Flow_End_Milliseconds is not None:
            self.Flow_End_Milliseconds.export(outfile, level, 'NetFlowObj:', name_='Flow_End_Milliseconds')
        if self.Octet_Total_Count is not None:
            self.Octet_Total_Count.export(outfile, level, 'NetFlowObj:', name_='Octet_Total_Count')
        if self.Packet_Total_Count is not None:
            self.Packet_Total_Count.export(outfile, level, 'NetFlowObj:', name_='Packet_Total_Count')
        if self.Flow_End_Reason is not None:
            self.Flow_End_Reason.export(outfile, level, 'NetFlowObj:', name_='Flow_End_Reason')
        if self.SiLK_App_Label is not None:
            self.SiLK_App_Label.export(outfile, level, 'NetFlowObj:', name_='SiLK_App_Label')
        if self.Payload_Entropy is not None:
            self.Payload_Entropy.export(outfile, level, 'NetFlowObj:', name_='Payload_Entropy')
        if self.ML_App_Label is not None:
            self.ML_App_Label.export(outfile, level, 'NetFlowObj:', name_='ML_App_Label')
        if self.TCP_Flow is not None:
            self.TCP_Flow.export(outfile, level, 'NetFlowObj:', name_='TCP_Flow')
        if self.Vlan_ID_MAC_Addr is not None:
            self.Vlan_ID_MAC_Addr.export(outfile, level, 'NetFlowObj:', name_='Vlan_ID_MAC_Addr')
        if self.Passive_OS_FIngerprinting is not None:
            self.Passive_OS_FIngerprinting.export(outfile, level, 'NetFlowObj:', name_='Passive_OS_FIngerprinting')
        if self.First_Packet_Banner is not None:
            self.First_Packet_Banner.export(outfile, level, 'NetFlowObj:', name_='First_Packet_Banner')
        if self.Second_Packet_Banner is not None:
            self.Second_Packet_Banner.export(outfile, level, 'NetFlowObj:', name_='Second_Packet_Banner')
        if self.N_Bytes_Payload is not None:
            self.N_Bytes_Payload.export(outfile, level, 'NetFlowObj:', name_='N_Bytes_Payload')
    def hasContent_(self):
        if (
            self.Flow_Start_Milliseconds is not None or
            self.Flow_End_Milliseconds is not None or
            self.Octet_Total_Count is not None or
            self.Packet_Total_Count is not None or
            self.Flow_End_Reason is not None or
            self.SiLK_App_Label is not None or
            self.Payload_Entropy is not None or
            self.ML_App_Label is not None or
            self.TCP_Flow is not None or
            self.Vlan_ID_MAC_Addr is not None or
            self.Passive_OS_FIngerprinting is not None or
            self.First_Packet_Banner is not None or
            self.Second_Packet_Banner is not None or
            self.N_Bytes_Payload is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='YAFFlowType'):
        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.Flow_Start_Milliseconds is not None:
            showIndent(outfile, level)
            outfile.write('Flow_Start_Milliseconds=%s,\n' % quote_python(self.Flow_Start_Milliseconds).encode(ExternalEncoding))
        if self.Flow_End_Milliseconds is not None:
            showIndent(outfile, level)
            outfile.write('Flow_End_Milliseconds=%s,\n' % quote_python(self.Flow_End_Milliseconds).encode(ExternalEncoding))
        if self.Octet_Total_Count is not None:
            showIndent(outfile, level)
            outfile.write('Octet_Total_Count=%s,\n' % quote_python(self.Octet_Total_Count).encode(ExternalEncoding))
        if self.Packet_Total_Count is not None:
            showIndent(outfile, level)
            outfile.write('Packet_Total_Count=%s,\n' % quote_python(self.Packet_Total_Count).encode(ExternalEncoding))
        if self.Flow_End_Reason is not None:
            showIndent(outfile, level)
            outfile.write('Flow_End_Reason=%s,\n' % quote_python(self.Flow_End_Reason).encode(ExternalEncoding))
        if self.SiLK_App_Label is not None:
            showIndent(outfile, level)
            outfile.write('SiLK_App_Label=%s,\n' % quote_python(self.SiLK_App_Label).encode(ExternalEncoding))
        if self.Payload_Entropy is not None:
            showIndent(outfile, level)
            outfile.write('Payload_Entropy=%s,\n' % quote_python(self.Payload_Entropy).encode(ExternalEncoding))
        if self.ML_App_Label is not None:
            showIndent(outfile, level)
            outfile.write('ML_App_Label=%s,\n' % quote_python(self.ML_App_Label).encode(ExternalEncoding))
        if self.TCP_Flow is not None:
            showIndent(outfile, level)
            outfile.write('TCP_Flow=model_.YAFTCPFlowType(\n')
            self.TCP_Flow.exportLiteral(outfile, level, name_='TCP_Flow')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Vlan_ID_MAC_Addr is not None:
            showIndent(outfile, level)
            outfile.write('Vlan_ID_MAC_Addr=%s,\n' % quote_python(self.Vlan_ID_MAC_Addr).encode(ExternalEncoding))
        if self.Passive_OS_FIngerprinting is not None:
            showIndent(outfile, level)
            outfile.write('Passive_OS_FIngerprinting=model_.YAFOSInformationType(\n')
            self.Passive_OS_FIngerprinting.exportLiteral(outfile, level, name_='Passive_OS_FIngerprinting')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.First_Packet_Banner is not None:
            showIndent(outfile, level)
            outfile.write('First_Packet_Banner=%s,\n' % quote_python(self.First_Packet_Banner).encode(ExternalEncoding))
        if self.Second_Packet_Banner is not None:
            showIndent(outfile, level)
            outfile.write('Second_Packet_Banner=%s,\n' % quote_python(self.Second_Packet_Banner).encode(ExternalEncoding))
        if self.N_Bytes_Payload is not None:
            showIndent(outfile, level)
            outfile.write('N_Bytes_Payload=%s,\n' % quote_python(self.N_Bytes_Payload).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_ == 'Flow_Start_Milliseconds':
            Flow_Start_Milliseconds_ = child_.text
            Flow_Start_Milliseconds_ = self.gds_validate_string(Flow_Start_Milliseconds_, node, 'Flow_Start_Milliseconds')
            self.Flow_Start_Milliseconds = Flow_Start_Milliseconds_
        elif nodeName_ == 'Flow_End_Milliseconds':
            Flow_End_Milliseconds_ = child_.text
            Flow_End_Milliseconds_ = self.gds_validate_string(Flow_End_Milliseconds_, node, 'Flow_End_Milliseconds')
            self.Flow_End_Milliseconds = Flow_End_Milliseconds_
        elif nodeName_ == 'Octet_Total_Count':
            Octet_Total_Count_ = child_.text
            Octet_Total_Count_ = self.gds_validate_string(Octet_Total_Count_, node, 'Octet_Total_Count')
            self.Octet_Total_Count = Octet_Total_Count_
        elif nodeName_ == 'Packet_Total_Count':
            Packet_Total_Count_ = child_.text
            Packet_Total_Count_ = self.gds_validate_string(Packet_Total_Count_, node, 'Packet_Total_Count')
            self.Packet_Total_Count = Packet_Total_Count_
        elif nodeName_ == 'Flow_End_Reason':
            Flow_End_Reason_ = child_.text
            Flow_End_Reason_ = self.gds_validate_string(Flow_End_Reason_, node, 'Flow_End_Reason')
            self.Flow_End_Reason = Flow_End_Reason_
        elif nodeName_ == 'SiLK_App_Label':
            SiLK_App_Label_ = child_.text
            SiLK_App_Label_ = self.gds_validate_string(SiLK_App_Label_, node, 'SiLK_App_Label')
            self.SiLK_App_Label = SiLK_App_Label_
        elif nodeName_ == 'Payload_Entropy':
            Payload_Entropy_ = child_.text
            Payload_Entropy_ = self.gds_validate_string(Payload_Entropy_, node, 'Payload_Entropy')
            self.Payload_Entropy = Payload_Entropy_
        elif nodeName_ == 'ML_App_Label':
            ML_App_Label_ = child_.text
            ML_App_Label_ = self.gds_validate_string(ML_App_Label_, node, 'ML_App_Label')
            self.ML_App_Label = ML_App_Label_
        elif nodeName_ == 'TCP_Flow':
            obj_ = YAFTCPFlowType.factory()
            obj_.build(child_)
            self.set_TCP_Flow(obj_)
        elif nodeName_ == 'Vlan_ID_MAC_Addr':
            Vlan_ID_MAC_Addr_ = child_.text
            Vlan_ID_MAC_Addr_ = self.gds_validate_string(Vlan_ID_MAC_Addr_, node, 'Vlan_ID_MAC_Addr')
            self.Vlan_ID_MAC_Addr = Vlan_ID_MAC_Addr_
        elif nodeName_ == 'Passive_OS_FIngerprinting':
            obj_ = YAFOSInformationType.factory()
            obj_.build(child_)
            self.set_Passive_OS_FIngerprinting(obj_)
        elif nodeName_ == 'First_Packet_Banner':
            First_Packet_Banner_ = child_.text
            First_Packet_Banner_ = self.gds_validate_string(First_Packet_Banner_, node, 'First_Packet_Banner')
            self.First_Packet_Banner = First_Packet_Banner_
        elif nodeName_ == 'Second_Packet_Banner':
            Second_Packet_Banner_ = child_.text
            Second_Packet_Banner_ = self.gds_validate_string(Second_Packet_Banner_, node, 'Second_Packet_Banner')
            self.Second_Packet_Banner = Second_Packet_Banner_
        elif nodeName_ == 'N_Bytes_Payload':
            N_Bytes_Payload_ = child_.text
            N_Bytes_Payload_ = self.gds_validate_string(N_Bytes_Payload_, node, 'N_Bytes_Payload')
            self.N_Bytes_Payload = N_Bytes_Payload_
# end class YAFFlowType


class YAFReverseFlowType(GeneratedsSuper):
    """These elements correspond to the reverse flow captured by in YAF
    record."""
    subclass = None
    superclass = None
    def __init__(self, Reverse_Octet_Total_Count=None, Reverse_Packet_Total_Count=None, Reverse_Payload_Entropy=None, Reverse_Flow_Delta_Milliseconds=None, TCP_Reverse_Flow=None, Reverse_Vlan_ID_MAC_Addr=None, Reverse_Passive_OS_Fingerprinting=None, Reverse_First_Packet=None, Reverse_N_Bytes_Payload=None):
        self.Reverse_Octet_Total_Count = Reverse_Octet_Total_Count
        self.Reverse_Packet_Total_Count = Reverse_Packet_Total_Count
        self.Reverse_Payload_Entropy = Reverse_Payload_Entropy
        self.Reverse_Flow_Delta_Milliseconds = Reverse_Flow_Delta_Milliseconds
        self.TCP_Reverse_Flow = TCP_Reverse_Flow
        self.Reverse_Vlan_ID_MAC_Addr = Reverse_Vlan_ID_MAC_Addr
        self.Reverse_Passive_OS_Fingerprinting = Reverse_Passive_OS_Fingerprinting
        self.Reverse_First_Packet = Reverse_First_Packet
        self.Reverse_N_Bytes_Payload = Reverse_N_Bytes_Payload
    def factory(*args_, **kwargs_):
        if YAFReverseFlowType.subclass:
            return YAFReverseFlowType.subclass(*args_, **kwargs_)
        else:
            return YAFReverseFlowType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Reverse_Octet_Total_Count(self): return self.Reverse_Octet_Total_Count
    def set_Reverse_Octet_Total_Count(self, Reverse_Octet_Total_Count): self.Reverse_Octet_Total_Count = Reverse_Octet_Total_Count
    def get_Reverse_Packet_Total_Count(self): return self.Reverse_Packet_Total_Count
    def set_Reverse_Packet_Total_Count(self, Reverse_Packet_Total_Count): self.Reverse_Packet_Total_Count = Reverse_Packet_Total_Count
    def get_Reverse_Payload_Entropy(self): return self.Reverse_Payload_Entropy
    def set_Reverse_Payload_Entropy(self, Reverse_Payload_Entropy): self.Reverse_Payload_Entropy = Reverse_Payload_Entropy
    def get_Reverse_Flow_Delta_Milliseconds(self): return self.Reverse_Flow_Delta_Milliseconds
    def set_Reverse_Flow_Delta_Milliseconds(self, Reverse_Flow_Delta_Milliseconds): self.Reverse_Flow_Delta_Milliseconds = Reverse_Flow_Delta_Milliseconds
    def get_TCP_Reverse_Flow(self): return self.TCP_Reverse_Flow
    def set_TCP_Reverse_Flow(self, TCP_Reverse_Flow): self.TCP_Reverse_Flow = TCP_Reverse_Flow
    def get_Reverse_Vlan_ID_MAC_Addr(self): return self.Reverse_Vlan_ID_MAC_Addr
    def set_Reverse_Vlan_ID_MAC_Addr(self, Reverse_Vlan_ID_MAC_Addr): self.Reverse_Vlan_ID_MAC_Addr = Reverse_Vlan_ID_MAC_Addr
    def get_Reverse_Passive_OS_Fingerprinting(self): return self.Reverse_Passive_OS_Fingerprinting
    def set_Reverse_Passive_OS_Fingerprinting(self, Reverse_Passive_OS_Fingerprinting): self.Reverse_Passive_OS_Fingerprinting = Reverse_Passive_OS_Fingerprinting
    def get_Reverse_First_Packet(self): return self.Reverse_First_Packet
    def set_Reverse_First_Packet(self, Reverse_First_Packet): self.Reverse_First_Packet = Reverse_First_Packet
    def get_Reverse_N_Bytes_Payload(self): return self.Reverse_N_Bytes_Payload
    def set_Reverse_N_Bytes_Payload(self, Reverse_N_Bytes_Payload): self.Reverse_N_Bytes_Payload = Reverse_N_Bytes_Payload
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='YAFReverseFlowType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='YAFReverseFlowType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='YAFReverseFlowType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='YAFReverseFlowType', fromsubclass_=False):
        if self.Reverse_Octet_Total_Count is not None:
            self.Reverse_Octet_Total_Count.export(outfile, level, 'NetFlowObj:', name_='Reverse_Octet_Total_Count')
        if self.Reverse_Packet_Total_Count is not None:
            self.Reverse_Packet_Total_Count.export(outfile, level, 'NetFlowObj:', name_='Reverse_Packet_Total_Count')
        if self.Reverse_Payload_Entropy is not None:
            self.Reverse_Payload_Entropy.export(outfile, level, 'NetFlowObj:', name_='Reverse_Payload_Entropy')
        if self.Reverse_Flow_Delta_Milliseconds is not None:
            self.Reverse_Flow_Delta_Milliseconds.export(outfile, level, 'NetFlowObj:', name_='Reverse_Flow_Delta_Milliseconds')
        if self.TCP_Reverse_Flow is not None:
            self.TCP_Reverse_Flow.export(outfile, level, 'NetFlowObj:', name_='TCP_Reverse_Flow')
        if self.Reverse_Vlan_ID_MAC_Addr is not None:
            self.Reverse_Vlan_ID_MAC_Addr.export(outfile, level, 'NetFlowObj:', name_='Reverse_Vlan_ID_MAC_Addr')
        if self.Reverse_Passive_OS_Fingerprinting is not None:
            self.Reverse_Passive_OS_Fingerprinting.export(outfile, level, 'NetFlowObj:', name_='Reverse_Passive_OS_Fingerprinting')
        if self.Reverse_First_Packet is not None:
            self.Reverse_First_Packet.export(outfile, level, 'NetFlowObj:', name_='Reverse_First_Packet')
        if self.Reverse_N_Bytes_Payload is not None:
            self.Reverse_N_Bytes_Payload.export(outfile, level, 'NetFlowObj:', name_='Reverse_N_Bytes_Payload')
    def hasContent_(self):
        if (
            self.Reverse_Octet_Total_Count is not None or
            self.Reverse_Packet_Total_Count is not None or
            self.Reverse_Payload_Entropy is not None or
            self.Reverse_Flow_Delta_Milliseconds is not None or
            self.TCP_Reverse_Flow is not None or
            self.Reverse_Vlan_ID_MAC_Addr is not None or
            self.Reverse_Passive_OS_Fingerprinting is not None or
            self.Reverse_First_Packet is not None or
            self.Reverse_N_Bytes_Payload is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='YAFReverseFlowType'):
        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.Reverse_Octet_Total_Count is not None:
            showIndent(outfile, level)
            outfile.write('Reverse_Octet_Total_Count=%s,\n' % quote_python(self.Reverse_Octet_Total_Count).encode(ExternalEncoding))
        if self.Reverse_Packet_Total_Count is not None:
            showIndent(outfile, level)
            outfile.write('Reverse_Packet_Total_Count=%s,\n' % quote_python(self.Reverse_Packet_Total_Count).encode(ExternalEncoding))
        if self.Reverse_Payload_Entropy is not None:
            showIndent(outfile, level)
            outfile.write('Reverse_Payload_Entropy=%s,\n' % quote_python(self.Reverse_Payload_Entropy).encode(ExternalEncoding))
        if self.Reverse_Flow_Delta_Milliseconds is not None:
            showIndent(outfile, level)
            outfile.write('Reverse_Flow_Delta_Milliseconds=%s,\n' % quote_python(self.Reverse_Flow_Delta_Milliseconds).encode(ExternalEncoding))
        if self.TCP_Reverse_Flow is not None:
            showIndent(outfile, level)
            outfile.write('TCP_Reverse_Flow=model_.YAFTCPFlowType(\n')
            self.TCP_Reverse_Flow.exportLiteral(outfile, level, name_='TCP_Reverse_Flow')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Reverse_Vlan_ID_MAC_Addr is not None:
            showIndent(outfile, level)
            outfile.write('Reverse_Vlan_ID_MAC_Addr=%s,\n' % quote_python(self.Reverse_Vlan_ID_MAC_Addr).encode(ExternalEncoding))
        if self.Reverse_Passive_OS_Fingerprinting is not None:
            showIndent(outfile, level)
            outfile.write('Reverse_Passive_OS_Fingerprinting=model_.YAFOSInformationType(\n')
            self.Reverse_Passive_OS_Fingerprinting.exportLiteral(outfile, level, name_='Reverse_Passive_OS_Fingerprinting')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Reverse_First_Packet is not None:
            showIndent(outfile, level)
            outfile.write('Reverse_First_Packet=%s,\n' % quote_python(self.Reverse_First_Packet).encode(ExternalEncoding))
        if self.Reverse_N_Bytes_Payload is not None:
            showIndent(outfile, level)
            outfile.write('Reverse_N_Bytes_Payload=%s,\n' % quote_python(self.Reverse_N_Bytes_Payload).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_ == 'Reverse_Octet_Total_Count':
            Reverse_Octet_Total_Count_ = child_.text
            Reverse_Octet_Total_Count_ = self.gds_validate_string(Reverse_Octet_Total_Count_, node, 'Reverse_Octet_Total_Count')
            self.Reverse_Octet_Total_Count = Reverse_Octet_Total_Count_
        elif nodeName_ == 'Reverse_Packet_Total_Count':
            Reverse_Packet_Total_Count_ = child_.text
            Reverse_Packet_Total_Count_ = self.gds_validate_string(Reverse_Packet_Total_Count_, node, 'Reverse_Packet_Total_Count')
            self.Reverse_Packet_Total_Count = Reverse_Packet_Total_Count_
        elif nodeName_ == 'Reverse_Payload_Entropy':
            Reverse_Payload_Entropy_ = child_.text
            Reverse_Payload_Entropy_ = self.gds_validate_string(Reverse_Payload_Entropy_, node, 'Reverse_Payload_Entropy')
            self.Reverse_Payload_Entropy = Reverse_Payload_Entropy_
        elif nodeName_ == 'Reverse_Flow_Delta_Milliseconds':
            Reverse_Flow_Delta_Milliseconds_ = child_.text
            Reverse_Flow_Delta_Milliseconds_ = self.gds_validate_string(Reverse_Flow_Delta_Milliseconds_, node, 'Reverse_Flow_Delta_Milliseconds')
            self.Reverse_Flow_Delta_Milliseconds = Reverse_Flow_Delta_Milliseconds_
        elif nodeName_ == 'TCP_Reverse_Flow':
            obj_ = YAFTCPFlowType.factory()
            obj_.build(child_)
            self.set_TCP_Reverse_Flow(obj_)
        elif nodeName_ == 'Reverse_Vlan_ID_MAC_Addr':
            Reverse_Vlan_ID_MAC_Addr_ = child_.text
            Reverse_Vlan_ID_MAC_Addr_ = self.gds_validate_string(Reverse_Vlan_ID_MAC_Addr_, node, 'Reverse_Vlan_ID_MAC_Addr')
            self.Reverse_Vlan_ID_MAC_Addr = Reverse_Vlan_ID_MAC_Addr_
        elif nodeName_ == 'Reverse_Passive_OS_Fingerprinting':
            obj_ = YAFOSInformationType.factory()
            obj_.build(child_)
            self.set_Reverse_Passive_OS_Fingerprinting(obj_)
        elif nodeName_ == 'Reverse_First_Packet':
            Reverse_First_Packet_ = child_.text
            Reverse_First_Packet_ = self.gds_validate_string(Reverse_First_Packet_, node, 'Reverse_First_Packet')
            self.Reverse_First_Packet = Reverse_First_Packet_
        elif nodeName_ == 'Reverse_N_Bytes_Payload':
            Reverse_N_Bytes_Payload_ = child_.text
            Reverse_N_Bytes_Payload_ = self.gds_validate_string(Reverse_N_Bytes_Payload_, node, 'Reverse_N_Bytes_Payload')
            self.Reverse_N_Bytes_Payload = Reverse_N_Bytes_Payload_
# end class YAFReverseFlowType


class YAFTCPFlowType(GeneratedsSuper):
    """Contains TCP-related information of the network flow."""
    subclass = None
    superclass = None
    def __init__(self, TCP_Sequence_Number=None, Initial_TCP_Flags=None, Union_TCP_Flags=None):
        self.TCP_Sequence_Number = TCP_Sequence_Number
        self.Initial_TCP_Flags = Initial_TCP_Flags
        self.Union_TCP_Flags = Union_TCP_Flags
    def factory(*args_, **kwargs_):
        if YAFTCPFlowType.subclass:
            return YAFTCPFlowType.subclass(*args_, **kwargs_)
        else:
            return YAFTCPFlowType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TCP_Sequence_Number(self): return self.TCP_Sequence_Number
    def set_TCP_Sequence_Number(self, TCP_Sequence_Number): self.TCP_Sequence_Number = TCP_Sequence_Number
    def get_Initial_TCP_Flags(self): return self.Initial_TCP_Flags
    def set_Initial_TCP_Flags(self, Initial_TCP_Flags): self.Initial_TCP_Flags = Initial_TCP_Flags
    def get_Union_TCP_Flags(self): return self.Union_TCP_Flags
    def set_Union_TCP_Flags(self, Union_TCP_Flags): self.Union_TCP_Flags = Union_TCP_Flags
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='YAFTCPFlowType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='YAFTCPFlowType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='YAFTCPFlowType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='YAFTCPFlowType', fromsubclass_=False):
        if self.TCP_Sequence_Number is not None:
            self.TCP_Sequence_Number.export(outfile, level, 'NetFlowObj:', name_='TCP_Sequence_Number')
        if self.Initial_TCP_Flags is not None:
            self.Initial_TCP_Flags.export(outfile, level, 'NetFlowObj:', name_='Initial_TCP_Flags')
        if self.Union_TCP_Flags is not None:
            self.Union_TCP_Flags.export(outfile, level, 'NetFlowObj:', name_='Union_TCP_Flags')
    def hasContent_(self):
        if (
            self.TCP_Sequence_Number is not None or
            self.Initial_TCP_Flags is not None or
            self.Union_TCP_Flags is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='YAFTCPFlowType'):
        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.TCP_Sequence_Number is not None:
            showIndent(outfile, level)
            outfile.write('TCP_Sequence_Number=%s,\n' % quote_python(self.TCP_Sequence_Number).encode(ExternalEncoding))
        if self.Initial_TCP_Flags is not None:
            showIndent(outfile, level)
            outfile.write('Initial_TCP_Flags=%s,\n' % quote_python(self.Initial_TCP_Flags).encode(ExternalEncoding))
        if self.Union_TCP_Flags is not None:
            showIndent(outfile, level)
            outfile.write('Union_TCP_Flags=%s,\n' % quote_python(self.Union_TCP_Flags).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_ == 'TCP_Sequence_Number':
            TCP_Sequence_Number_ = child_.text
            TCP_Sequence_Number_ = self.gds_validate_string(TCP_Sequence_Number_, node, 'TCP_Sequence_Number')
            self.TCP_Sequence_Number = TCP_Sequence_Number_
        elif nodeName_ == 'Initial_TCP_Flags':
            Initial_TCP_Flags_ = child_.text
            Initial_TCP_Flags_ = self.gds_validate_string(Initial_TCP_Flags_, node, 'Initial_TCP_Flags')
            self.Initial_TCP_Flags = Initial_TCP_Flags_
        elif nodeName_ == 'Union_TCP_Flags':
            Union_TCP_Flags_ = child_.text
            Union_TCP_Flags_ = self.gds_validate_string(Union_TCP_Flags_, node, 'Union_TCP_Flags')
            self.Union_TCP_Flags = Union_TCP_Flags_
# end class YAFTCPFlowType


class YAFOSInformationType(GeneratedsSuper):
    """This represents information about an operating system gathered
    through OS fingerprinting techniques. We need to reference CPE
    at some point."""
    subclass = None
    superclass = None
    def __init__(self, OS_Name=None, OS_Version=None):
        self.OS_Name = OS_Name
        self.OS_Version = OS_Version
    def factory(*args_, **kwargs_):
        if YAFOSInformationType.subclass:
            return YAFOSInformationType.subclass(*args_, **kwargs_)
        else:
            return YAFOSInformationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_OS_Name(self): return self.OS_Name
    def set_OS_Name(self, OS_Name): self.OS_Name = OS_Name
    def get_OS_Version(self): return self.OS_Version
    def set_OS_Version(self, OS_Version): self.OS_Version = OS_Version
    def export(self, outfile, level, namespace_='NetFlowObj:', name_='YAFOSInformationType', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='YAFOSInformationType')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='NetFlowObj:', name_='YAFOSInformationType'):
        pass
    def exportChildren(self, outfile, level, namespace_='NetFlowObj:', name_='YAFOSInformationType', fromsubclass_=False):
        if self.OS_Name is not None:
            self.OS_Name.export(outfile, level, 'NetFlowObj:', name_='OS_Name')
        if self.OS_Version is not None:
            self.OS_Version.export(outfile, level, 'NetFlowObj:', name_='OS_Version')
    def hasContent_(self):
        if (
            self.OS_Name is not None or
            self.OS_Version is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='YAFOSInformationType'):
        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.OS_Name is not None:
            showIndent(outfile, level)
            outfile.write('OS_Name=%s,\n' % quote_python(self.OS_Name).encode(ExternalEncoding))
        if self.OS_Version is not None:
            showIndent(outfile, level)
            outfile.write('OS_Version=%s,\n' % quote_python(self.OS_Version).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_ == 'OS_Name':
            OS_Name_ = child_.text
            OS_Name_ = self.gds_validate_string(OS_Name_, node, 'OS_Name')
            self.OS_Name = OS_Name_
        elif nodeName_ == 'OS_Version':
            OS_Version_ = child_.text
            OS_Version_ = self.gds_validate_string(OS_Version_, node, 'OS_Version')
            self.OS_Version = OS_Version_
# end class YAFOSInformationType


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)
    return tag, rootClass


def parse(inFileName):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'Network_Flow_Object'
        rootClass = NetworkFlowObjectType
    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 parseString(inString):
    from StringIO import StringIO
    doc = parsexml_(StringIO(inString))
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'Network_Flow_Object'
        rootClass = NetworkFlowObjectType
    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_="Network_Flow_Object",
        namespacedef_='')
    return rootObj


def parseLiteral(inFileName):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'Network_Flow_Object'
        rootClass = NetworkFlowObjectType
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    sys.stdout.write('#from Network_Flow_Object import *\n\n')
    sys.stdout.write('import Network_Flow_Object 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__ = [
    "BidirectionalRecordType",
    "FlowCollectionElementType",
    "FlowDataRecordType",
    "IPFIXDataRecordType",
    "IPFIXDataSetType",
    "IPFIXMessageHeaderType",
    "IPFIXMessageType",
    "IPFIXOptionsTemplateRecordFieldSpecifiersType",
    "IPFIXOptionsTemplateRecordHeaderType",
    "IPFIXOptionsTemplateRecordType",
    "IPFIXOptionsTemplateSetType",
    "IPFIXSetHeaderType",
    "IPFIXSetType",
    "IPFIXTemplateRecordFieldSpecifiersType",
    "IPFIXTemplateRecordHeaderType",
    "IPFIXTemplateRecordType",
    "IPFIXTemplateSetType",
    "NetflowV5FlowHeaderType",
    "NetflowV5FlowRecordType",
    "NetflowV5PacketType",
    "NetflowV9DataFlowSetType",
    "NetflowV9DataRecordType",
    "NetflowV9ExportPacketType",
    "NetflowV9FieldType",
    "NetflowV9FlowSetType",
    "NetflowV9OptionsTemplateFlowSetType",
    "NetflowV9OptionsTemplateRecordType",
    "NetflowV9PacketHeaderType",
    "NetflowV9ScopeFieldType",
    "NetflowV9TemplateFlowSetType",
    "NetflowV9TemplateRecordType",
    "NetworkFlowLabelType",
    "NetworkFlowObjectType",
    "NetworkLayerInfoType",
    "OptionCollectionElementType",
    "OptionsDataRecordType",
    "SiLKAddressType",
    "SiLKCountryCodeType",
    "SiLKDirectionType",
    "SiLKFlowAttributesType",
    "SiLKRecordType",
    "SiLKSensorClassType",
    "SiLKSensorInfoType",
    "UnidirectionalRecordType",
    "YAFFlowType",
    "YAFOSInformationType",
    "YAFRecordType",
    "YAFReverseFlowType",
    "YAFTCPFlowType"
    ]
