text: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  
  #
  # Generated Tue Oct 10 00:42:25 2017 by generateDS.py version 2.28b.
  # Python 2.7.12 (default, Nov 19 2016, 06:48:10)  [GCC 5.4.0 20160609]
  #
  # Command line options:
  #   ('--no-process-includes', '')
  #   ('-o', 'esociallib/v2_04/evtTabCargo.py')
  #
  # Command line arguments:
  #   schemas/v2_04/evtTabCargo.xsd
  #
  # Command line:
  #   /usr/local/bin/generateDS --no-process-includes -o "esociallib/v2_04/evtTabCargo.py" schemas/v2_04/evtTabCargo.xsd
  #
  # Current working directory (os.getcwd()):
  #   esociallib
  #
  
  import sys
  import re as re_
  import base64
  import datetime as datetime_
  import warnings as warnings_
  try:
      from lxml import etree as etree_
  except ImportError:
      from xml.etree import ElementTree as etree_
  
  
  Validate_simpletypes_ = True
  if sys.version_info.major == 2:
      BaseStrType_ = basestring
  else:
      BaseStrType_ = str
  
  
  def parsexml_(infile, parser=None, **kwargs):
      if parser is None:
          # Use the lxml ElementTree compatible parser so that, e.g.,
          #   we ignore comments.
          try:
              parser = etree_.ETCompatXMLParser()
          except AttributeError:
              # fallback to xml.etree
              parser = etree_.XMLParser()
      doc = etree_.parse(infile, parser=parser, **kwargs)
      return doc
  
  #
  # Namespace prefix definition table (and other attributes, too)
  #
  # The module generatedsnamespaces, if it is importable, must contain
  # a dictionary named GeneratedsNamespaceDefs.  This Python dictionary
  # should map element type names (strings) to XML schema namespace prefix
  # definitions.  The export method for any class for which there is
  # a namespace prefix definition, will export that definition in the
  # XML representation of that element.  See the export method of
  # any generated element type class for a example of the use of this
  # table.
  # A sample table is:
  #
  #     # File: generatedsnamespaces.py
  #
  #     GenerateDSNamespaceDefs = {
  #         "ElementtypeA": "http://www.xxx.com/namespaceA",
  #         "ElementtypeB": "http://www.xxx.com/namespaceB",
  #     }
  #
  
  try:
      from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
  except ImportError:
      GenerateDSNamespaceDefs_ = {}
  
  #
  # The root super-class for element type classes
  #
  # 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 as exp:
      
      class GeneratedsSuper(object):
          tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
          class _FixedOffsetTZ(datetime_.tzinfo):
              def __init__(self, offset, name):
                  self.__offset = datetime_.timedelta(minutes=offset)
                  self.__name = name
              def utcoffset(self, dt):
                  return self.__offset
              def tzname(self, dt):
                  return self.__name
              def dst(self, dt):
                  return None
          def gds_format_string(self, input_data, input_name=''):
              return input_data
          def gds_validate_string(self, input_data, node=None, input_name=''):
              if not input_data:
                  return ''
              else:
                  return input_data
          def gds_format_base64(self, input_data, input_name=''):
              return base64.b64encode(input_data)
          def gds_validate_base64(self, input_data, node=None, 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=None, input_name=''):
              return input_data
          def gds_format_integer_list(self, input_data, input_name=''):
              return '%s' % ' '.join(input_data)
          def gds_validate_integer_list(
                  self, input_data, node=None, input_name=''):
              values = input_data.split()
              for value in values:
                  try:
                      int(value)
                  except (TypeError, ValueError):
                      raise_parse_error(node, 'Requires sequence of integers')
              return values
          def gds_format_float(self, input_data, input_name=''):
              return ('%.15f' % input_data).rstrip('0')
          def gds_validate_float(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_float_list(self, input_data, input_name=''):
              return '%s' % ' '.join(input_data)
          def gds_validate_float_list(
                  self, input_data, node=None, input_name=''):
              values = input_data.split()
              for value in values:
                  try:
                      float(value)
                  except (TypeError, ValueError):
                      raise_parse_error(node, 'Requires sequence of floats')
              return values
          def gds_format_double(self, input_data, input_name=''):
              return '%e' % input_data
          def gds_validate_double(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_double_list(self, input_data, input_name=''):
              return '%s' % ' '.join(input_data)
          def gds_validate_double_list(
                  self, input_data, node=None, input_name=''):
              values = input_data.split()
              for value in values:
                  try:
                      float(value)
                  except (TypeError, ValueError):
                      raise_parse_error(node, 'Requires sequence of doubles')
              return values
          def gds_format_boolean(self, input_data, input_name=''):
              return ('%s' % input_data).lower()
          def gds_validate_boolean(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_boolean_list(self, input_data, input_name=''):
              return '%s' % ' '.join(input_data)
          def gds_validate_boolean_list(
                  self, input_data, node=None, 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 values
          def gds_validate_datetime(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_datetime(self, input_data, input_name=''):
              if input_data.microsecond == 0:
                  _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (
                      input_data.year,
                      input_data.month,
                      input_data.day,
                      input_data.hour,
                      input_data.minute,
                      input_data.second,
                  )
              else:
                  _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (
                      input_data.year,
                      input_data.month,
                      input_data.day,
                      input_data.hour,
                      input_data.minute,
                      input_data.second,
                      ('%f' % (float(input_data.microsecond) / 1000000))[2:],
                  )
              if input_data.tzinfo is not None:
                  tzoff = input_data.tzinfo.utcoffset(input_data)
                  if tzoff is not None:
                      total_seconds = tzoff.seconds + (86400 * tzoff.days)
                      if total_seconds == 0:
                          _svalue += 'Z'
                      else:
                          if total_seconds < 0:
                              _svalue += '-'
                              total_seconds *= -1
                          else:
                              _svalue += '+'
                          hours = total_seconds // 3600
                          minutes = (total_seconds - (hours * 3600)) // 60
                          _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
              return _svalue
          @classmethod
          def gds_parse_datetime(cls, input_data):
              tz = None
              if input_data[-1] == 'Z':
                  tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                  input_data = input_data[:-1]
              else:
                  results = GeneratedsSuper.tzoff_pattern.search(input_data)
                  if results is not None:
                      tzoff_parts = results.group(2).split(':')
                      tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                      if results.group(1) == '-':
                          tzoff *= -1
                      tz = GeneratedsSuper._FixedOffsetTZ(
                          tzoff, results.group(0))
                      input_data = input_data[:-6]
              time_parts = input_data.split('.')
              if len(time_parts) > 1:
                  micro_seconds = int(float('0.' + time_parts[1]) * 1000000)
                  input_data = '%s.%s' % (time_parts[0], micro_seconds, )
                  dt = datetime_.datetime.strptime(
                      input_data, '%Y-%m-%dT%H:%M:%S.%f')
              else:
                  dt = datetime_.datetime.strptime(
                      input_data, '%Y-%m-%dT%H:%M:%S')
              dt = dt.replace(tzinfo=tz)
              return dt
          def gds_validate_date(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_date(self, input_data, input_name=''):
              _svalue = '%04d-%02d-%02d' % (
                  input_data.year,
                  input_data.month,
                  input_data.day,
              )
              try:
                  if input_data.tzinfo is not None:
                      tzoff = input_data.tzinfo.utcoffset(input_data)
                      if tzoff is not None:
                          total_seconds = tzoff.seconds + (86400 * tzoff.days)
                          if total_seconds == 0:
                              _svalue += 'Z'
                          else:
                              if total_seconds < 0:
                                  _svalue += '-'
                                  total_seconds *= -1
                              else:
                                  _svalue += '+'
                              hours = total_seconds // 3600
                              minutes = (total_seconds - (hours * 3600)) // 60
                              _svalue += '{0:02d}:{1:02d}'.format(
                                  hours, minutes)
              except AttributeError:
                  pass
              return _svalue
          @classmethod
          def gds_parse_date(cls, input_data):
              tz = None
              if input_data[-1] == 'Z':
                  tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                  input_data = input_data[:-1]
              else:
                  results = GeneratedsSuper.tzoff_pattern.search(input_data)
                  if results is not None:
                      tzoff_parts = results.group(2).split(':')
                      tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                      if results.group(1) == '-':
                          tzoff *= -1
                      tz = GeneratedsSuper._FixedOffsetTZ(
                          tzoff, results.group(0))
                      input_data = input_data[:-6]
              dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')
              dt = dt.replace(tzinfo=tz)
              return dt.date()
          def gds_validate_time(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_time(self, input_data, input_name=''):
              if input_data.microsecond == 0:
                  _svalue = '%02d:%02d:%02d' % (
                      input_data.hour,
                      input_data.minute,
                      input_data.second,
                  )
              else:
                  _svalue = '%02d:%02d:%02d.%s' % (
                      input_data.hour,
                      input_data.minute,
                      input_data.second,
                      ('%f' % (float(input_data.microsecond) / 1000000))[2:],
                  )
              if input_data.tzinfo is not None:
                  tzoff = input_data.tzinfo.utcoffset(input_data)
                  if tzoff is not None:
                      total_seconds = tzoff.seconds + (86400 * tzoff.days)
                      if total_seconds == 0:
                          _svalue += 'Z'
                      else:
                          if total_seconds < 0:
                              _svalue += '-'
                              total_seconds *= -1
                          else:
                              _svalue += '+'
                          hours = total_seconds // 3600
                          minutes = (total_seconds - (hours * 3600)) // 60
                          _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
              return _svalue
          def gds_validate_simple_patterns(self, patterns, target):
              # pat is a list of lists of strings/patterns.  We should:
              # - AND the outer elements
              # - OR the inner elements
              found1 = True
              for patterns1 in patterns:
                  found2 = False
                  for patterns2 in patterns1:
                      if re_.search(patterns2, target) is not None:
                          found2 = True
                          break
                  if not found2:
                      found1 = False
                      break
              return found1
          @classmethod
          def gds_parse_time(cls, input_data):
              tz = None
              if input_data[-1] == 'Z':
                  tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                  input_data = input_data[:-1]
              else:
                  results = GeneratedsSuper.tzoff_pattern.search(input_data)
                  if results is not None:
                      tzoff_parts = results.group(2).split(':')
                      tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                      if results.group(1) == '-':
                          tzoff *= -1
                      tz = GeneratedsSuper._FixedOffsetTZ(
                          tzoff, results.group(0))
                      input_data = input_data[:-6]
              if len(input_data.split('.')) > 1:
                  dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')
              else:
                  dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')
              dt = dt.replace(tzinfo=tz)
              return dt.time()
          def gds_str_lower(self, instring):
              return instring.lower()
          def get_path_(self, node):
              path_list = []
              self.get_path_list_(node, path_list)
              path_list.reverse()
              path = '/'.join(path_list)
              return path
          Tag_strip_pattern_ = re_.compile(r'\{.*\}')
          def get_path_list_(self, node, path_list):
              if node is None:
                  return
              tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
              if tag:
                  path_list.append(tag)
              self.get_path_list_(node.getparent(), path_list)
          def get_class_obj_(self, node, default_class=None):
              class_obj1 = default_class
              if 'xsi' in node.nsmap:
                  classname = node.get('{%s}type' % node.nsmap['xsi'])
                  if classname is not None:
                      names = classname.split(':')
                      if len(names) == 2:
                          classname = names[1]
                      class_obj2 = globals().get(classname)
                      if class_obj2 is not None:
                          class_obj1 = class_obj2
              return class_obj1
          def gds_build_any(self, node, type_name=None):
              return None
          @classmethod
          def gds_reverse_node_mapping(cls, mapping):
              return dict(((v, k) for k, v in mapping.iteritems()))
          @staticmethod
          def gds_encode(instring):
              if sys.version_info.major == 2:
                  return instring.encode(ExternalEncoding)
              else:
                  return instring
          @staticmethod
          def convert_unicode(instring):
              if isinstance(instring, str):
                  result = quote_xml(instring)
              elif sys.version_info.major == 2 and isinstance(instring, unicode):
                  result = quote_xml(instring).encode('utf8')
              else:
                  result = GeneratedsSuper.gds_encode(str(instring))
              return result
          def __eq__(self, other):
              if type(self) != type(other):
                  return False
              return self.__dict__ == other.__dict__
          def __ne__(self, other):
              return not self.__eq__(other)
      
      def getSubclassFromModule_(module, class_):
          '''Get the subclass of a class from a specific module.'''
          name = class_.__name__ + 'Sub'
          if hasattr(module, name):
              return getattr(module, name)
          else:
              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'{(.*)}(.*)')
  CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)
  
  # Change this to redirect the generated superclass module to use a
  # specific subclass module.
  CurrentSubclassModule_ = None
  
  #
  # Support/utility functions.
  #
  
  
  def showIndent(outfile, level, pretty_print=True):
      if pretty_print:
          for idx in range(level):
              outfile.write('    ')
  
  
  def quote_xml(inStr):
      "Escape markup chars, but do not modify CDATA sections."
      if not inStr:
          return ''
      s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
      s2 = ''
      pos = 0
      matchobjects = CDATA_pattern_.finditer(s1)
      for mo in matchobjects:
          s3 = s1[pos:mo.start()]
          s2 += quote_xml_aux(s3)
          s2 += s1[mo.start():mo.end()]
          pos = mo.end()
      s3 = s1[pos:]
      s2 += quote_xml_aux(s3)
      return s2
  
  
  def quote_xml_aux(inStr):
      s1 = inStr.replace('&', '&amp;')
      s1 = s1.replace('<', '&lt;')
      s1 = s1.replace('>', '&gt;')
      return s1
  
  
  def quote_attrib(inStr):
      s1 = (isinstance(inStr, BaseStrType_) 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):
      msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )
      raise GDSParseError(msg)
  
  
  class MixedContainer:
      # Constants for category:
      CategoryNone = 0
      CategoryText = 1
      CategorySimple = 2
      CategoryComplex = 3
      # Constants for content_type:
      TypeNone = 0
      TypeText = 1
      TypeString = 2
      TypeInteger = 3
      TypeFloat = 4
      TypeDecimal = 5
      TypeDouble = 6
      TypeBoolean = 7
      TypeBase64 = 8
      def __init__(self, category, content_type, name, value):
          self.category = category
          self.content_type = content_type
          self.name = name
          self.value = value
      def getCategory(self):
          return self.category
      def getContenttype(self, content_type):
          return self.content_type
      def getValue(self):
          return self.value
      def getName(self):
          return self.name
      def export(self, outfile, level, name, namespace,
                 pretty_print=True):
          if self.category == MixedContainer.CategoryText:
              # Prevent exporting empty content as empty lines.
              if self.value.strip():
                  outfile.write(self.value)
          elif self.category == MixedContainer.CategorySimple:
              self.exportSimple(outfile, level, name)
          else:    # category == MixedContainer.CategoryComplex
              self.value.export(
                  outfile, level, namespace, name,
                  pretty_print=pretty_print)
      def exportSimple(self, outfile, level, name):
          if self.content_type == MixedContainer.TypeString:
              outfile.write('<%s>%s</%s>' % (
                  self.name, self.value, self.name))
          elif self.content_type == MixedContainer.TypeInteger or \
                  self.content_type == MixedContainer.TypeBoolean:
              outfile.write('<%s>%d</%s>' % (
                  self.name, self.value, self.name))
          elif self.content_type == MixedContainer.TypeFloat or \
                  self.content_type == MixedContainer.TypeDecimal:
              outfile.write('<%s>%f</%s>' % (
                  self.name, self.value, self.name))
          elif self.content_type == MixedContainer.TypeDouble:
              outfile.write('<%s>%g</%s>' % (
                  self.name, self.value, self.name))
          elif self.content_type == MixedContainer.TypeBase64:
              outfile.write('<%s>%s</%s>' % (
                  self.name,
                  base64.b64encode(self.value),
                  self.name))
      def to_etree(self, element):
          if self.category == MixedContainer.CategoryText:
              # Prevent exporting empty content as empty lines.
              if self.value.strip():
                  if len(element) > 0:
                      if element[-1].tail is None:
                          element[-1].tail = self.value
                      else:
                          element[-1].tail += self.value
                  else:
                      if element.text is None:
                          element.text = self.value
                      else:
                          element.text += self.value
          elif self.category == MixedContainer.CategorySimple:
              subelement = etree_.SubElement(
                  element, '%s' % self.name)
              subelement.text = self.to_etree_simple()
          else:    # category == MixedContainer.CategoryComplex
              self.value.to_etree(element)
      def to_etree_simple(self):
          if self.content_type == MixedContainer.TypeString:
              text = self.value
          elif (self.content_type == MixedContainer.TypeInteger or
                  self.content_type == MixedContainer.TypeBoolean):
              text = '%d' % self.value
          elif (self.content_type == MixedContainer.TypeFloat or
                  self.content_type == MixedContainer.TypeDecimal):
              text = '%f' % self.value
          elif self.content_type == MixedContainer.TypeDouble:
              text = '%g' % self.value
          elif self.content_type == MixedContainer.TypeBase64:
              text = '%s' % base64.b64encode(self.value)
          return text
      def exportLiteral(self, outfile, level, name):
          if self.category == MixedContainer.CategoryText:
              showIndent(outfile, level)
              outfile.write(
                  'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
                      self.category, self.content_type,
                      self.name, self.value))
          elif self.category == MixedContainer.CategorySimple:
              showIndent(outfile, level)
              outfile.write(
                  'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
                      self.category, self.content_type,
                      self.name, self.value))
          else:    # category == MixedContainer.CategoryComplex
              showIndent(outfile, level)
              outfile.write(
                  'model_.MixedContainer(%d, %d, "%s",\n' % (
                      self.category, self.content_type, self.name,))
              self.value.exportLiteral(outfile, level + 1)
              showIndent(outfile, level)
              outfile.write(')\n')
  
  
  class MemberSpec_(object):
      def __init__(self, name='', data_type='', container=0,
              optional=0, child_attrs=None, choice=None):
          self.name = name
          self.data_type = data_type
          self.container = container
          self.child_attrs = child_attrs
          self.choice = choice
          self.optional = optional
      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 set_child_attrs(self, child_attrs): self.child_attrs = child_attrs
      def get_child_attrs(self): return self.child_attrs
      def set_choice(self, choice): self.choice = choice
      def get_choice(self): return self.choice
      def set_optional(self, optional): self.optional = optional
      def get_optional(self): return self.optional
  
  
  def _cast(typ, value):
      if typ is None or value is None:
          return value
      return typ(value)
  
  #
  # Data representation classes.
  #
  
  
  class eSocial(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self, evtTabCargo=None, Signature=None):
          self.original_tagname_ = None
          self.evtTabCargo = evtTabCargo
          self.Signature = Signature
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, eSocial)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if eSocial.subclass:
              return eSocial.subclass(*args_, **kwargs_)
          else:
              return eSocial(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_evtTabCargo(self): return self.evtTabCargo
      def set_evtTabCargo(self, evtTabCargo): self.evtTabCargo = evtTabCargo
      def get_Signature(self): return self.Signature
      def set_Signature(self, Signature): self.Signature = Signature
      def hasContent_(self):
          if (
              self.evtTabCargo is not None or
              self.Signature is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='eSocial', namespacedef_=' xmlns:ds="http://www.w3.org/2000/09/xmldsig#" ', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('eSocial')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='eSocial')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='eSocial', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='eSocial'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='eSocial', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.evtTabCargo is not None:
              self.evtTabCargo.export(outfile, level, namespace_, name_='evtTabCargo', pretty_print=pretty_print)
          if self.Signature is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sSignature>%s</%sSignature>%s' % ('ds:', self.gds_encode(self.gds_format_string(quote_xml(self.Signature), input_name='Signature')), 'ds:', eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'evtTabCargo':
              obj_ = evtTabCargo.factory()
              obj_.build(child_)
              self.evtTabCargo = obj_
              obj_.original_tagname_ = 'evtTabCargo'
          elif nodeName_ == 'Signature':
              Signature_ = child_.text
              Signature_ = self.gds_validate_string(Signature_, node, 'Signature')
              self.Signature = Signature_
  # end class eSocial
  
  
  class evtTabCargo(GeneratedsSuper):
      """Evento utilizado para inclusão, alteração e exclusão de registros na
      tabela de cargos."""
      subclass = None
      superclass = None
      def __init__(self, Id=None, ideEvento=None, ideEmpregador=None, infoCargo=None):
          self.original_tagname_ = None
          self.Id = _cast(None, Id)
          self.ideEvento = ideEvento
          self.ideEmpregador = ideEmpregador
          self.infoCargo = infoCargo
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, evtTabCargo)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if evtTabCargo.subclass:
              return evtTabCargo.subclass(*args_, **kwargs_)
          else:
              return evtTabCargo(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_ideEvento(self): return self.ideEvento
      def set_ideEvento(self, ideEvento): self.ideEvento = ideEvento
      def get_ideEmpregador(self): return self.ideEmpregador
      def set_ideEmpregador(self, ideEmpregador): self.ideEmpregador = ideEmpregador
      def get_infoCargo(self): return self.infoCargo
      def set_infoCargo(self, infoCargo): self.infoCargo = infoCargo
      def get_Id(self): return self.Id
      def set_Id(self, Id): self.Id = Id
      def hasContent_(self):
          if (
              self.ideEvento is not None or
              self.ideEmpregador is not None or
              self.infoCargo is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='evtTabCargo', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('evtTabCargo')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='evtTabCargo')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='evtTabCargo', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='evtTabCargo'):
          if self.Id is not None and 'Id' not in already_processed:
              already_processed.add('Id')
              outfile.write(' Id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Id), input_name='Id')), ))
      def exportChildren(self, outfile, level, namespace_='', name_='evtTabCargo', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.ideEvento is not None:
              self.ideEvento.export(outfile, level, namespace_, name_='ideEvento', pretty_print=pretty_print)
          if self.ideEmpregador is not None:
              self.ideEmpregador.export(outfile, level, namespace_, name_='ideEmpregador', pretty_print=pretty_print)
          if self.infoCargo is not None:
              self.infoCargo.export(outfile, level, namespace_, name_='infoCargo', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          value = find_attr_value_('Id', node)
          if value is not None and 'Id' not in already_processed:
              already_processed.add('Id')
              self.Id = value
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'ideEvento':
              obj_ = TIdeCadastro.factory()
              obj_.build(child_)
              self.ideEvento = obj_
              obj_.original_tagname_ = 'ideEvento'
          elif nodeName_ == 'ideEmpregador':
              obj_ = TEmpregador.factory()
              obj_.build(child_)
              self.ideEmpregador = obj_
              obj_.original_tagname_ = 'ideEmpregador'
          elif nodeName_ == 'infoCargo':
              obj_ = infoCargo.factory()
              obj_.build(child_)
              self.infoCargo = obj_
              obj_.original_tagname_ = 'infoCargo'
  # end class evtTabCargo
  
  
  class infoCargo(GeneratedsSuper):
      """Identificação da operação (inclusão, alteração ou exclusão) e das
      informações do cargo."""
      subclass = None
      superclass = None
      def __init__(self, inclusao=None, alteracao=None, exclusao=None):
          self.original_tagname_ = None
          self.inclusao = inclusao
          self.alteracao = alteracao
          self.exclusao = exclusao
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, infoCargo)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if infoCargo.subclass:
              return infoCargo.subclass(*args_, **kwargs_)
          else:
              return infoCargo(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_inclusao(self): return self.inclusao
      def set_inclusao(self, inclusao): self.inclusao = inclusao
      def get_alteracao(self): return self.alteracao
      def set_alteracao(self, alteracao): self.alteracao = alteracao
      def get_exclusao(self): return self.exclusao
      def set_exclusao(self, exclusao): self.exclusao = exclusao
      def hasContent_(self):
          if (
              self.inclusao is not None or
              self.alteracao is not None or
              self.exclusao is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='infoCargo', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('infoCargo')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='infoCargo')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='infoCargo', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='infoCargo'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='infoCargo', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.inclusao is not None:
              self.inclusao.export(outfile, level, namespace_, name_='inclusao', pretty_print=pretty_print)
          if self.alteracao is not None:
              self.alteracao.export(outfile, level, namespace_, name_='alteracao', pretty_print=pretty_print)
          if self.exclusao is not None:
              self.exclusao.export(outfile, level, namespace_, name_='exclusao', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'inclusao':
              obj_ = inclusao.factory()
              obj_.build(child_)
              self.inclusao = obj_
              obj_.original_tagname_ = 'inclusao'
          elif nodeName_ == 'alteracao':
              obj_ = alteracao.factory()
              obj_.build(child_)
              self.alteracao = obj_
              obj_.original_tagname_ = 'alteracao'
          elif nodeName_ == 'exclusao':
              obj_ = exclusao.factory()
              obj_.build(child_)
              self.exclusao = obj_
              obj_.original_tagname_ = 'exclusao'
  # end class infoCargo
  
  
  class inclusao(GeneratedsSuper):
      """Inclusão de novas informações"""
      subclass = None
      superclass = None
      def __init__(self, ideCargo=None, dadosCargo=None):
          self.original_tagname_ = None
          self.ideCargo = ideCargo
          self.dadosCargo = dadosCargo
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, inclusao)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if inclusao.subclass:
              return inclusao.subclass(*args_, **kwargs_)
          else:
              return inclusao(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_ideCargo(self): return self.ideCargo
      def set_ideCargo(self, ideCargo): self.ideCargo = ideCargo
      def get_dadosCargo(self): return self.dadosCargo
      def set_dadosCargo(self, dadosCargo): self.dadosCargo = dadosCargo
      def hasContent_(self):
          if (
              self.ideCargo is not None or
              self.dadosCargo is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='inclusao', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('inclusao')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='inclusao')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='inclusao', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='inclusao'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='inclusao', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.ideCargo is not None:
              self.ideCargo.export(outfile, level, namespace_, name_='ideCargo', pretty_print=pretty_print)
          if self.dadosCargo is not None:
              self.dadosCargo.export(outfile, level, namespace_, name_='dadosCargo', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'ideCargo':
              obj_ = TideCargo.factory()
              obj_.build(child_)
              self.ideCargo = obj_
              obj_.original_tagname_ = 'ideCargo'
          elif nodeName_ == 'dadosCargo':
              obj_ = TDadosCargo.factory()
              obj_.build(child_)
              self.dadosCargo = obj_
              obj_.original_tagname_ = 'dadosCargo'
  # end class inclusao
  
  
  class alteracao(GeneratedsSuper):
      """Alteração de informações já existentes"""
      subclass = None
      superclass = None
      def __init__(self, ideCargo=None, dadosCargo=None, novaValidade=None):
          self.original_tagname_ = None
          self.ideCargo = ideCargo
          self.dadosCargo = dadosCargo
          self.novaValidade = novaValidade
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, alteracao)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if alteracao.subclass:
              return alteracao.subclass(*args_, **kwargs_)
          else:
              return alteracao(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_ideCargo(self): return self.ideCargo
      def set_ideCargo(self, ideCargo): self.ideCargo = ideCargo
      def get_dadosCargo(self): return self.dadosCargo
      def set_dadosCargo(self, dadosCargo): self.dadosCargo = dadosCargo
      def get_novaValidade(self): return self.novaValidade
      def set_novaValidade(self, novaValidade): self.novaValidade = novaValidade
      def hasContent_(self):
          if (
              self.ideCargo is not None or
              self.dadosCargo is not None or
              self.novaValidade is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='alteracao', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('alteracao')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='alteracao')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='alteracao', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='alteracao'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='alteracao', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.ideCargo is not None:
              self.ideCargo.export(outfile, level, namespace_, name_='ideCargo', pretty_print=pretty_print)
          if self.dadosCargo is not None:
              self.dadosCargo.export(outfile, level, namespace_, name_='dadosCargo', pretty_print=pretty_print)
          if self.novaValidade is not None:
              self.novaValidade.export(outfile, level, namespace_, name_='novaValidade', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'ideCargo':
              obj_ = TideCargo.factory()
              obj_.build(child_)
              self.ideCargo = obj_
              obj_.original_tagname_ = 'ideCargo'
          elif nodeName_ == 'dadosCargo':
              obj_ = TDadosCargo.factory()
              obj_.build(child_)
              self.dadosCargo = obj_
              obj_.original_tagname_ = 'dadosCargo'
          elif nodeName_ == 'novaValidade':
              obj_ = TPeriodoValidade.factory()
              obj_.build(child_)
              self.novaValidade = obj_
              obj_.original_tagname_ = 'novaValidade'
  # end class alteracao
  
  
  class exclusao(GeneratedsSuper):
      """Exclusão de informações"""
      subclass = None
      superclass = None
      def __init__(self, ideCargo=None):
          self.original_tagname_ = None
          self.ideCargo = ideCargo
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, exclusao)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if exclusao.subclass:
              return exclusao.subclass(*args_, **kwargs_)
          else:
              return exclusao(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_ideCargo(self): return self.ideCargo
      def set_ideCargo(self, ideCargo): self.ideCargo = ideCargo
      def hasContent_(self):
          if (
              self.ideCargo is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='exclusao', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('exclusao')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='exclusao')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='exclusao', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='exclusao'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='exclusao', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.ideCargo is not None:
              self.ideCargo.export(outfile, level, namespace_, name_='ideCargo', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'ideCargo':
              obj_ = TideCargo.factory()
              obj_.build(child_)
              self.ideCargo = obj_
              obj_.original_tagname_ = 'ideCargo'
  # end class exclusao
  
  
  class TIdeCadastro(GeneratedsSuper):
      """Identificação de evento de cadastro/tabelas"""
      subclass = None
      superclass = None
      def __init__(self, tpAmb=None, procEmi=None, verProc=None):
          self.original_tagname_ = None
          self.tpAmb = tpAmb
          self.procEmi = procEmi
          self.verProc = verProc
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, TIdeCadastro)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if TIdeCadastro.subclass:
              return TIdeCadastro.subclass(*args_, **kwargs_)
          else:
              return TIdeCadastro(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_tpAmb(self): return self.tpAmb
      def set_tpAmb(self, tpAmb): self.tpAmb = tpAmb
      def get_procEmi(self): return self.procEmi
      def set_procEmi(self, procEmi): self.procEmi = procEmi
      def get_verProc(self): return self.verProc
      def set_verProc(self, verProc): self.verProc = verProc
      def hasContent_(self):
          if (
              self.tpAmb is not None or
              self.procEmi is not None or
              self.verProc is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='TIdeCadastro', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('TIdeCadastro')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='TIdeCadastro')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='TIdeCadastro', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TIdeCadastro'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='TIdeCadastro', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.tpAmb is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%stpAmb>%s</%stpAmb>%s' % (namespace_, self.gds_format_integer(self.tpAmb, input_name='tpAmb'), namespace_, eol_))
          if self.procEmi is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sprocEmi>%s</%sprocEmi>%s' % (namespace_, self.gds_format_integer(self.procEmi, input_name='procEmi'), namespace_, eol_))
          if self.verProc is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sverProc>%s</%sverProc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.verProc), input_name='verProc')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'tpAmb':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'tpAmb')
              self.tpAmb = ival_
          elif nodeName_ == 'procEmi':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'procEmi')
              self.procEmi = ival_
          elif nodeName_ == 'verProc':
              verProc_ = child_.text
              verProc_ = self.gds_validate_string(verProc_, node, 'verProc')
              self.verProc = verProc_
  # end class TIdeCadastro
  
  
  class tpAmb(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, tpAmb)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if tpAmb.subclass:
              return tpAmb.subclass(*args_, **kwargs_)
          else:
              return tpAmb(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='tpAmb', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpAmb')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpAmb')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='tpAmb', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpAmb'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='tpAmb', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class tpAmb
  
  
  class procEmi(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, procEmi)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if procEmi.subclass:
              return procEmi.subclass(*args_, **kwargs_)
          else:
              return procEmi(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='procEmi', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('procEmi')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='procEmi')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='procEmi', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='procEmi'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='procEmi', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class procEmi
  
  
  class verProc(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, verProc)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if verProc.subclass:
              return verProc.subclass(*args_, **kwargs_)
          else:
              return verProc(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='verProc', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('verProc')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='verProc')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='verProc', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='verProc'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='verProc', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class verProc
  
  
  class TEmpregador(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self, tpInsc=None, nrInsc=None):
          self.original_tagname_ = None
          self.tpInsc = tpInsc
          self.nrInsc = nrInsc
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, TEmpregador)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if TEmpregador.subclass:
              return TEmpregador.subclass(*args_, **kwargs_)
          else:
              return TEmpregador(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_tpInsc(self): return self.tpInsc
      def set_tpInsc(self, tpInsc): self.tpInsc = tpInsc
      def get_nrInsc(self): return self.nrInsc
      def set_nrInsc(self, nrInsc): self.nrInsc = nrInsc
      def hasContent_(self):
          if (
              self.tpInsc is not None or
              self.nrInsc is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='TEmpregador', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('TEmpregador')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='TEmpregador')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='TEmpregador', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TEmpregador'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='TEmpregador', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.tpInsc is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%stpInsc>%s</%stpInsc>%s' % (namespace_, self.gds_format_integer(self.tpInsc, input_name='tpInsc'), namespace_, eol_))
          if self.nrInsc is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%snrInsc>%s</%snrInsc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrInsc), input_name='nrInsc')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'tpInsc':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'tpInsc')
              self.tpInsc = ival_
          elif nodeName_ == 'nrInsc':
              nrInsc_ = child_.text
              nrInsc_ = self.gds_validate_string(nrInsc_, node, 'nrInsc')
              self.nrInsc = nrInsc_
  # end class TEmpregador
  
  
  class tpInsc(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, tpInsc)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if tpInsc.subclass:
              return tpInsc.subclass(*args_, **kwargs_)
          else:
              return tpInsc(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='tpInsc', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpInsc')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpInsc')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='tpInsc', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpInsc'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='tpInsc', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class tpInsc
  
  
  class nrInsc(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, nrInsc)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if nrInsc.subclass:
              return nrInsc.subclass(*args_, **kwargs_)
          else:
              return nrInsc(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='nrInsc', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('nrInsc')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='nrInsc')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='nrInsc', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='nrInsc'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='nrInsc', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class nrInsc
  
  
  class TideCargo(GeneratedsSuper):
      """Identificação do cargo (código) e do período de validade das
      informações"""
      subclass = None
      superclass = None
      def __init__(self, codCargo=None, iniValid=None, fimValid=None):
          self.original_tagname_ = None
          self.codCargo = codCargo
          self.iniValid = iniValid
          self.fimValid = fimValid
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, TideCargo)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if TideCargo.subclass:
              return TideCargo.subclass(*args_, **kwargs_)
          else:
              return TideCargo(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_codCargo(self): return self.codCargo
      def set_codCargo(self, codCargo): self.codCargo = codCargo
      def get_iniValid(self): return self.iniValid
      def set_iniValid(self, iniValid): self.iniValid = iniValid
      def get_fimValid(self): return self.fimValid
      def set_fimValid(self, fimValid): self.fimValid = fimValid
      def hasContent_(self):
          if (
              self.codCargo is not None or
              self.iniValid is not None or
              self.fimValid is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='TideCargo', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('TideCargo')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='TideCargo')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='TideCargo', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TideCargo'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='TideCargo', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.codCargo is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%scodCargo>%s</%scodCargo>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.codCargo), input_name='codCargo')), namespace_, eol_))
          if self.iniValid is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%siniValid>%s</%siniValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.iniValid), input_name='iniValid')), namespace_, eol_))
          if self.fimValid is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sfimValid>%s</%sfimValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.fimValid), input_name='fimValid')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'codCargo':
              codCargo_ = child_.text
              codCargo_ = self.gds_validate_string(codCargo_, node, 'codCargo')
              self.codCargo = codCargo_
          elif nodeName_ == 'iniValid':
              iniValid_ = child_.text
              iniValid_ = self.gds_validate_string(iniValid_, node, 'iniValid')
              self.iniValid = iniValid_
          elif nodeName_ == 'fimValid':
              fimValid_ = child_.text
              fimValid_ = self.gds_validate_string(fimValid_, node, 'fimValid')
              self.fimValid = fimValid_
  # end class TideCargo
  
  
  class codCargo(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, codCargo)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if codCargo.subclass:
              return codCargo.subclass(*args_, **kwargs_)
          else:
              return codCargo(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='codCargo', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('codCargo')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='codCargo')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='codCargo', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='codCargo'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='codCargo', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class codCargo
  
  
  class iniValid(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, iniValid)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if iniValid.subclass:
              return iniValid.subclass(*args_, **kwargs_)
          else:
              return iniValid(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='iniValid', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('iniValid')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='iniValid')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='iniValid', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='iniValid'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='iniValid', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class iniValid
  
  
  class fimValid(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, fimValid)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if fimValid.subclass:
              return fimValid.subclass(*args_, **kwargs_)
          else:
              return fimValid(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='fimValid', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('fimValid')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='fimValid')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='fimValid', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='fimValid'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='fimValid', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class fimValid
  
  
  class TDadosCargo(GeneratedsSuper):
      """Informações do Cargo"""
      subclass = None
      superclass = None
      def __init__(self, nmCargo=None, codCBO=None, cargoPublico=None):
          self.original_tagname_ = None
          self.nmCargo = nmCargo
          self.codCBO = codCBO
          self.cargoPublico = cargoPublico
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, TDadosCargo)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if TDadosCargo.subclass:
              return TDadosCargo.subclass(*args_, **kwargs_)
          else:
              return TDadosCargo(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_nmCargo(self): return self.nmCargo
      def set_nmCargo(self, nmCargo): self.nmCargo = nmCargo
      def get_codCBO(self): return self.codCBO
      def set_codCBO(self, codCBO): self.codCBO = codCBO
      def get_cargoPublico(self): return self.cargoPublico
      def set_cargoPublico(self, cargoPublico): self.cargoPublico = cargoPublico
      def hasContent_(self):
          if (
              self.nmCargo is not None or
              self.codCBO is not None or
              self.cargoPublico is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='TDadosCargo', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('TDadosCargo')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='TDadosCargo')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='TDadosCargo', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TDadosCargo'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='TDadosCargo', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.nmCargo is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%snmCargo>%s</%snmCargo>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nmCargo), input_name='nmCargo')), namespace_, eol_))
          if self.codCBO is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%scodCBO>%s</%scodCBO>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.codCBO), input_name='codCBO')), namespace_, eol_))
          if self.cargoPublico is not None:
              self.cargoPublico.export(outfile, level, namespace_, name_='cargoPublico', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'nmCargo':
              nmCargo_ = child_.text
              nmCargo_ = self.gds_validate_string(nmCargo_, node, 'nmCargo')
              self.nmCargo = nmCargo_
          elif nodeName_ == 'codCBO':
              codCBO_ = child_.text
              codCBO_ = self.gds_validate_string(codCBO_, node, 'codCBO')
              self.codCBO = codCBO_
          elif nodeName_ == 'cargoPublico':
              obj_ = cargoPublico.factory()
              obj_.build(child_)
              self.cargoPublico = obj_
              obj_.original_tagname_ = 'cargoPublico'
  # end class TDadosCargo
  
  
  class nmCargo(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, nmCargo)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if nmCargo.subclass:
              return nmCargo.subclass(*args_, **kwargs_)
          else:
              return nmCargo(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='nmCargo', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('nmCargo')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='nmCargo')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='nmCargo', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='nmCargo'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='nmCargo', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class nmCargo
  
  
  class codCBO(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, codCBO)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if codCBO.subclass:
              return codCBO.subclass(*args_, **kwargs_)
          else:
              return codCBO(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='codCBO', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('codCBO')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='codCBO')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='codCBO', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='codCBO'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='codCBO', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class codCBO
  
  
  class cargoPublico(GeneratedsSuper):
      """Detalhamento de informações exclusivas para Cargos e Empregos
      Públicos"""
      subclass = None
      superclass = None
      def __init__(self, acumCargo=None, contagemEsp=None, dedicExcl=None, leiCargo=None):
          self.original_tagname_ = None
          self.acumCargo = acumCargo
          self.contagemEsp = contagemEsp
          self.dedicExcl = dedicExcl
          self.leiCargo = leiCargo
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, cargoPublico)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if cargoPublico.subclass:
              return cargoPublico.subclass(*args_, **kwargs_)
          else:
              return cargoPublico(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_acumCargo(self): return self.acumCargo
      def set_acumCargo(self, acumCargo): self.acumCargo = acumCargo
      def get_contagemEsp(self): return self.contagemEsp
      def set_contagemEsp(self, contagemEsp): self.contagemEsp = contagemEsp
      def get_dedicExcl(self): return self.dedicExcl
      def set_dedicExcl(self, dedicExcl): self.dedicExcl = dedicExcl
      def get_leiCargo(self): return self.leiCargo
      def set_leiCargo(self, leiCargo): self.leiCargo = leiCargo
      def hasContent_(self):
          if (
              self.acumCargo is not None or
              self.contagemEsp is not None or
              self.dedicExcl is not None or
              self.leiCargo is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='cargoPublico', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('cargoPublico')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='cargoPublico')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='cargoPublico', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='cargoPublico'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='cargoPublico', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.acumCargo is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sacumCargo>%s</%sacumCargo>%s' % (namespace_, self.gds_format_integer(self.acumCargo, input_name='acumCargo'), namespace_, eol_))
          if self.contagemEsp is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%scontagemEsp>%s</%scontagemEsp>%s' % (namespace_, self.gds_format_integer(self.contagemEsp, input_name='contagemEsp'), namespace_, eol_))
          if self.dedicExcl is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sdedicExcl>%s</%sdedicExcl>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.dedicExcl), input_name='dedicExcl')), namespace_, eol_))
          if self.leiCargo is not None:
              self.leiCargo.export(outfile, level, namespace_, name_='leiCargo', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'acumCargo':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'acumCargo')
              self.acumCargo = ival_
          elif nodeName_ == 'contagemEsp':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'contagemEsp')
              self.contagemEsp = ival_
          elif nodeName_ == 'dedicExcl':
              dedicExcl_ = child_.text
              dedicExcl_ = self.gds_validate_string(dedicExcl_, node, 'dedicExcl')
              self.dedicExcl = dedicExcl_
          elif nodeName_ == 'leiCargo':
              obj_ = leiCargo.factory()
              obj_.build(child_)
              self.leiCargo = obj_
              obj_.original_tagname_ = 'leiCargo'
  # end class cargoPublico
  
  
  class acumCargo(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, acumCargo)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if acumCargo.subclass:
              return acumCargo.subclass(*args_, **kwargs_)
          else:
              return acumCargo(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='acumCargo', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('acumCargo')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='acumCargo')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='acumCargo', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='acumCargo'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='acumCargo', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class acumCargo
  
  
  class contagemEsp(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, contagemEsp)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if contagemEsp.subclass:
              return contagemEsp.subclass(*args_, **kwargs_)
          else:
              return contagemEsp(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='contagemEsp', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('contagemEsp')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='contagemEsp')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='contagemEsp', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='contagemEsp'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='contagemEsp', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class contagemEsp
  
  
  class dedicExcl(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, dedicExcl)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if dedicExcl.subclass:
              return dedicExcl.subclass(*args_, **kwargs_)
          else:
              return dedicExcl(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='dedicExcl', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('dedicExcl')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='dedicExcl')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='dedicExcl', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='dedicExcl'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='dedicExcl', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class dedicExcl
  
  
  class leiCargo(GeneratedsSuper):
      """Lei que criou/extinguiu/reestruturou o cargo"""
      subclass = None
      superclass = None
      def __init__(self, nrLei=None, dtLei=None, sitCargo=None):
          self.original_tagname_ = None
          self.nrLei = nrLei
          if isinstance(dtLei, BaseStrType_):
              initvalue_ = datetime_.datetime.strptime(dtLei, '%Y-%m-%d').date()
          else:
              initvalue_ = dtLei
          self.dtLei = initvalue_
          self.sitCargo = sitCargo
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, leiCargo)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if leiCargo.subclass:
              return leiCargo.subclass(*args_, **kwargs_)
          else:
              return leiCargo(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_nrLei(self): return self.nrLei
      def set_nrLei(self, nrLei): self.nrLei = nrLei
      def get_dtLei(self): return self.dtLei
      def set_dtLei(self, dtLei): self.dtLei = dtLei
      def get_sitCargo(self): return self.sitCargo
      def set_sitCargo(self, sitCargo): self.sitCargo = sitCargo
      def hasContent_(self):
          if (
              self.nrLei is not None or
              self.dtLei is not None or
              self.sitCargo is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='leiCargo', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('leiCargo')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='leiCargo')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='leiCargo', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='leiCargo'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='leiCargo', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.nrLei is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%snrLei>%s</%snrLei>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrLei), input_name='nrLei')), namespace_, eol_))
          if self.dtLei is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sdtLei>%s</%sdtLei>%s' % (namespace_, self.gds_format_date(self.dtLei, input_name='dtLei'), namespace_, eol_))
          if self.sitCargo is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%ssitCargo>%s</%ssitCargo>%s' % (namespace_, self.gds_format_integer(self.sitCargo, input_name='sitCargo'), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'nrLei':
              nrLei_ = child_.text
              nrLei_ = self.gds_validate_string(nrLei_, node, 'nrLei')
              self.nrLei = nrLei_
          elif nodeName_ == 'dtLei':
              sval_ = child_.text
              dval_ = self.gds_parse_date(sval_)
              self.dtLei = dval_
          elif nodeName_ == 'sitCargo':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'sitCargo')
              self.sitCargo = ival_
  # end class leiCargo
  
  
  class nrLei(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, nrLei)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if nrLei.subclass:
              return nrLei.subclass(*args_, **kwargs_)
          else:
              return nrLei(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='nrLei', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('nrLei')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='nrLei')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='nrLei', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='nrLei'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='nrLei', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class nrLei
  
  
  class dtLei(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, dtLei)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if dtLei.subclass:
              return dtLei.subclass(*args_, **kwargs_)
          else:
              return dtLei(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='dtLei', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('dtLei')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='dtLei')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='dtLei', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='dtLei'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='dtLei', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class dtLei
  
  
  class sitCargo(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self):
          self.original_tagname_ = None
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, sitCargo)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if sitCargo.subclass:
              return sitCargo.subclass(*args_, **kwargs_)
          else:
              return sitCargo(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='sitCargo', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('sitCargo')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='sitCargo')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='sitCargo', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='sitCargo'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='sitCargo', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class sitCargo
  
  
  class TPeriodoValidade(GeneratedsSuper):
      subclass = None
      superclass = None
      def __init__(self, iniValid=None, fimValid=None):
          self.original_tagname_ = None
          self.iniValid = iniValid
          self.fimValid = fimValid
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, TPeriodoValidade)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if TPeriodoValidade.subclass:
              return TPeriodoValidade.subclass(*args_, **kwargs_)
          else:
              return TPeriodoValidade(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_iniValid(self): return self.iniValid
      def set_iniValid(self, iniValid): self.iniValid = iniValid
      def get_fimValid(self): return self.fimValid
      def set_fimValid(self, fimValid): self.fimValid = fimValid
      def hasContent_(self):
          if (
              self.iniValid is not None or
              self.fimValid is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='TPeriodoValidade', namespacedef_='', pretty_print=True):
          imported_ns_def_ = GenerateDSNamespaceDefs_.get('TPeriodoValidade')
          if imported_ns_def_ is not None:
              namespacedef_ = imported_ns_def_
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='TPeriodoValidade')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='TPeriodoValidade', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TPeriodoValidade'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='TPeriodoValidade', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.iniValid is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%siniValid>%s</%siniValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.iniValid), input_name='iniValid')), namespace_, eol_))
          if self.fimValid is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sfimValid>%s</%sfimValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.fimValid), input_name='fimValid')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'iniValid':
              iniValid_ = child_.text
              iniValid_ = self.gds_validate_string(iniValid_, node, 'iniValid')
              self.iniValid = iniValid_
          elif nodeName_ == 'fimValid':
              fimValid_ = child_.text
              fimValid_ = self.gds_validate_string(fimValid_, node, 'fimValid')
              self.fimValid = fimValid_
  # end class TPeriodoValidade
  
  
  GDSClassesMapping = {
      'dadosCargo': TDadosCargo,
      'ideCargo': TideCargo,
      'ideEmpregador': TEmpregador,
      'ideEvento': TIdeCadastro,
      'novaValidade': TPeriodoValidade,
  }
  
  
  USAGE_TEXT = """
  Usage: python <Parser>.py [ -s ] <in_xml_file>
  """
  
  
  def usage():
      print(USAGE_TEXT)
      sys.exit(1)
  
  
  def get_root_tag(node):
      tag = Tag_pattern_.match(node.tag).groups()[-1]
      rootClass = GDSClassesMapping.get(tag)
      if rootClass is None:
          rootClass = globals().get(tag)
      return tag, rootClass
  
  
  def parse(inFileName, silence=False):
      parser = None
      doc = parsexml_(inFileName, parser)
      rootNode = doc.getroot()
      rootTag, rootClass = get_root_tag(rootNode)
      if rootClass is None:
          rootTag = 'eSocial'
          rootClass = eSocial
      rootObj = rootClass.factory()
      rootObj.build(rootNode)
      # Enable Python to collect the space used by the DOM.
      doc = None
      if not silence:
          sys.stdout.write('<?xml version="1.0" ?>\n')
          rootObj.export(
              sys.stdout, 0, name_=rootTag,
              namespacedef_='',
              pretty_print=True)
      return rootObj
  
  
  def parseEtree(inFileName, silence=False):
      parser = None
      doc = parsexml_(inFileName, parser)
      rootNode = doc.getroot()
      rootTag, rootClass = get_root_tag(rootNode)
      if rootClass is None:
          rootTag = 'eSocial'
          rootClass = eSocial
      rootObj = rootClass.factory()
      rootObj.build(rootNode)
      # Enable Python to collect the space used by the DOM.
      doc = None
      mapping = {}
      rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping)
      reverse_mapping = rootObj.gds_reverse_node_mapping(mapping)
      if not silence:
          content = etree_.tostring(
              rootElement, pretty_print=True,
              xml_declaration=True, encoding="utf-8")
          sys.stdout.write(content)
          sys.stdout.write('\n')
      return rootObj, rootElement, mapping, reverse_mapping
  
  
  def parseString(inString, silence=False):
      if sys.version_info.major == 2:
          from StringIO import StringIO as IOBuffer
      else:
          from io import BytesIO as IOBuffer
      parser = None
      doc = parsexml_(IOBuffer(inString), parser)
      rootNode = doc.getroot()
      rootTag, rootClass = get_root_tag(rootNode)
      if rootClass is None:
          rootTag = 'eSocial'
          rootClass = eSocial
      rootObj = rootClass.factory()
      rootObj.build(rootNode)
      # Enable Python to collect the space used by the DOM.
      doc = None
      if not silence:
          sys.stdout.write('<?xml version="1.0" ?>\n')
          rootObj.export(
              sys.stdout, 0, name_=rootTag,
              namespacedef_='')
      return rootObj
  
  
  def parseLiteral(inFileName, silence=False):
      parser = None
      doc = parsexml_(inFileName, parser)
      rootNode = doc.getroot()
      rootTag, rootClass = get_root_tag(rootNode)
      if rootClass is None:
          rootTag = 'eSocial'
          rootClass = eSocial
      rootObj = rootClass.factory()
      rootObj.build(rootNode)
      # Enable Python to collect the space used by the DOM.
      doc = None
      if not silence:
          sys.stdout.write('#from evtTabCargo import *\n\n')
          sys.stdout.write('import evtTabCargo as model_\n\n')
          sys.stdout.write('rootObj = model_.rootClass(\n')
          rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
          sys.stdout.write(')\n')
      return rootObj
  
  
  def main():
      args = sys.argv[1:]
      if len(args) == 1:
          parse(args[0])
      else:
          usage()
  
  
  if __name__ == '__main__':
      #import pdb; pdb.set_trace()
      main()
  
  
  __all__ = [
      "TDadosCargo",
      "TEmpregador",
      "TIdeCadastro",
      "TPeriodoValidade",
      "TideCargo",
      "eSocial"
  ]
  