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

#
# Generated Thu May  4 11:41:10 2023 by generateDS.py version 2.41.4.
# Python 3.8.16 (default, Dec 20 2022, 23:15:53) [MSC v.1900 64 bit (AMD64)]
#
# Command line options:
#   ('-f', '')
#   ('-o', 'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\Python\\kpt_10.py')
#   ('--super', 'kpt_10')
#
# Command line arguments:
#   E:\Download\RossRestr\KPT_v10\KPT_v10\KPT\KPT_v10.xsd
#
# Command line:
#   Scripts/generateDS.py -f -o "E:\Download\RossRestr\KPT_v10\KPT_v10\KPT\Python\kpt_10.py" --super="kpt_10" E:\Download\RossRestr\KPT_v10\KPT_v10\KPT\KPT_v10.xsd
#
# Current working directory (os.getcwd()):
#   python
#

import sys
try:
    ModulenotfoundExp_ = ModuleNotFoundError
except NameError:
    ModulenotfoundExp_ = ImportError
from six.moves import zip_longest
import os
import re as re_
import base64
import datetime as datetime_
import decimal as decimal_
from lxml import etree as etree_


Validate_simpletypes_ = True
SaveElementTreeNode = True
TagNamePrefix = ""
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()
    try:
        if isinstance(infile, os.PathLike):
            infile = os.path.join(infile)
    except AttributeError:
        pass
    doc = etree_.parse(infile, parser=parser, **kwargs)
    return doc

def parsexmlstring_(instring, 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()
    element=None
    try:
        #element = etree_.fromstring(instring, parser=parser, **kwargs)
        element = etree_.fromstring(bytes(instring, encoding='utf-8'), parser=parser, **kwargs)

    except Exception as e:
        jkl=0
        #element = etree_.fromstring(instring, parser=parser, **kwargs)element = etree_.fromstring(instring, parser=parser, **kwargs)
    return element

#
# 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 an 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",
#     }
#
# Additionally, the generatedsnamespaces module can contain a python
# dictionary named GenerateDSNamespaceTypePrefixes that associates element
# types with the namespace prefixes that are to be added to the
# "xsi:type" attribute value.  See the _exportAttributes method of
# any generated element type and the generation of "xsi:type" for an
# example of the use of this table.
# An example table:
#
#     # File: generatedsnamespaces.py
#
#     GenerateDSNamespaceTypePrefixes = {
#         "ElementtypeC": "aaa:",
#         "ElementtypeD": "bbb:",
#     }
#

try:
    from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ModulenotfoundExp_ :
    GenerateDSNamespaceDefs_ = {}
try:
    from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
except ModulenotfoundExp_ :
    GenerateDSNamespaceTypePrefixes_ = {}

#
# You can replace the following class definition by defining an
# importable module named "generatedscollector" containing a class
# named "GdsCollector".  See the default class definition below for
# clues about the possible content of that class.
#
try:
    from generatedscollector import GdsCollector as GdsCollector_
except ModulenotfoundExp_ :

    class GdsCollector_(object):

        def __init__(self, messages=None):
            if messages is None:
                self.messages = []
            else:
                self.messages = messages

        def add_message(self, msg):
            self.messages.append(msg)

        def get_messages(self):
            return self.messages

        def clear_messages(self):
            self.messages = []

        def print_messages(self):
            for msg in self.messages:
                print("Warning: {}".format(msg))

        def write_messages(self, outstream):
            for msg in self.messages:
                outstream.write("Warning: {}\n".format(msg))


#
# The super-class for enum types
#

try:
    from enum import Enum
except ModulenotfoundExp_ :
    Enum = object

#
# 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 ModulenotfoundExp_ as exp:
    try:
        from generatedssupersuper import GeneratedsSuperSuper
    except ModulenotfoundExp_ as exp:
        class GeneratedsSuperSuper(object):
            pass
    
    class GeneratedsSuper(GeneratedsSuperSuper):
        __hash__ = object.__hash__
        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 __str__(self):
            settings = {
                'str_pretty_print': True,
                'str_indent_level': 0,
                'str_namespaceprefix': '',
                'str_name': self.__class__.__name__,
                'str_namespacedefs': '',
            }
            for n in settings:
                if hasattr(self, n):
                    settings[n] = getattr(self, n)
            if sys.version_info.major == 2:
                from StringIO import StringIO
            else:
                from io import StringIO
            output = StringIO()
            self.export(
                output,
                settings['str_indent_level'],
                pretty_print=settings['str_pretty_print'],
                namespaceprefix_=settings['str_namespaceprefix'],
                name_=settings['str_name'],
                namespacedef_=settings['str_namespacedefs']
            )
            strval = output.getvalue()
            output.close()
            return strval
        def gds_format_string(self, input_data, input_name=''):
            return input_data
        def gds_parse_string(self, input_data, node=None, 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).decode('ascii')
        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' % int(input_data)
        def gds_parse_integer(self, input_data, node=None, input_name=''):
            try:
                ival = int(input_data)
            except (TypeError, ValueError) as exp:
                raise_parse_error(node, 'Requires integer value: %s' % exp)
            return ival
        def gds_validate_integer(self, input_data, node=None, input_name=''):
            try:
                value = int(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires integer value')
            return value
        def gds_format_integer_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            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 integer values')
            return values
        def gds_format_float(self, input_data, input_name=''):
            value = ('%.15f' % float(input_data)).rstrip('0')
            if value.endswith('.'):
                value += '0'
            return value
    
        def gds_parse_float(self, input_data, node=None, input_name=''):
            try:
                fval_ = float(input_data)
            except (TypeError, ValueError) as exp:
                raise_parse_error(node, 'Requires float or double value: %s' % exp)
            return fval_
        def gds_validate_float(self, input_data, node=None, input_name=''):
            try:
                value = float(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires float value')
            return value
        def gds_format_float_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            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 float values')
            return values
        def gds_format_decimal(self, input_data, input_name=''):
            return_value = '%s' % input_data
            if '.' in return_value:
                return_value = return_value.rstrip('0')
                if return_value.endswith('.'):
                    return_value = return_value.rstrip('.')
            return return_value
        def gds_parse_decimal(self, input_data, node=None, input_name=''):
            try:
                decimal_value = decimal_.Decimal(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires decimal value')
            return decimal_value
        def gds_validate_decimal(self, input_data, node=None, input_name=''):
            try:
                value = decimal_.Decimal(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires decimal value')
            return value
        def gds_format_decimal_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            return ' '.join([self.gds_format_decimal(item) for item in input_data])
        def gds_validate_decimal_list(
                self, input_data, node=None, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    decimal_.Decimal(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of decimal values')
            return values
        def gds_format_double(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_parse_double(self, input_data, node=None, input_name=''):
            try:
                fval_ = float(input_data)
            except (TypeError, ValueError) as exp:
                raise_parse_error(node, 'Requires double or float value: %s' % exp)
            return fval_
        def gds_validate_double(self, input_data, node=None, input_name=''):
            try:
                value = float(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires double or float value')
            return value
        def gds_format_double_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            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 double or float values')
            return values
        def gds_format_boolean(self, input_data, input_name=''):
            return ('%s' % input_data).lower()
        def gds_parse_boolean(self, input_data, node=None, input_name=''):
            input_data = input_data.strip()
            if input_data in ('true', '1'):
                bval = True
            elif input_data in ('false', '0'):
                bval = False
            else:
                raise_parse_error(node, 'Requires boolean value')
            return bval
        def gds_validate_boolean(self, input_data, node=None, input_name=''):
            if input_data not in (True, 1, False, 0, ):
                raise_parse_error(
                    node,
                    'Requires boolean value '
                    '(one of True, 1, False, 0)')
            return input_data
        def gds_format_boolean_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            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:
                value = self.gds_parse_boolean(value, node, input_name)
                if value not in (True, 1, False, 0, ):
                    raise_parse_error(
                        node,
                        'Requires sequence of boolean values '
                        '(one of 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], "{}".format(micro_seconds).rjust(6, "0"), )
                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.
            # The target value must match at least one of the patterns
            # in order for the test to succeed.
            found1 = True
            target = str(target)
            for patterns1 in patterns:
                found2 = False
                for patterns2 in patterns1:
                    mo = re_.search(patterns2, target)
                    if mo is not None and len(mo.group(0)) == len(target):
                        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_check_cardinality_(
                self, value, input_name,
                min_occurs=0, max_occurs=1, required=None):
            if value is None:
                length = 0
            elif isinstance(value, list):
                length = len(value)
            else:
                length = 1
            if required is not None :
                if required and length < 1:
                    self.gds_collector_.add_message(
                        "Required value {}{} is missing".format(
                            input_name, self.gds_get_node_lineno_()))
            if length < min_occurs:
                self.gds_collector_.add_message(
                    "Number of values for {}{} is below "
                    "the minimum allowed, "
                    "expected at least {}, found {}".format(
                        input_name, self.gds_get_node_lineno_(),
                        min_occurs, length))
            elif length > max_occurs:
                self.gds_collector_.add_message(
                    "Number of values for {}{} is above "
                    "the maximum allowed, "
                    "expected at most {}, found {}".format(
                        input_name, self.gds_get_node_lineno_(),
                        max_occurs, length))
        def gds_validate_builtin_ST_(
                self, validator, value, input_name,
                min_occurs=None, max_occurs=None, required=None):
            if value is not None:
                try:
                    validator(value, input_name=input_name)
                except GDSParseError as parse_error:
                    self.gds_collector_.add_message(str(parse_error))
        def gds_validate_defined_ST_(
                self, validator, value, input_name,
                min_occurs=None, max_occurs=None, required=None):
            if value is not None:
                try:
                    validator(value)
                except GDSParseError as parse_error:
                    self.gds_collector_.add_message(str(parse_error))
        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):
            # provide default value in case option --disable-xml is used.
            content = ""
            content = etree_.tostring(node, encoding="unicode")
            return content
        @classmethod
        def gds_reverse_node_mapping(cls, mapping):
            return dict(((v, k) for k, v in mapping.items()))
        @staticmethod
        def gds_encode(instring):
            if sys.version_info.major == 2:
                if ExternalEncoding:
                    encoding = ExternalEncoding
                else:
                    encoding = 'utf-8'
                return instring.encode(encoding)
            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):
            def excl_select_objs_(obj):
                return (obj[0] != 'parent_object_' and
                        obj[0] != 'gds_collector_')
            if type(self) != type(other):
                return False
            return all(x == y for x, y in zip_longest(
                filter(excl_select_objs_, self.__dict__.items()),
                filter(excl_select_objs_, other.__dict__.items())))
        def __ne__(self, other):
            return not self.__eq__(other)
        # Django ETL transform hooks.
        def gds_djo_etl_transform(self):
            pass
        def gds_djo_etl_transform_db_obj(self, dbobj):
            pass
        # SQLAlchemy ETL transform hooks.
        def gds_sqa_etl_transform(self):
            return 0, None
        def gds_sqa_etl_transform_db_obj(self, dbobj):
            pass
        def gds_get_node_lineno_(self):
            if (hasattr(self, "gds_elementtree_node_") and
                    self.gds_elementtree_node_ is not None):
                return ' near line {}'.format(
                    self.gds_elementtree_node_.sourceline)
            else:
                return ""
    
    
    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 = ''
# Set this to false in order to deactivate during export, the use of
# name space prefixes captured from the input document.
UseCapturedNS_ = True
CapturedNsmap_ = {}
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;')
    s1 = s1.replace('\n', '&#10;')
    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
        if prefix == 'xml':
            namespace = 'http://www.w3.org/XML/1998/namespace'
        else:
            namespace = node.nsmap.get(prefix)
        if namespace is not None:
            value = attrs.get('{%s}%s' % (namespace, name, ))
    return value


def encode_str_2_3(instr):
    return instr


class GDSParseError(Exception):
    pass


def raise_parse_error(node, msg):
    if node is not None:
        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_=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, mapping_=None, reverse_mapping_=None, nsmap_=None):
        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, mapping_=None, reverse_mapping_=None, nsmap_=None):
        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 GenderType(str, Enum):
    """GenderType -- П
    о
    л
    .
    
    """
    MALE='Male'
    FEMALE='Female'


class UndergroundType(str, Enum):
    """UndergroundType -- П
    р
    и
    з
    н
    а
    к
    к
    о
    н
    т
    у
    р
    а
    (0-
    Н
    а
    з
    е
    м
    н
    ы
    й
    к
    о
    н
    т
    у
    р
    , 1 -
    П
    о
    д
    з
    е
    м
    н
    ы
    й
    к
    о
    н
    т
    у
    р
    , 2 -
    Н
    а
    д
    з
    е
    м
    н
    ы
    й
    к
    о
    н
    т
    у
    р
    )
    
    """
    _0='0'
    _1='1'
    _2='2'


class UndergroundType14(str, Enum):
    """UndergroundType14 -- П
    р
    и
    з
    н
    а
    к
    к
    о
    н
    т
    у
    р
    а
    (0-
    Н
    а
    з
    е
    м
    н
    ы
    й
    к
    о
    н
    т
    у
    р
    , 1 -
    П
    о
    д
    з
    е
    м
    н
    ы
    й
    к
    о
    н
    т
    у
    р
    , 2 -
    Н
    а
    д
    з
    е
    м
    н
    ы
    й
    к
    о
    н
    т
    у
    р
    )
    
    """
    _0='0'
    _1='1'
    _2='2'


class dAllDocuments(str, Enum):
    """dAllDocuments -- В
    с
    е
    д
    о
    к
    у
    м
    е
    н
    т
    ы
    
    """
    _0_08001000000='008001000000' # Документы, удостоверяющие личность физического лица
    _0_08001001000='008001001000' # Паспорт гражданина Российской Федерации
    _0_08001002000='008001002000' # Паспорт гражданина СССР
    _0_08001003000='008001003000' # Паспорт гражданина иностранного государства
    _0_08001004000='008001004000' # Общегражданский заграничный паспорт
    _0_08001005000='008001005000' # Заграничный паспорт Министерства морского флота
    _0_08001006000='008001006000' # Дипломатический паспорт
    _0_08001007000='008001007000' # Паспорт моряка (удостоверение личности моряка)
    _0_08001008000='008001008000' # Военный билет военнослужащего
    _0_08001009000='008001009000' # Временное удостоверение, выданное взамен военного билета
    _0_08001010000='008001010000' # Удостоверение личности офицера Министерства обороны Российской Федерации, Министерства внутренних дел Российской Федерации и других воинских формирований с приложением справки о прописке (регистрации) Ф-33
    _0_08001011000='008001011000' # Свидетельство о рождении
    _0_08001012000='008001012000' # Свидетельство о рассмотрении ходатайства о признании беженцем на территории Российской Федерации по существу
    _0_08001013000='008001013000' # Вид на жительство иностранного гражданина или лица без гражданства
    _0_08001014000='008001014000' # Справка об освобождении из мест лишения свободы
    _0_08001015000='008001015000' # Временное удостоверение личности гражданина Российской Федерации
    _0_08001016000='008001016000' # Удостоверение вынужденного переселенца
    _0_08001017000='008001017000' # Разрешение на временное проживание в Российской Федерации
    _0_08001018000='008001018000' # Удостоверение беженца в Российской Федерации
    _0_08001019000='008001019000' # Свидетельство о рассмотрении ходатайства о признании лица вынужденным переселенцем
    _0_08001020000='008001020000' # Свидетельство о предоставлении временного убежища на территории Российской Федерации
    _0_08001099000='008001099000' # Иные документы, предусмотренные законодательством Российской Федерации или признаваемые в соответствии с международным договором Российской Федерации в качестве документов, удостоверяющих личность
    _0_08002000000='008002000000' # Документы, идентифицирующие юридическое лицо
    _0_08002001000='008002001000' # Свидетельство о государственной регистрации юридического лица
    _0_08002002000='008002002000' # Свидетельство о внесении записей в ЕГРЮЛ
    _0_08002004000='008002004000' # Устав
    _0_08002005000='008002005000' # Учредительный договор
    _0_08002006000='008002006000' # Положение (общее положение об организации)
    _0_08002007000='008002007000' # Свидетельство (или уведомление) о постановке на учёт в налоговом органе с указанием ИНН
    _0_08002008000='008002008000' # Выписка из ЕГРЮЛ
    _0_08002099000='008002099000' # Иной документ
    _5_55001000000='555001000000' # Квитанция
    _5_55002000000='555002000000' # Платёжное поручение
    _5_55003000000='555003000000' # Чек
    _5_55004000000='555004000000' # Подтверждение электронного платежа
    _5_55005000000='555005000000' # Документ, подтверждающий право заявителя на безвозмездное получение сведений
    _5_58100000000='558100000000' # ЗАЯВЛЕНИЯ
    _5_58101000000='558101000000' # Заявления и запросы, связанные с государственным кадастровым учётом
    _5_58101010000='558101010000' # Запрос о предоставлении сведений, внесённых в государственный кадастр недвижимости, в виде кадастровой выписки об объекте недвижимости, территориальной зоне, зоне с особыми условиями использования территории, территории объекта культурного наследия, включенного в единый государственный реестр объектов культурного наследия (памятников истории и культуры) народов Российской Федерации, границах между субъектами Российской Федерации, границах муниципальных образований и границах населённых пунктов, кадастрового паспорта объекта недвижимости и кадастрового плана территории, кадастровой справки о кадастровой стоимости объекта недвижимости
    _5_58101020000='558101020000' # Заявление о постановке на государственный кадастровый учёт объекта недвижимости
    _5_58101030000='558101030000' # Заявление о государственном кадастровом учёте изменений объекта недвижимости
    _5_58101040000='558101040000' # Заявление о внесении в Единый государственный реестр объектов капитального строительства (ЕГРОКС) сведений об объекте капитального строительства (ОКС)
    _5_58101050000='558101050000' # Запрос о предоставлении сведений об ОКС
    _5_58101060000='558101060000' # Заявление о снятии с государственного кадастрового учёта объекта недвижимости
    _5_58101070000='558101070000' # Заявление о внесении в государственный кадастр недвижимости сведений о ранее учтённом объекте недвижимости
    _5_58101080000='558101080000' # Заявление об исправлении кадастровой ошибки
    _5_58101090000='558101090000' # Заявление об исправлении технической ошибки в сведениях государственного кадастра недвижимости
    _5_58101090100='558101090100' # Заявление об исправлении технической ошибки в сведениях государственного кадастра недвижимости об объекте недвижимости
    _5_58101090200='558101090200' # Заявление об исправлении технической ошибки в сведениях государственного кадастра недвижимости о прохождении участка Государственной границы Российской Федерации; о границах между субъектами Российской Федерации; о границах муниципальных образований; о границах населённых пунктов; о территориальных зонах и зонах с особыми условиями использования территорий; о картографической и геодезической основах государственного кадастра недвижимости
    _5_58101100000='558101100000' # Заявление о представлении дополнительных документов на государственный кадастровый учёт
    _5_58101110000='558101110000' # Внутриведомственный запрос информации государственного кадастра недвижимости
    _5_58101120000='558101120000' # Запрос о предоставлении копии документа, на основании которого сведения об объекте недвижимости внесены в государственный кадастр недвижимости, или копий документов, помещённых в кадастровое дело
    _5_58101130000='558101130000' # Запрос о предоставлении сведений, внесённых в государственный кадастр недвижимости, посредством обеспечения доступа к информационному ресурсу, содержащему сведения государственного кадастра недвижимости
    _5_58101140000='558101140000' # Запрос о предоставлении перечня объектов недвижимости, подлежащих государственной кадастровой оценке
    _5_58101150000='558101150000' # Заявление о прекращении осуществления кадастрового учёта
    _5_58101160000='558101160000' # Межведомственный запрос документов в органах государственной власти и органах местного самоуправления
    _5_58101170000='558101170000' # Запрос документов о ранее учтённом объекте недвижимости в органах государственной власти, органах местного самоуправления или органах и организациях по государственному техническому учёту и (или) технической инвентаризации
    _5_58101180000='558101180000' # Запрос об уточнении данных, представленных органом государственной власти или органом местного самоуправления в порядке информационного взаимодействия
    _5_58102000000='558102000000' # Заявления и запросы, связанные с регистрацией прав
    _5_58102010000='558102010000' # Заявление о государственной регистрации права на недвижимое имущество, сделки с ним, ограничения (обременения), перехода, прекращения права на недвижимое имущество
    _5_58102020000='558102020000' # Заявление о государственной регистрации прекращения права (ограничения (обременения) права)
    _5_58102030000='558102030000' # Заявление о внесении изменений в ЕГРП
    _5_58102040000='558102040000' # Заявление об исправлении технической ошибки
    _5_58102050000='558102050000' # Заявление о представлении дополнительных документов для государственной регистрации прав
    _5_58102060000='558102060000' # Заявление о приостановлении государственной регистрации прав на недвижимое имущество и сделок с ним
    _5_58102070000='558102070000' # Заявление о возобновлении государственной регистрации
    _5_58102080000='558102080000' # Заявление о прекращении государственной регистрации
    _5_58102090000='558102090000' # Заявление о повторной выдаче свидетельства о государственной регистрации права
    _5_58102100000='558102100000' # Запрос о предоставлении сведений, содержащихся в Едином государственном реестре прав на недвижимое имущество и сделок с ним
    _5_58102110000='558102110000' # Заявление о постановке на учёт бесхозяйных недвижимых вещей
    _5_58102120000='558102120000' # Заявление о выдаче закладной (новой закладной, дубликата закладной, аннулированной закладной)
    _5_58102130000='558102130000' # Запрос о выдаче копий договоров и иных документов, выражающих содержание односторонних сделок, совершенных в простой письменной форме
    _5_58102140000='558102140000' # Заявление о приостановлении государственной регистрации, возврате документов без проведения государственной регистрации, представлении дополнительных документов, о возобновлении государственной регистрации, ранее приостановленной по заявлению правообладателя, стороны (сторон) сделки, лица, чьё право ограничивается (обременяется), лица, в пользу которого право ограничивается (обременяется), законного владельца закладной (их представителя)
    _5_58102150000='558102150000' # Заявление о повторной выдаче нового свидетельства о государственной регистрации права, выдаче закладной, внесении изменений в запись Единого государственного реестра прав на недвижимое имущество и сделок с ним, погашении регистрационной записи об ипотеке
    _5_58102160000='558102160000' # Заявление о принятии объекта недвижимого имущества вновь во владение, пользование и распоряжение (в собственность)
    _5_58102170000='558102170000' # Заявление о внесении в Единый государственный реестр прав на недвижимое имущество и сделок с ним отметки о наличии судебного спора в отношении зарегистрированного права
    _5_58102180000='558102180000' # Заявление об исправлении технической ошибки в записях Единого государственного реестра прав на недвижимое имущество и сделок с ним, о наличии возражения в отношении зарегистрированного права на объект недвижимости, о погашении записи в Едином государственном реестре прав на недвижимое имущество и сделок с ним о наличии возражения в отношении зарегистрированного права на объект недвижимости, о невозможности государственной регистрации перехода, ограничения (обременения), прекращения права на объект недвижимости без личного участия собственника (его законного представителя), об отзыве ранее представленного заявления о невозможности государственной регистрации перехода, ограничения (обременения), прекращения права на объект недвижимости без личного участия собственника (его законного представителя)
    _5_58102190000='558102190000' # Заявление о скреплении добавочного листа (добавочных листов) с закладной
    _5_58102200000='558102200000' # Запрос о предоставлении сведений, содержащихся в Едином государственном реестре прав на недвижимое имущество и сделок с ним, посредством обеспечения доступа к информационному ресурсу, содержащему сведения Единого государственного реестра прав на недвижимое имущество и сделок с ним
    _5_58102210000='558102210000' # Заявление о государственной регистрации законного владельца закладной
    _5_58102220000='558102220000' # Заявление о внесении изменений в запись Единого государственного реестра прав на недвижимое имущество и сделок с ним, погашении регистрационной записи об ипотеке
    _5_58103000000='558103000000' # Заявления о государственном учёте зданий, сооружений, помещений, объектов незавершённого строительства (объектов учёта) и запросы о предоставлении сведений, внесённых в Единый государственный реестр
    _5_58103010000='558103010000' # Заявление о постановке на государственный учёт объекта учёта
    _5_58103020000='558103020000' # Заявление о внесении в ЕГРОКС сведений о ранее учтённом объекте капитального строительства
    _5_58103030000='558103030000' # Заявление о государственном учёте изменений объекта учёта
    _5_58103040000='558103040000' # Заявление о снятии с государственного учёта объекта учёта
    _5_58103050000='558103050000' # Заявление об исправлении технической ошибки
    _5_58103060000='558103060000' # Заявление об исключении сведений из ЕГРОКС, носящих временный характер
    _5_58103070000='558103070000' # Запрос о предоставлении копии документа, на основании которого сведения об объекте внесены в Единый государственный реестр
    _5_58103080000='558103080000' # Запрос о предоставлении сведений, внесенных в Единый государственный реестр
    _5_58103090000='558103090000' # Заявление о представлении дополнительных документов на государственный учёт
    _5_58104000000='558104000000' # Заявление о возврате платежа
    _5_58199000000='558199000000' # Иное заявление
    _5_58200000000='558200000000' # ДОКУМЕНТЫ, СОДЕРЖАЩИЕ ОПИСАНИЕ ОБЪЕКТА
    _5_58201000000='558201000000' # Описание земельных участков
    _5_58202000000='558202000000' # Землеустроительное дело
    _5_58203000000='558203000000' # Межевой план
    _5_58204000000='558204000000' # Документ (копия), на основании которого сведения об объекте недвижимости внесены в ГКН
    _5_58205000000='558205000000' # Технический паспорт объекта учёта
    _5_58205010000='558205010000' # Технический паспорт домовладения
    _5_58205020000='558205020000' # Технический паспорт здания (строения)
    _5_58205030000='558205030000' # Технический паспорт жилого помещения (квартиры)
    _5_58205040000='558205040000' # Технический паспорт объекта индивидуального жилищного строительства
    _5_58205050000='558205050000' # Технический паспорт сооружения
    _5_58205060000='558205060000' # Технический паспорт объекта незавершённого строительства
    _5_58206000000='558206000000' # Выписка из технического паспорта
    _5_58206010000='558206010000' # Выписка из технического паспорта на здание (строение)
    _5_58206020000='558206020000' # Выписка из технического паспорта БТИ
    _5_58207000000='558207000000' # Документ (копия), подтверждающий разрешение земельного спора о согласовании местоположения границ земельного участка
    _5_58208000000='558208000000' # Документ (копия), подтверждающий принадлежность земельного участка к определенной категории земель
    _5_58209000000='558209000000' # Документ (копия), подтверждающий установленное разрешенное использование земельного участка
    _5_58210000000='558210000000' # Кадастровый план земельного участка (выписка из государственного земельного кадастра)
    _5_58211000000='558211000000' # Планы иных объектов недвижимости
    _5_58211010000='558211010000' # Технический план здания, сооружения, помещения либо объекта незавершённого строительства
    _5_58211020000='558211020000' # План участка лесного фонда
    _5_58211030000='558211030000' # План объекта недвижимости
    _5_58211040000='558211040000' # Экспликация к поэтажному плану
    _5_58212000000='558212000000' # Декларация об объекте недвижимости
    _5_58213000000='558213000000' # Кадастровый паспорт объекта недвижимости
    _5_58213010000='558213010000' # Кадастровый паспорт земельного участка
    _5_58213020000='558213020000' # Кадастровый паспорт помещения (выписка из ГКН)
    _5_58213030000='558213030000' # Кадастровый паспорт здания, сооружения, объекта незавершённого строительства
    _5_58214000000='558214000000' # Кадастровая выписка
    _5_58214010000='558214010000' # Кадастровая выписка о земельном участке
    _5_58214020000='558214020000' # Кадастровая выписка о здании, сооружении, объекте незавершённого строительства
    _5_58214030000='558214030000' # Кадастровая выписка о территориальной зоне, зоне с особыми условиями использования территории, территории объекта культурного наследия, включенного в единый государственный реестр объектов культурного наследия (памятников истории и культуры) народов Российской Федерации
    _5_58214040000='558214040000' # Кадастровая выписка о границах между субъектами Российской Федерации, границах муниципальных образований и границах населенных пунктов
    _5_58216000000='558216000000' # Документ, подтверждающий изменение назначения здания, помещения или сооружения, наименования сооружения
    _5_58217000000='558217000000' # Кадастровый план территории
    _5_58218000000='558218000000' # Кадастровая справка о кадастровой стоимости объекта недвижимости
    _5_58219000000='558219000000' # Акт обследования, подтверждающий прекращение существования объекта недвижимости
    _5_58220000000='558220000000' # Документы, в виде которых предоставляются сведения Единого государственного реестра
    _5_58220010000='558220010000' # Выписка из Реестра, содержащая относящиеся к информации ограниченного доступа сведения об объекте учета
    _5_58220020000='558220020000' # Справка, содержащая, внесённые в Единый государственный реестр сведения о прекращении существования объекта учёта
    _5_58220030000='558220030000' # Выписка из Реестра, подтверждающая факт отсутствия в Реестре сведений об объекте учета
    _5_58221000000='558221000000' # ПРОЧИЕ
    _5_58221010000='558221010000' # Решение о необходимости устранения кадастровой ошибки
    _5_58221020000='558221020000' # Международный договор Российской Федерации, в соответствии с которым установлено или изменено прохождение государственной границы Российской Федерации
    _5_58221030000='558221030000' # Документ, содержащий необходимые для внесения в государственный кадастр недвижимости сведения о границах между субъектами Российской Федерации, границах муниципального образования, границах населённого пункта
    _5_58221040000='558221040000' # Документ, содержащий необходимые для внесения в государственный кадастр недвижимости сведения об установлении или изменении территориальной зоны или зоны с особыми условиями использования территорий, либо об отмене установления такой зоны
    _5_58221050000='558221050000' # Решение о присвоении, изменении адреса
    _5_58221060000='558221060000' # Документы органов, осуществляющих ведение лесного и водного кадастра, содержащие сведения о природных объектах
    _5_58221070000='558221070000' # Документ, содержащий сведения об адресе объекта недвижимости
    _5_58221080000='558221080000' # Акт об утверждении результатов определения кадастровой стоимости
    _5_58221090000='558221090000' # Документы – основания внесения отметки, предусмотренной пунктом 14.1 части 2 статьи 7 221-ФЗ «О государственном кадастре недвижимости»
    _5_58221090100='558221090100' # Акт и (или) договор о предоставлении находящегося в государственной или муниципальной собственности участка под наемный дом
    _5_58221090200='558221090200' # Решение собственника земельного участка, находящегося в частной собственности, о строительстве наемного дома либо договор, заключенный для создания, эксплуатации наемного дома
    _5_58221090300='558221090300' # Акт о предоставлении участка для строительства наемного дома
    _5_58221090400='558221090400' # Акт о предоставлении участка для освоения территории в целях строительства и эксплуатации наемного дома
    _5_58221090500='558221090500' # Договор о предоставлении участка для строительства наемного дома
    _5_58221090600='558221090600' # Договор о предоставлении участка для освоения территории в целях строительства и эксплуатации наемного дома
    _5_58221090700='558221090700' # Решение собственника земельного участка, находящегося в частной собственности, о строительстве наемного дома
    _5_58221090800='558221090800' # Договор о предоставлении поддержки для создания и эксплуатации наемного дома социального использования
    _5_58221990000='558221990000' # Иной документ, содержащий описание объекта
    _5_58222000000='558222000000' # Документ, воспроизводящий сведения, содержащиеся в международном договоре Российской Федерации, в соответствии с которым установлено или изменено прохождение государственной границы Российской Федерации, а также сведения о федеральном законе, которым ратифицирован международный договор Российской Федерации, и об официальном опубликовании такого федерального закона
    _5_58223000000='558223000000' # Соглашение об изменении границ между субъектами Российской Федерации
    _5_58224000000='558224000000' # Закон субъекта Российской Федерации об установлении или изменении границ муниципальных образований либо о преобразовании муниципальных образований
    _5_58225000000='558225000000' # Акт уполномоченного органа об установлении или изменении границ населённых пунктов
    _5_58226000000='558226000000' # Документ, воспроизводящий необходимые для внесения в государственный кадастр недвижимости сведения о границах между субъектами Российской Федерации, границах муниципального образования, границах населённого пункта, содержащиеся в утверждённых органами власти документах
    _5_58227000000='558227000000' # Решение об установлении или изменении границ зон с особыми условиями использования территорий
    _5_58228000000='558228000000' # Правовой акт, которым утверждены или изменены правила землепользования и застройки
    _5_58229000000='558229000000' # Документ, подтверждающий изменение назначения помещения
    _5_58230000000='558230000000' # Решение о переводе жилого помещения в нежилое помещение, нежилого помещения в жилое помещение
    _5_58231000000='558231000000' # Акт приемочной комиссии, подтверждающий завершение переустройства и (или) перепланировки и (или) иных работ
    _5_58232000000='558232000000' # Документы, воспроизводящие сведения об изменении назначения помещения
    _5_58233000000='558233000000' # Документ, воспроизводящий сведения, содержащиеся в решении о переводе жилого помещения в нежилое помещение, нежилого помещения в жилое помещение
    _5_58234000000='558234000000' # Документ, воспроизводящий сведения, содержащиеся в акте приемочной комиссии, подтверждающем завершение переустройства и (или) перепланировки и (или) иных работ
    _5_58235000000='558235000000' # Документ, подтверждающий изменение назначения здания
    _5_58236000000='558236000000' # Документ, подтверждающий изменение назначения сооружения
    _5_58237000000='558237000000' # Решение о предоставлении разрешения на условно разрешенный вид использования
    _5_58238000000='558238000000' # Решение об определении (изменении) вида разрешенного использования
    _5_58239000000='558239000000' # Документ (копия), воспроизводящий сведения о предоставлении разрешения на условно разрешенный вид использования, об определении (изменении) вида разрешенного использования
    _5_58240000000='558240000000' # Документ, воспроизводящий сведения, содержащиеся в решении о присвоении, изменении адреса
    _5_58241000000='558241000000' # Документ, воспроизводящий содержащиеся в разрешении на ввод объекта капитального строительства в эксплуатацию сведения
    _5_58242000000='558242000000' # Документ, воспроизводящий сведения, содержащиеся в реестре объектов культурного наследия (памятников истории и культуры) народов Российской Федерации
    _5_58243000000='558243000000' # Документ, воспроизводящий сведения, содержащиеся в акте Правительства Российской Федерации об исключении объекта недвижимости из единого государственного реестра объектов культурного наследия (памятников истории и культуры) народов Российской Федерации
    _5_58244000000='558244000000' # Документ, содержащий сведения о дате поступления документов, предусмотренных статьей 17 Федерального закона "Об объектах культурного наследия (памятниках истории и культуры) народов Российской Федерации", в отношении объекта недвижимости
    _5_58245000000='558245000000' # Решение органа охраны объектов культурного наследия об отказе включить объект недвижимости в единый государственный реестр объектов культурного наследия (памятников истории и культуры) народов Российской Федерации
    _5_58246000000='558246000000' # Решение Правительства Российской Федерации об исключении объекта культурного наследия из единого государственного реестра объектов культурного наследия (памятников истории и культуры) народов Российской Федерации
    _5_58247000000='558247000000' # Документ, воспроизводящий сведения о наименовании водного объекта и установленных параметрах водоохранных зон и прибрежных защитных полос, зон затопления, подтопления и других зон с особыми условиями их использования
    _5_58248000000='558248000000' # Документ, воспроизводящий содержащиеся в государственном лесном реестре сведения в отношении лесного участка
    _5_58249000000='558249000000' # Документ, воспроизводящий сведения, содержащиеся во вступившем в силу акте об утверждении результатов определения кадастровой стоимости
    _5_58250000000='558250000000' # Документ, воспроизводящий сведения, содержащиеся в решении об установлении или изменении границ зон с особыми условиями использования территорий
    _5_58251000000='558251000000' # Документ, воспроизводящий сведения, содержащиеся в правовом акте, которым утверждены или изменены правила землепользования и застройки, включая сведения о территориальных зонах
    _5_58252000000='558252000000' # Карта (план) объекта землеустройства
    _5_58253000000='558253000000' # Декларация заинтересованного лица о выбранном виде разрешенного использования земельного участка
    _5_58254000000='558254000000' # Документы, определяющие (определявшие) в соответствии с законодательством Российской Федерации местоположение границ земельного участка (земельных участков)
    _5_58254010000='558254010000' # Землеустроительная документация
    _5_58254020000='558254020000' # Лесоустроительная документация
    _5_58254030000='558254030000' # Документы градостроительного зонирования (Правила землепользования и застройки)
    _5_58254040000='558254040000' # Документация по планировке территории (проекты межевания территорий), в т.ч. документ по планировке территории в планируемых границах искусственного земельного участка
    _5_58254040100='558254040100' # Проект межевания территории
    _5_58254040200='558254040200' # Решение об утверждении проекта межевания территории
    _5_58254040300='558254040300' # Документ, воспроизводящий сведения, содержащиеся в решении об утверждении проекта межевания территории
    _5_58254050000='558254050000' # Копия проекта межевания земельных участков
    _5_58254060000='558254060000' # Акт отвода земельных участков в натуре
    _5_58254070000='558254070000' # Проект границ земельных участков
    _5_58254080000='558254080000' # Проект (копии отдельных составных частей) организации и застройки территорий садоводческих, огороднических или дачных некоммерческих объединений граждан
    _5_58254090000='558254090000' # Проект (копии отдельных составных частей) перераспределения сельскохозяйственных угодий и иных земель сельскохозяйственного назначения
    _5_58254100000='558254100000' # Решение о предварительном согласовании мест размещения объектов
    _5_58254110000='558254110000' # Копия решения общего собрания участников долевой собственности на земельный участок из земель сельскохозяйственного назначения об утверждении проекта межевания земельных участков
    _5_58254120000='558254120000' # Копия документа, подтверждающего согласование проекта межевания земельного участка
    _5_58254130000='558254130000' # Возражения заинтересованных лиц по поводу местоположения границ земельного участка
    _5_58254140000='558254140000' # Документ, свидетельствующий о снятии возражений заинтересованных лиц по поводу местоположения границ земельного участка
    _5_58254150000='558254150000' # Схема расположения земельных участков на кадастровых планах или кадастровых картах соответствующих территорий
    _5_58254990000='558254990000' # Прочие документы, определяющие (определявшие) в соответствии с законодательством Российской Федерации местоположение границ земельного участка (земельных участков)
    _5_58255000000='558255000000' # Картографические материалы
    _5_58256000000='558256000000' # Материалы картографо-геодезического фонда
    _5_58257000000='558257000000' # Документы, устанавливающие предельные минимальные и максимальные размеры, соответствующие виду разрешенного использования земельного участка
    _5_58257010000='558257010000' # Федеральный закон
    _5_58257020000='558257020000' # Закон субъекта Российской Федерации
    _5_58257030000='558257030000' # Нормативный правовой акт органа местного самоуправления
    _5_58258000000='558258000000' # Документ, содержащий информацию о ранее присвоенных государственных учетных номерах объекта недвижимости
    _5_58259000000='558259000000' # Протокол образования земельных участков
    _5_58260000000='558260000000' # Чертеж (абрис) помещения
    _5_58261000000='558261000000' # Проектная документация здания
    _5_58262000000='558262000000' # Проектная документация сооружения
    _5_58263000000='558263000000' # Решение комиссии по рассмотрению споров о результатах определения кадастровой стоимости
    _5_58264000000='558264000000' # Решение суда
    _5_58265000000='558265000000' # Документ о редакционно-контрольном просмотре правильности отображения линии государственной границы Российской Федерации на картографических материалах, предназначенных для размещения на Публичной кадастровой карте
    _5_58266000000='558266000000' # Документ, содержащий сведения о лесах, водных объектах и об иных природных объектах
    _5_58267000000='558267000000' # Правовой акт, которым утвержден или изменен генеральный план
    _5_58268000000='558268000000' # Документ, воспроизводящий сведения, содержащиеся в правовом акте, которым утвержден или изменен генеральный план
    _5_58269000000='558269000000' # Решение о переводе земельного участка из одной категории земель
    _5_58270000000='558270000000' # Решение об отнесении земельного участка к определенной категории земель
    _5_58271000000='558271000000' # Документ, воспроизводящий сведения, содержащиеся в решении об отнесении земельного участка к определенной категории земель или о переводе земельного участка из одной категории земель в другую
    _5_58272000000='558272000000' # Документ об установлении (изменении) границ территории объекта культурного наследия или зон его охраны
    _5_58273000000='558273000000' # Текстовое и графическое описание местоположения границ территории объекта культурного наследия или зон его охраны с перечнем координат характерных точек этих границ
    _5_58274000000='558274000000' # Документ, воспроизводящий сведения о присвоении адресов объектам адресации, об изменении или аннулировании адресов объектов адресации
    _5_58275000000='558275000000' # Решение о включении объекта недвижимости в перечень выявленных объектов культурного наследия
    _5_58276000000='558276000000' # Решение об отказе во включении объекта в перечень выявленных объектов культурного наследия
    _5_58277000000='558277000000' # Решение о включении выявленного объекта культурного наследия в единый государственный реестр объектов культурного наследия (памятников истории и культуры) народов Российской Федерации
    _5_58278000000='558278000000' # Решение Правительства Российской Федерации о создании особой экономической зоны
    _5_58279000000='558279000000' # Решение Правительства Российской Федерации об увеличении площади такой особой экономической зоны
    _5_58280000000='558280000000' # Решение Правительства Российской Федерации о досрочном прекращении особой экономической зоны
    _5_58281000000='558281000000' # Соглашение о создании особой экономической зоны
    _5_58282000000='558282000000' # Документ, воспроизводящий сведения, содержащиеся в соглашении о создании особой экономической зоны или в решении об увеличении площади особой экономической зоны
    _5_58283000000='558283000000' # Документ, воспроизводящий сведения, содержащиеся в решении об увеличении площади особой экономической зоны
    _5_58284000000='558284000000' # Уведомление о досрочном прекращении существования особой экономической зоны
    _5_58285000000='558285000000' # Документ, воспроизводящий сведения о реквизитах акта или договора органа государственной власти или органа местного самоуправления, предусматривающих предоставление земельного участка для строительства либо освоения территории с целью строительства и эксплуатации наемного дома
    _5_58286000000='558286000000' # Описание местоположения границ особой экономической зоны
    _5_58299000000='558299000000' # Иной документ, содержащий описание объекта
    _5_58300000000='558300000000' # ДОКУМЕНТЫ, СОДЕРЖАЩИЕ ОПИСАНИЕ ЗАЯВИТЕЛЯ ИЛИ ЕГО ПРЕДСТАВИТЕЛЯ
    _5_58301000000='558301000000' # Документы, подтверждающие полномочия представителя
    _5_58301010000='558301010000' # Доверенность
    _5_58301020000='558301020000' # Свидетельство о рождении
    _5_58301030000='558301030000' # Свидетельство об усыновлении
    _5_58301040000='558301040000' # Решение суда
    _5_58301050000='558301050000' # Определение суда
    _5_58301060000='558301060000' # Протокол об избрании (единоличного исполнительного органа юридического лица)
    _5_58301070000='558301070000' # Выписка из протокола об избрании (единоличного исполнительного органа юридического лица)
    _5_58301080000='558301080000' # Приказ о назначении (руководителя или иного уполномоченного лица)
    _5_58301090000='558301090000' # Решение органов опеки и попечительства
    _5_58301100000='558301100000' # Договор коммерческого представительства
    _5_58301110000='558301110000' # Договор доверительного управления
    _5_58301120000='558301120000' # Постановление судебного пристава-исполнителя
    _5_58301130000='558301130000' # Протокол общего собрания
    _5_58301140000='558301140000' # Акт органа государственной власти или органа местного самоуправления, подтверждающий полномочия представителя заявителя
    _5_58301990000='558301990000' # Иной документ
    _5_58400000000='558400000000' # ДОКУМЕНТЫ О ПРАВАХ, СДЕЛКАХ, ОГРАНИЧЕНИЯХ (ОБРЕМЕНЕНИЯХ)
    _5_58401000000='558401000000' # Правоустанавливающие и правоудостоверяющие документы
    _5_58401010000='558401010000' # Договоры / соглашения
    _5_58401010100='558401010100' # Сделки об отчуждении
    _5_58401010101='558401010101' # Договор купли-продажи
    _5_58401010102='558401010102' # Договор мены
    _5_58401010103='558401010103' # Договор дарения
    _5_58401010104='558401010104' # Договор ренты
    _5_58401010105='558401010105' # Договор пожизненного содержания с иждивением
    _5_58401010106='558401010106' # Договор приватизации (договор передачи объекта недвижимости в собственность)
    _5_58401010200='558401010200' # Другие сделки
    _5_58401010201='558401010201' # Договор участия в долевом строительстве
    _5_58401010202='558401010202' # Соглашение об определении (перераспределении) долей в праве общей долевой собственности
    _5_58401010203='558401010203' # Брачный договор
    _5_58401010204='558401010204' # Соглашение об отступном
    _5_58401010205='558401010205' # Соглашение о разделе имущества
    _5_58401010206='558401010206' # Соглашение о выделе доли
    _5_58401010207='558401010207' # Инвестиционный договор (договор об инвестировании)
    _5_58401010208='558401010208' # Мировое соглашение
    _5_58401010209='558401010209' # Договор аренды (субаренды)
    _5_58401010210='558401010210' # Договор об ипотеке
    _5_58401010211='558401010211' # Договор безвозмездного срочного пользования земельным участком
    _5_58401010212='558401010212' # Кредитный договор
    _5_58401010213='558401010213' # Договор займа
    _5_58401010214='558401010214' # Соглашение об установлении сервитута
    _5_58401010215='558401010215' # Соглашение об изменении содержания закладной
    _5_58401010216='558401010216' # Дополнительное соглашение (соглашение об изменении условий договора) к договору
    _5_58401010217='558401010217' # Соглашение о расторжении договора
    _5_58401010218='558401010218' # Соглашение об уступке прав требования по договору (договор о передаче прав и обязанностей)
    _5_58401010219='558401010219' # Договор простого товарищества (договор о совместной деятельности)
    _5_58401010220='558401010220' # Государственный контракт
    _5_58401010299='558401010299' # Иная сделка
    _5_58401020000='558401020000' # Акты органов государственной власти или органов местного самоуправления
    _5_58401020100='558401020100' # Федеральный закон
    _5_58401020200='558401020200' # Указ Президента Российской Федерации
    _5_58401020300='558401020300' # Постановление Правительства Российской Федерации
    _5_58401020400='558401020400' # Закон (законы Российской Федерации, субъекта Российской Федерации)
    _5_58401020500='558401020500' # Документ о предоставлении земельных участков
    _5_58401020600='558401020600' # Решение об образовании земельных участков
    _5_58401020700='558401020700' # Акт об установлении сервитута
    _5_58401020800='558401020800' # Акт об установлении ограничения (обременения)
    _5_58401029900='558401029900' # Иные акты органов государственной власти или органов местного самоуправления
    _5_58401030000='558401030000' # Свидетельство о праве на наследство
    _5_58401030100='558401030100' # Свидетельство о праве на наследство по закону
    _5_58401030200='558401030200' # Свидетельство о праве на наследство по завещанию
    _5_58401040000='558401040000' # Вступившие в силу судебные акты
    _5_58401040100='558401040100' # Судебный акт, устанавливающий запрет на совершение действий в сфере государственного кадастрового учета в отношении объекта недвижимости
    _5_58401040200='558401040200' # Судебный акт о восстановлении аннулированных и исключенных из государственного кадастра недвижимости сведений об объекте недвижимости
    _5_58401040300='558401040300' # Судебный акт об установлении обременения (ограничении) в использовании объекта недвижимости (части объекта недвижимости)
    _5_58401049900='558401049900' # Иные предусмотренные законодательством судебные акты
    _5_58401050000='558401050000' # Акты (свидетельства) о правах на объекты недвижимости
    _5_58401050100='558401050100' # Регистрационное удостоверение
    _5_58401050200='558401050200' # Свидетельство о праве на землю
    _5_58401050300='558401050300' # Государственный акт о праве на землю
    _5_58401050400='558401050400' # Свидетельство о праве собственности
    _5_58401059900='558401059900' # Иные акты, свидетельства о правах на объекты недвижимости
    _5_58401060000='558401060000' # Документы на вновь возведенный (реконструированный) объект
    _5_58401060100='558401060100' # Разрешение на ввод объекта в эксплуатацию
    _5_58401060200='558401060200' # Разрешение на строительство
    _5_58401060300='558401060300' # Акт ввода в эксплуатацию
    _5_58401060400='558401060400' # Копия решения о создании искусственного земельного участка
    _5_58401070000='558401070000' # Документы при упрощенном порядке оформления прав граждан на отдельные объекты недвижимого имущества
    _5_58401070100='558401070100' # Выписка из похозяйственной книги о наличии у гражданина права на земельный участок
    _5_58401070200='558401070200' # Кадастровый паспорт объекта недвижимости
    _5_58401070300='558401070300' # Декларация об объекте недвижимого имущества
    _5_58401080000='558401080000' # Прочие правоустанавливающие документы
    _5_58401080100='558401080100' # Передаточный акт
    _5_58401080200='558401080200' # Разделительный баланс
    _5_58401080300='558401080300' # План приватизации
    _5_58401080400='558401080400' # Правила доверительного управления
    _5_58401080500='558401080500' # Акт описи и ареста имущества
    _5_58401080600='558401080600' # Протокол о выделе земельного участка в счет земельной доли
    _5_58401080700='558401080700' # Протокол общего собрания собственников помещений в многоквартирном доме
    _5_58401080800='558401080800' # Отказ одаряемого принять дар (отказ от дара)
    _5_58401080900='558401080900' # Соглашение о новации
    _5_58401081000='558401081000' # Соглашение о разделе наследственного имущества
    _5_58401081100='558401081100' # Соглашение об уплате алиментов
    _5_58401081200='558401081200' # Документ, подтверждающий наличие, возникновение, переход ограничения (обременения) вещного права на объект недвижимости в пользу заявителя
    _5_58401089900='558401089900' # Иной документ
    _5_58402000000='558402000000' # СОПУТСТВУЮЩИЕ И ДОПОЛНИТЕЛЬНЫЕ ДОКУМЕНТЫ
    _5_58402010000='558402010000' # Согласие супруга на совершение сделки
    _5_58402020000='558402020000' # Согласие органов опеки и попечительства
    _5_58402030000='558402030000' # Свидетельство о заключении брака
    _5_58402040000='558402040000' # Свидетельство о расторжении брака
    _5_58402050000='558402050000' # Решение об одобрении (о совершении) сделки
    _5_58402060000='558402060000' # Справка о стоимости (справка о соотношении стоимости отчуждаемого объекта и балансовой стоимости имущества или активов хозяйственного общества)
    _5_58402070000='558402070000' # Справка о заинтересованных лицах в сделке
    _5_58402080000='558402080000' # Выписка из домовой книги (сведения о лицах, сохраняющих право проживания в жилом помещении после перехода права на него)
    _5_58402090000='558402090000' # Выписка из лицевого счета (сведения о лицах, сохраняющих право проживания в жилом помещении после перехода права на него)
    _5_58402100000='558402100000' # Протокол о результатах торгов
    _5_58402110000='558402110000' # Лицензия (лицензия на осуществление определенных видов деятельности)
    _5_58402120000='558402120000' # Проектная декларация
    _5_58402130000='558402130000' # Отказ от преимущественного права покупки (для участников долевой собственности, для субъекта Российской Федерации при продаже земельного участка из состава земель сельскохозяйственного назначения)
    _5_58402140000='558402140000' # Решение о создании юридического лица
    _5_58402150000='558402150000' # Решение о реорганизации юридического лица
    _5_58402160000='558402160000' # Решение о ликвидации юридического лица
    _5_58402170000='558402170000' # Решение об утверждении оценки имущества (решение об утверждении оценки неденежных вкладов в уставный капитал общества)
    _5_58402180000='558402180000' # Исполнительный лист
    _5_58402190000='558402190000' # Договор поручения
    _5_58402200000='558402200000' # Бухгалтерский баланс
    _5_58402210000='558402210000' # Закладная
    _5_58402220000='558402220000' # Добавочный лист к закладной
    _5_58402230000='558402230000' # Выписка из реестра муниципальной собственности
    _5_58402240000='558402240000' # Выписка из реестра собственности субъекта Российской Федерации
    _5_58402250000='558402250000' # Выписка из реестра федерального имущества
    _5_58402260000='558402260000' # Жилищный сертификат
    _5_58402270000='558402270000' # Аудиторское заключение
    _5_58402280000='558402280000' # Отчет о проведении независимой оценки (акт оценки)
    _5_58402390000='558402390000' # Акт инвентаризации
    _5_58402400000='558402400000' # Охранное обязательство собственника объекта культурного наследия
    _5_58402990000='558402990000' # Иной документ
    _5_58403000000='558403000000' # ДОКУМЕНТЫ, СОДЕРЖАЩИЕ СВЕДЕНИЯ ЕГРП
    _5_58403010000='558403010000' # Свидетельство о государственной регистрации права
    _5_58403020000='558403020000' # Выписка о правах на объект недвижимого имущества
    _5_58403030000='558403030000' # Выписка о переходе прав на объект недвижимого имущества
    _5_58403040000='558403040000' # Выписка о правах отдельного лица на имеющиеся у него объекты недвижимого имущества
    _5_58403050000='558403050000' # Выписка о признании правообладателя недееспособным или ограниченно дееспособным
    _5_58403060000='558403060000' # Справка о содержании правоустанавливающих документов на объект недвижимого имущества
    _5_58403070000='558403070000' # Справка о лицах, получивших сведения об объекте недвижимого имущества
    _5_58403080000='558403080000' # Копии договоров и иных документов, выражающих содержание односторонних сделок, совершенных в простой письменной форме
    _5_58403090000='558403090000' # Выписка из ЕГРП о принятии на учёт бесхозяйного объекта недвижимого имущества
    _5_58403100000='558403100000' # Выписка из ЕГРП о принятии на учёт бесхозяйного объекта недвижимого имущества, от права собственности на который собственник отказался
    _5_58403110000='558403110000' # Выписка из ЕГРП о бесхозяйном объекте недвижимого имущества, принятом на учёт
    _5_58403120000='558403120000' # Выписка из единого государственного реестра прав на недвижимое имущество и сделок с ним, удостоверяющая проведение государственной регистрации возникновения и (или) перехода прав на недвижимое имущество
    _5_58403990000='558403990000' # Иной документ
    _5_58404000000='558404000000' # Соглашения и согласия об образовании земельных участков
    _5_58404010000='558404010000' # Соглашение о разделе, об объединении, о перераспределении земельных участков или о выделе из земельных участков
    _5_58404020000='558404020000' # Согласие на образование земельных участков
    _5_58404030000='558404030000' # Соглашение об образовании общей долевой собственности на земельный участок, образуемый при выделе его в счет земельной доли или земельных долей
    _5_58404040000='558404040000' # Соглашение об образовании общей совместной собственности на земельный участок, образуемый при выделе его в счет земельной доли или земельных долей
    _5_58405000000='558405000000' # Документы, подтверждающие возникновение права собственности в отношении земельного участка в силу федерального закона вне зависимости от момента государственной регистрации этого права в ЕГРП
    _5_58405010000='558405010000' # Копия решения о безвозмездной передаче военного недвижимого имущества из федеральной собственности в собственность субъекта Российской Федерации - города федерального значения Москвы или Санкт-Петербурга либо муниципальную собственность
    _5_58405020000='558405020000' # Подлинник или копия письма органа исполнительной власти субъекта Российской Федерации - города федерального значения Москвы или Санкт-Петербурга либо органа местного самоуправления муниципального образования о согласовании границ образуемого земельного участка с приложением согласованного проекта границ земельного участка в случае, если акт согласования границ земельного участка не заверен подписью уполномоченного должностного лица соответствующего органа
    _5_58405030000='558405030000' # Решение об изъятии земельных участков и (или) расположенных на них иных объектов недвижимого имущества в целях размещения олимпийских объектов
    _5_58405040000='558405040000' # Копия акта приема-передачи объектов недвижимого имущества, в отношении которых принято решение об изъятии в целях размещения олимпийских объектов
    _5_58405990000='558405990000' # Иные документы, подтверждающие возникновение права собственности в отношении земельного участка в силу федерального закона вне зависимости от момента государственной регистрации этого права в ЕГРП
    _5_58500000000='558500000000' # Решения, уведомления, расписки
    _5_58501000000='558501000000' # Документы о результатах государственного кадастрового учёта
    _5_58501010000='558501010000' # РЕШЕНИЯ
    _5_58501010100='558501010100' # Решение об отказе в предоставлении запрашиваемых сведений
    _5_58501010200='558501010200' # Решение об отказе в исправлении кадастровой ошибки
    _5_58501010300='558501010300' # Решение об отказе в исправлении технической ошибки
    _5_58501010400='558501010400' # Решение об исправлении технической и кадастровой ошибок
    _5_58501010500='558501010500' # Решение об отказе в осуществлении кадастровой процедуры
    _5_58501010600='558501010600' # Решение о приостановлении осуществления кадастровой процедуры
    _5_58501010700='558501010700' # Решение об отказе в снятии приостановления
    _5_58501010800='558501010800' # Решение о снятии с кадастрового учёта земельных участков со статусом «временные» по заявлению заинтересованного лица
    _5_58501010900='558501010900' # Решение об отказе в выдаче кадастрового паспорта
    _5_58501011000='558501011000' # Решение об осуществлении кадастровой процедуры
    _5_58501011100='558501011100' # Решение об аннулировании кадастровых сведений
    _5_58501011200='558501011200' # Решение об отклонении заявления об исправлении технической ошибки
    _5_58501011300='558501011300' # Решение о внесении записи о наличии возражения
    _5_58501011400='558501011400' # Решение о погашении записи о наличии возражения
    _5_58501011500='558501011500' # Решение о внесении записи о заявлении о невозможности государственной регистрации
    _5_58501011600='558501011600' # Решение о погашении записи о заявлении о невозможности государственной регистрации
    _5_58501011700='558501011700' # Решение о необходимости устранения кадастровой ошибки в сведениях ГКН
    _5_58501011701='558501011701' # Решение о необходимости устранения кадастровой ошибки в сведениях ГКН о местоположении границ земельного участка
    _5_58501020000='558501020000' # УВЕДОМЛЕНИЯ
    _5_58501020100='558501020100' # Уведомление об отсутствии в ГКН запрашиваемых сведений
    _5_58501020200='558501020200' # Уведомление об осуществлённом кадастровом учёте
    _5_58501020300='558501020300' # Уведомление об отказе в приеме документов для внесения в Единый государственный реестр объектов капитального строительства (далее - Единый государственный реестр) сведений об ОКС
    _5_58501020400='558501020400' # Уведомление об отказе в приеме документов для предоставления из Единого государственного реестра сведений об ОКС
    _5_58501020500='558501020500' # Уведомление об устранении технической ошибки в сведениях ГКН
    _5_58501020600='558501020600' # Уведомление об отказе в выдаче сведений об ОКС
    _5_58501020700='558501020700' # Уведомление о приостановлении осуществления кадастровой процедуры
    _5_58501020800='558501020800' # Уведомление об отказе в осуществлении кадастровой процедуры
    _5_58501020900='558501020900' # Уведомление о регистрации права
    _5_58501021000='558501021000' # Уведомление о приостановлении принятия на учёт имущества в качестве бесхозяйного
    _5_58501021100='558501021100' # Сообщение об отказе в принятии на учёт имущества в качестве бесхозяйного
    _5_58501021200='558501021200' # Уведомление о снятии с учёта имущества в качестве бесхозяйного
    _5_58501021300='558501021300' # Уведомление о возврате заявления о наличии возражения в отношении зарегистрированного права на объект недвижимости без рассмотрения
    _5_58501021400='558501021400' # Уведомление о неполучении и нерассмотрении запроса о предоставлении сведений ГКН
    _5_58501030000='558501030000' # ПРОЧИЕ
    _5_58501030100='558501030100' # Расписка в получении соответствующих документов для проведения государственного кадастрового учёта
    _5_58501030200='558501030200' # Протокол проверки документов
    _5_58501030300='558501030300' # Акт определения кадастровой стоимости земельных участков
    _5_58501030400='558501030400' # Протокол выявления технической ошибки
    _5_58501030500='558501030500' # Акт определения кадастровой стоимости объектов недвижимости
    _5_58501030600='558501030600' # Протокол выявления кадастровой ошибки
    _5_58501030601='558501030601' # Протокол выявления кадастровой ошибки в сведениях ГКН о местоположении границ земельного участка
    _5_58501030700='558501030700' # Документ, содержащий сведения о расчете среднего (взвешенного по площади) значения УПКС помещений
    _5_58501030800='558501030800' # Протокол проверок сведений о земельных участках (верификация)
    _5_58501030900='558501030900' # Протокол проверок сведений о зданиях, сооружениях, помещениях, объектах незавершенного строительства (верификация)
    _5_58501031000='558501031000' # Протокол проверок пространственных данных кадастра (верификация)
    _5_58501039900='558501039900' # Иные документы
    _5_58502000000='558502000000' # ДОКУМЕНТЫ О РЕЗУЛЬТАТАХ РЕГИСТРАЦИИ ПРАВ
    _5_58502010000='558502010000' # УВЕДОМЛЕНИЯ, СООБЩЕНИЯ
    _5_58502010100='558502010100' # Уведомление о приостановлении государственной регистрации прав
    _5_58502010200='558502010200' # Уведомление о прекращении государственной регистрации прав
    _5_58502010300='558502010300' # Уведомление о зарегистрированных ограничениях (обременениях) прав
    _5_58502010400='558502010400' # Уведомление о внесении изменений в ЕГРП
    _5_58502010500='558502010500' # Уведомление об исправлении технической ошибки в записях единого государственного реестра прав на недвижимое имущество и сделок с ним
    _5_58502010600='558502010600' # Сообщение об отказе в государственной регистрации прав
    _5_58502010700='558502010700' # Сообщение об отказе в предоставлении сведений из ЕГРП
    _5_58502010800='558502010800' # Уведомление об отсутствии в ЕГРП запрашиваемых сведений
    _5_58502010900='558502010900' # Сообщение о приёме заявления о государственной регистрации права, ограничения (обременения) права на предприятие, сделки с ним
    _5_58502011000='558502011000' # Сообщение о поступлении документов на государственную регистрацию договоров мены и (или) перехода права
    _5_58502011100='558502011100' # Уведомление о возврате приложенных к заявлению документов без рассмотрения
    _5_58502011200='558502011200' # Уведомление о государственной регистрации прекращения ограничения (обременения)
    _5_58502011300='558502011300' # Уведомление об отсутствии сведений о лицах, получивших сведения об объектах недвижимого имущества
    _5_58502011400='558502011400' # Уведомление о государственной регистрации права собственности субъекта Российской Федерации или муниципального образования на земельный участок или земельную долю вследствие отказа от соответствующего права правообладателем
    _5_58502011500='558502011500' # Уведомление о поступлении решения суда, вступившего в законную силу, с указанием срока окончания осуществления государственной регистрации прав, в случае если отказ в государственной регистрации прав признан судом необоснованным
    _5_58502011600='558502011600' # Уведомление о внесении изменений в единый государственный реестр прав на недвижимое имущество и сделок с ним в связи с изменением содержащихся в базовых государственных информационных ресурсах сведений о правообладателе (правообладателях)
    _5_58502011700='558502011700' # Уведомление о возврате документов без рассмотрения при отказе в осуществлении государственного кадастрового учета
    _5_58502011800='558502011800' # Уведомление о неполучении и нерассмотрении запроса о предоставлении сведений ЕГРП
    _5_58502011900='558502011900' # Уведомление о непринятии заявления и документов, необходимых для государственной регистрации прав, к рассмотрению.
    _5_58502020000='558502020000' # ПРОЧИЕ
    _5_58502020100='558502020100' # Расписка в получении документов на государственную регистрацию прав
    _5_58502029900='558502029900' # Иной документ
    _5_58601000000='558601000000' # Расписка в получении извещений о проведении собрания о согласовании местоположения границ
    _5_58602000000='558602000000' # Уведомление о вручении извещения о проведении собрания о согласовании местоположения границ
    _5_58603000000='558603000000' # Копия страницы печатного издания, содержащей извещение о проведении собрания о согласовании местоположения границ земельного участка, включая первый лист, содержащего реквизиты такого печатного издания
    _5_58699000000='558699000000' # Иные документы, свидетельствующие о соблюдении установленного порядка извещения заинтересованных лиц о проведении собрания о согласовании местоположения границ земельного участка


class dAllowedUse(str, Enum):
    """dAllowedUse -- К
    л
    а
    с
    с
    и
    ф
    и
    к
    а
    т
    о
    р
    в
    и
    д
    о
    в
    р
    а
    з
    р
    е
    ш
    е
    н
    н
    о
    г
    о
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    з
    е
    м
    е
    л
    ь
    н
    ы
    х
    у
    ч
    а
    с
    т
    к
    о
    в
    
    """
    _2_14001000000='214001000000' # Сельскохозяйственное использование
    _2_14001001000='214001001000' # Растениеводство
    _2_14001001001='214001001001' # Выращивание зерновых и иных сельскохозяйственных культур
    _2_14001001002='214001001002' # Овощеводство
    _2_14001001003='214001001003' # Выращивание тонизирующих, лекарственных, цветочных культур
    _2_14001001004='214001001004' # Садоводство
    _2_14001001005='214001001005' # Выращивание льна и конопли
    _2_14001002000='214001002000' # Животноводство
    _2_14001002001='214001002001' # Скотоводство
    _2_14001002002='214001002002' # Звероводство
    _2_14001002003='214001002003' # Птицеводство
    _2_14001002004='214001002004' # Свиноводство
    _2_14001003000='214001003000' # Пчеловодство
    _2_14001004000='214001004000' # Рыбоводство
    _2_14001005000='214001005000' # Научное обеспечение сельского хозяйства
    _2_14001006000='214001006000' # Хранение и переработка сельскохозяйственной продукции
    _2_14001007000='214001007000' # Ведение личного подсобного хозяйства на полевых участках
    _2_14001008000='214001008000' # Питомники
    _2_14001009000='214001009000' # Обеспечение сельскохозяйственного производства
    _2_14002000000='214002000000' # Жилая застройка
    _2_14002001000='214002001000' # Для индивидуального жилищного строительства
    _2_14002001001='214002001001' # Малоэтажная многоквартирная жилая застройка
    _2_14002002000='214002002000' # Для ведения личного подсобного хозяйства
    _2_14002003000='214002003000' # Блокированная жилая застройка
    _2_14002004000='214002004000' # Передвижное жилье
    _2_14002005000='214002005000' # Среднеэтажная жилая застройка
    _2_14002006000='214002006000' # Многоэтажная жилая застройка (высотная застройка)
    _2_14002007000='214002007000' # Обслуживание жилой застройки
    _2_14002007001='214002007001' # Объекты гаражного назначения
    _2_14003000000='214003000000' # Общественное использование объектов капитального строительства
    _2_14003001000='214003001000' # Коммунальное обслуживание
    _2_14003002000='214003002000' # Социальное обслуживание
    _2_14003003000='214003003000' # Бытовое обслуживание
    _2_14003004000='214003004000' # Здравоохранение
    _2_14003004001='214003004001' # Амбулаторно-поликлиническое обслуживание
    _2_14003004002='214003004002' # Стационарное медицинское обслуживание
    _2_14003005000='214003005000' # Образование и просвещение
    _2_14003005001='214003005001' # Дошкольное, начальное и среднее общее образование
    _2_14003005002='214003005002' # Среднее и высшее профессиональное образование
    _2_14003006000='214003006000' # Культурное развитие
    _2_14003007000='214003007000' # Религиозное использование
    _2_14003008000='214003008000' # Общественное управление
    _2_14003009000='214003009000' # Обеспечение научной деятельности
    _2_14003009001='214003009001' # Обеспечение деятельности в области гидрометеорологии и смежных с ней областях
    _2_14003010000='214003010000' # Ветеринарное обслуживание
    _2_14003010001='214003010001' # Амбулаторное ветеринарное обслуживание
    _2_14003010002='214003010002' # Приюты для животных
    _2_14004000000='214004000000' # Предпринимательство
    _2_14004001000='214004001000' # Деловое управление
    _2_14004002000='214004002000' # Объекты торговли (торговые центры, торгово-развлекательные центры (комплексы)
    _2_14004003000='214004003000' # Рынки
    _2_14004004000='214004004000' # Магазины
    _2_14004005000='214004005000' # Банковская и страховая деятельность
    _2_14004006000='214004006000' # Общественное питание
    _2_14004007000='214004007000' # Гостиничное обслуживание
    _2_14004008000='214004008000' # Развлечения
    _2_14004009000='214004009000' # Обслуживание автотранспорта
    _2_14004009001='214004009001' # Объекты придорожного сервиса
    _2_14004010000='214004010000' # Выставочно-ярмарочная деятельность
    _2_14005000000='214005000000' # Отдых (рекреация)
    _2_14005001000='214005001000' # Спорт
    _2_14005002000='214005002000' # Природно-познавательный туризм
    _2_14005002001='214005002001' # Туристическое обслуживание
    _2_14005003000='214005003000' # Охота и рыбалка
    _2_14005004000='214005004000' # Причалы для маломерных судов
    _2_14005005000='214005005000' # Поля для гольфа или конных прогулок
    _2_14006000000='214006000000' # Производственная деятельность
    _2_14006001000='214006001000' # Недропользование
    _2_14006002000='214006002000' # Тяжелая промышленность
    _2_14006002001='214006002001' # Автомобилестроительная промышленность
    _2_14006003000='214006003000' # Легкая промышленность
    _2_14006003001='214006003001' # Фармацевтическая промышленность
    _2_14006004000='214006004000' # Пищевая промышленность
    _2_14006005000='214006005000' # Нефтехимическая промышленность
    _2_14006006000='214006006000' # Строительная промышленность
    _2_14006007000='214006007000' # Энергетика
    _2_14006007001='214006007001' # Атомная энергетика
    _2_14006008000='214006008000' # Связь
    _2_14006009000='214006009000' # Склады
    _2_14007000000='214007000000' # Обеспечение космической деятельности
    _2_14006011000='214006011000' # Целлюлозно-бумажная промышленность
    _2_14008000000='214008000000' # Транспорт
    _2_14008001000='214008001000' # Железнодорожный транспорт
    _2_14008002000='214008002000' # Автомобильный транспорт
    _2_14008003000='214008003000' # Водный транспорт
    _2_14008004000='214008004000' # Воздушный транспорт
    _2_14008005000='214008005000' # Трубопроводный транспорт
    _2_14009000000='214009000000' # Обеспечение обороны и безопасности
    _2_14010000000='214010000000' # Обеспечение вооруженных сил
    _2_14011000000='214011000000' # Охрана Государственной границы Российской Федерации
    _2_14012000000='214012000000' # Обеспечение внутреннего правопорядка
    _2_14013000000='214013000000' # Обеспечение деятельности по исполнению наказаний
    _2_14014000000='214014000000' # Деятельность по особой охране и изучению природы
    _2_14015000000='214015000000' # Охрана природных территорий
    _2_14016000000='214016000000' # Курортная деятельность
    _2_14016001000='214016001000' # Санаторная деятельность
    _2_14017000000='214017000000' # Историко-культурная деятельность
    _2_14018000000='214018000000' # Использование лесов
    _2_14018001000='214018001000' # Заготовка древесины
    _2_14018002000='214018002000' # Лесные плантации
    _2_14018003000='214018003000' # Заготовка лесных ресурсов
    _2_14018004000='214018004000' # Резервные леса
    _2_14019000000='214019000000' # Водные объекты
    _2_14020000000='214020000000' # Общее пользование водными объектами
    _2_14021000000='214021000000' # Специальное пользование водными объектами
    _2_14022000000='214022000000' # Гидротехнические сооружения
    _2_14023000000='214023000000' # Земельные участки (территории) общего пользования
    _2_14024000000='214024000000' # Ритуальная деятельность
    _2_14025000000='214025000000' # Специальная деятельность
    _2_14026000000='214026000000' # Запас
    _2_14027001000='214027001000' # Ведение огородничества
    _2_14027002000='214027002000' # Ведение садоводства
    _2_14027003000='214027003000' # Ведение дачного хозяйства
    _2_14099000000='214099000000' # Сведения отсутствуют


class dApartmentType(str, Enum):
    """dApartmentType -- Т
    и
    п
    а
    д
    р
    е
    с
    н
    о
    г
    о
    э
    л
    е
    м
    е
    н
    т
    а
    ч
    е
    т
    в
    е
    р
    т
    о
    г
    о
    у
    р
    о
    в
    н
    я
    
    """
    КВ='кв' # Квартира
    БОКС='бокс' # Бокс
    К='к' # Комната
    ПОМ='пом' # Помещение


class dAssBuilding(str, Enum):
    """dAssBuilding -- Н
    а
    з
    н
    а
    ч
    е
    н
    и
    е
    з
    д
    а
    н
    и
    й
    
    """
    _2_04001000000='204001000000' # Нежилое здание
    _2_04002000000='204002000000' # Жилой дом
    _2_04003000000='204003000000' # Многоквартирный дом


class dCategories(str, Enum):
    """dCategories -- К
    а
    т
    е
    г
    о
    р
    и
    и
    з
    е
    м
    е
    л
    ь
    
    """
    _0_03001000000='003001000000' # Земли сельскохозяйственного назначения
    _0_03002000000='003002000000' # Земли населённых пунктов
    _0_03003000000='003003000000' # Земли промышленности, энергетики, транспорта, связи, радиовещания, телевидения, информатики, земли для обеспечения космической деятельности, земли обороны, безопасности и земли иного специального назначения
    _0_03004000000='003004000000' # Земли особо охраняемых территорий и объектов
    _0_03005000000='003005000000' # Земли лесного фонда
    _0_03006000000='003006000000' # Земли водного фонда
    _0_03007000000='003007000000' # Земли запаса
    _0_03008000000='003008000000' # Категория не установлена


class dGeopointOpred(str, Enum):
    """dGeopointOpred -- М
    е
    т
    о
    д
    ы
    о
    п
    р
    е
    д
    е
    л
    е
    н
    и
    я
    к
    о
    о
    р
    д
    и
    н
    а
    т
    х
    а
    р
    а
    к
    т
    е
    р
    н
    ы
    х
    т
    о
    ч
    е
    к
    
    """
    _6_92001000000='692001000000' # Геодезический метод
    _6_92002000000='692002000000' # Фотограмметрический метод
    _6_92003000000='692003000000' # Картометрический метод
    _6_92004000000='692004000000' # Иное описание
    _6_92005000000='692005000000' # Метод спутниковых геодезических измерений (определений)
    _6_92006000000='692006000000' # Аналитический метод


class dLocationLevel1Type(str, Enum):
    """dLocationLevel1Type -- Т
    и
    п
    а
    д
    р
    е
    с
    н
    о
    г
    о
    э
    л
    е
    м
    е
    н
    т
    а
    п
    е
    р
    в
    о
    г
    о
    у
    р
    о
    в
    н
    я
    
    """
    Д='д' # Дом
    ГСК='ГСК' # Гаражно-строительный кооператив
    КАЗАРМА='казарма' # казарма
    УЧ='уч' # Участок
    ВЛ='вл' # Владение
    БОКС='бокс' # бокс
    ВЧ='в/ч' # военная часть
    СООРУЖЕНИЕ='сооружение' # сооружение


class dLocationLevel2Type(str, Enum):
    """dLocationLevel2Type -- Т
    и
    п
    а
    д
    р
    е
    с
    н
    о
    г
    о
    э
    л
    е
    м
    е
    н
    т
    а
    в
    т
    о
    р
    о
    г
    о
    у
    р
    о
    в
    н
    я
    
    """
    КОРП='корп' # Корпус
    Д='д' # Дом
    УЧ='уч' # Участок
    ВЛ='вл' # Владение
    ГАРАЖ='гараж' # Гараж
    БОКС='бокс' # бокс
    СТРОЕНИЕ='строение' # строение
    СООРУЖЕНИЕ='сооружение' # сооружение


class dLocationLevel3Type(str, Enum):
    """dLocationLevel3Type -- Т
    и
    п
    а
    д
    р
    е
    с
    н
    о
    г
    о
    э
    л
    е
    м
    е
    н
    т
    а
    т
    р
    е
    т
    ь
    е
    г
    о
    у
    р
    о
    в
    н
    я
    
    """
    СТРОЕН='строен' # Строение
    КОРП='корп' # Корпус
    БЛОК='блок' # Блок
    ЛИТЕРА='литера' # литера


class dParcels(str, Enum):
    """dParcels -- В
    и
    д
    з
    е
    м
    е
    л
    ь
    н
    о
    г
    о
    у
    ч
    а
    с
    т
    к
    а
    .
    
    """
    _0_1='01' # Землепользование
    _0_2='02' # Единое землепользование
    _0_3='03' # Обособленный участок
    _0_4='04' # Условный участок
    _0_5='05' # Многоконтурный участок
    _0_6='06' # Значение отсутствует


class dPermitUse(str, Enum):
    """dPermitUse -- В
    и
    д
    ы
    р
    а
    з
    р
    е
    ш
    е
    н
    н
    о
    г
    о
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    
    """
    _1='1' # Основной
    _2='2' # Условно разрешенный
    _3='3' # Вспомогательный


class dRealty(str, Enum):
    """dRealty -- В
    и
    д
    ы
    о
    б
    ъ
    е
    к
    т
    о
    в
    г
    о
    с
    у
    д
    а
    р
    с
    т
    в
    е
    н
    н
    о
    г
    о
    к
    а
    д
    а
    с
    т
    р
    а
    н
    е
    д
    в
    и
    ж
    и
    м
    о
    с
    т
    и
    (
    Г
    К
    Н
    )
    и
    Е
    д
    и
    н
    о
    г
    о
    г
    о
    с
    у
    д
    а
    р
    с
    т
    в
    е
    н
    н
    о
    г
    о
    р
    е
    е
    с
    т
    р
    а
    п
    р
    а
    в
    н
    а
    н
    е
    д
    в
    и
    ж
    и
    м
    о
    е
    и
    м
    у
    щ
    е
    с
    т
    в
    о
    и
    с
    д
    е
    л
    о
    к
    с
    н
    и
    м
    (
    Е
    Г
    Р
    П
    )
    
    """
    _0_02001000000='002001000000' # Объекты учёта и регистрации
    _0_02001001000='002001001000' # Земельный участок
    _0_02001002000='002001002000' # Здание
    _0_02001003000='002001003000' # Помещение
    _0_02001004000='002001004000' # Сооружение
    _0_02001004001='002001004001' # Линейное сооружение, расположенное более чем в одном кадастровом округе
    _0_02001004002='002001004002' # Условная часть линейного сооружения
    _0_02001005000='002001005000' # Объект незавершённого строительства
    _0_02001006000='002001006000' # Предприятие как имущественный комплекс (ПИК)
    _0_02001007000='002001007000' # Участок недр
    _0_02001008000='002001008000' # Единый недвижимый комплекс
    _0_02002000000='002002000000' # Границы
    _0_02002001000='002002001000' # Государственная граница Российской Федерации
    _0_02002002000='002002002000' # Граница между субъектами Российской Федерации
    _0_02002003000='002002003000' # Граница муниципального образования
    _0_02002004000='002002004000' # Граница населённого пункта
    _0_02003000000='002003000000' # Зоны
    _0_02003001000='002003001000' # Зона с особыми условиями использования территорий
    _0_02003002000='002003002000' # Территориальная зона
    _0_02003003000='002003003000' # Особая экономическая зона
    _0_02004000000='002004000000' # Территория объекта культурного наследия


class dRegionsRF(str, Enum):
    """dRegionsRF -- С
    у
    б
    ъ
    е
    к
    т
    ы
    Р
    Ф
    
    """
    _0_1='01' # Республика Адыгея (Адыгея)
    _0_2='02' # Республика Башкортостан
    _0_3='03' # Республика Бурятия
    _0_4='04' # Республика Алтай
    _0_5='05' # Республика Дагестан
    _0_6='06' # Республика Ингушетия
    _0_7='07' # Кабардино-Балкарская Республика
    _0_8='08' # Республика Калмыкия
    _0_9='09' # Карачаево-Черкесская Республика
    _1_0='10' # Республика Карелия
    _1_1='11' # Республика Коми
    _1_2='12' # Республика Марий Эл
    _1_3='13' # Республика Мордовия
    _1_4='14' # Республика Саха (Якутия)
    _1_5='15' # Республика Северная Осетия-Алания
    _1_6='16' # Республика Татарстан (Татарстан)
    _1_7='17' # Республика Тыва
    _1_8='18' # Удмуртская Республика
    _1_9='19' # Республика Хакасия
    _2_0='20' # Чеченская Республика
    _2_1='21' # Чувашская Республика-Чувашия
    _2_2='22' # Алтайский край
    _2_3='23' # Краснодарский край
    _2_4='24' # Красноярский край
    _2_5='25' # Приморский край
    _2_6='26' # Ставропольский край
    _2_7='27' # Хабаровский край
    _2_8='28' # Амурская область
    _2_9='29' # Архангельская область
    _3_0='30' # Астраханская область
    _3_1='31' # Белгородская область
    _3_2='32' # Брянская область
    _3_3='33' # Владимирская область
    _3_4='34' # Волгоградская область
    _3_5='35' # Вологодская область
    _3_6='36' # Воронежская область
    _3_7='37' # Ивановская область
    _3_8='38' # Иркутская область
    _3_9='39' # Калининградская область
    _4_0='40' # Калужская область
    _4_1='41' # Камчатский край
    _4_2='42' # Кемеровская область
    _4_3='43' # Кировская область
    _4_4='44' # Костромская область
    _4_5='45' # Курганская область
    _4_6='46' # Курская область
    _4_7='47' # Ленинградская область
    _4_8='48' # Липецкая область
    _4_9='49' # Магаданская область
    _5_0='50' # Московская область
    _5_1='51' # Мурманская область
    _5_2='52' # Нижегородская область
    _5_3='53' # Новгородская область
    _5_4='54' # Новосибирская область
    _5_5='55' # Омская область
    _5_6='56' # Оренбургская область
    _5_7='57' # Орловская область
    _5_8='58' # Пензенская область
    _5_9='59' # Пермский край
    _6_0='60' # Псковская область
    _6_1='61' # Ростовская область
    _6_2='62' # Рязанская область
    _6_3='63' # Самарская область
    _6_4='64' # Саратовская область
    _6_5='65' # Сахалинская область
    _6_6='66' # Свердловская область
    _6_7='67' # Смоленская область
    _6_8='68' # Тамбовская область
    _6_9='69' # Тверская область
    _7_0='70' # Томская область
    _7_1='71' # Тульская область
    _7_2='72' # Тюменская область
    _7_3='73' # Ульяновская область
    _7_4='74' # Челябинская область
    _7_5='75' # Забайкальский край
    _7_6='76' # Ярославская область
    _7_7='77' # Москва
    _7_8='78' # Санкт-Петербург
    _7_9='79' # Еврейская автономная область
    _8_3='83' # Ненецкий автономный округ
    _8_6='86' # Ханты-Мансийский автономный округ - Югра
    _8_7='87' # Чукотский автономный округ
    _8_9='89' # Ямало-Ненецкий автономный округ
    _9_1='91' # Республика Крым
    _9_2='92' # Севастополь
    _9_8='98' # Неопределено
    _9_9='99' # Значение отсутствует


class dSovietVillage(str, Enum):
    """dSovietVillage -- С
    е
    л
    ь
    с
    о
    в
    е
    т
    
    """
    СС='с/с' # Сельсовет


class dStates(str, Enum):
    """dStates -- С
    т
    а
    т
    у
    с
    о
    б
    ъ
    е
    к
    т
    а
    н
    е
    д
    в
    и
    ж
    и
    м
    о
    с
    т
    и
    
    """
    _0_1='01' # Ранее учтенный
    _0_5='05' # Временный
    _0_6='06' # Учтенный
    _0_7='07' # Снят с учета
    _0_8='08' # Аннулированный


class dTypeParameter(str, Enum):
    """dTypeParameter -- Т
    и
    п
    о
    с
    н
    о
    в
    н
    о
    г
    о
    п
    а
    р
    а
    м
    е
    т
    р
    а
    
    """
    _0_1='01' # Протяженность
    _0_2='02' # Глубина
    _0_3='03' # Объем
    _0_4='04' # Высота
    _0_5='05' # Площадь
    _0_6='06' # Площадь застройки
    _0_7='07' # Глубина залегания


class dUnit(str, Enum):
    """dUnit -- Е
    д
    и
    н
    и
    ц
    ы
    и
    з
    м
    е
    р
    е
    н
    и
    й
    
    """
    _0_03='003' # Миллиметр
    _0_04='004' # Сантиметр
    _0_05='005' # Дециметр
    _0_06='006' # Метр
    _0_08='008' # Километр
    _0_09='009' # Мегаметр
    _0_47='047' # Морская миля
    _0_50='050' # Квадратный миллиметр
    _0_51='051' # Квадратный сантиметр
    _0_53='053' # Квадратный дециметр
    _0_55='055' # Квадратный метр
    _0_58='058' # Тысяча квадратных метров
    _0_59='059' # Гектар
    _0_61='061' # Квадратный километр
    _1_09='109' # Ар (100 м2)
    _3_59='359' # Сутки
    _3_60='360' # Неделя
    _3_61='361' # Декада
    _3_62='362' # Месяц
    _3_64='364' # Квартал
    _3_65='365' # Полугодие
    _3_56='356' # Час
    _3_55='355' # Минута
    _3_66='366' # Год
    _3_83='383' # Рубль
    _3_84='384' # Тысяча рублей
    _3_85='385' # Миллион рублей
    _3_86='386' # Миллиард рублей
    _1_000='1000' # Неопределено
    _1_001='1001' # Значение отсутствует
    _1_002='1002' # Рублей за кв. метр
    _1_003='1003' # Рублей за ар
    _1_004='1004' # Рублей за гектар
    _1_005='1005' # Иные
    _1_006='1006' # Рублей за кв. км
    _1_007='1007' # Рабочий день


class dUrbanDistrict(str, Enum):
    """dUrbanDistrict -- Г
    о
    р
    о
    д
    с
    к
    о
    й
    р
    а
    й
    о
    н
    
    """
    РН='р-н' # район


class dUtilizations(str, Enum):
    """dUtilizations -- К
    л
    а
    с
    с
    и
    ф
    и
    к
    а
    т
    о
    р
    в
    и
    д
    о
    в
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    з
    е
    м
    е
    л
    ь
    
    """
    _1_41000000000='141000000000' # Для размещения объектов сельскохозяйственного назначения и сельскохозяйственных угодий
    _1_41001000000='141001000000' # Для сельскохозяйственного производства
    _1_41001010000='141001010000' # Для использования в качестве сельскохозяйственных угодий
    _1_41001020000='141001020000' # Для размещения зданий, строений, сооружений, используемых для производства, хранения и первичной переработки сельскохозяйственной продукции
    _1_41001030000='141001030000' # Для размещения внутрихозяйственных дорог и коммуникаций
    _1_41001040000='141001040000' # Для размещения водных объектов
    _1_41002000000='141002000000' # Для ведения крестьянского (фермерского) хозяйства
    _1_41003000000='141003000000' # Для ведения личного подсобного хозяйства
    _1_41004000000='141004000000' # Для ведения гражданами садоводства и огородничества
    _1_41005000000='141005000000' # Для ведения гражданами животноводства
    _1_41006000000='141006000000' # Для дачного строительства
    _1_41007000000='141007000000' # Для размещения древесно-кустарниковой растительности, предназначенной для защиты земель от воздействия негативных (вредных) природных, антропогенных и техногенных явлений
    _1_41008000000='141008000000' # Для научно-исследовательских целей
    _1_41009000000='141009000000' # Для учебных целей
    _1_41010000000='141010000000' # Для сенокошения и выпаса скота гражданами
    _1_41011000000='141011000000' # Фонд перераспределения
    _1_41012000000='141012000000' # Для размещения объектов охотничьего хозяйства
    _1_41013000000='141013000000' # Для размещения объектов рыбного хозяйства
    _1_41014000000='141014000000' # Для иных видов сельскохозяйственного использования
    _1_42000000000='142000000000' # Для размещения объектов, характерных для населённых пунктов
    _1_42001000000='142001000000' # Для объектов жилой застройки
    _1_42001010000='142001010000' # Для индивидуальной жилой застройки
    _1_42001020000='142001020000' # Для многоквартирной застройки
    _1_42001020100='142001020100' # Для малоэтажной застройки
    _1_42001020200='142001020200' # Для среднеэтажной застройки
    _1_42001020300='142001020300' # Для многоэтажной застройки
    _1_42001020400='142001020400' # Для иных видов жилой застройки
    _1_42001030000='142001030000' # Для размещения объектов дошкольного, начального, общего и среднего (полного) общего образования
    _1_42001040000='142001040000' # Для размещения иных объектов, допустимых в жилых зонах и не перечисленных в классификаторе
    _1_42002000000='142002000000' # Для объектов общественно-делового значения
    _1_42002010000='142002010000' # Для размещения объектов социального и коммунально-бытового назначения
    _1_42002020000='142002020000' # Для размещения объектов здравоохранения
    _1_42002030000='142002030000' # Для размещения объектов культуры
    _1_42002040000='142002040000' # Для размещения объектов торговли
    _1_42002040100='142002040100' # Для размещения объектов розничной торговли
    _1_42002040200='142002040200' # Для размещения объектов оптовой торговли
    _1_42002050000='142002050000' # Для размещения объектов общественного питания
    _1_42002060000='142002060000' # Для размещения объектов предпринимательской деятельности
    _1_42002070000='142002070000' # Для размещения объектов среднего профессионального и высшего профессионального образования
    _1_42002080000='142002080000' # Для размещения административных зданий
    _1_42002090000='142002090000' # Для размещения научно-исследовательских учреждений
    _1_42002100000='142002100000' # Для размещения культовых зданий
    _1_42002110000='142002110000' # Для стоянок автомобильного транспорта
    _1_42002120000='142002120000' # Для размещения объектов делового назначения, в том числе офисных центров
    _1_42002130000='142002130000' # Для размещения объектов финансового назначения
    _1_42002140000='142002140000' # Для размещения гостиниц
    _1_42002150000='142002150000' # Для размещения подземных или многоэтажных гаражей
    _1_42002160000='142002160000' # Для размещения индивидуальных гаражей
    _1_42002170000='142002170000' # Для размещения иных объектов общественно-делового значения, обеспечивающих жизнь граждан
    _1_42003000000='142003000000' # Для общего пользования (уличная сеть)
    _1_42004000000='142004000000' # Для размещения объектов специального назначения
    _1_42004010000='142004010000' # Для размещения кладбищ
    _1_42004020000='142004020000' # Для размещения крематориев
    _1_42004030000='142004030000' # Для размещения скотомогильников
    _1_42004040000='142004040000' # Под объектами размещения отходов потребления
    _1_42004050000='142004050000' # Под иными объектами специального назначения
    _1_42005000000='142005000000' # Для размещения коммунальных, складских объектов
    _1_42006000000='142006000000' # Для размещения объектов жилищно-коммунального хозяйства
    _1_42007000000='142007000000' # Для иных видов использования, характерных для населённых пунктов
    _1_43000000000='143000000000' # Для размещения объектов промышленности, энергетики, транспорта, связи, радиовещания, телевидения, информатики, обеспечения космической деятельности, обороны, безопасности и иного специального назначения
    _1_43001000000='143001000000' # Для размещения промышленных объектов
    _1_43001010000='143001010000' # Для размещения производственных и административных зданий, строений, сооружений и обслуживающих их объектов
    _1_43001010100='143001010100' # Для размещения производственных зданий
    _1_43001010200='143001010200' # Для размещения коммуникаций
    _1_43001010300='143001010300' # Для размещения подъездных путей
    _1_43001010400='143001010400' # Для размещения складских помещений
    _1_43001010500='143001010500' # Для размещения административных зданий
    _1_43001010600='143001010600' # Для размещения культурно-бытовых зданий
    _1_43001010700='143001010700' # Для размещения иных сооружений промышленности
    _1_43001020000='143001020000' # Для добычи и разработки полезных ископаемых
    _1_43001030000='143001030000' # Для размещения иных объектов промышленности
    _1_43002000000='143002000000' # Для размещения объектов энергетики
    _1_43002010000='143002010000' # Для размещения электростанций и обслуживающих сооружений и объектов
    _1_43002010100='143002010100' # Для размещения гидроэлектростанций
    _1_43002010200='143002010200' # Для размещения атомных станций
    _1_43002010300='143002010300' # Для размещения ядерных установок
    _1_43002010400='143002010400' # Для размещения пунктов хранения ядерных материалов и радиоактивных веществ энергетики
    _1_43002010500='143002010500' # Для размещения хранилищ радиоактивных отходов
    _1_43002010600='143002010600' # Для размещения тепловых станций
    _1_43002010700='143002010700' # Для размещения иных типов электростанций
    _1_43002010800='143002010800' # Для размещения иных обслуживающих сооружений и объектов
    _1_43002020000='143002020000' # Для размещения объектов электросетевого хозяйства
    _1_43002020100='143002020100' # Для размещения воздушных линий электропередачи
    _1_43002020200='143002020200' # Для размещения наземных сооружений кабельных линий электропередачи
    _1_43002020300='143002020300' # Для размещения подстанций
    _1_43002020400='143002020400' # Для размещения распределительных пунктов
    _1_43002020500='143002020500' # Для размещения других сооружений и объектов электросетевого хозяйства
    _1_43002030000='143002030000' # Для размещения иных объектов энергетики
    _1_43003000000='143003000000' # Для размещения объектов транспорта
    _1_43003010000='143003010000' # Для размещения и эксплуатации объектов железнодорожного транспорта
    _1_43003010100='143003010100' # Для размещения железнодорожных путей и их конструктивных элементов
    _1_43003010200='143003010200' # Для размещения полос отвода железнодорожных путей
    _1_43003010300='143003010300' # Для размещения, эксплуатации, расширения и реконструкции строений, зданий, сооружений, в том числе железнодорожных вокзалов, железнодорожных станций, а также устройств и других объектов, необходимых для эксплуатации, содержания, строительства, реконструкции, ремонта, развития наземных и подземных зданий, строений, сооружений, устройств и других объектов железнодорожного транспорта
    _1_43003010301='143003010301' # Для размещения железнодорожных вокзалов
    _1_43003010302='143003010302' # Для размещения железнодорожных станций
    _1_43003010303='143003010303' # Для размещения устройств и других объектов, необходимых для эксплуатации, содержания, строительства, реконструкции, ремонта, развития наземных и подземных зданий, строений, сооружений, устройств и других объектов железнодорожного транспорта
    _1_43003020000='143003020000' # Для размещения и эксплуатации объектов автомобильного транспорта и объектов дорожного хозяйства
    _1_43003020100='143003020100' # Для размещения автомобильных дорог и их конструктивных элементов
    _1_43003020200='143003020200' # Для размещения полос отвода
    _1_43003020300='143003020300' # Для размещения объектов дорожного сервиса в полосах отвода автомобильных дорог
    _1_43003020400='143003020400' # Для размещения дорожных сооружений
    _1_43003020500='143003020500' # Для размещения автовокзалов и автостанций
    _1_43003020600='143003020600' # Для размещения иных объектов автомобильного транспорта и дорожного хозяйства
    _1_43003030000='143003030000' # Для размещения и эксплуатации объектов морского, внутреннего водного транспорта
    _1_43003030100='143003030100' # Для размещения искусственно созданных внутренних водных путей
    _1_43003030200='143003030200' # Для размещения морских и речных портов, причалов, пристаней
    _1_43003030300='143003030300' # Для размещения иных объектов морского, внутреннего водного транспорта
    _1_43003030400='143003030400' # Для выделения береговой полосы
    _1_43003040000='143003040000' # Для размещения и эксплуатации объектов воздушного транспорта
    _1_43003040100='143003040100' # Для размещения аэропортов и аэродромов
    _1_43003040200='143003040200' # Для размещения аэровокзалов
    _1_43003040300='143003040300' # Для размещения взлетно-посадочных полос
    _1_43003040400='143003040400' # Для размещения иных наземных объектов воздушного транспорта
    _1_43003050000='143003050000' # Для размещения и эксплуатации объектов трубопроводного транспорта
    _1_43003050100='143003050100' # Для размещения нефтепроводов
    _1_43003050200='143003050200' # Для размещения газопроводов
    _1_43003050300='143003050300' # Для размещения иных трубопроводов
    _1_43003050400='143003050400' # Для размещения иных объектов трубопроводного транспорта
    _1_43003060000='143003060000' # Для размещения и эксплуатации иных объектов транспорта
    _1_43004000000='143004000000' # Для размещения объектов связи, радиовещания, телевидения, информатики
    _1_43004010000='143004010000' # Для размещения эксплуатационных предприятий связи и обслуживания линий связи
    _1_43004020000='143004020000' # Для размещения кабельных, радиорелейных и воздушных линий связи и линий радиофикации на трассах кабельных и воздушных линий связи и радиофикации и их охранные зоны
    _1_43004030000='143004030000' # Для размещения подземных кабельных и воздушных линий связи и радиофикации и их охранные зоны
    _1_43004040000='143004040000' # Для размещения наземных и подземных необслуживаемых усилительных пунктов на кабельных линиях связи и их охранные зоны
    _1_43004050000='143004050000' # Для размещения наземных сооружений и инфраструктур спутниковой связи
    _1_43004060000='143004060000' # Для размещения иных объектов связи, радиовещания, телевидения, информатики
    _1_43005000000='143005000000' # Для размещения объектов, предназначенных для обеспечения космической деятельности
    _1_43005010000='143005010000' # Для размещения космодромов, стартовых комплексов и пусковых установок
    _1_43005020000='143005020000' # Для размещения командно-измерительных комплексов, центров и пунктов управления полетами космических объектов, приема, хранения и переработки информации
    _1_43005030000='143005030000' # Для размещения баз хранения космической техники
    _1_43005040000='143005040000' # Для размещения полигонов приземления космических объектов и взлетно-посадочных полос
    _1_43005050000='143005050000' # Для размещения объектов экспериментальной базы для отработки космической техники
    _1_43005060000='143005060000' # Для размещения центров и оборудования для подготовки космонавтов
    _1_43005070000='143005070000' # Для размещения других наземных сооружений и техники, используемых при осуществлении космической деятельности
    _1_43006000000='143006000000' # Для размещения объектов, предназначенных для обеспечения обороны и безопасности
    _1_43006010000='143006010000' # Для обеспечения задач обороны
    _1_43006010100='143006010100' # Для размещения военных организаций, учреждений и других объектов
    _1_43006010200='143006010200' # Для дислокации войск и сил флота
    _1_43006010300='143006010300' # Для проведения учений и иных мероприятий
    _1_43006010400='143006010400' # Для испытательных полигонов
    _1_43006010500='143006010500' # Для мест уничтожения оружия и захоронения отходов
    _1_43006010600='143006010600' # Для создания запасов материальных ценностей в государственном и мобилизационном резервах (хранилища, склады и другие)
    _1_43006010700='143006010700' # Для размещения иных объектов обороны
    _1_43006020000='143006020000' # Для размещения объектов (территорий), обеспечивающих защиту и охрану Государственной границы Российской Федерации
    _1_43006020100='143006020100' # Для обустройства и содержания инженерно-технических сооружений и заграждений
    _1_43006020200='143006020200' # Для обустройства и содержания пограничных знаков
    _1_43006020300='143006020300' # Для обустройства и содержания пограничных просек
    _1_43006020400='143006020400' # Для обустройства и содержания коммуникаций
    _1_43006020500='143006020500' # Для обустройства и содержания пунктов пропуска через Государственную границу Российской Федерации
    _1_43006020600='143006020600' # Для размещения иных объектов для защиты и охраны Государственной границы Российской Федерации
    _1_43006030000='143006030000' # Для размещения иных объектов обороны и безопасности
    _1_43007000000='143007000000' # Для размещения иных объектов промышленности, энергетики, транспорта, связи, радиовещания, телевидения, информатики, обеспечения космической деятельности, обороны, безопасности и иного специального назначения
    _1_44000000000='144000000000' # Для размещения особо охраняемых историко-культурных и природных объектов (территорий)
    _1_44001000000='144001000000' # Для размещения особо охраняемых природных объектов (территорий)
    _1_44001010000='144001010000' # Для размещения государственных природных заповедников (в том числе биосферных)
    _1_44001020000='144001020000' # Для размещения государственных природных заказников
    _1_44001030000='144001030000' # Для размещения национальных парков
    _1_44001040000='144001040000' # Для размещения природных парков
    _1_44001050000='144001050000' # Для размещения дендрологических парков
    _1_44001060000='144001060000' # Для размещения ботанических садов
    _1_44001070000='144001070000' # Для размещения объектов санаторного и курортного назначения
    _1_44001080000='144001080000' # Территории месторождений минеральных вод, лечебных грязей, рапы лиманов и озер
    _1_44001090000='144001090000' # Для традиционного природопользования
    _1_44001100000='144001100000' # Для размещения иных особо охраняемых природных территорий (объектов)
    _1_44002000000='144002000000' # Для размещения объектов (территорий) природоохранного назначения
    _1_44003000000='144003000000' # Для размещения объектов (территорий) рекреационного назначения
    _1_44003010000='144003010000' # Для размещения домов отдыха, пансионатов, кемпингов
    _1_44003020000='144003020000' # Для размещения объектов физической культуры и спорта
    _1_44003030000='144003030000' # Для размещения туристических баз, стационарных и палаточных туристско-оздоровительных лагерей, домов рыболова и охотника, детских туристических станций
    _1_44003040000='144003040000' # Для размещения туристических парков
    _1_44003050000='144003050000' # Для размещения лесопарков
    _1_44003060000='144003060000' # Для размещения учебно-туристических троп и трасс
    _1_44003070000='144003070000' # Для размещения детских и спортивных лагерей
    _1_44003080000='144003080000' # Для размещения скверов, парков, городских садов
    _1_44003090000='144003090000' # Для размещения пляжей
    _1_44003100000='144003100000' # Для размещения иных объектов (территорий) рекреационного назначения
    _1_44004000000='144004000000' # Для размещения объектов историко-культурного назначения
    _1_44004010000='144004010000' # Для размещения объектов культурного наследия народов Российской Федерации (памятников истории и культуры), в том числе объектов археологического наследия
    _1_44004020000='144004020000' # Для размещения военных и гражданских захоронений
    _1_44005000000='144005000000' # Для размещения иных особо охраняемых историко-культурных и природных объектов (территорий)
    _1_45000000000='145000000000' # Для размещения объектов лесного фонда
    _1_45001000000='145001000000' # Для размещения лесной растительности
    _1_45002000000='145002000000' # Для восстановления лесной растительности
    _1_45003000000='145003000000' # Для прочих объектов лесного хозяйства
    _1_46000000000='146000000000' # Для размещения объектов водного фонда
    _1_46001000000='146001000000' # Под водными объектами
    _1_46002000000='146002000000' # Для размещения гидротехнических сооружений
    _1_46003000000='146003000000' # Для размещения иных сооружений, расположенных на водных объектах
    _1_47000000000='147000000000' # Земли запаса (неиспользуемые)


class dWall(str, Enum):
    """dWall -- П
    е
    р
    е
    ч
    е
    н
    ь
    н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    й
    м
    а
    т
    е
    р
    и
    а
    л
    о
    в
    н
    а
    р
    у
    ж
    н
    ы
    х
    с
    т
    е
    н
    з
    д
    а
    н
    и
    я
    ,
    п
    р
    и
    м
    е
    н
    я
    е
    м
    ы
    й
    п
    р
    и
    в
    е
    д
    е
    н
    и
    и
    Е
    д
    и
    н
    о
    г
    о
    г
    о
    с
    у
    д
    а
    р
    с
    т
    в
    е
    н
    н
    о
    г
    о
    р
    е
    е
    с
    т
    р
    а
    о
    б
    ъ
    е
    к
    т
    о
    в
    к
    а
    п
    и
    т
    а
    л
    ь
    н
    о
    г
    о
    с
    т
    р
    о
    и
    т
    е
    л
    ь
    с
    т
    в
    а
    
    """
    _0_61001000000='061001000000' # Стены
    _0_61001001000='061001001000' # Каменные
    _0_61001001001='061001001001' # Кирпичные
    _0_61001001002='061001001002' # Кирпичные облегченные
    _0_61001001003='061001001003' # Из природного камня
    _0_61001002000='061001002000' # Деревянные
    _0_61001002001='061001002001' # Рубленые
    _0_61001002002='061001002002' # Каркасно-засыпные
    _0_61001002003='061001002003' # Каркасно-обшивные
    _0_61001002004='061001002004' # Сборно-щитовые
    _0_61001002005='061001002005' # Дощатые
    _0_61001002006='061001002006' # Деревянный каркас без обшивки
    _0_61001003000='061001003000' # Смешанные
    _0_61001003001='061001003001' # Каменные и деревянные
    _0_61001003002='061001003002' # Каменные и бетонные
    _0_61001004000='061001004000' # Легкие из местных материалов
    _0_61001005000='061001005000' # Из прочих материалов
    _0_61001006000='061001006000' # Бетонные
    _0_61001006001='061001006001' # Монолитные
    _0_61001006002='061001006002' # Из мелких бетонных блоков
    _0_61001006003='061001006003' # Из легкобетонных панелей
    _0_61001007000='061001007000' # Железобетонные
    _0_61001007001='061001007001' # Крупнопанельные
    _0_61001007002='061001007002' # Каркасно-панельные
    _0_61001007003='061001007003' # Монолитные
    _0_61001007004='061001007004' # Крупноблочные
    _0_61001007005='061001007005' # Из унифицированных железобетонных элементов
    _0_61001007006='061001007006' # Из железобетонных сегментов
    _0_61001008000='061001008000' # Шлакобетонные
    _0_61001009000='061001009000' # Металлические


class sAddressOrLocation(str, Enum):
    """sAddressOrLocation -- А
    д
    р
    е
    с
    и
    л
    и
    о
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    (0 -
    о
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    , 1 -
    а
    д
    р
    е
    с
    )
    
    """
    _0='0' # Описание местоположения объекта недвижимости
    _1='1' # Присвоенный в установленном порядке адрес объекта недвижимости


class sFamilyStatus(str, Enum):
    """sFamilyStatus -- С
    е
    м
    е
    й
    н
    о
    е
    п
    о
    л
    о
    ж
    е
    н
    и
    е
    
    """
    _0='0' # Не в браке
    _1='1' # В браке


class sInBounds(str, Enum):
    """sInBounds -- М
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    е
    о
    р
    и
    е
    н
    т
    и
    р
    а
    (0 -
    в
    н
    е
    г
    р
    а
    н
    и
    ц
    у
    ч
    а
    с
    т
    к
    а
    , 1 -
    в
    г
    р
    а
    н
    и
    ц
    а
    х
    у
    ч
    а
    с
    т
    к
    а
    , 2 -
    н
    е
    о
    п
    р
    е
    д
    е
    л
    е
    н
    о
    )
    
    """
    _0='0' # Расположение ориентира вне границ участка
    _1='1' # Расположение ориентира в границах участка
    _2='2' # Не определено


class sName_Contour(str, Enum):
    """sName_Contour -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    к
    о
    н
    т
    у
    р
    а
    
    """
    ВНЕШНИЙКОНТУР='Внешний контур'
    ВНУТРЕННИЙКОНТУР='Внутренний контур'


class sType_Unit(str, Enum):
    """sType_Unit -- "
    Э
    л
    е
    м
    е
    н
    т
    а
    р
    н
    ы
    й
    "
    т
    и
    п
    д
    л
    я
    ч
    а
    с
    т
    и
    э
    л
    е
    м
    е
    н
    т
    а
    
    """
    ТОЧКА='Точка'
    ЛИНИЯ='Линия'
    ДУГА='Дуга'
    ПРЯМОУГОЛЬНИК='Прямоугольник'
    ОКРУЖНОСТЬ='Окружность'


class KPT(GeneratedsSuper):
    """CadastralBlocks -- К
    а
    д
    а
    с
    т
    р
    о
    в
    ы
    е
    к
    в
    а
    р
    т
    а
    л
    ы
    CertificationDoc -- С
    в
    е
    д
    е
    н
    и
    я
    о
    б
    у
    д
    о
    с
    т
    о
    в
    е
    р
    е
    н
    и
    и
    д
    о
    к
    у
    м
    е
    н
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralBlocks=None, CertificationDoc=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.CadastralBlocks = CadastralBlocks
        self.CadastralBlocks_nsprefix_ = None
        self.CertificationDoc = CertificationDoc
        self.CertificationDoc_nsprefix_ = "Cer1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, KPT)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if KPT.subclass:
            return KPT.subclass(*args_, **kwargs_)
        else:
            return KPT(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_CadastralBlocks(self):
        return self.CadastralBlocks
    def set_CadastralBlocks(self, CadastralBlocks):
        self.CadastralBlocks = CadastralBlocks
    def get_CertificationDoc(self):
        return self.CertificationDoc
    def set_CertificationDoc(self, CertificationDoc):
        self.CertificationDoc = CertificationDoc
    def _hasContent(self):
        if (
            self.CadastralBlocks is not None or
            self.CertificationDoc is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Cer1="urn://x-artefacts-rosreestr-ru/commons/complex-types/certification-doc/1.0" ', name_='KPT', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('KPT')
        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 and name_ == 'KPT':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='KPT')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='KPT', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='KPT'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Cer1="urn://x-artefacts-rosreestr-ru/commons/complex-types/certification-doc/1.0" ', name_='KPT', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CadastralBlocks is not None:
            namespaceprefix_ = self.CadastralBlocks_nsprefix_ + ':' if (UseCapturedNS_ and self.CadastralBlocks_nsprefix_) else ''
            self.CadastralBlocks.export(outfile, level, namespaceprefix_, namespacedef_='', name_='CadastralBlocks', pretty_print=pretty_print)
        if self.CertificationDoc is not None:
            namespaceprefix_ = self.CertificationDoc_nsprefix_ + ':' if (UseCapturedNS_ and self.CertificationDoc_nsprefix_) else ''
            self.CertificationDoc.export(outfile, level, namespaceprefix_, namespacedef_='', name_='CertificationDoc', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'CadastralBlocks':
            obj_ = CadastralBlocksType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.CadastralBlocks = obj_
            obj_.original_tagname_ = 'CadastralBlocks'
        elif nodeName_ == 'CertificationDoc':
            obj_ = tCertificationDoc.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.CertificationDoc = obj_
            obj_.original_tagname_ = 'CertificationDoc'
# end class KPT


class tCadastralBlock(GeneratedsSuper):
    """Area -- П
    л
    о
    щ
    а
    д
    ь
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    г
    о
    к
    в
    а
    р
    т
    а
    л
    а
    Parcels -- С
    в
    е
    д
    е
    н
    и
    я
    о
    з
    е
    м
    е
    л
    ь
    н
    ы
    х
    у
    ч
    а
    с
    т
    к
    а
    х
    ObjectsRealty -- С
    в
    е
    д
    е
    н
    и
    я
    о
    з
    д
    а
    н
    и
    я
    х
    ,
    с
    о
    о
    р
    у
    ж
    е
    н
    и
    я
    х
    ,
    о
    б
    ъ
    е
    к
    т
    а
    х
    н
    е
    з
    а
    в
    е
    р
    ш
    е
    н
    н
    о
    г
    о
    с
    т
    р
    о
    и
    т
    е
    л
    ь
    с
    т
    в
    а
    OMSPoints -- С
    в
    е
    д
    е
    н
    и
    я
    о
    п
    у
    н
    к
    т
    а
    х
    О
    М
    С
    SpatialData -- М
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    е
    к
    в
    а
    р
    т
    а
    л
    а
    Bounds -- Г
    р
    а
    н
    и
    ц
    ы
    м
    е
    ж
    д
    у
    с
    у
    б
    ъ
    е
    к
    т
    а
    м
    и
    Р
    Ф
    ,
    г
    р
    а
    н
    и
    ц
    ы
    н
    а
    с
    е
    л
    е
    н
    н
    ы
    х
    п
    у
    н
    к
    т
    о
    в
    ,
    м
    у
    н
    и
    ц
    и
    п
    а
    л
    ь
    н
    ы
    х
    о
    б
    р
    а
    з
    о
    в
    а
    н
    и
    й
    ,
    р
    а
    с
    п
    о
    л
    о
    ж
    е
    н
    н
    ы
    х
    в
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    м
    к
    в
    а
    р
    т
    а
    л
    е
    Zones -- З
    о
    н
    ы
    CoordSystems -- П
    е
    р
    е
    ч
    е
    н
    ь
    с
    и
    с
    т
    е
    м
    к
    о
    о
    р
    д
    и
    н
    а
    т
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralNumber=None, Area=None, Parcels=None, ObjectsRealty=None, OMSPoints=None, SpatialData=None, Bounds=None, Zones=None, CoordSystems=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.CadastralNumber = _cast(None, CadastralNumber)
        self.CadastralNumber_nsprefix_ = None
        self.Area = Area
        self.Area_nsprefix_ = None
        self.Parcels = Parcels
        self.Parcels_nsprefix_ = None
        self.ObjectsRealty = ObjectsRealty
        self.ObjectsRealty_nsprefix_ = None
        self.OMSPoints = OMSPoints
        self.OMSPoints_nsprefix_ = None
        self.SpatialData = SpatialData
        self.SpatialData_nsprefix_ = None
        self.Bounds = Bounds
        self.Bounds_nsprefix_ = None
        self.Zones = Zones
        self.Zones_nsprefix_ = None
        self.CoordSystems = CoordSystems
        self.CoordSystems_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tCadastralBlock)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tCadastralBlock.subclass:
            return tCadastralBlock.subclass(*args_, **kwargs_)
        else:
            return tCadastralBlock(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Area(self):
        return self.Area
    def set_Area(self, Area):
        self.Area = Area
    def get_Parcels(self):
        return self.Parcels
    def set_Parcels(self, Parcels):
        self.Parcels = Parcels
    def get_ObjectsRealty(self):
        return self.ObjectsRealty
    def set_ObjectsRealty(self, ObjectsRealty):
        self.ObjectsRealty = ObjectsRealty
    def get_OMSPoints(self):
        return self.OMSPoints
    def set_OMSPoints(self, OMSPoints):
        self.OMSPoints = OMSPoints
    def get_SpatialData(self):
        return self.SpatialData
    def set_SpatialData(self, SpatialData):
        self.SpatialData = SpatialData
    def get_Bounds(self):
        return self.Bounds
    def set_Bounds(self, Bounds):
        self.Bounds = Bounds
    def get_Zones(self):
        return self.Zones
    def set_Zones(self, Zones):
        self.Zones = Zones
    def get_CoordSystems(self):
        return self.CoordSystems
    def set_CoordSystems(self, CoordSystems):
        self.CoordSystems = CoordSystems
    def get_CadastralNumber(self):
        return self.CadastralNumber
    def set_CadastralNumber(self, CadastralNumber):
        self.CadastralNumber = CadastralNumber
    def validate_s40(self, value):
        # Validate type Simple1:s40, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 40:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s40' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Area is not None or
            self.Parcels is not None or
            self.ObjectsRealty is not None or
            self.OMSPoints is not None or
            self.SpatialData is not None or
            self.Bounds is not None or
            self.Zones is not None or
            self.CoordSystems is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tCadastralBlock', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tCadastralBlock')
        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 and name_ == 'tCadastralBlock':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tCadastralBlock')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tCadastralBlock', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tCadastralBlock'):
        if self.CadastralNumber is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            outfile.write(' CadastralNumber=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.CadastralNumber), input_name='CadastralNumber')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tCadastralBlock', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Area is not None:
            namespaceprefix_ = self.Area_nsprefix_ + ':' if (UseCapturedNS_ and self.Area_nsprefix_) else ''
            self.Area.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Area', pretty_print=pretty_print)
        if self.Parcels is not None:
            namespaceprefix_ = self.Parcels_nsprefix_ + ':' if (UseCapturedNS_ and self.Parcels_nsprefix_) else ''
            self.Parcels.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Parcels', pretty_print=pretty_print)
        if self.ObjectsRealty is not None:
            namespaceprefix_ = self.ObjectsRealty_nsprefix_ + ':' if (UseCapturedNS_ and self.ObjectsRealty_nsprefix_) else ''
            self.ObjectsRealty.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ObjectsRealty', pretty_print=pretty_print)
        if self.OMSPoints is not None:
            namespaceprefix_ = self.OMSPoints_nsprefix_ + ':' if (UseCapturedNS_ and self.OMSPoints_nsprefix_) else ''
            self.OMSPoints.export(outfile, level, namespaceprefix_, namespacedef_='', name_='OMSPoints', pretty_print=pretty_print)
        if self.SpatialData is not None:
            namespaceprefix_ = self.SpatialData_nsprefix_ + ':' if (UseCapturedNS_ and self.SpatialData_nsprefix_) else ''
            self.SpatialData.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpatialData', pretty_print=pretty_print)
        if self.Bounds is not None:
            namespaceprefix_ = self.Bounds_nsprefix_ + ':' if (UseCapturedNS_ and self.Bounds_nsprefix_) else ''
            self.Bounds.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Bounds', pretty_print=pretty_print)
        if self.Zones is not None:
            namespaceprefix_ = self.Zones_nsprefix_ + ':' if (UseCapturedNS_ and self.Zones_nsprefix_) else ''
            self.Zones.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Zones', pretty_print=pretty_print)
        if self.CoordSystems is not None:
            namespaceprefix_ = self.CoordSystems_nsprefix_ + ':' if (UseCapturedNS_ and self.CoordSystems_nsprefix_) else ''
            self.CoordSystems.export(outfile, level, namespaceprefix_, namespacedef_='', name_='CoordSystems', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('CadastralNumber', node)
        if value is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            self.CadastralNumber = value
            self.validate_s40(self.CadastralNumber)    # validate type s40
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Area':
            obj_ = tAreaCadastralBlock.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Area = obj_
            obj_.original_tagname_ = 'Area'
        elif nodeName_ == 'Parcels':
            obj_ = ParcelsType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Parcels = obj_
            obj_.original_tagname_ = 'Parcels'
        elif nodeName_ == 'ObjectsRealty':
            obj_ = tObjectsRealty.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.ObjectsRealty = obj_
            obj_.original_tagname_ = 'ObjectsRealty'
        elif nodeName_ == 'OMSPoints':
            obj_ = tOMSPoints.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.OMSPoints = obj_
            obj_.original_tagname_ = 'OMSPoints'
        elif nodeName_ == 'SpatialData':
            obj_ = SpatialDataType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpatialData = obj_
            obj_.original_tagname_ = 'SpatialData'
        elif nodeName_ == 'Bounds':
            obj_ = BoundsType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Bounds = obj_
            obj_.original_tagname_ = 'Bounds'
        elif nodeName_ == 'Zones':
            obj_ = ZonesType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Zones = obj_
            obj_.original_tagname_ = 'Zones'
        elif nodeName_ == 'CoordSystems':
            obj_ = tCoordSystems.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.CoordSystems = obj_
            obj_.original_tagname_ = 'CoordSystems'
# end class tCadastralBlock


class tParcel(GeneratedsSuper):
    """Area -- П
    л
    о
    щ
    а
    д
    ь
    з
    е
    м
    е
    л
    ь
    н
    о
    г
    о
    у
    ч
    а
    с
    т
    к
    а
    Name -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    у
    ч
    а
    с
    т
    к
    а
    Location -- У
    т
    о
    ч
    н
    е
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    и
    а
    д
    р
    е
    с
    (
    о
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    )
    з
    е
    м
    е
    л
    ь
    н
    о
    г
    о
    у
    ч
    а
    с
    т
    к
    а
    Category -- К
    а
    т
    е
    г
    о
    р
    и
    я
    з
    е
    м
    е
    л
    ь
    Utilization -- Р
    а
    з
    р
    е
    ш
    е
    н
    н
    о
    е
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    е
    у
    ч
    а
    с
    т
    к
    а
    ParentCadastralNumbers -- К
    а
    д
    а
    с
    т
    р
    о
    в
    ы
    й
    н
    о
    м
    е
    р
    з
    е
    м
    е
    л
    ь
    н
    о
    г
    о
    у
    ч
    а
    с
    т
    к
    а
    -
    Е
    д
    и
    н
    о
    г
    о
    з
    е
    м
    л
    е
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    Contours -- К
    о
    н
    т
    у
    р
    ы
    м
    н
    о
    г
    о
    к
    о
    н
    т
    у
    р
    н
    о
    г
    о
    у
    ч
    а
    с
    т
    к
    а
    CadastralCost -- С
    в
    е
    д
    е
    н
    и
    я
    о
    в
    е
    л
    и
    ч
    и
    н
    е
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    й
    с
    т
    о
    и
    м
    о
    с
    т
    и
    EntitySpatial -- О
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    г
    р
    а
    н
    и
    ц
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralNumber=None, State=None, DateCreated=None, Area=None, Name=None, Location=None, Category=None, Utilization=None, ParentCadastralNumbers=None, Contours=None, CadastralCost=None, EntitySpatial=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.CadastralNumber = _cast(None, CadastralNumber)
        self.CadastralNumber_nsprefix_ = None
        self.State = _cast(None, State)
        self.State_nsprefix_ = None
        if isinstance(DateCreated, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(DateCreated, '%Y-%m-%d').date()
        else:
            initvalue_ = DateCreated
        self.DateCreated = initvalue_
        self.Area = Area
        self.Area_nsprefix_ = None
        self.Name = Name
        self.validate_dParcels(self.Name)
        self.Name_nsprefix_ = "dParc1"
        self.Location = Location
        self.Location_nsprefix_ = None
        self.Category = Category
        self.validate_dCategories(self.Category)
        self.Category_nsprefix_ = "dCateg1"
        self.Utilization = Utilization
        self.Utilization_nsprefix_ = None
        self.ParentCadastralNumbers = ParentCadastralNumbers
        self.ParentCadastralNumbers_nsprefix_ = None
        self.Contours = Contours
        self.Contours_nsprefix_ = None
        self.CadastralCost = CadastralCost
        self.CadastralCost_nsprefix_ = "Cos1"
        self.EntitySpatial = EntitySpatial
        self.EntitySpatial_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tParcel)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tParcel.subclass:
            return tParcel.subclass(*args_, **kwargs_)
        else:
            return tParcel(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Area(self):
        return self.Area
    def set_Area(self, Area):
        self.Area = Area
    def get_Name(self):
        return self.Name
    def set_Name(self, Name):
        self.Name = Name
    def get_Location(self):
        return self.Location
    def set_Location(self, Location):
        self.Location = Location
    def get_Category(self):
        return self.Category
    def set_Category(self, Category):
        self.Category = Category
    def get_Utilization(self):
        return self.Utilization
    def set_Utilization(self, Utilization):
        self.Utilization = Utilization
    def get_ParentCadastralNumbers(self):
        return self.ParentCadastralNumbers
    def set_ParentCadastralNumbers(self, ParentCadastralNumbers):
        self.ParentCadastralNumbers = ParentCadastralNumbers
    def get_Contours(self):
        return self.Contours
    def set_Contours(self, Contours):
        self.Contours = Contours
    def get_CadastralCost(self):
        return self.CadastralCost
    def set_CadastralCost(self, CadastralCost):
        self.CadastralCost = CadastralCost
    def get_EntitySpatial(self):
        return self.EntitySpatial
    def set_EntitySpatial(self, EntitySpatial):
        self.EntitySpatial = EntitySpatial
    def get_CadastralNumber(self):
        return self.CadastralNumber
    def set_CadastralNumber(self, CadastralNumber):
        self.CadastralNumber = CadastralNumber
    def get_State(self):
        return self.State
    def set_State(self, State):
        self.State = State
    def get_DateCreated(self):
        return self.DateCreated
    def set_DateCreated(self, DateCreated):
        self.DateCreated = DateCreated
    def validate_dParcels(self, value):
        result = True
        # Validate type dParcels, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['01', '02', '03', '04', '05', '06']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dParcels' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_dCategories(self, value):
        result = True
        # Validate type dCategories, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['003001000000', '003002000000', '003003000000', '003004000000', '003005000000', '003006000000', '003007000000', '003008000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dCategories' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s40(self, value):
        # Validate type Simple1:s40, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 40:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s40' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_dStates(self, value):
        # Validate type dStat1:dStates, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['01', '05', '06', '07', '08']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dStates' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Area is not None or
            self.Name is not None or
            self.Location is not None or
            self.Category is not None or
            self.Utilization is not None or
            self.ParentCadastralNumbers is not None or
            self.Contours is not None or
            self.CadastralCost is not None or
            self.EntitySpatial is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:dParc1="urn://x-artefacts-rosreestr-ru/commons/directories/parcels/1.0.1"  xmlns:dCateg1="urn://x-artefacts-rosreestr-ru/commons/directories/categories/1.0.1"  xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tParcel', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tParcel')
        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 and name_ == 'tParcel':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tParcel')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tParcel', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tParcel'):
        if self.CadastralNumber is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            outfile.write(' CadastralNumber=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.CadastralNumber), input_name='CadastralNumber')), ))
        if self.State is not None and 'State' not in already_processed:
            already_processed.add('State')
            outfile.write(' State=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.State), input_name='State')), ))
        if self.DateCreated is not None and 'DateCreated' not in already_processed:
            already_processed.add('DateCreated')
            outfile.write(' DateCreated="%s"' % self.gds_format_date(self.DateCreated, input_name='DateCreated'))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:dParc1="urn://x-artefacts-rosreestr-ru/commons/directories/parcels/1.0.1"  xmlns:dCateg1="urn://x-artefacts-rosreestr-ru/commons/directories/categories/1.0.1"  xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tParcel', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Area is not None:
            namespaceprefix_ = self.Area_nsprefix_ + ':' if (UseCapturedNS_ and self.Area_nsprefix_) else ''
            self.Area.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Area', pretty_print=pretty_print)
        if self.Name is not None:
            namespaceprefix_ = self.Name_nsprefix_ + ':' if (UseCapturedNS_ and self.Name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sName>%s</%sName>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Name), input_name='Name')), namespaceprefix_ , eol_))
        if self.Location is not None:
            namespaceprefix_ = self.Location_nsprefix_ + ':' if (UseCapturedNS_ and self.Location_nsprefix_) else ''
            self.Location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Location', pretty_print=pretty_print)
        if self.Category is not None:
            namespaceprefix_ = self.Category_nsprefix_ + ':' if (UseCapturedNS_ and self.Category_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCategory>%s</%sCategory>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Category), input_name='Category')), namespaceprefix_ , eol_))
        if self.Utilization is not None:
            namespaceprefix_ = self.Utilization_nsprefix_ + ':' if (UseCapturedNS_ and self.Utilization_nsprefix_) else ''
            self.Utilization.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Utilization', pretty_print=pretty_print)
        if self.ParentCadastralNumbers is not None:
            namespaceprefix_ = self.ParentCadastralNumbers_nsprefix_ + ':' if (UseCapturedNS_ and self.ParentCadastralNumbers_nsprefix_) else ''
            self.ParentCadastralNumbers.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ParentCadastralNumbers', pretty_print=pretty_print)
        if self.Contours is not None:
            namespaceprefix_ = self.Contours_nsprefix_ + ':' if (UseCapturedNS_ and self.Contours_nsprefix_) else ''
            self.Contours.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Contours', pretty_print=pretty_print)
        if self.CadastralCost is not None:
            namespaceprefix_ = self.CadastralCost_nsprefix_ + ':' if (UseCapturedNS_ and self.CadastralCost_nsprefix_) else ''
            self.CadastralCost.export(outfile, level, namespaceprefix_, namespacedef_='', name_='CadastralCost', pretty_print=pretty_print)
        if self.EntitySpatial is not None:
            namespaceprefix_ = self.EntitySpatial_nsprefix_ + ':' if (UseCapturedNS_ and self.EntitySpatial_nsprefix_) else ''
            self.EntitySpatial.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EntitySpatial', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('CadastralNumber', node)
        if value is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            self.CadastralNumber = value
            self.validate_s40(self.CadastralNumber)    # validate type s40
        value = find_attr_value_('State', node)
        if value is not None and 'State' not in already_processed:
            already_processed.add('State')
            self.State = value
            self.validate_dStates(self.State)    # validate type dStates
        value = find_attr_value_('DateCreated', node)
        if value is not None and 'DateCreated' not in already_processed:
            already_processed.add('DateCreated')
            try:
                self.DateCreated = self.gds_parse_date(value)
            except ValueError as exp:
                raise ValueError('Bad date attribute (DateCreated): %s' % exp)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Area':
            obj_ = tAreaOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Area = obj_
            obj_.original_tagname_ = 'Area'
        elif nodeName_ == 'Name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Name')
            value_ = self.gds_validate_string(value_, node, 'Name')
            self.Name = value_
            self.Name_nsprefix_ = child_.prefix
            # validate type dParcels
            self.validate_dParcels(self.Name)
        elif nodeName_ == 'Location':
            obj_ = tLocation.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Location = obj_
            obj_.original_tagname_ = 'Location'
        elif nodeName_ == 'Category':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Category')
            value_ = self.gds_validate_string(value_, node, 'Category')
            self.Category = value_
            self.Category_nsprefix_ = child_.prefix
            # validate type dCategories
            self.validate_dCategories(self.Category)
        elif nodeName_ == 'Utilization':
            obj_ = tUtilization.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Utilization = obj_
            obj_.original_tagname_ = 'Utilization'
        elif nodeName_ == 'ParentCadastralNumbers':
            obj_ = tLandUnit.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.ParentCadastralNumbers = obj_
            obj_.original_tagname_ = 'ParentCadastralNumbers'
        elif nodeName_ == 'Contours':
            obj_ = ContoursType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Contours = obj_
            obj_.original_tagname_ = 'Contours'
        elif nodeName_ == 'CadastralCost':
            class_obj_ = self.get_class_obj_(child_, tCadastralCost)
            obj_ = class_obj_.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.CadastralCost = obj_
            obj_.original_tagname_ = 'CadastralCost'
        elif nodeName_ == 'EntitySpatial':
            class_obj_ = self.get_class_obj_(child_, tEntitySpatialZUOut)
            obj_ = class_obj_.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.EntitySpatial = obj_
            obj_.original_tagname_ = 'EntitySpatial'
# end class tParcel


class tContour(GeneratedsSuper):
    """EntitySpatial -- О
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    г
    р
    а
    н
    и
    ц
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, NumberRecord=None, EntitySpatial=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.NumberRecord = _cast(None, NumberRecord)
        self.NumberRecord_nsprefix_ = None
        self.EntitySpatial = EntitySpatial
        self.EntitySpatial_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tContour)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tContour.subclass:
            return tContour.subclass(*args_, **kwargs_)
        else:
            return tContour(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_EntitySpatial(self):
        return self.EntitySpatial
    def set_EntitySpatial(self, EntitySpatial):
        self.EntitySpatial = EntitySpatial
    def get_NumberRecord(self):
        return self.NumberRecord
    def set_NumberRecord(self, NumberRecord):
        self.NumberRecord = NumberRecord
    def validate_p10(self, value):
        # Validate type Simple1:p10, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 10:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p10' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.EntitySpatial is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tContour', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tContour')
        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 and name_ == 'tContour':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tContour')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tContour', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tContour'):
        if self.NumberRecord is not None and 'NumberRecord' not in already_processed:
            already_processed.add('NumberRecord')
            outfile.write(' NumberRecord="%s"' % self.gds_format_integer(self.NumberRecord, input_name='NumberRecord'))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tContour', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EntitySpatial is not None:
            namespaceprefix_ = self.EntitySpatial_nsprefix_ + ':' if (UseCapturedNS_ and self.EntitySpatial_nsprefix_) else ''
            self.EntitySpatial.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EntitySpatial', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('NumberRecord', node)
        if value is not None and 'NumberRecord' not in already_processed:
            already_processed.add('NumberRecord')
            self.NumberRecord = self.gds_parse_integer(value, node, 'NumberRecord')
            if self.NumberRecord <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p10(self.NumberRecord)    # validate type p10
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'EntitySpatial':
            class_obj_ = self.get_class_obj_(child_, tEntitySpatialZUOut)
            obj_ = class_obj_.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.EntitySpatial = obj_
            obj_.original_tagname_ = 'EntitySpatial'
# end class tContour


class tLandUnit(GeneratedsSuper):
    """CadastralNumber -- К
    а
    д
    а
    с
    т
    р
    о
    в
    ы
    й
    н
    о
    м
    е
    р
    е
    д
    и
    н
    о
    г
    о
    з
    е
    м
    л
    е
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralNumber=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.CadastralNumber = CadastralNumber
        self.validate_s40(self.CadastralNumber)
        self.CadastralNumber_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tLandUnit)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tLandUnit.subclass:
            return tLandUnit.subclass(*args_, **kwargs_)
        else:
            return tLandUnit(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_CadastralNumber(self):
        return self.CadastralNumber
    def set_CadastralNumber(self, CadastralNumber):
        self.CadastralNumber = CadastralNumber
    def validate_s40(self, value):
        result = True
        # Validate type s40, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 40:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s40' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.CadastralNumber is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tLandUnit', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tLandUnit')
        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 and name_ == 'tLandUnit':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tLandUnit')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tLandUnit', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tLandUnit'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tLandUnit', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CadastralNumber is not None:
            namespaceprefix_ = self.CadastralNumber_nsprefix_ + ':' if (UseCapturedNS_ and self.CadastralNumber_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCadastralNumber>%s</%sCadastralNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.CadastralNumber), input_name='CadastralNumber')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'CadastralNumber':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'CadastralNumber')
            value_ = self.gds_validate_string(value_, node, 'CadastralNumber')
            self.CadastralNumber = value_
            self.CadastralNumber_nsprefix_ = child_.prefix
            # validate type s40
            self.validate_s40(self.CadastralNumber)
# end class tLandUnit


class tUtilization(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Utilization=None, ByDoc=None, LandUse=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Utilization = _cast(None, Utilization)
        self.Utilization_nsprefix_ = None
        self.ByDoc = _cast(None, ByDoc)
        self.ByDoc_nsprefix_ = None
        self.LandUse = _cast(None, LandUse)
        self.LandUse_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tUtilization)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tUtilization.subclass:
            return tUtilization.subclass(*args_, **kwargs_)
        else:
            return tUtilization(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Utilization(self):
        return self.Utilization
    def set_Utilization(self, Utilization):
        self.Utilization = Utilization
    def get_ByDoc(self):
        return self.ByDoc
    def set_ByDoc(self, ByDoc):
        self.ByDoc = ByDoc
    def get_LandUse(self):
        return self.LandUse
    def set_LandUse(self, LandUse):
        self.LandUse = LandUse
    def validate_dUtilizations(self, value):
        # Validate type dUtz1:dUtilizations, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['141000000000', '141001000000', '141001010000', '141001020000', '141001030000', '141001040000', '141002000000', '141003000000', '141004000000', '141005000000', '141006000000', '141007000000', '141008000000', '141009000000', '141010000000', '141011000000', '141012000000', '141013000000', '141014000000', '142000000000', '142001000000', '142001010000', '142001020000', '142001020100', '142001020200', '142001020300', '142001020400', '142001030000', '142001040000', '142002000000', '142002010000', '142002020000', '142002030000', '142002040000', '142002040100', '142002040200', '142002050000', '142002060000', '142002070000', '142002080000', '142002090000', '142002100000', '142002110000', '142002120000', '142002130000', '142002140000', '142002150000', '142002160000', '142002170000', '142003000000', '142004000000', '142004010000', '142004020000', '142004030000', '142004040000', '142004050000', '142005000000', '142006000000', '142007000000', '143000000000', '143001000000', '143001010000', '143001010100', '143001010200', '143001010300', '143001010400', '143001010500', '143001010600', '143001010700', '143001020000', '143001030000', '143002000000', '143002010000', '143002010100', '143002010200', '143002010300', '143002010400', '143002010500', '143002010600', '143002010700', '143002010800', '143002020000', '143002020100', '143002020200', '143002020300', '143002020400', '143002020500', '143002030000', '143003000000', '143003010000', '143003010100', '143003010200', '143003010300', '143003010301', '143003010302', '143003010303', '143003020000', '143003020100', '143003020200', '143003020300', '143003020400', '143003020500', '143003020600', '143003030000', '143003030100', '143003030200', '143003030300', '143003030400', '143003040000', '143003040100', '143003040200', '143003040300', '143003040400', '143003050000', '143003050100', '143003050200', '143003050300', '143003050400', '143003060000', '143004000000', '143004010000', '143004020000', '143004030000', '143004040000', '143004050000', '143004060000', '143005000000', '143005010000', '143005020000', '143005030000', '143005040000', '143005050000', '143005060000', '143005070000', '143006000000', '143006010000', '143006010100', '143006010200', '143006010300', '143006010400', '143006010500', '143006010600', '143006010700', '143006020000', '143006020100', '143006020200', '143006020300', '143006020400', '143006020500', '143006020600', '143006030000', '143007000000', '144000000000', '144001000000', '144001010000', '144001020000', '144001030000', '144001040000', '144001050000', '144001060000', '144001070000', '144001080000', '144001090000', '144001100000', '144002000000', '144003000000', '144003010000', '144003020000', '144003030000', '144003040000', '144003050000', '144003060000', '144003070000', '144003080000', '144003090000', '144003100000', '144004000000', '144004010000', '144004020000', '144005000000', '145000000000', '145001000000', '145002000000', '145003000000', '146000000000', '146001000000', '146002000000', '146003000000', '147000000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dUtilizations' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_s4000(self, value):
        # Validate type Simple1:s4000, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 4000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s4000' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_dAllowedUse(self, value):
        # Validate type dAU:dAllowedUse, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['214001000000', '214001001000', '214001001001', '214001001002', '214001001003', '214001001004', '214001001005', '214001002000', '214001002001', '214001002002', '214001002003', '214001002004', '214001003000', '214001004000', '214001005000', '214001006000', '214001007000', '214001008000', '214001009000', '214002000000', '214002001000', '214002001001', '214002002000', '214002003000', '214002004000', '214002005000', '214002006000', '214002007000', '214002007001', '214003000000', '214003001000', '214003002000', '214003003000', '214003004000', '214003004001', '214003004002', '214003005000', '214003005001', '214003005002', '214003006000', '214003007000', '214003008000', '214003009000', '214003009001', '214003010000', '214003010001', '214003010002', '214004000000', '214004001000', '214004002000', '214004003000', '214004004000', '214004005000', '214004006000', '214004007000', '214004008000', '214004009000', '214004009001', '214004010000', '214005000000', '214005001000', '214005002000', '214005002001', '214005003000', '214005004000', '214005005000', '214006000000', '214006001000', '214006002000', '214006002001', '214006003000', '214006003001', '214006004000', '214006005000', '214006006000', '214006007000', '214006007001', '214006008000', '214006009000', '214007000000', '214006011000', '214008000000', '214008001000', '214008002000', '214008003000', '214008004000', '214008005000', '214009000000', '214010000000', '214011000000', '214012000000', '214013000000', '214014000000', '214015000000', '214016000000', '214016001000', '214017000000', '214018000000', '214018001000', '214018002000', '214018003000', '214018004000', '214019000000', '214020000000', '214021000000', '214022000000', '214023000000', '214024000000', '214025000000', '214026000000', '214027001000', '214027002000', '214027003000', '214099000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dAllowedUse' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='tUtilization', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tUtilization')
        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 and name_ == 'tUtilization':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tUtilization')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tUtilization', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tUtilization'):
        if self.Utilization is not None and 'Utilization' not in already_processed:
            already_processed.add('Utilization')
            outfile.write(' Utilization=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Utilization), input_name='Utilization')), ))
        if self.ByDoc is not None and 'ByDoc' not in already_processed:
            already_processed.add('ByDoc')
            outfile.write(' ByDoc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ByDoc), input_name='ByDoc')), ))
        if self.LandUse is not None and 'LandUse' not in already_processed:
            already_processed.add('LandUse')
            outfile.write(' LandUse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.LandUse), input_name='LandUse')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='tUtilization', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Utilization', node)
        if value is not None and 'Utilization' not in already_processed:
            already_processed.add('Utilization')
            self.Utilization = value
            self.validate_dUtilizations(self.Utilization)    # validate type dUtilizations
        value = find_attr_value_('ByDoc', node)
        if value is not None and 'ByDoc' not in already_processed:
            already_processed.add('ByDoc')
            self.ByDoc = value
            self.validate_s4000(self.ByDoc)    # validate type s4000
        value = find_attr_value_('LandUse', node)
        if value is not None and 'LandUse' not in already_processed:
            already_processed.add('LandUse')
            self.LandUse = value
            self.validate_dAllowedUse(self.LandUse)    # validate type dAllowedUse
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tUtilization


class tAreaOut(GeneratedsSuper):
    """Area -- З
    н
    а
    ч
    е
    н
    и
    е
    п
    л
    о
    щ
    а
    д
    и
    Unit -- Е
    д
    и
    н
    и
    ц
    а
    и
    з
    м
    е
    р
    е
    н
    и
    я
    -
    к
    в
    а
    д
    р
    а
    т
    н
    ы
    й
    м
    е
    т
    р
    Inaccuracy -- П
    о
    г
    р
    е
    ш
    н
    о
    с
    т
    ь
    в
    ы
    ч
    и
    с
    л
    е
    н
    и
    я
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Area=None, Unit=None, Inaccuracy=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Area = Area
        self.validate_nn20(self.Area)
        self.Area_nsprefix_ = "Simple2"
        self.Unit = Unit
        self.validate_dUnit(self.Unit)
        self.Unit_nsprefix_ = "dUn1"
        self.Inaccuracy = Inaccuracy
        self.validate_d20_2(self.Inaccuracy)
        self.Inaccuracy_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tAreaOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tAreaOut.subclass:
            return tAreaOut.subclass(*args_, **kwargs_)
        else:
            return tAreaOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Area(self):
        return self.Area
    def set_Area(self, Area):
        self.Area = Area
    def get_Unit(self):
        return self.Unit
    def set_Unit(self, Unit):
        self.Unit = Unit
    def get_Inaccuracy(self):
        return self.Inaccuracy
    def set_Inaccuracy(self, Inaccuracy):
        self.Inaccuracy = Inaccuracy
    def validate_nn20(self, value):
        result = True
        # Validate type nn20, a restriction on xs:nonNegativeInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on nn20' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def validate_dUnit(self, value):
        result = True
        # Validate type dUnit, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['003', '004', '005', '006', '008', '009', '047', '050', '051', '053', '055', '058', '059', '061', '109', '359', '360', '361', '362', '364', '365', '356', '355', '366', '383', '384', '385', '386', '1000', '1001', '1002', '1003', '1004', '1005', '1006', '1007']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dUnit' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_d20_2(self, value):
        result = True
        # Validate type d20_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d20_2' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.Area is not None or
            self.Unit is not None or
            self.Inaccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple2="urn://x-artefacts-rosreestr-ru/commons/simple-types/2.0.1"  xmlns:dUn1="urn://x-artefacts-rosreestr-ru/commons/directories/unit/1.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tAreaOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tAreaOut')
        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 and name_ == 'tAreaOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tAreaOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tAreaOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tAreaOut'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple2="urn://x-artefacts-rosreestr-ru/commons/simple-types/2.0.1"  xmlns:dUn1="urn://x-artefacts-rosreestr-ru/commons/directories/unit/1.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tAreaOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Area is not None:
            namespaceprefix_ = self.Area_nsprefix_ + ':' if (UseCapturedNS_ and self.Area_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sArea>%s</%sArea>%s' % (namespaceprefix_ , self.gds_format_integer(self.Area, input_name='Area'), namespaceprefix_ , eol_))
        if self.Unit is not None:
            namespaceprefix_ = self.Unit_nsprefix_ + ':' if (UseCapturedNS_ and self.Unit_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sUnit>%s</%sUnit>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Unit), input_name='Unit')), namespaceprefix_ , eol_))
        if self.Inaccuracy is not None:
            namespaceprefix_ = self.Inaccuracy_nsprefix_ + ':' if (UseCapturedNS_ and self.Inaccuracy_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInaccuracy>%s</%sInaccuracy>%s' % (namespaceprefix_ , self.gds_format_decimal(self.Inaccuracy, input_name='Inaccuracy'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Area' and child_.text:
            sval_ = child_.text
            ival_ = self.gds_parse_integer(sval_, node, 'Area')
            if ival_ < 0:
                raise_parse_error(child_, 'requires nonNegativeInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'Area')
            self.Area = ival_
            self.Area_nsprefix_ = child_.prefix
            # validate type nn20
            self.validate_nn20(self.Area)
        elif nodeName_ == 'Unit':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Unit')
            value_ = self.gds_validate_string(value_, node, 'Unit')
            self.Unit = value_
            self.Unit_nsprefix_ = child_.prefix
            # validate type dUnit
            self.validate_dUnit(self.Unit)
        elif nodeName_ == 'Inaccuracy' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'Inaccuracy')
            fval_ = self.gds_validate_decimal(fval_, node, 'Inaccuracy')
            self.Inaccuracy = fval_
            self.Inaccuracy_nsprefix_ = child_.prefix
            # validate type d20_2
            self.validate_d20_2(self.Inaccuracy)
# end class tAreaOut


class tAreaCadastralBlock(GeneratedsSuper):
    """Total -- З
    н
    а
    ч
    е
    н
    и
    е
    п
    л
    о
    щ
    а
    д
    и
    Unit -- Е
    д
    и
    н
    и
    ц
    а
    и
    з
    м
    е
    р
    е
    н
    и
    й
    -
    Г
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Total=None, Unit=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Total = Total
        self.Total_nsprefix_ = None
        self.Unit = Unit
        self.validate_dUnit(self.Unit)
        self.Unit_nsprefix_ = "dUn1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tAreaCadastralBlock)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tAreaCadastralBlock.subclass:
            return tAreaCadastralBlock.subclass(*args_, **kwargs_)
        else:
            return tAreaCadastralBlock(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Total(self):
        return self.Total
    def set_Total(self, Total):
        self.Total = Total
    def get_Unit(self):
        return self.Unit
    def set_Unit(self, Unit):
        self.Unit = Unit
    def validate_dUnit(self, value):
        result = True
        # Validate type dUnit, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['003', '004', '005', '006', '008', '009', '047', '050', '051', '053', '055', '058', '059', '061', '109', '359', '360', '361', '362', '364', '365', '356', '355', '366', '383', '384', '385', '386', '1000', '1001', '1002', '1003', '1004', '1005', '1006', '1007']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dUnit' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.Total is not None or
            self.Unit is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:dUn1="urn://x-artefacts-rosreestr-ru/commons/directories/unit/1.0.1" ', name_='tAreaCadastralBlock', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tAreaCadastralBlock')
        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 and name_ == 'tAreaCadastralBlock':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tAreaCadastralBlock')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tAreaCadastralBlock', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tAreaCadastralBlock'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:dUn1="urn://x-artefacts-rosreestr-ru/commons/directories/unit/1.0.1" ', name_='tAreaCadastralBlock', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Total is not None:
            namespaceprefix_ = self.Total_nsprefix_ + ':' if (UseCapturedNS_ and self.Total_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sTotal>%s</%sTotal>%s' % (namespaceprefix_ , self.gds_format_decimal(self.Total, input_name='Total'), namespaceprefix_ , eol_))
        if self.Unit is not None:
            namespaceprefix_ = self.Unit_nsprefix_ + ':' if (UseCapturedNS_ and self.Unit_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sUnit>%s</%sUnit>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Unit), input_name='Unit')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Total' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'Total')
            fval_ = self.gds_validate_decimal(fval_, node, 'Total')
            self.Total = fval_
            self.Total_nsprefix_ = child_.prefix
        elif nodeName_ == 'Unit':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Unit')
            value_ = self.gds_validate_string(value_, node, 'Unit')
            self.Unit = value_
            self.Unit_nsprefix_ = child_.prefix
            # validate type dUnit
            self.validate_dUnit(self.Unit)
# end class tAreaCadastralBlock


class tOMSPoints(GeneratedsSuper):
    """OMSPoint -- С
    в
    е
    д
    е
    н
    и
    я
    о
    п
    у
    н
    к
    т
    е
    О
    М
    С
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, OMSPoint=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if OMSPoint is None:
            self.OMSPoint = []
        else:
            self.OMSPoint = OMSPoint
        self.OMSPoint_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tOMSPoints)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tOMSPoints.subclass:
            return tOMSPoints.subclass(*args_, **kwargs_)
        else:
            return tOMSPoints(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_OMSPoint(self):
        return self.OMSPoint
    def set_OMSPoint(self, OMSPoint):
        self.OMSPoint = OMSPoint
    def add_OMSPoint(self, value):
        self.OMSPoint.append(value)
    def insert_OMSPoint_at(self, index, value):
        self.OMSPoint.insert(index, value)
    def replace_OMSPoint_at(self, index, value):
        self.OMSPoint[index] = value
    def _hasContent(self):
        if (
            self.OMSPoint
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tOMSPoints', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tOMSPoints')
        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 and name_ == 'tOMSPoints':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tOMSPoints')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tOMSPoints', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tOMSPoints'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tOMSPoints', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for OMSPoint_ in self.OMSPoint:
            namespaceprefix_ = self.OMSPoint_nsprefix_ + ':' if (UseCapturedNS_ and self.OMSPoint_nsprefix_) else ''
            OMSPoint_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='OMSPoint', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'OMSPoint':
            obj_ = OMSPointType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.OMSPoint.append(obj_)
            obj_.original_tagname_ = 'OMSPoint'
# end class tOMSPoints


class tName1(GeneratedsSuper):
    """Name -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Name=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Name = Name
        self.validate_s255(self.Name)
        self.Name_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tName1)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tName1.subclass:
            return tName1.subclass(*args_, **kwargs_)
        else:
            return tName1(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Name(self):
        return self.Name
    def set_Name(self, Name):
        self.Name = Name
    def validate_s255(self, value):
        result = True
        # Validate type s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.Name is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tName1', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tName1')
        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 and name_ == 'tName1':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tName1')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tName1', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tName1'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tName1', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Name is not None:
            namespaceprefix_ = self.Name_nsprefix_ + ':' if (UseCapturedNS_ and self.Name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sName>%s</%sName>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Name), input_name='Name')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Name')
            value_ = self.gds_validate_string(value_, node, 'Name')
            self.Name = value_
            self.Name_nsprefix_ = child_.prefix
            # validate type s255
            self.validate_s255(self.Name)
# end class tName1


class tObjectsRealty(GeneratedsSuper):
    """ObjectRealty -- З
    д
    а
    н
    и
    я
    ,
    с
    о
    о
    р
    у
    ж
    е
    н
    и
    я
    ,
    о
    б
    ъ
    е
    к
    т
    ы
    н
    е
    з
    а
    в
    е
    р
    ш
    е
    н
    н
    о
    г
    о
    с
    т
    р
    о
    и
    т
    е
    л
    ь
    с
    т
    в
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, ObjectRealty=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if ObjectRealty is None:
            self.ObjectRealty = []
        else:
            self.ObjectRealty = ObjectRealty
        self.ObjectRealty_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tObjectsRealty)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tObjectsRealty.subclass:
            return tObjectsRealty.subclass(*args_, **kwargs_)
        else:
            return tObjectsRealty(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_ObjectRealty(self):
        return self.ObjectRealty
    def set_ObjectRealty(self, ObjectRealty):
        self.ObjectRealty = ObjectRealty
    def add_ObjectRealty(self, value):
        self.ObjectRealty.append(value)
    def insert_ObjectRealty_at(self, index, value):
        self.ObjectRealty.insert(index, value)
    def replace_ObjectRealty_at(self, index, value):
        self.ObjectRealty[index] = value
    def _hasContent(self):
        if (
            self.ObjectRealty
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tObjectsRealty', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tObjectsRealty')
        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 and name_ == 'tObjectsRealty':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tObjectsRealty')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tObjectsRealty', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tObjectsRealty'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tObjectsRealty', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for ObjectRealty_ in self.ObjectRealty:
            namespaceprefix_ = self.ObjectRealty_nsprefix_ + ':' if (UseCapturedNS_ and self.ObjectRealty_nsprefix_) else ''
            ObjectRealty_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ObjectRealty', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'ObjectRealty':
            obj_ = ObjectRealtyType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.ObjectRealty.append(obj_)
            obj_.original_tagname_ = 'ObjectRealty'
# end class tObjectsRealty


class tBuilding(GeneratedsSuper):
    """ObjectType -- В
    и
    д
    о
    б
    ъ
    е
    к
    т
    а
    н
    е
    д
    в
    и
    ж
    и
    м
    о
    с
    т
    и
    -
    З
    д
    а
    н
    и
    е
    AssignationBuilding -- Н
    а
    з
    н
    а
    ч
    е
    н
    и
    е
    з
    д
    а
    н
    и
    я
    Area -- П
    л
    о
    щ
    а
    д
    ь
    в
    к
    в
    а
    д
    р
    а
    т
    н
    ы
    х
    м
    е
    т
    р
    а
    х
      
    * Address -- А
      д
      р
      е
      с
      (
      о
      п
      и
      с
      а
      н
      и
      е
      м
      е
      с
      т
      о
      п
      о
      л
      о
      ж
      е
      н
      и
      я
      )
    * CadastralCost -- С
      в
      е
      д
      е
      н
      и
      я
      о
      в
      е
      л
      и
      ч
      и
      н
      е
      к
      а
      д
      а
      с
      т
      р
      о
      в
      о
      й
      с
      т
      о
      и
      м
      о
      с
      т
      и
    * EntitySpatial -- О
      п
      и
      с
      а
      н
      и
      е
      м
      е
      с
      т
      о
      п
      о
      л
      о
      ж
      е
      н
      и
      я
      г
      р
      а
      н
      и
      ц
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralNumber=None, ObjectType=None, AssignationBuilding=None, Area=None, Address=None, CadastralCost=None, EntitySpatial=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.CadastralNumber = _cast(None, CadastralNumber)
        self.CadastralNumber_nsprefix_ = None
        self.ObjectType = ObjectType
        self.validate_ObjectTypeType(self.ObjectType)
        self.ObjectType_nsprefix_ = None
        self.AssignationBuilding = AssignationBuilding
        self.validate_dAssBuilding(self.AssignationBuilding)
        self.AssignationBuilding_nsprefix_ = "dAb1"
        self.Area = Area
        self.validate_d21_1(self.Area)
        self.Area_nsprefix_ = "Simple2"
        self.Address = Address
        self.Address_nsprefix_ = "adrOut4"
        self.CadastralCost = CadastralCost
        self.CadastralCost_nsprefix_ = "Cos1"
        self.EntitySpatial = EntitySpatial
        self.EntitySpatial_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tBuilding)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tBuilding.subclass:
            return tBuilding.subclass(*args_, **kwargs_)
        else:
            return tBuilding(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_ObjectType(self):
        return self.ObjectType
    def set_ObjectType(self, ObjectType):
        self.ObjectType = ObjectType
    def get_AssignationBuilding(self):
        return self.AssignationBuilding
    def set_AssignationBuilding(self, AssignationBuilding):
        self.AssignationBuilding = AssignationBuilding
    def get_Area(self):
        return self.Area
    def set_Area(self, Area):
        self.Area = Area
    def get_Address(self):
        return self.Address
    def set_Address(self, Address):
        self.Address = Address
    def get_CadastralCost(self):
        return self.CadastralCost
    def set_CadastralCost(self, CadastralCost):
        self.CadastralCost = CadastralCost
    def get_EntitySpatial(self):
        return self.EntitySpatial
    def set_EntitySpatial(self, EntitySpatial):
        self.EntitySpatial = EntitySpatial
    def get_CadastralNumber(self):
        return self.CadastralNumber
    def set_CadastralNumber(self, CadastralNumber):
        self.CadastralNumber = CadastralNumber
    def validate_ObjectTypeType(self, value):
        result = True
        # Validate type ObjectTypeType, a restriction on dRe3:dRealty.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['002001000000', '002001001000', '002001002000', '002001003000', '002001004000', '002001004001', '002001004002', '002001005000', '002001006000', '002001007000', '002001008000', '002002000000', '002002001000', '002002002000', '002002003000', '002002004000', '002003000000', '002003001000', '002003002000', '002003003000', '002004000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on ObjectTypeType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_ObjectTypeType_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_ObjectTypeType_patterns_, ))
                result = False
        return result
    validate_ObjectTypeType_patterns_ = [['^(002001002000)$']]
    def validate_dAssBuilding(self, value):
        result = True
        # Validate type dAssBuilding, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['204001000000', '204002000000', '204003000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dAssBuilding' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_d21_1(self, value):
        result = True
        # Validate type d21_1, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 21:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d21_1' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def validate_s40(self, value):
        # Validate type Simple1:s40, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 40:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s40' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.ObjectType is not None or
            self.AssignationBuilding is not None or
            self.Area is not None or
            self.Address is not None or
            self.CadastralCost is not None or
            self.EntitySpatial is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:dAb1="urn://x-artefacts-rosreestr-ru/commons/directories/ass-building/1.0.1"  xmlns:Simple2="urn://x-artefacts-rosreestr-ru/commons/simple-types/2.0.1"  xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"  xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tBuilding', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tBuilding')
        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 and name_ == 'tBuilding':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tBuilding')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tBuilding', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tBuilding'):
        if self.CadastralNumber is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            outfile.write(' CadastralNumber=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.CadastralNumber), input_name='CadastralNumber')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:dAb1="urn://x-artefacts-rosreestr-ru/commons/directories/ass-building/1.0.1"  xmlns:Simple2="urn://x-artefacts-rosreestr-ru/commons/simple-types/2.0.1"  xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"  xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tBuilding', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ObjectType is not None:
            namespaceprefix_ = self.ObjectType_nsprefix_ + ':' if (UseCapturedNS_ and self.ObjectType_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sObjectType>%s</%sObjectType>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.ObjectType), input_name='ObjectType')), namespaceprefix_ , eol_))
        if self.AssignationBuilding is not None:
            namespaceprefix_ = self.AssignationBuilding_nsprefix_ + ':' if (UseCapturedNS_ and self.AssignationBuilding_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAssignationBuilding>%s</%sAssignationBuilding>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.AssignationBuilding), input_name='AssignationBuilding')), namespaceprefix_ , eol_))
        if self.Area is not None:
            namespaceprefix_ = self.Area_nsprefix_ + ':' if (UseCapturedNS_ and self.Area_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sArea>%s</%sArea>%s' % (namespaceprefix_ , self.gds_format_decimal(self.Area, input_name='Area'), namespaceprefix_ , eol_))
        if self.Address is not None:
            namespaceprefix_ = self.Address_nsprefix_ + ':' if (UseCapturedNS_ and self.Address_nsprefix_) else ''
            self.Address.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Address', pretty_print=pretty_print)
        if self.CadastralCost is not None:
            namespaceprefix_ = self.CadastralCost_nsprefix_ + ':' if (UseCapturedNS_ and self.CadastralCost_nsprefix_) else ''
            self.CadastralCost.export(outfile, level, namespaceprefix_, namespacedef_='', name_='CadastralCost', pretty_print=pretty_print)
        if self.EntitySpatial is not None:
            namespaceprefix_ = self.EntitySpatial_nsprefix_ + ':' if (UseCapturedNS_ and self.EntitySpatial_nsprefix_) else ''
            self.EntitySpatial.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EntitySpatial', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('CadastralNumber', node)
        if value is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            self.CadastralNumber = value
            self.validate_s40(self.CadastralNumber)    # validate type s40
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'ObjectType':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'ObjectType')
            value_ = self.gds_validate_string(value_, node, 'ObjectType')
            self.ObjectType = value_
            self.ObjectType_nsprefix_ = child_.prefix
            # validate type ObjectTypeType
            self.validate_ObjectTypeType(self.ObjectType)
        elif nodeName_ == 'AssignationBuilding':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'AssignationBuilding')
            value_ = self.gds_validate_string(value_, node, 'AssignationBuilding')
            self.AssignationBuilding = value_
            self.AssignationBuilding_nsprefix_ = child_.prefix
            # validate type dAssBuilding
            self.validate_dAssBuilding(self.AssignationBuilding)
        elif nodeName_ == 'Area' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'Area')
            fval_ = self.gds_validate_decimal(fval_, node, 'Area')
            self.Area = fval_
            self.Area_nsprefix_ = child_.prefix
            # validate type d21_1
            self.validate_d21_1(self.Area)
        elif nodeName_ == 'Address':
            obj_ = tAddressOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Address = obj_
            obj_.original_tagname_ = 'Address'
        elif nodeName_ == 'CadastralCost':
            class_obj_ = self.get_class_obj_(child_, tCadastralCost)
            obj_ = class_obj_.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.CadastralCost = obj_
            obj_.original_tagname_ = 'CadastralCost'
        elif nodeName_ == 'EntitySpatial':
            obj_ = tEntitySpatialOKSOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.EntitySpatial = obj_
            obj_.original_tagname_ = 'EntitySpatial'
# end class tBuilding


class tConstruction(GeneratedsSuper):
    """ObjectType -- В
    и
    д
    о
    б
    ъ
    е
    к
    т
    а
    н
    е
    д
    в
    и
    ж
    и
    м
    о
    с
    т
    и
    -
    С
    о
    о
    р
    у
    ж
    е
    н
    и
    е
    AssignationName -- Н
    а
    з
    н
    а
    ч
    е
    н
    и
    е
    с
    о
    о
    р
    у
    ж
    е
    н
    и
    я
    KeyParameters -- О
    с
    н
    о
    в
    н
    ы
    е
    х
    а
    р
    а
    к
    т
    е
    р
    и
    с
    т
    и
    к
    и
    с
    о
    о
    р
    у
    ж
    е
    н
    и
    я
    Address -- А
    д
    р
    е
    с
    (
    о
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    )
    CadastralCost -- С
    в
    е
    д
    е
    н
    и
    я
    о
    в
    е
    л
    и
    ч
    и
    н
    е
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    й
    с
    т
    о
    и
    м
    о
    с
    т
    и
    EntitySpatial -- О
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    г
    р
    а
    н
    и
    ц
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralNumber=None, ObjectType=None, AssignationName=None, KeyParameters=None, Address=None, CadastralCost=None, EntitySpatial=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.CadastralNumber = _cast(None, CadastralNumber)
        self.CadastralNumber_nsprefix_ = None
        self.ObjectType = ObjectType
        self.validate_ObjectTypeType4(self.ObjectType)
        self.ObjectType_nsprefix_ = None
        self.AssignationName = AssignationName
        self.validate_s250(self.AssignationName)
        self.AssignationName_nsprefix_ = "Simple1"
        self.KeyParameters = KeyParameters
        self.KeyParameters_nsprefix_ = "Param2"
        self.Address = Address
        self.Address_nsprefix_ = "adrOut4"
        self.CadastralCost = CadastralCost
        self.CadastralCost_nsprefix_ = "Cos1"
        self.EntitySpatial = EntitySpatial
        self.EntitySpatial_nsprefix_ = "Spa5"
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tConstruction)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tConstruction.subclass:
            return tConstruction.subclass(*args_, **kwargs_)
        else:
            return tConstruction(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_ObjectType(self):
        return self.ObjectType
    def set_ObjectType(self, ObjectType):
        self.ObjectType = ObjectType
    def get_AssignationName(self):
        return self.AssignationName
    def set_AssignationName(self, AssignationName):
        self.AssignationName = AssignationName
    def get_KeyParameters(self):
        return self.KeyParameters
    def set_KeyParameters(self, KeyParameters):
        self.KeyParameters = KeyParameters
    def get_Address(self):
        return self.Address
    def set_Address(self, Address):
        self.Address = Address
    def get_CadastralCost(self):
        return self.CadastralCost
    def set_CadastralCost(self, CadastralCost):
        self.CadastralCost = CadastralCost
    def get_EntitySpatial(self):
        return self.EntitySpatial
    def set_EntitySpatial(self, EntitySpatial):
        self.EntitySpatial = EntitySpatial
    def get_CadastralNumber(self):
        return self.CadastralNumber
    def set_CadastralNumber(self, CadastralNumber):
        self.CadastralNumber = CadastralNumber
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_ObjectTypeType4(self, value):
        result = True
        # Validate type ObjectTypeType4, a restriction on dRe3:dRealty.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['002001000000', '002001001000', '002001002000', '002001003000', '002001004000', '002001004001', '002001004002', '002001005000', '002001006000', '002001007000', '002001008000', '002002000000', '002002001000', '002002002000', '002002003000', '002002004000', '002003000000', '002003001000', '002003002000', '002003003000', '002004000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on ObjectTypeType4' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_ObjectTypeType4_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_ObjectTypeType4_patterns_, ))
                result = False
        return result
    validate_ObjectTypeType4_patterns_ = [['^(002001004000)$']]
    def validate_s250(self, value):
        result = True
        # Validate type s250, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 250:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s250' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s40(self, value):
        # Validate type Simple1:s40, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 40:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s40' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.ObjectType is not None or
            self.AssignationName is not None or
            self.KeyParameters is not None or
            self.Address is not None or
            self.CadastralCost is not None or
            self.EntitySpatial is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"  xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"  xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tConstruction', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tConstruction')
        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 and name_ == 'tConstruction':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tConstruction')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tConstruction', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tConstruction'):
        if self.CadastralNumber is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            outfile.write(' CadastralNumber=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.CadastralNumber), input_name='CadastralNumber')), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"  xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"  xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tConstruction', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ObjectType is not None:
            namespaceprefix_ = self.ObjectType_nsprefix_ + ':' if (UseCapturedNS_ and self.ObjectType_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sObjectType>%s</%sObjectType>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.ObjectType), input_name='ObjectType')), namespaceprefix_ , eol_))
        if self.AssignationName is not None:
            namespaceprefix_ = self.AssignationName_nsprefix_ + ':' if (UseCapturedNS_ and self.AssignationName_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAssignationName>%s</%sAssignationName>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.AssignationName), input_name='AssignationName')), namespaceprefix_ , eol_))
        if self.KeyParameters is not None:
            namespaceprefix_ = self.KeyParameters_nsprefix_ + ':' if (UseCapturedNS_ and self.KeyParameters_nsprefix_) else ''
            self.KeyParameters.export(outfile, level, namespaceprefix_, namespacedef_='', name_='KeyParameters', pretty_print=pretty_print)
        if self.Address is not None:
            namespaceprefix_ = self.Address_nsprefix_ + ':' if (UseCapturedNS_ and self.Address_nsprefix_) else ''
            self.Address.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Address', pretty_print=pretty_print)
        if self.CadastralCost is not None:
            namespaceprefix_ = self.CadastralCost_nsprefix_ + ':' if (UseCapturedNS_ and self.CadastralCost_nsprefix_) else ''
            self.CadastralCost.export(outfile, level, namespaceprefix_, namespacedef_='', name_='CadastralCost', pretty_print=pretty_print)
        if self.EntitySpatial is not None:
            namespaceprefix_ = self.EntitySpatial_nsprefix_ + ':' if (UseCapturedNS_ and self.EntitySpatial_nsprefix_) else ''
            self.EntitySpatial.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EntitySpatial', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('CadastralNumber', node)
        if value is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            self.CadastralNumber = value
            self.validate_s40(self.CadastralNumber)    # validate type s40
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'ObjectType':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'ObjectType')
            value_ = self.gds_validate_string(value_, node, 'ObjectType')
            self.ObjectType = value_
            self.ObjectType_nsprefix_ = child_.prefix
            # validate type ObjectTypeType4
            self.validate_ObjectTypeType4(self.ObjectType)
        elif nodeName_ == 'AssignationName':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'AssignationName')
            value_ = self.gds_validate_string(value_, node, 'AssignationName')
            self.AssignationName = value_
            self.AssignationName_nsprefix_ = child_.prefix
            # validate type s250
            self.validate_s250(self.AssignationName)
        elif nodeName_ == 'KeyParameters':
            obj_ = tKeyParameters.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.KeyParameters = obj_
            obj_.original_tagname_ = 'KeyParameters'
        elif nodeName_ == 'Address':
            obj_ = tAddressOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Address = obj_
            obj_.original_tagname_ = 'Address'
        elif nodeName_ == 'CadastralCost':
            class_obj_ = self.get_class_obj_(child_, tCadastralCost)
            obj_ = class_obj_.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.CadastralCost = obj_
            obj_.original_tagname_ = 'CadastralCost'
        elif nodeName_ == 'EntitySpatial':
            obj_ = tEntitySpatialOKSOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.EntitySpatial = obj_
            obj_.original_tagname_ = 'EntitySpatial'
# end class tConstruction


class tUncompleted(GeneratedsSuper):
    """ObjectType -- В
    и
    д
    о
    б
    ъ
    е
    к
    т
    а
    н
    е
    д
    в
    и
    ж
    и
    м
    о
    с
    т
    и
    -
    О
    б
    ъ
    е
    к
    т
    н
    е
    з
    а
    в
    е
    р
    ш
    е
    н
    н
    о
    г
    о
    с
    т
    р
    о
    и
    т
    е
    л
    ь
    с
    т
    в
    а
    AssignationName -- П
    р
    о
    е
    к
    т
    и
    р
    у
    е
    м
    о
    е
    н
    а
    з
    н
    а
    ч
    е
    н
    и
    е
    о
    б
    ъ
    е
    к
    т
    а
    н
    е
    з
    а
    в
    е
    р
    ш
    е
    н
    н
    о
    г
    о
    с
    т
    р
    о
    и
    т
    е
    л
    ь
    с
    т
    в
    а
    KeyParameters -- О
    с
    н
    о
    в
    н
    ы
    е
    х
    а
    р
    а
    к
    т
    е
    р
    и
    с
    т
    и
    к
    и
    (
    и
    и
    х
    п
    р
    о
    е
    к
    т
    и
    р
    у
    е
    м
    ы
    е
    з
    н
    а
    ч
    е
    н
    и
    я
    )
    Address -- А
    д
    р
    е
    с
    (
    о
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    )
    CadastralCost -- С
    в
    е
    д
    е
    н
    и
    я
    о
    в
    е
    л
    и
    ч
    и
    н
    е
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    й
    с
    т
    о
    и
    м
    о
    с
    т
    и
    EntitySpatial -- О
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    г
    р
    а
    н
    и
    ц
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralNumber=None, ObjectType=None, AssignationName=None, KeyParameters=None, Address=None, CadastralCost=None, EntitySpatial=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.CadastralNumber = _cast(None, CadastralNumber)
        self.CadastralNumber_nsprefix_ = None
        self.ObjectType = ObjectType
        self.validate_ObjectTypeType5(self.ObjectType)
        self.ObjectType_nsprefix_ = None
        self.AssignationName = AssignationName
        self.validate_s250(self.AssignationName)
        self.AssignationName_nsprefix_ = "Simple1"
        self.KeyParameters = KeyParameters
        self.KeyParameters_nsprefix_ = "Param2"
        self.Address = Address
        self.Address_nsprefix_ = "adrOut4"
        self.CadastralCost = CadastralCost
        self.CadastralCost_nsprefix_ = "Cos1"
        self.EntitySpatial = EntitySpatial
        self.EntitySpatial_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tUncompleted)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tUncompleted.subclass:
            return tUncompleted.subclass(*args_, **kwargs_)
        else:
            return tUncompleted(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_ObjectType(self):
        return self.ObjectType
    def set_ObjectType(self, ObjectType):
        self.ObjectType = ObjectType
    def get_AssignationName(self):
        return self.AssignationName
    def set_AssignationName(self, AssignationName):
        self.AssignationName = AssignationName
    def get_KeyParameters(self):
        return self.KeyParameters
    def set_KeyParameters(self, KeyParameters):
        self.KeyParameters = KeyParameters
    def get_Address(self):
        return self.Address
    def set_Address(self, Address):
        self.Address = Address
    def get_CadastralCost(self):
        return self.CadastralCost
    def set_CadastralCost(self, CadastralCost):
        self.CadastralCost = CadastralCost
    def get_EntitySpatial(self):
        return self.EntitySpatial
    def set_EntitySpatial(self, EntitySpatial):
        self.EntitySpatial = EntitySpatial
    def get_CadastralNumber(self):
        return self.CadastralNumber
    def set_CadastralNumber(self, CadastralNumber):
        self.CadastralNumber = CadastralNumber
    def validate_ObjectTypeType5(self, value):
        result = True
        # Validate type ObjectTypeType5, a restriction on dRe3:dRealty.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['002001000000', '002001001000', '002001002000', '002001003000', '002001004000', '002001004001', '002001004002', '002001005000', '002001006000', '002001007000', '002001008000', '002002000000', '002002001000', '002002002000', '002002003000', '002002004000', '002003000000', '002003001000', '002003002000', '002003003000', '002004000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on ObjectTypeType5' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_ObjectTypeType5_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_ObjectTypeType5_patterns_, ))
                result = False
        return result
    validate_ObjectTypeType5_patterns_ = [['^(002001005000)$']]
    def validate_s250(self, value):
        result = True
        # Validate type s250, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 250:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s250' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s40(self, value):
        # Validate type Simple1:s40, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 40:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s40' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.ObjectType is not None or
            self.AssignationName is not None or
            self.KeyParameters is not None or
            self.Address is not None or
            self.CadastralCost is not None or
            self.EntitySpatial is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"  xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"  xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tUncompleted', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tUncompleted')
        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 and name_ == 'tUncompleted':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tUncompleted')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tUncompleted', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tUncompleted'):
        if self.CadastralNumber is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            outfile.write(' CadastralNumber=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.CadastralNumber), input_name='CadastralNumber')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"  xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"  xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tUncompleted', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ObjectType is not None:
            namespaceprefix_ = self.ObjectType_nsprefix_ + ':' if (UseCapturedNS_ and self.ObjectType_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sObjectType>%s</%sObjectType>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.ObjectType), input_name='ObjectType')), namespaceprefix_ , eol_))
        if self.AssignationName is not None:
            namespaceprefix_ = self.AssignationName_nsprefix_ + ':' if (UseCapturedNS_ and self.AssignationName_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAssignationName>%s</%sAssignationName>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.AssignationName), input_name='AssignationName')), namespaceprefix_ , eol_))
        if self.KeyParameters is not None:
            namespaceprefix_ = self.KeyParameters_nsprefix_ + ':' if (UseCapturedNS_ and self.KeyParameters_nsprefix_) else ''
            self.KeyParameters.export(outfile, level, namespaceprefix_, namespacedef_='', name_='KeyParameters', pretty_print=pretty_print)
        if self.Address is not None:
            namespaceprefix_ = self.Address_nsprefix_ + ':' if (UseCapturedNS_ and self.Address_nsprefix_) else ''
            self.Address.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Address', pretty_print=pretty_print)
        if self.CadastralCost is not None:
            namespaceprefix_ = self.CadastralCost_nsprefix_ + ':' if (UseCapturedNS_ and self.CadastralCost_nsprefix_) else ''
            self.CadastralCost.export(outfile, level, namespaceprefix_, namespacedef_='', name_='CadastralCost', pretty_print=pretty_print)
        if self.EntitySpatial is not None:
            namespaceprefix_ = self.EntitySpatial_nsprefix_ + ':' if (UseCapturedNS_ and self.EntitySpatial_nsprefix_) else ''
            self.EntitySpatial.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EntitySpatial', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('CadastralNumber', node)
        if value is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            self.CadastralNumber = value
            self.validate_s40(self.CadastralNumber)    # validate type s40
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'ObjectType':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'ObjectType')
            value_ = self.gds_validate_string(value_, node, 'ObjectType')
            self.ObjectType = value_
            self.ObjectType_nsprefix_ = child_.prefix
            # validate type ObjectTypeType5
            self.validate_ObjectTypeType5(self.ObjectType)
        elif nodeName_ == 'AssignationName':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'AssignationName')
            value_ = self.gds_validate_string(value_, node, 'AssignationName')
            self.AssignationName = value_
            self.AssignationName_nsprefix_ = child_.prefix
            # validate type s250
            self.validate_s250(self.AssignationName)
        elif nodeName_ == 'KeyParameters':
            obj_ = tKeyParameters.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.KeyParameters = obj_
            obj_.original_tagname_ = 'KeyParameters'
        elif nodeName_ == 'Address':
            obj_ = tAddressOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Address = obj_
            obj_.original_tagname_ = 'Address'
        elif nodeName_ == 'CadastralCost':
            class_obj_ = self.get_class_obj_(child_, tCadastralCost)
            obj_ = class_obj_.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.CadastralCost = obj_
            obj_.original_tagname_ = 'CadastralCost'
        elif nodeName_ == 'EntitySpatial':
            obj_ = tEntitySpatialOKSOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.EntitySpatial = obj_
            obj_.original_tagname_ = 'EntitySpatial'
# end class tUncompleted


class tConditionalPartLinear(GeneratedsSuper):
    """ObjectType -- В
    и
    д
    о
    б
    ъ
    е
    к
    т
    а
    -
    У
    с
    л
    о
    в
    н
    а
    я
    ч
    а
    с
    т
    ь
    л
    и
    н
    е
    й
    н
    о
    г
    о
    с
    о
    о
    р
    у
    ж
    е
    н
    и
    я
    EntitySpatial -- О
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    г
    р
    а
    н
    и
    ц
    у
    с
    л
    о
    в
    н
    о
    й
    ч
    а
    с
    т
    и
    л
    и
    н
    е
    й
    н
    о
    г
    о
    с
    о
    о
    р
    у
    ж
    е
    н
    и
    я
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralNumber=None, ObjectType=None, EntitySpatial=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.CadastralNumber = _cast(None, CadastralNumber)
        self.CadastralNumber_nsprefix_ = None
        self.ObjectType = ObjectType
        self.validate_ObjectTypeType6(self.ObjectType)
        self.ObjectType_nsprefix_ = None
        self.EntitySpatial = EntitySpatial
        self.EntitySpatial_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tConditionalPartLinear)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tConditionalPartLinear.subclass:
            return tConditionalPartLinear.subclass(*args_, **kwargs_)
        else:
            return tConditionalPartLinear(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_ObjectType(self):
        return self.ObjectType
    def set_ObjectType(self, ObjectType):
        self.ObjectType = ObjectType
    def get_EntitySpatial(self):
        return self.EntitySpatial
    def set_EntitySpatial(self, EntitySpatial):
        self.EntitySpatial = EntitySpatial
    def get_CadastralNumber(self):
        return self.CadastralNumber
    def set_CadastralNumber(self, CadastralNumber):
        self.CadastralNumber = CadastralNumber
    def validate_ObjectTypeType6(self, value):
        result = True
        # Validate type ObjectTypeType6, a restriction on dRe3:dRealty.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['002001000000', '002001001000', '002001002000', '002001003000', '002001004000', '002001004001', '002001004002', '002001005000', '002001006000', '002001007000', '002001008000', '002002000000', '002002001000', '002002002000', '002002003000', '002002004000', '002003000000', '002003001000', '002003002000', '002003003000', '002004000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on ObjectTypeType6' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_ObjectTypeType6_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_ObjectTypeType6_patterns_, ))
                result = False
        return result
    validate_ObjectTypeType6_patterns_ = [['^(002001004002)$']]
    def validate_s40(self, value):
        # Validate type Simple1:s40, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 40:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s40' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.ObjectType is not None or
            self.EntitySpatial is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tConditionalPartLinear', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tConditionalPartLinear')
        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 and name_ == 'tConditionalPartLinear':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tConditionalPartLinear')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tConditionalPartLinear', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tConditionalPartLinear'):
        if self.CadastralNumber is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            outfile.write(' CadastralNumber=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.CadastralNumber), input_name='CadastralNumber')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='tConditionalPartLinear', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ObjectType is not None:
            namespaceprefix_ = self.ObjectType_nsprefix_ + ':' if (UseCapturedNS_ and self.ObjectType_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sObjectType>%s</%sObjectType>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.ObjectType), input_name='ObjectType')), namespaceprefix_ , eol_))
        if self.EntitySpatial is not None:
            namespaceprefix_ = self.EntitySpatial_nsprefix_ + ':' if (UseCapturedNS_ and self.EntitySpatial_nsprefix_) else ''
            self.EntitySpatial.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EntitySpatial', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('CadastralNumber', node)
        if value is not None and 'CadastralNumber' not in already_processed:
            already_processed.add('CadastralNumber')
            self.CadastralNumber = value
            self.validate_s40(self.CadastralNumber)    # validate type s40
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'ObjectType':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'ObjectType')
            value_ = self.gds_validate_string(value_, node, 'ObjectType')
            self.ObjectType = value_
            self.ObjectType_nsprefix_ = child_.prefix
            # validate type ObjectTypeType6
            self.validate_ObjectTypeType6(self.ObjectType)
        elif nodeName_ == 'EntitySpatial':
            obj_ = tEntitySpatialOKSOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.EntitySpatial = obj_
            obj_.original_tagname_ = 'EntitySpatial'
# end class tConditionalPartLinear


class tTerritorialZone(GeneratedsSuper):
    """PermittedUses -- В
    и
    д
    ы
    р
    а
    з
    р
    е
    ш
    е
    н
    н
    о
    г
    о
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    о
    б
    ъ
    е
    к
    т
    о
    в
    н
    е
    д
    в
    и
    ж
    и
    м
    о
    с
    т
    и
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, PermittedUses=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.PermittedUses = PermittedUses
        self.PermittedUses_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tTerritorialZone)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tTerritorialZone.subclass:
            return tTerritorialZone.subclass(*args_, **kwargs_)
        else:
            return tTerritorialZone(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_PermittedUses(self):
        return self.PermittedUses
    def set_PermittedUses(self, PermittedUses):
        self.PermittedUses = PermittedUses
    def _hasContent(self):
        if (
            self.PermittedUses is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tTerritorialZone', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tTerritorialZone')
        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 and name_ == 'tTerritorialZone':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tTerritorialZone')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tTerritorialZone', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tTerritorialZone'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tTerritorialZone', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PermittedUses is not None:
            namespaceprefix_ = self.PermittedUses_nsprefix_ + ':' if (UseCapturedNS_ and self.PermittedUses_nsprefix_) else ''
            self.PermittedUses.export(outfile, level, namespaceprefix_, namespacedef_='', name_='PermittedUses', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'PermittedUses':
            obj_ = tPermittedUses.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.PermittedUses = obj_
            obj_.original_tagname_ = 'PermittedUses'
# end class tTerritorialZone


class tSpecialZones(GeneratedsSuper):
    """ContentRestrictions -- С
    о
    д
    е
    р
    ж
    а
    н
    и
    е
    о
    г
    р
    а
    н
    и
    ч
    е
    н
    и
    й
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    о
    б
    ъ
    е
    к
    т
    о
    в
    н
    е
    д
    в
    и
    ж
    и
    м
    о
    с
    т
    и
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, ContentRestrictions=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.ContentRestrictions = ContentRestrictions
        self.validate_s4000(self.ContentRestrictions)
        self.ContentRestrictions_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpecialZones)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpecialZones.subclass:
            return tSpecialZones.subclass(*args_, **kwargs_)
        else:
            return tSpecialZones(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_ContentRestrictions(self):
        return self.ContentRestrictions
    def set_ContentRestrictions(self, ContentRestrictions):
        self.ContentRestrictions = ContentRestrictions
    def validate_s4000(self, value):
        result = True
        # Validate type s4000, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 4000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s4000' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.ContentRestrictions is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tSpecialZones', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpecialZones')
        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 and name_ == 'tSpecialZones':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpecialZones')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpecialZones', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tSpecialZones'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tSpecialZones', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ContentRestrictions is not None:
            namespaceprefix_ = self.ContentRestrictions_nsprefix_ + ':' if (UseCapturedNS_ and self.ContentRestrictions_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sContentRestrictions>%s</%sContentRestrictions>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.ContentRestrictions), input_name='ContentRestrictions')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'ContentRestrictions':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'ContentRestrictions')
            value_ = self.gds_validate_string(value_, node, 'ContentRestrictions')
            self.ContentRestrictions = value_
            self.ContentRestrictions_nsprefix_ = child_.prefix
            # validate type s4000
            self.validate_s4000(self.ContentRestrictions)
# end class tSpecialZones


class tPermittedUses(GeneratedsSuper):
    """PermittedUse -- В
    и
    д
    р
    а
    з
    р
    е
    ш
    е
    н
    н
    о
    г
    о
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, PermittedUse=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if PermittedUse is None:
            self.PermittedUse = []
        else:
            self.PermittedUse = PermittedUse
        self.PermittedUse_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tPermittedUses)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tPermittedUses.subclass:
            return tPermittedUses.subclass(*args_, **kwargs_)
        else:
            return tPermittedUses(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_PermittedUse(self):
        return self.PermittedUse
    def set_PermittedUse(self, PermittedUse):
        self.PermittedUse = PermittedUse
    def add_PermittedUse(self, value):
        self.PermittedUse.append(value)
    def insert_PermittedUse_at(self, index, value):
        self.PermittedUse.insert(index, value)
    def replace_PermittedUse_at(self, index, value):
        self.PermittedUse[index] = value
    def _hasContent(self):
        if (
            self.PermittedUse
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tPermittedUses', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tPermittedUses')
        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 and name_ == 'tPermittedUses':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tPermittedUses')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tPermittedUses', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tPermittedUses'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tPermittedUses', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for PermittedUse_ in self.PermittedUse:
            namespaceprefix_ = self.PermittedUse_nsprefix_ + ':' if (UseCapturedNS_ and self.PermittedUse_nsprefix_) else ''
            PermittedUse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='PermittedUse', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'PermittedUse':
            obj_ = tPermittedUseAll.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.PermittedUse.append(obj_)
            obj_.original_tagname_ = 'PermittedUse'
# end class tPermittedUses


class tPermittedUse(GeneratedsSuper):
    """TypePermittedUse -- В
    и
    д
    р
    а
    з
    р
    е
    ш
    е
    н
    н
    о
    г
    о
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    LandUse -- Р
    а
    з
    р
    е
    ш
    е
    н
    н
    о
    е
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    е
    в
    с
    о
    о
    т
    в
    е
    т
    с
    т
    в
    и
    и
    с
    к
    л
    а
    с
    с
    и
    ф
    и
    к
    а
    т
    о
    р
    о
    м
    ,
    у
    т
    в
    е
    р
    ж
    д
    е
    н
    н
    ы
    м
    п
    р
    и
    к
    а
    з
    о
    м
    М
    и
    н
    э
    к
    о
    н
    о
    м
    р
    а
    з
    в
    и
    т
    и
    я
    Р
    о
    с
    с
    и
    и
    о
    т
    01.09.2014
    №
    540
    Utilization -- Р
    а
    з
    р
    е
    ш
    е
    н
    н
    о
    е
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    е
    в
    с
    о
    о
    т
    в
    е
    т
    с
    т
    в
    и
    и
    с
    р
    а
    н
    е
    е
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    в
    ш
    и
    м
    с
    я
    к
    л
    а
    с
    с
    и
    ф
    и
    к
    а
    т
    о
    р
    о
    м
    dUtilizations
    PermittedUse -- Р
    а
    з
    р
    е
    ш
    е
    н
    н
    о
    е
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    е
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, TypePermittedUse=None, LandUse=None, Utilization=None, PermittedUse=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.TypePermittedUse = TypePermittedUse
        self.validate_dPermitUse(self.TypePermittedUse)
        self.TypePermittedUse_nsprefix_ = "dPUse1"
        self.LandUse = LandUse
        self.validate_dAllowedUse(self.LandUse)
        self.LandUse_nsprefix_ = "dAU"
        self.Utilization = Utilization
        self.validate_dUtilizations(self.Utilization)
        self.Utilization_nsprefix_ = "dUtz1"
        self.PermittedUse = PermittedUse
        self.validate_s4000(self.PermittedUse)
        self.PermittedUse_nsprefix_ = "Simple1"
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tPermittedUse)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tPermittedUse.subclass:
            return tPermittedUse.subclass(*args_, **kwargs_)
        else:
            return tPermittedUse(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_TypePermittedUse(self):
        return self.TypePermittedUse
    def set_TypePermittedUse(self, TypePermittedUse):
        self.TypePermittedUse = TypePermittedUse
    def get_LandUse(self):
        return self.LandUse
    def set_LandUse(self, LandUse):
        self.LandUse = LandUse
    def get_Utilization(self):
        return self.Utilization
    def set_Utilization(self, Utilization):
        self.Utilization = Utilization
    def get_PermittedUse(self):
        return self.PermittedUse
    def set_PermittedUse(self, PermittedUse):
        self.PermittedUse = PermittedUse
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_dPermitUse(self, value):
        result = True
        # Validate type dPermitUse, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['1', '2', '3']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dPermitUse' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_dAllowedUse(self, value):
        result = True
        # Validate type dAllowedUse, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['214001000000', '214001001000', '214001001001', '214001001002', '214001001003', '214001001004', '214001001005', '214001002000', '214001002001', '214001002002', '214001002003', '214001002004', '214001003000', '214001004000', '214001005000', '214001006000', '214001007000', '214001008000', '214001009000', '214002000000', '214002001000', '214002001001', '214002002000', '214002003000', '214002004000', '214002005000', '214002006000', '214002007000', '214002007001', '214003000000', '214003001000', '214003002000', '214003003000', '214003004000', '214003004001', '214003004002', '214003005000', '214003005001', '214003005002', '214003006000', '214003007000', '214003008000', '214003009000', '214003009001', '214003010000', '214003010001', '214003010002', '214004000000', '214004001000', '214004002000', '214004003000', '214004004000', '214004005000', '214004006000', '214004007000', '214004008000', '214004009000', '214004009001', '214004010000', '214005000000', '214005001000', '214005002000', '214005002001', '214005003000', '214005004000', '214005005000', '214006000000', '214006001000', '214006002000', '214006002001', '214006003000', '214006003001', '214006004000', '214006005000', '214006006000', '214006007000', '214006007001', '214006008000', '214006009000', '214007000000', '214006011000', '214008000000', '214008001000', '214008002000', '214008003000', '214008004000', '214008005000', '214009000000', '214010000000', '214011000000', '214012000000', '214013000000', '214014000000', '214015000000', '214016000000', '214016001000', '214017000000', '214018000000', '214018001000', '214018002000', '214018003000', '214018004000', '214019000000', '214020000000', '214021000000', '214022000000', '214023000000', '214024000000', '214025000000', '214026000000', '214027001000', '214027002000', '214027003000', '214099000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dAllowedUse' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_dUtilizations(self, value):
        result = True
        # Validate type dUtilizations, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['141000000000', '141001000000', '141001010000', '141001020000', '141001030000', '141001040000', '141002000000', '141003000000', '141004000000', '141005000000', '141006000000', '141007000000', '141008000000', '141009000000', '141010000000', '141011000000', '141012000000', '141013000000', '141014000000', '142000000000', '142001000000', '142001010000', '142001020000', '142001020100', '142001020200', '142001020300', '142001020400', '142001030000', '142001040000', '142002000000', '142002010000', '142002020000', '142002030000', '142002040000', '142002040100', '142002040200', '142002050000', '142002060000', '142002070000', '142002080000', '142002090000', '142002100000', '142002110000', '142002120000', '142002130000', '142002140000', '142002150000', '142002160000', '142002170000', '142003000000', '142004000000', '142004010000', '142004020000', '142004030000', '142004040000', '142004050000', '142005000000', '142006000000', '142007000000', '143000000000', '143001000000', '143001010000', '143001010100', '143001010200', '143001010300', '143001010400', '143001010500', '143001010600', '143001010700', '143001020000', '143001030000', '143002000000', '143002010000', '143002010100', '143002010200', '143002010300', '143002010400', '143002010500', '143002010600', '143002010700', '143002010800', '143002020000', '143002020100', '143002020200', '143002020300', '143002020400', '143002020500', '143002030000', '143003000000', '143003010000', '143003010100', '143003010200', '143003010300', '143003010301', '143003010302', '143003010303', '143003020000', '143003020100', '143003020200', '143003020300', '143003020400', '143003020500', '143003020600', '143003030000', '143003030100', '143003030200', '143003030300', '143003030400', '143003040000', '143003040100', '143003040200', '143003040300', '143003040400', '143003050000', '143003050100', '143003050200', '143003050300', '143003050400', '143003060000', '143004000000', '143004010000', '143004020000', '143004030000', '143004040000', '143004050000', '143004060000', '143005000000', '143005010000', '143005020000', '143005030000', '143005040000', '143005050000', '143005060000', '143005070000', '143006000000', '143006010000', '143006010100', '143006010200', '143006010300', '143006010400', '143006010500', '143006010600', '143006010700', '143006020000', '143006020100', '143006020200', '143006020300', '143006020400', '143006020500', '143006020600', '143006030000', '143007000000', '144000000000', '144001000000', '144001010000', '144001020000', '144001030000', '144001040000', '144001050000', '144001060000', '144001070000', '144001080000', '144001090000', '144001100000', '144002000000', '144003000000', '144003010000', '144003020000', '144003030000', '144003040000', '144003050000', '144003060000', '144003070000', '144003080000', '144003090000', '144003100000', '144004000000', '144004010000', '144004020000', '144005000000', '145000000000', '145001000000', '145002000000', '145003000000', '146000000000', '146001000000', '146002000000', '146003000000', '147000000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dUtilizations' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s4000(self, value):
        result = True
        # Validate type s4000, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 4000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s4000' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.TypePermittedUse is not None or
            self.LandUse is not None or
            self.Utilization is not None or
            self.PermittedUse is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:dPUse1="urn://x-artefacts-rosreestr-ru/commons/directories/permit-use/1.0.1"  xmlns:dAU="urn://x-artefacts-rosreestr-ru/commons/directories/allowed-use/2.0.1"  xmlns:dUtz1="urn://x-artefacts-rosreestr-ru/commons/directories/utilizations/1.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tPermittedUse', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tPermittedUse')
        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 and name_ == 'tPermittedUse':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tPermittedUse')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tPermittedUse', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tPermittedUse'):
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:dPUse1="urn://x-artefacts-rosreestr-ru/commons/directories/permit-use/1.0.1"  xmlns:dAU="urn://x-artefacts-rosreestr-ru/commons/directories/allowed-use/2.0.1"  xmlns:dUtz1="urn://x-artefacts-rosreestr-ru/commons/directories/utilizations/1.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tPermittedUse', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TypePermittedUse is not None:
            namespaceprefix_ = self.TypePermittedUse_nsprefix_ + ':' if (UseCapturedNS_ and self.TypePermittedUse_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sTypePermittedUse>%s</%sTypePermittedUse>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.TypePermittedUse), input_name='TypePermittedUse')), namespaceprefix_ , eol_))
        if self.LandUse is not None:
            namespaceprefix_ = self.LandUse_nsprefix_ + ':' if (UseCapturedNS_ and self.LandUse_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLandUse>%s</%sLandUse>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.LandUse), input_name='LandUse')), namespaceprefix_ , eol_))
        if self.Utilization is not None:
            namespaceprefix_ = self.Utilization_nsprefix_ + ':' if (UseCapturedNS_ and self.Utilization_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sUtilization>%s</%sUtilization>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Utilization), input_name='Utilization')), namespaceprefix_ , eol_))
        if self.PermittedUse is not None:
            namespaceprefix_ = self.PermittedUse_nsprefix_ + ':' if (UseCapturedNS_ and self.PermittedUse_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPermittedUse>%s</%sPermittedUse>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.PermittedUse), input_name='PermittedUse')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'TypePermittedUse':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'TypePermittedUse')
            value_ = self.gds_validate_string(value_, node, 'TypePermittedUse')
            self.TypePermittedUse = value_
            self.TypePermittedUse_nsprefix_ = child_.prefix
            # validate type dPermitUse
            self.validate_dPermitUse(self.TypePermittedUse)
        elif nodeName_ == 'LandUse':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'LandUse')
            value_ = self.gds_validate_string(value_, node, 'LandUse')
            self.LandUse = value_
            self.LandUse_nsprefix_ = child_.prefix
            # validate type dAllowedUse
            self.validate_dAllowedUse(self.LandUse)
        elif nodeName_ == 'Utilization':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Utilization')
            value_ = self.gds_validate_string(value_, node, 'Utilization')
            self.Utilization = value_
            self.Utilization_nsprefix_ = child_.prefix
            # validate type dUtilizations
            self.validate_dUtilizations(self.Utilization)
        elif nodeName_ == 'PermittedUse':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'PermittedUse')
            value_ = self.gds_validate_string(value_, node, 'PermittedUse')
            self.PermittedUse = value_
            self.PermittedUse_nsprefix_ = child_.prefix
            # validate type s4000
            self.validate_s4000(self.PermittedUse)
# end class tPermittedUse


class tLocation(GeneratedsSuper):
    """inBounds -- В
    г
    р
    а
    н
    и
    ц
    а
    х
    Placed -- П
    о
    л
    о
    ж
    е
    н
    и
    е
    н
    а
    Д
    К
    К
    Elaboration -- У
    т
    о
    ч
    н
    е
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    Address -- А
    д
    р
    е
    с
    (
    о
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, inBounds=None, Placed=None, Elaboration=None, Address=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.inBounds = inBounds
        self.validate_sInBounds(self.inBounds)
        self.inBounds_nsprefix_ = "Simple2"
        self.Placed = Placed
        self.validate_s6(self.Placed)
        self.Placed_nsprefix_ = "Simple1"
        self.Elaboration = Elaboration
        self.Elaboration_nsprefix_ = None
        self.Address = Address
        self.Address_nsprefix_ = "adrOut4"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tLocation)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tLocation.subclass:
            return tLocation.subclass(*args_, **kwargs_)
        else:
            return tLocation(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_inBounds(self):
        return self.inBounds
    def set_inBounds(self, inBounds):
        self.inBounds = inBounds
    def get_Placed(self):
        return self.Placed
    def set_Placed(self, Placed):
        self.Placed = Placed
    def get_Elaboration(self):
        return self.Elaboration
    def set_Elaboration(self, Elaboration):
        self.Elaboration = Elaboration
    def get_Address(self):
        return self.Address
    def set_Address(self, Address):
        self.Address = Address
    def validate_sInBounds(self, value):
        result = True
        # Validate type sInBounds, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['0', '1', '2']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on sInBounds' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s6(self, value):
        result = True
        # Validate type s6, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 6:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s6' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.inBounds is not None or
            self.Placed is not None or
            self.Elaboration is not None or
            self.Address is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple2="urn://x-artefacts-rosreestr-ru/commons/simple-types/2.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1" ', name_='tLocation', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tLocation')
        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 and name_ == 'tLocation':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tLocation')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tLocation', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tLocation'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple2="urn://x-artefacts-rosreestr-ru/commons/simple-types/2.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1" ', name_='tLocation', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.inBounds is not None:
            namespaceprefix_ = self.inBounds_nsprefix_ + ':' if (UseCapturedNS_ and self.inBounds_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sinBounds>%s</%sinBounds>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.inBounds), input_name='inBounds')), namespaceprefix_ , eol_))
        if self.Placed is not None:
            namespaceprefix_ = self.Placed_nsprefix_ + ':' if (UseCapturedNS_ and self.Placed_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPlaced>%s</%sPlaced>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Placed), input_name='Placed')), namespaceprefix_ , eol_))
        if self.Elaboration is not None:
            namespaceprefix_ = self.Elaboration_nsprefix_ + ':' if (UseCapturedNS_ and self.Elaboration_nsprefix_) else ''
            self.Elaboration.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Elaboration', pretty_print=pretty_print)
        if self.Address is not None:
            namespaceprefix_ = self.Address_nsprefix_ + ':' if (UseCapturedNS_ and self.Address_nsprefix_) else ''
            self.Address.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Address', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'inBounds':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'inBounds')
            value_ = self.gds_validate_string(value_, node, 'inBounds')
            self.inBounds = value_
            self.inBounds_nsprefix_ = child_.prefix
            # validate type sInBounds
            self.validate_sInBounds(self.inBounds)
        elif nodeName_ == 'Placed':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Placed')
            value_ = self.gds_validate_string(value_, node, 'Placed')
            self.Placed = value_
            self.Placed_nsprefix_ = child_.prefix
            # validate type s6
            self.validate_s6(self.Placed)
        elif nodeName_ == 'Elaboration':
            obj_ = tElaborationLocation.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Elaboration = obj_
            obj_.original_tagname_ = 'Elaboration'
        elif nodeName_ == 'Address':
            obj_ = tAddressOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Address = obj_
            obj_.original_tagname_ = 'Address'
# end class tLocation


class tElaborationLocation(GeneratedsSuper):
    """ReferenceMark -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    о
    р
    и
    е
    н
    т
    и
    р
    а
    Distance -- Р
    а
    с
    с
    т
    о
    я
    н
    и
    е
    Direction -- Н
    а
    п
    р
    а
    в
    л
    е
    н
    и
    е
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, ReferenceMark=None, Distance=None, Direction=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.ReferenceMark = ReferenceMark
        self.validate_s255(self.ReferenceMark)
        self.ReferenceMark_nsprefix_ = "Simple1"
        self.Distance = Distance
        self.validate_s255(self.Distance)
        self.Distance_nsprefix_ = "Simple1"
        self.Direction = Direction
        self.validate_s255(self.Direction)
        self.Direction_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tElaborationLocation)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tElaborationLocation.subclass:
            return tElaborationLocation.subclass(*args_, **kwargs_)
        else:
            return tElaborationLocation(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_ReferenceMark(self):
        return self.ReferenceMark
    def set_ReferenceMark(self, ReferenceMark):
        self.ReferenceMark = ReferenceMark
    def get_Distance(self):
        return self.Distance
    def set_Distance(self, Distance):
        self.Distance = Distance
    def get_Direction(self):
        return self.Direction
    def set_Direction(self, Direction):
        self.Direction = Direction
    def validate_s255(self, value):
        result = True
        # Validate type s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.ReferenceMark is not None or
            self.Distance is not None or
            self.Direction is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tElaborationLocation', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tElaborationLocation')
        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 and name_ == 'tElaborationLocation':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tElaborationLocation')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tElaborationLocation', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tElaborationLocation'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tElaborationLocation', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ReferenceMark is not None:
            namespaceprefix_ = self.ReferenceMark_nsprefix_ + ':' if (UseCapturedNS_ and self.ReferenceMark_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sReferenceMark>%s</%sReferenceMark>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.ReferenceMark), input_name='ReferenceMark')), namespaceprefix_ , eol_))
        if self.Distance is not None:
            namespaceprefix_ = self.Distance_nsprefix_ + ':' if (UseCapturedNS_ and self.Distance_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDistance>%s</%sDistance>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Distance), input_name='Distance')), namespaceprefix_ , eol_))
        if self.Direction is not None:
            namespaceprefix_ = self.Direction_nsprefix_ + ':' if (UseCapturedNS_ and self.Direction_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDirection>%s</%sDirection>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Direction), input_name='Direction')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'ReferenceMark':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'ReferenceMark')
            value_ = self.gds_validate_string(value_, node, 'ReferenceMark')
            self.ReferenceMark = value_
            self.ReferenceMark_nsprefix_ = child_.prefix
            # validate type s255
            self.validate_s255(self.ReferenceMark)
        elif nodeName_ == 'Distance':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Distance')
            value_ = self.gds_validate_string(value_, node, 'Distance')
            self.Distance = value_
            self.Distance_nsprefix_ = child_.prefix
            # validate type s255
            self.validate_s255(self.Distance)
        elif nodeName_ == 'Direction':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Direction')
            value_ = self.gds_validate_string(value_, node, 'Direction')
            self.Direction = value_
            self.Direction_nsprefix_ = child_.prefix
            # validate type s255
            self.validate_s255(self.Direction)
# end class tElaborationLocation


class AttachmentRefType(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, attachmentId=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "tns"
        self.attachmentId = _cast(None, attachmentId)
        self.attachmentId_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, AttachmentRefType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if AttachmentRefType.subclass:
            return AttachmentRefType.subclass(*args_, **kwargs_)
        else:
            return AttachmentRefType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_attachmentId(self):
        return self.attachmentId
    def set_attachmentId(self, attachmentId):
        self.attachmentId = attachmentId
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1"', name_='AttachmentRefType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('AttachmentRefType')
        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 and name_ == 'AttachmentRefType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AttachmentRefType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='AttachmentRefType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='tns:', name_='AttachmentRefType'):
        if self.attachmentId is not None and 'attachmentId' not in already_processed:
            already_processed.add('attachmentId')
            outfile.write(' attachmentId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.attachmentId), input_name='attachmentId')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1"', name_='AttachmentRefType', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('attachmentId', node)
        if value is not None and 'attachmentId' not in already_processed:
            already_processed.add('attachmentId')
            self.attachmentId = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class AttachmentRefType


class PrimaryIdentityDocumentType(GeneratedsSuper):
    """PassportRF -- П
    а
    с
    п
    о
    р
    т
    Р
    Ф
    ForeignPassport -- П
    а
    с
    п
    о
    р
    т
    и
    н
    о
    с
    т
    р
    а
    н
    н
    о
    г
    о
    г
    р
    а
    ж
    д
    а
    н
    и
    н
    а
    ResidencePermitRF -- В
    и
    д
    н
    а
    ж
    и
    т
    е
    л
    ь
    с
    т
    в
    о
    в
    Р
    Ф
    .
    Ф
    о
    р
    м
    а
    т
    с
    е
    р
    и
    и
    и
    н
    о
    м
    е
    р
    а
    с
    о
    в
    п
    а
    д
    а
    е
    т
    с
    з
    а
    г
    р
    а
    н
    п
    а
    с
    п
    о
    р
    т
    о
    м
    .
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, PassportRF=None, ForeignPassport=None, ResidencePermitRF=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "tns"
        self.PassportRF = PassportRF
        self.PassportRF_nsprefix_ = "tns"
        self.ForeignPassport = ForeignPassport
        self.ForeignPassport_nsprefix_ = "tns"
        self.ResidencePermitRF = ResidencePermitRF
        self.ResidencePermitRF_nsprefix_ = "tns"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, PrimaryIdentityDocumentType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if PrimaryIdentityDocumentType.subclass:
            return PrimaryIdentityDocumentType.subclass(*args_, **kwargs_)
        else:
            return PrimaryIdentityDocumentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_PassportRF(self):
        return self.PassportRF
    def set_PassportRF(self, PassportRF):
        self.PassportRF = PassportRF
    def get_ForeignPassport(self):
        return self.ForeignPassport
    def set_ForeignPassport(self, ForeignPassport):
        self.ForeignPassport = ForeignPassport
    def get_ResidencePermitRF(self):
        return self.ResidencePermitRF
    def set_ResidencePermitRF(self, ResidencePermitRF):
        self.ResidencePermitRF = ResidencePermitRF
    def _hasContent(self):
        if (
            self.PassportRF is not None or
            self.ForeignPassport is not None or
            self.ResidencePermitRF is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1"', name_='PrimaryIdentityDocumentType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('PrimaryIdentityDocumentType')
        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 and name_ == 'PrimaryIdentityDocumentType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PrimaryIdentityDocumentType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='PrimaryIdentityDocumentType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='tns:', name_='PrimaryIdentityDocumentType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1"', name_='PrimaryIdentityDocumentType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PassportRF is not None:
            namespaceprefix_ = self.PassportRF_nsprefix_ + ':' if (UseCapturedNS_ and self.PassportRF_nsprefix_) else ''
            self.PassportRF.export(outfile, level, namespaceprefix_, namespacedef_='', name_='PassportRF', pretty_print=pretty_print)
        if self.ForeignPassport is not None:
            namespaceprefix_ = self.ForeignPassport_nsprefix_ + ':' if (UseCapturedNS_ and self.ForeignPassport_nsprefix_) else ''
            self.ForeignPassport.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ForeignPassport', pretty_print=pretty_print)
        if self.ResidencePermitRF is not None:
            namespaceprefix_ = self.ResidencePermitRF_nsprefix_ + ':' if (UseCapturedNS_ and self.ResidencePermitRF_nsprefix_) else ''
            self.ResidencePermitRF.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ResidencePermitRF', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'PassportRF':
            obj_ = PassportRFType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.PassportRF = obj_
            obj_.original_tagname_ = 'PassportRF'
        elif nodeName_ == 'ForeignPassport':
            obj_ = NotRestrictedDocumentType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.ForeignPassport = obj_
            obj_.original_tagname_ = 'ForeignPassport'
        elif nodeName_ == 'ResidencePermitRF':
            obj_ = InternationalPassportRFType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.ResidencePermitRF = obj_
            obj_.original_tagname_ = 'ResidencePermitRF'
# end class PrimaryIdentityDocumentType


class AnyIdentityDocumentType(GeneratedsSuper):
    """PassportRF -- П
    а
    с
    п
    о
    р
    т
    Р
    Ф
    ForeignPassport -- П
    а
    с
    п
    о
    р
    т
    и
    н
    о
    с
    т
    р
    а
    н
    н
    о
    г
    о
    г
    р
    а
    ж
    д
    а
    н
    и
    н
    а
    ResidencePermitRF -- В
    и
    д
    н
    а
    ж
    и
    т
    е
    л
    ь
    с
    т
    в
    о
    в
    Р
    Ф
    .
    Ф
    о
    р
    м
    а
    т
    с
    е
    р
    и
    и
    и
    н
    о
    м
    е
    р
    а
    с
    о
    в
    п
    а
    д
    а
    е
    т
    с
    з
    а
    г
    р
    а
    н
    п
    а
    с
    п
    о
    р
    т
    о
    м
    .
    InternationalPassportRF -- З
    а
    г
    р
    а
    н
    п
    а
    с
    п
    о
    р
    т
    MilitaryPassport -- В
    о
    е
    н
    н
    ы
    й
    б
    и
    л
    е
    т
    SailorPassport -- П
    а
    с
    п
    о
    р
    т
    м
    о
    р
    я
    к
    а
    SovietPassport -- П
    а
    с
    п
    о
    р
    т
    С
    С
    С
    Р
    BirthCertificate -- С
    в
    и
    д
    е
    т
    е
    л
    ь
    с
    т
    в
    о
    о
    р
    о
    ж
    д
    е
    н
    и
    и
    DrivingLicenseRF -- В
    о
    д
    и
    т
    е
    л
    ь
    с
    к
    о
    е
    у
    д
    о
    с
    т
    о
    в
    е
    р
    е
    н
    и
    е
    Р
    Ф
    ReleaseCertificate -- С
    п
    р
    а
    в
    к
    а
    о
    б
    о
    с
    в
    о
    б
    о
    ж
    д
    е
    н
    и
    и
    PassportLossCertificate -- С
    п
    р
    а
    в
    к
    а
    о
    б
    у
    т
    е
    р
    е
    п
    а
    с
    п
    о
    р
    т
    а
    Form9Certificate -- С
    п
    р
    а
    в
    к
    а
    о
    р
    е
    г
    и
    с
    т
    р
    а
    ц
    и
    и
    п
    о
    ф
    о
    р
    м
    е
    9
    TemporaryIdentityCardRF -- В
    р
    е
    м
    е
    н
    н
    о
    е
    у
    д
    о
    с
    т
    о
    в
    е
    р
    е
    н
    и
    е
    л
    и
    ч
    н
    о
    с
    т
    и
    г
    р
    а
    ж
    д
    а
    н
    и
    н
    а
    Р
    Ф
    п
    о
    ф
    о
    р
    м
    е
    2
    П
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, PassportRF=None, ForeignPassport=None, ResidencePermitRF=None, InternationalPassportRF=None, MilitaryPassport=None, SailorPassport=None, SovietPassport=None, BirthCertificate=None, DrivingLicenseRF=None, ReleaseCertificate=None, PassportLossCertificate=None, Form9Certificate=None, TemporaryIdentityCardRF=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "tns"
        self.PassportRF = PassportRF
        self.PassportRF_nsprefix_ = "tns"
        self.ForeignPassport = ForeignPassport
        self.ForeignPassport_nsprefix_ = "tns"
        self.ResidencePermitRF = ResidencePermitRF
        self.ResidencePermitRF_nsprefix_ = "tns"
        self.InternationalPassportRF = InternationalPassportRF
        self.InternationalPassportRF_nsprefix_ = "tns"
        self.MilitaryPassport = MilitaryPassport
        self.MilitaryPassport_nsprefix_ = "tns"
        self.SailorPassport = SailorPassport
        self.SailorPassport_nsprefix_ = "tns"
        self.SovietPassport = SovietPassport
        self.SovietPassport_nsprefix_ = "tns"
        self.BirthCertificate = BirthCertificate
        self.BirthCertificate_nsprefix_ = "tns"
        self.DrivingLicenseRF = DrivingLicenseRF
        self.DrivingLicenseRF_nsprefix_ = "tns"
        self.ReleaseCertificate = ReleaseCertificate
        self.ReleaseCertificate_nsprefix_ = "tns"
        self.PassportLossCertificate = PassportLossCertificate
        self.PassportLossCertificate_nsprefix_ = "tns"
        self.Form9Certificate = Form9Certificate
        self.Form9Certificate_nsprefix_ = "tns"
        self.TemporaryIdentityCardRF = TemporaryIdentityCardRF
        self.TemporaryIdentityCardRF_nsprefix_ = "tns"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, AnyIdentityDocumentType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if AnyIdentityDocumentType.subclass:
            return AnyIdentityDocumentType.subclass(*args_, **kwargs_)
        else:
            return AnyIdentityDocumentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_PassportRF(self):
        return self.PassportRF
    def set_PassportRF(self, PassportRF):
        self.PassportRF = PassportRF
    def get_ForeignPassport(self):
        return self.ForeignPassport
    def set_ForeignPassport(self, ForeignPassport):
        self.ForeignPassport = ForeignPassport
    def get_ResidencePermitRF(self):
        return self.ResidencePermitRF
    def set_ResidencePermitRF(self, ResidencePermitRF):
        self.ResidencePermitRF = ResidencePermitRF
    def get_InternationalPassportRF(self):
        return self.InternationalPassportRF
    def set_InternationalPassportRF(self, InternationalPassportRF):
        self.InternationalPassportRF = InternationalPassportRF
    def get_MilitaryPassport(self):
        return self.MilitaryPassport
    def set_MilitaryPassport(self, MilitaryPassport):
        self.MilitaryPassport = MilitaryPassport
    def get_SailorPassport(self):
        return self.SailorPassport
    def set_SailorPassport(self, SailorPassport):
        self.SailorPassport = SailorPassport
    def get_SovietPassport(self):
        return self.SovietPassport
    def set_SovietPassport(self, SovietPassport):
        self.SovietPassport = SovietPassport
    def get_BirthCertificate(self):
        return self.BirthCertificate
    def set_BirthCertificate(self, BirthCertificate):
        self.BirthCertificate = BirthCertificate
    def get_DrivingLicenseRF(self):
        return self.DrivingLicenseRF
    def set_DrivingLicenseRF(self, DrivingLicenseRF):
        self.DrivingLicenseRF = DrivingLicenseRF
    def get_ReleaseCertificate(self):
        return self.ReleaseCertificate
    def set_ReleaseCertificate(self, ReleaseCertificate):
        self.ReleaseCertificate = ReleaseCertificate
    def get_PassportLossCertificate(self):
        return self.PassportLossCertificate
    def set_PassportLossCertificate(self, PassportLossCertificate):
        self.PassportLossCertificate = PassportLossCertificate
    def get_Form9Certificate(self):
        return self.Form9Certificate
    def set_Form9Certificate(self, Form9Certificate):
        self.Form9Certificate = Form9Certificate
    def get_TemporaryIdentityCardRF(self):
        return self.TemporaryIdentityCardRF
    def set_TemporaryIdentityCardRF(self, TemporaryIdentityCardRF):
        self.TemporaryIdentityCardRF = TemporaryIdentityCardRF
    def _hasContent(self):
        if (
            self.PassportRF is not None or
            self.ForeignPassport is not None or
            self.ResidencePermitRF is not None or
            self.InternationalPassportRF is not None or
            self.MilitaryPassport is not None or
            self.SailorPassport is not None or
            self.SovietPassport is not None or
            self.BirthCertificate is not None or
            self.DrivingLicenseRF is not None or
            self.ReleaseCertificate is not None or
            self.PassportLossCertificate is not None or
            self.Form9Certificate is not None or
            self.TemporaryIdentityCardRF is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1"', name_='AnyIdentityDocumentType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('AnyIdentityDocumentType')
        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 and name_ == 'AnyIdentityDocumentType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AnyIdentityDocumentType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='AnyIdentityDocumentType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='tns:', name_='AnyIdentityDocumentType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1"', name_='AnyIdentityDocumentType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PassportRF is not None:
            namespaceprefix_ = self.PassportRF_nsprefix_ + ':' if (UseCapturedNS_ and self.PassportRF_nsprefix_) else ''
            self.PassportRF.export(outfile, level, namespaceprefix_, namespacedef_='', name_='PassportRF', pretty_print=pretty_print)
        if self.ForeignPassport is not None:
            namespaceprefix_ = self.ForeignPassport_nsprefix_ + ':' if (UseCapturedNS_ and self.ForeignPassport_nsprefix_) else ''
            self.ForeignPassport.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ForeignPassport', pretty_print=pretty_print)
        if self.ResidencePermitRF is not None:
            namespaceprefix_ = self.ResidencePermitRF_nsprefix_ + ':' if (UseCapturedNS_ and self.ResidencePermitRF_nsprefix_) else ''
            self.ResidencePermitRF.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ResidencePermitRF', pretty_print=pretty_print)
        if self.InternationalPassportRF is not None:
            namespaceprefix_ = self.InternationalPassportRF_nsprefix_ + ':' if (UseCapturedNS_ and self.InternationalPassportRF_nsprefix_) else ''
            self.InternationalPassportRF.export(outfile, level, namespaceprefix_, namespacedef_='', name_='InternationalPassportRF', pretty_print=pretty_print)
        if self.MilitaryPassport is not None:
            namespaceprefix_ = self.MilitaryPassport_nsprefix_ + ':' if (UseCapturedNS_ and self.MilitaryPassport_nsprefix_) else ''
            self.MilitaryPassport.export(outfile, level, namespaceprefix_, namespacedef_='', name_='MilitaryPassport', pretty_print=pretty_print)
        if self.SailorPassport is not None:
            namespaceprefix_ = self.SailorPassport_nsprefix_ + ':' if (UseCapturedNS_ and self.SailorPassport_nsprefix_) else ''
            self.SailorPassport.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SailorPassport', pretty_print=pretty_print)
        if self.SovietPassport is not None:
            namespaceprefix_ = self.SovietPassport_nsprefix_ + ':' if (UseCapturedNS_ and self.SovietPassport_nsprefix_) else ''
            self.SovietPassport.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SovietPassport', pretty_print=pretty_print)
        if self.BirthCertificate is not None:
            namespaceprefix_ = self.BirthCertificate_nsprefix_ + ':' if (UseCapturedNS_ and self.BirthCertificate_nsprefix_) else ''
            self.BirthCertificate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='BirthCertificate', pretty_print=pretty_print)
        if self.DrivingLicenseRF is not None:
            namespaceprefix_ = self.DrivingLicenseRF_nsprefix_ + ':' if (UseCapturedNS_ and self.DrivingLicenseRF_nsprefix_) else ''
            self.DrivingLicenseRF.export(outfile, level, namespaceprefix_, namespacedef_='', name_='DrivingLicenseRF', pretty_print=pretty_print)
        if self.ReleaseCertificate is not None:
            namespaceprefix_ = self.ReleaseCertificate_nsprefix_ + ':' if (UseCapturedNS_ and self.ReleaseCertificate_nsprefix_) else ''
            self.ReleaseCertificate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ReleaseCertificate', pretty_print=pretty_print)
        if self.PassportLossCertificate is not None:
            namespaceprefix_ = self.PassportLossCertificate_nsprefix_ + ':' if (UseCapturedNS_ and self.PassportLossCertificate_nsprefix_) else ''
            self.PassportLossCertificate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='PassportLossCertificate', pretty_print=pretty_print)
        if self.Form9Certificate is not None:
            namespaceprefix_ = self.Form9Certificate_nsprefix_ + ':' if (UseCapturedNS_ and self.Form9Certificate_nsprefix_) else ''
            self.Form9Certificate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Form9Certificate', pretty_print=pretty_print)
        if self.TemporaryIdentityCardRF is not None:
            namespaceprefix_ = self.TemporaryIdentityCardRF_nsprefix_ + ':' if (UseCapturedNS_ and self.TemporaryIdentityCardRF_nsprefix_) else ''
            self.TemporaryIdentityCardRF.export(outfile, level, namespaceprefix_, namespacedef_='', name_='TemporaryIdentityCardRF', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'PassportRF':
            obj_ = PassportRFType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.PassportRF = obj_
            obj_.original_tagname_ = 'PassportRF'
        elif nodeName_ == 'ForeignPassport':
            obj_ = NotRestrictedDocumentType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.ForeignPassport = obj_
            obj_.original_tagname_ = 'ForeignPassport'
        elif nodeName_ == 'ResidencePermitRF':
            obj_ = InternationalPassportRFType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.ResidencePermitRF = obj_
            obj_.original_tagname_ = 'ResidencePermitRF'
        elif nodeName_ == 'InternationalPassportRF':
            obj_ = InternationalPassportRFType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.InternationalPassportRF = obj_
            obj_.original_tagname_ = 'InternationalPassportRF'
        elif nodeName_ == 'MilitaryPassport':
            obj_ = MilitaryPassportDocumentType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.MilitaryPassport = obj_
            obj_.original_tagname_ = 'MilitaryPassport'
        elif nodeName_ == 'SailorPassport':
            obj_ = MilitaryPassportDocumentType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SailorPassport = obj_
            obj_.original_tagname_ = 'SailorPassport'
        elif nodeName_ == 'SovietPassport':
            obj_ = SovietPassportType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SovietPassport = obj_
            obj_.original_tagname_ = 'SovietPassport'
        elif nodeName_ == 'BirthCertificate':
            obj_ = SovietPassportType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.BirthCertificate = obj_
            obj_.original_tagname_ = 'BirthCertificate'
        elif nodeName_ == 'DrivingLicenseRF':
            obj_ = DrivingLicenseRFType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.DrivingLicenseRF = obj_
            obj_.original_tagname_ = 'DrivingLicenseRF'
        elif nodeName_ == 'ReleaseCertificate':
            obj_ = NotRestrictedDocumentType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.ReleaseCertificate = obj_
            obj_.original_tagname_ = 'ReleaseCertificate'
        elif nodeName_ == 'PassportLossCertificate':
            obj_ = NotRestrictedDocumentType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.PassportLossCertificate = obj_
            obj_.original_tagname_ = 'PassportLossCertificate'
        elif nodeName_ == 'Form9Certificate':
            obj_ = NotRestrictedDocumentType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Form9Certificate = obj_
            obj_.original_tagname_ = 'Form9Certificate'
        elif nodeName_ == 'TemporaryIdentityCardRF':
            obj_ = NotRestrictedDocumentType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.TemporaryIdentityCardRF = obj_
            obj_.original_tagname_ = 'TemporaryIdentityCardRF'
# end class AnyIdentityDocumentType


class NotRestrictedDocumentType(GeneratedsSuper):
    """Series -- С
    е
    р
    и
    я
    Number -- Н
    о
    м
    е
    р
    IssueDate -- Д
    а
    т
    а
    в
    ы
    д
    а
    ч
    и
    Issuer -- К
    е
    м
    в
    ы
    д
    а
    н
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Series=None, Number=None, IssueDate=None, Issuer=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Series = Series
        self.validate_string_20(self.Series)
        self.Series_nsprefix_ = "tns"
        self.Number = Number
        self.validate_NumberType(self.Number)
        self.Number_nsprefix_ = None
        if isinstance(IssueDate, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(IssueDate, '%Y-%m-%d').date()
        else:
            initvalue_ = IssueDate
        self.IssueDate = initvalue_
        self.IssueDate_nsprefix_ = None
        self.Issuer = Issuer
        self.validate_rus_and_num_200(self.Issuer)
        self.Issuer_nsprefix_ = "tns"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, NotRestrictedDocumentType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if NotRestrictedDocumentType.subclass:
            return NotRestrictedDocumentType.subclass(*args_, **kwargs_)
        else:
            return NotRestrictedDocumentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Series(self):
        return self.Series
    def set_Series(self, Series):
        self.Series = Series
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_IssueDate(self):
        return self.IssueDate
    def set_IssueDate(self, IssueDate):
        self.IssueDate = IssueDate
    def get_Issuer(self):
        return self.Issuer
    def set_Issuer(self, Issuer):
        self.Issuer = Issuer
    def validate_string_20(self, value):
        result = True
        # Validate type string-20, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on string-20' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_NumberType(self, value):
        result = True
        # Validate type NumberType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if not self.gds_validate_simple_patterns(
                    self.validate_NumberType_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NumberType_patterns_, ))
                result = False
        return result
    validate_NumberType_patterns_ = [['^([0-9а-яА-ЯA-Za-z]{1,25})$']]
    def validate_rus_and_num_200(self, value):
        result = True
        # Validate type rus-and-num-200, a restriction on tns:rus-and-num.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 200:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on rus-and-num-200' % {"value": value, "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_rus_and_num_200_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_rus_and_num_200_patterns_, ))
                result = False
        return result
    validate_rus_and_num_200_patterns_ = [["^([а-яА-ЯёЁ\\-0-9][а-яА-ЯёЁ\\-\\s'',.0-9]*)$"]]
    def _hasContent(self):
        if (
            self.Series is not None or
            self.Number is not None or
            self.IssueDate is not None or
            self.Issuer is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='NotRestrictedDocumentType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('NotRestrictedDocumentType')
        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 and name_ == 'NotRestrictedDocumentType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NotRestrictedDocumentType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='NotRestrictedDocumentType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='tns:', name_='NotRestrictedDocumentType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='NotRestrictedDocumentType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Series is not None:
            namespaceprefix_ = self.Series_nsprefix_ + ':' if (UseCapturedNS_ and self.Series_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSeries>%s</%sSeries>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Series), input_name='Series')), namespaceprefix_ , eol_))
        if self.Number is not None:
            namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Number), input_name='Number')), namespaceprefix_ , eol_))
        if self.IssueDate is not None:
            namespaceprefix_ = self.IssueDate_nsprefix_ + ':' if (UseCapturedNS_ and self.IssueDate_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssueDate>%s</%sIssueDate>%s' % (namespaceprefix_ , self.gds_format_date(self.IssueDate, input_name='IssueDate'), namespaceprefix_ , eol_))
        if self.Issuer is not None:
            namespaceprefix_ = self.Issuer_nsprefix_ + ':' if (UseCapturedNS_ and self.Issuer_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssuer>%s</%sIssuer>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Issuer), input_name='Issuer')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Series':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Series')
            value_ = self.gds_validate_string(value_, node, 'Series')
            self.Series = value_
            self.Series_nsprefix_ = child_.prefix
            # validate type string-20
            self.validate_string_20(self.Series)
        elif nodeName_ == 'Number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Number')
            value_ = self.gds_validate_string(value_, node, 'Number')
            self.Number = value_
            self.Number_nsprefix_ = child_.prefix
            # validate type NumberType
            self.validate_NumberType(self.Number)
        elif nodeName_ == 'IssueDate':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.IssueDate = dval_
            self.IssueDate_nsprefix_ = child_.prefix
        elif nodeName_ == 'Issuer':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Issuer')
            value_ = self.gds_validate_string(value_, node, 'Issuer')
            self.Issuer = value_
            self.Issuer_nsprefix_ = child_.prefix
            # validate type rus-and-num-200
            self.validate_rus_and_num_200(self.Issuer)
# end class NotRestrictedDocumentType


class PassportRFType(GeneratedsSuper):
    """Series -- С
    е
    р
    и
    я
    Number -- Н
    о
    м
    е
    р
    IssueDate -- Д
    а
    т
    а
    в
    ы
    д
    а
    ч
    и
    Issuer -- К
    е
    м
    в
    ы
    д
    а
    н
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Series=None, Number=None, IssueDate=None, Issuer=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Series = Series
        self.validate_digits_4(self.Series)
        self.Series_nsprefix_ = "tns"
        self.Number = Number
        self.validate_digits_6(self.Number)
        self.Number_nsprefix_ = "tns"
        if isinstance(IssueDate, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(IssueDate, '%Y-%m-%d').date()
        else:
            initvalue_ = IssueDate
        self.IssueDate = initvalue_
        self.IssueDate_nsprefix_ = None
        self.Issuer = Issuer
        self.validate_rus_and_num_200(self.Issuer)
        self.Issuer_nsprefix_ = "tns"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, PassportRFType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if PassportRFType.subclass:
            return PassportRFType.subclass(*args_, **kwargs_)
        else:
            return PassportRFType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Series(self):
        return self.Series
    def set_Series(self, Series):
        self.Series = Series
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_IssueDate(self):
        return self.IssueDate
    def set_IssueDate(self, IssueDate):
        self.IssueDate = IssueDate
    def get_Issuer(self):
        return self.Issuer
    def set_Issuer(self, Issuer):
        self.Issuer = Issuer
    def validate_digits_4(self, value):
        result = True
        # Validate type digits-4, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 4:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on digits-4' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_digits_4_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_digits_4_patterns_, ))
                result = False
        return result
    validate_digits_4_patterns_ = [['^(\\d{4})$']]
    def validate_digits_6(self, value):
        result = True
        # Validate type digits-6, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 6:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on digits-6' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_digits_6_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_digits_6_patterns_, ))
                result = False
        return result
    validate_digits_6_patterns_ = [['^(\\d{6})$']]
    def validate_rus_and_num_200(self, value):
        result = True
        # Validate type rus-and-num-200, a restriction on tns:rus-and-num.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 200:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on rus-and-num-200' % {"value": value, "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_rus_and_num_200_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_rus_and_num_200_patterns_, ))
                result = False
        return result
    validate_rus_and_num_200_patterns_ = [["^([а-яА-ЯёЁ\\-0-9][а-яА-ЯёЁ\\-\\s'',.0-9]*)$"]]
    def _hasContent(self):
        if (
            self.Series is not None or
            self.Number is not None or
            self.IssueDate is not None or
            self.Issuer is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='PassportRFType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('PassportRFType')
        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 and name_ == 'PassportRFType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PassportRFType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='PassportRFType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='tns:', name_='PassportRFType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='PassportRFType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Series is not None:
            namespaceprefix_ = self.Series_nsprefix_ + ':' if (UseCapturedNS_ and self.Series_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSeries>%s</%sSeries>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Series), input_name='Series')), namespaceprefix_ , eol_))
        if self.Number is not None:
            namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Number), input_name='Number')), namespaceprefix_ , eol_))
        if self.IssueDate is not None:
            namespaceprefix_ = self.IssueDate_nsprefix_ + ':' if (UseCapturedNS_ and self.IssueDate_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssueDate>%s</%sIssueDate>%s' % (namespaceprefix_ , self.gds_format_date(self.IssueDate, input_name='IssueDate'), namespaceprefix_ , eol_))
        if self.Issuer is not None:
            namespaceprefix_ = self.Issuer_nsprefix_ + ':' if (UseCapturedNS_ and self.Issuer_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssuer>%s</%sIssuer>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Issuer), input_name='Issuer')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Series':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Series')
            value_ = self.gds_validate_string(value_, node, 'Series')
            self.Series = value_
            self.Series_nsprefix_ = child_.prefix
            # validate type digits-4
            self.validate_digits_4(self.Series)
        elif nodeName_ == 'Number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Number')
            value_ = self.gds_validate_string(value_, node, 'Number')
            self.Number = value_
            self.Number_nsprefix_ = child_.prefix
            # validate type digits-6
            self.validate_digits_6(self.Number)
        elif nodeName_ == 'IssueDate':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.IssueDate = dval_
            self.IssueDate_nsprefix_ = child_.prefix
        elif nodeName_ == 'Issuer':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Issuer')
            value_ = self.gds_validate_string(value_, node, 'Issuer')
            self.Issuer = value_
            self.Issuer_nsprefix_ = child_.prefix
            # validate type rus-and-num-200
            self.validate_rus_and_num_200(self.Issuer)
# end class PassportRFType


class SovietPassportType(GeneratedsSuper):
    """Series -- С
    е
    р
    и
    я
    Number -- Н
    о
    м
    е
    р
    IssueDate -- Д
    а
    т
    а
    в
    ы
    д
    а
    ч
    и
    Issuer -- К
    е
    м
    в
    ы
    д
    а
    н
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Series=None, Number=None, IssueDate=None, Issuer=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Series = Series
        self.validate_SovietStyleDocumentSeriesType(self.Series)
        self.Series_nsprefix_ = "tns"
        self.Number = Number
        self.validate_digits_6(self.Number)
        self.Number_nsprefix_ = "tns"
        if isinstance(IssueDate, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(IssueDate, '%Y-%m-%d').date()
        else:
            initvalue_ = IssueDate
        self.IssueDate = initvalue_
        self.IssueDate_nsprefix_ = None
        self.Issuer = Issuer
        self.validate_rus_and_num_200(self.Issuer)
        self.Issuer_nsprefix_ = "tns"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, SovietPassportType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if SovietPassportType.subclass:
            return SovietPassportType.subclass(*args_, **kwargs_)
        else:
            return SovietPassportType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Series(self):
        return self.Series
    def set_Series(self, Series):
        self.Series = Series
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_IssueDate(self):
        return self.IssueDate
    def set_IssueDate(self, IssueDate):
        self.IssueDate = IssueDate
    def get_Issuer(self):
        return self.Issuer
    def set_Issuer(self, Issuer):
        self.Issuer = Issuer
    def validate_SovietStyleDocumentSeriesType(self, value):
        result = True
        # Validate type SovietStyleDocumentSeriesType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 6:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on SovietStyleDocumentSeriesType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_SovietStyleDocumentSeriesType_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_SovietStyleDocumentSeriesType_patterns_, ))
                result = False
        return result
    validate_SovietStyleDocumentSeriesType_patterns_ = [['^([IVXLCDM]{1,3}[\\-][А-Я]{2})$']]
    def validate_digits_6(self, value):
        result = True
        # Validate type digits-6, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 6:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on digits-6' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_digits_6_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_digits_6_patterns_, ))
                result = False
        return result
    validate_digits_6_patterns_ = [['^(\\d{6})$']]
    def validate_rus_and_num_200(self, value):
        result = True
        # Validate type rus-and-num-200, a restriction on tns:rus-and-num.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 200:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on rus-and-num-200' % {"value": value, "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_rus_and_num_200_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_rus_and_num_200_patterns_, ))
                result = False
        return result
    validate_rus_and_num_200_patterns_ = [["^([а-яА-ЯёЁ\\-0-9][а-яА-ЯёЁ\\-\\s'',.0-9]*)$"]]
    def _hasContent(self):
        if (
            self.Series is not None or
            self.Number is not None or
            self.IssueDate is not None or
            self.Issuer is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='SovietPassportType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('SovietPassportType')
        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 and name_ == 'SovietPassportType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SovietPassportType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='SovietPassportType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='tns:', name_='SovietPassportType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='SovietPassportType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Series is not None:
            namespaceprefix_ = self.Series_nsprefix_ + ':' if (UseCapturedNS_ and self.Series_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSeries>%s</%sSeries>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Series), input_name='Series')), namespaceprefix_ , eol_))
        if self.Number is not None:
            namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Number), input_name='Number')), namespaceprefix_ , eol_))
        if self.IssueDate is not None:
            namespaceprefix_ = self.IssueDate_nsprefix_ + ':' if (UseCapturedNS_ and self.IssueDate_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssueDate>%s</%sIssueDate>%s' % (namespaceprefix_ , self.gds_format_date(self.IssueDate, input_name='IssueDate'), namespaceprefix_ , eol_))
        if self.Issuer is not None:
            namespaceprefix_ = self.Issuer_nsprefix_ + ':' if (UseCapturedNS_ and self.Issuer_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssuer>%s</%sIssuer>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Issuer), input_name='Issuer')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Series':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Series')
            value_ = self.gds_validate_string(value_, node, 'Series')
            self.Series = value_
            self.Series_nsprefix_ = child_.prefix
            # validate type SovietStyleDocumentSeriesType
            self.validate_SovietStyleDocumentSeriesType(self.Series)
        elif nodeName_ == 'Number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Number')
            value_ = self.gds_validate_string(value_, node, 'Number')
            self.Number = value_
            self.Number_nsprefix_ = child_.prefix
            # validate type digits-6
            self.validate_digits_6(self.Number)
        elif nodeName_ == 'IssueDate':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.IssueDate = dval_
            self.IssueDate_nsprefix_ = child_.prefix
        elif nodeName_ == 'Issuer':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Issuer')
            value_ = self.gds_validate_string(value_, node, 'Issuer')
            self.Issuer = value_
            self.Issuer_nsprefix_ = child_.prefix
            # validate type rus-and-num-200
            self.validate_rus_and_num_200(self.Issuer)
# end class SovietPassportType


class InternationalPassportRFType(GeneratedsSuper):
    """Series -- С
    е
    р
    и
    я
    Number -- Н
    о
    м
    е
    р
    IssueDate -- Д
    а
    т
    а
    в
    ы
    д
    а
    ч
    и
    Issuer -- К
    е
    м
    в
    ы
    д
    а
    н
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Series=None, Number=None, IssueDate=None, Issuer=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Series = Series
        self.validate_digits_2(self.Series)
        self.Series_nsprefix_ = "tns"
        self.Number = Number
        self.validate_digits_7(self.Number)
        self.Number_nsprefix_ = "tns"
        if isinstance(IssueDate, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(IssueDate, '%Y-%m-%d').date()
        else:
            initvalue_ = IssueDate
        self.IssueDate = initvalue_
        self.IssueDate_nsprefix_ = None
        self.Issuer = Issuer
        self.validate_rus_and_num_200(self.Issuer)
        self.Issuer_nsprefix_ = "tns"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, InternationalPassportRFType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if InternationalPassportRFType.subclass:
            return InternationalPassportRFType.subclass(*args_, **kwargs_)
        else:
            return InternationalPassportRFType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Series(self):
        return self.Series
    def set_Series(self, Series):
        self.Series = Series
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_IssueDate(self):
        return self.IssueDate
    def set_IssueDate(self, IssueDate):
        self.IssueDate = IssueDate
    def get_Issuer(self):
        return self.Issuer
    def set_Issuer(self, Issuer):
        self.Issuer = Issuer
    def validate_digits_2(self, value):
        result = True
        # Validate type digits-2, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 2:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on digits-2' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_digits_2_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_digits_2_patterns_, ))
                result = False
        return result
    validate_digits_2_patterns_ = [['^(\\d{2})$']]
    def validate_digits_7(self, value):
        result = True
        # Validate type digits-7, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 7:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on digits-7' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_digits_7_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_digits_7_patterns_, ))
                result = False
        return result
    validate_digits_7_patterns_ = [['^(\\d{7})$']]
    def validate_rus_and_num_200(self, value):
        result = True
        # Validate type rus-and-num-200, a restriction on tns:rus-and-num.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 200:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on rus-and-num-200' % {"value": value, "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_rus_and_num_200_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_rus_and_num_200_patterns_, ))
                result = False
        return result
    validate_rus_and_num_200_patterns_ = [["^([а-яА-ЯёЁ\\-0-9][а-яА-ЯёЁ\\-\\s'',.0-9]*)$"]]
    def _hasContent(self):
        if (
            self.Series is not None or
            self.Number is not None or
            self.IssueDate is not None or
            self.Issuer is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='InternationalPassportRFType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('InternationalPassportRFType')
        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 and name_ == 'InternationalPassportRFType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='InternationalPassportRFType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='InternationalPassportRFType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='tns:', name_='InternationalPassportRFType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='InternationalPassportRFType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Series is not None:
            namespaceprefix_ = self.Series_nsprefix_ + ':' if (UseCapturedNS_ and self.Series_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSeries>%s</%sSeries>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Series), input_name='Series')), namespaceprefix_ , eol_))
        if self.Number is not None:
            namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Number), input_name='Number')), namespaceprefix_ , eol_))
        if self.IssueDate is not None:
            namespaceprefix_ = self.IssueDate_nsprefix_ + ':' if (UseCapturedNS_ and self.IssueDate_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssueDate>%s</%sIssueDate>%s' % (namespaceprefix_ , self.gds_format_date(self.IssueDate, input_name='IssueDate'), namespaceprefix_ , eol_))
        if self.Issuer is not None:
            namespaceprefix_ = self.Issuer_nsprefix_ + ':' if (UseCapturedNS_ and self.Issuer_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssuer>%s</%sIssuer>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Issuer), input_name='Issuer')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Series':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Series')
            value_ = self.gds_validate_string(value_, node, 'Series')
            self.Series = value_
            self.Series_nsprefix_ = child_.prefix
            # validate type digits-2
            self.validate_digits_2(self.Series)
        elif nodeName_ == 'Number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Number')
            value_ = self.gds_validate_string(value_, node, 'Number')
            self.Number = value_
            self.Number_nsprefix_ = child_.prefix
            # validate type digits-7
            self.validate_digits_7(self.Number)
        elif nodeName_ == 'IssueDate':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.IssueDate = dval_
            self.IssueDate_nsprefix_ = child_.prefix
        elif nodeName_ == 'Issuer':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Issuer')
            value_ = self.gds_validate_string(value_, node, 'Issuer')
            self.Issuer = value_
            self.Issuer_nsprefix_ = child_.prefix
            # validate type rus-and-num-200
            self.validate_rus_and_num_200(self.Issuer)
# end class InternationalPassportRFType


class MilitaryPassportDocumentType(GeneratedsSuper):
    """Series -- С
    е
    р
    и
    я
    Number -- Н
    о
    м
    е
    р
    IssueDate -- Д
    а
    т
    а
    в
    ы
    д
    а
    ч
    и
    Issuer -- К
    е
    м
    в
    ы
    д
    а
    н
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Series=None, Number=None, IssueDate=None, Issuer=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Series = Series
        self.validate_SeriesType(self.Series)
        self.Series_nsprefix_ = None
        self.Number = Number
        self.validate_digits_7(self.Number)
        self.Number_nsprefix_ = "tns"
        if isinstance(IssueDate, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(IssueDate, '%Y-%m-%d').date()
        else:
            initvalue_ = IssueDate
        self.IssueDate = initvalue_
        self.IssueDate_nsprefix_ = None
        self.Issuer = Issuer
        self.validate_rus_and_num_200(self.Issuer)
        self.Issuer_nsprefix_ = "tns"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, MilitaryPassportDocumentType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if MilitaryPassportDocumentType.subclass:
            return MilitaryPassportDocumentType.subclass(*args_, **kwargs_)
        else:
            return MilitaryPassportDocumentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Series(self):
        return self.Series
    def set_Series(self, Series):
        self.Series = Series
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_IssueDate(self):
        return self.IssueDate
    def set_IssueDate(self, IssueDate):
        self.IssueDate = IssueDate
    def get_Issuer(self):
        return self.Issuer
    def set_Issuer(self, Issuer):
        self.Issuer = Issuer
    def validate_SeriesType(self, value):
        result = True
        # Validate type SeriesType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 2:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on SeriesType' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_SeriesType_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_SeriesType_patterns_, ))
                result = False
        return result
    validate_SeriesType_patterns_ = [['^([А-Я]{2})$']]
    def validate_digits_7(self, value):
        result = True
        # Validate type digits-7, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 7:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on digits-7' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_digits_7_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_digits_7_patterns_, ))
                result = False
        return result
    validate_digits_7_patterns_ = [['^(\\d{7})$']]
    def validate_rus_and_num_200(self, value):
        result = True
        # Validate type rus-and-num-200, a restriction on tns:rus-and-num.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 200:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on rus-and-num-200' % {"value": value, "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_rus_and_num_200_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_rus_and_num_200_patterns_, ))
                result = False
        return result
    validate_rus_and_num_200_patterns_ = [["^([а-яА-ЯёЁ\\-0-9][а-яА-ЯёЁ\\-\\s'',.0-9]*)$"]]
    def _hasContent(self):
        if (
            self.Series is not None or
            self.Number is not None or
            self.IssueDate is not None or
            self.Issuer is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='MilitaryPassportDocumentType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('MilitaryPassportDocumentType')
        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 and name_ == 'MilitaryPassportDocumentType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='MilitaryPassportDocumentType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='MilitaryPassportDocumentType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='tns:', name_='MilitaryPassportDocumentType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='MilitaryPassportDocumentType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Series is not None:
            namespaceprefix_ = self.Series_nsprefix_ + ':' if (UseCapturedNS_ and self.Series_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSeries>%s</%sSeries>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Series), input_name='Series')), namespaceprefix_ , eol_))
        if self.Number is not None:
            namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Number), input_name='Number')), namespaceprefix_ , eol_))
        if self.IssueDate is not None:
            namespaceprefix_ = self.IssueDate_nsprefix_ + ':' if (UseCapturedNS_ and self.IssueDate_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssueDate>%s</%sIssueDate>%s' % (namespaceprefix_ , self.gds_format_date(self.IssueDate, input_name='IssueDate'), namespaceprefix_ , eol_))
        if self.Issuer is not None:
            namespaceprefix_ = self.Issuer_nsprefix_ + ':' if (UseCapturedNS_ and self.Issuer_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssuer>%s</%sIssuer>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Issuer), input_name='Issuer')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Series':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Series')
            value_ = self.gds_validate_string(value_, node, 'Series')
            self.Series = value_
            self.Series_nsprefix_ = child_.prefix
            # validate type SeriesType
            self.validate_SeriesType(self.Series)
        elif nodeName_ == 'Number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Number')
            value_ = self.gds_validate_string(value_, node, 'Number')
            self.Number = value_
            self.Number_nsprefix_ = child_.prefix
            # validate type digits-7
            self.validate_digits_7(self.Number)
        elif nodeName_ == 'IssueDate':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.IssueDate = dval_
            self.IssueDate_nsprefix_ = child_.prefix
        elif nodeName_ == 'Issuer':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Issuer')
            value_ = self.gds_validate_string(value_, node, 'Issuer')
            self.Issuer = value_
            self.Issuer_nsprefix_ = child_.prefix
            # validate type rus-and-num-200
            self.validate_rus_and_num_200(self.Issuer)
# end class MilitaryPassportDocumentType


class DrivingLicenseRFType(GeneratedsSuper):
    """Series --
    С
    е
    р
    и
    я
    .
    Д
    в
    е
    ц
    и
    ф
    р
    ы
    и
    д
    в
    е
    р
    у
    с
    с
    к
    и
    е
    з
    а
    г
    л
    а
    в
    н
    ы
    е
    б
    у
    к
    в
    ы
    д
    л
    я
    в
    о
    д
    и
    т
    е
    л
    ь
    с
    к
    о
    г
    о
    у
    д
    о
    с
    т
    о
    в
    е
    р
    е
    н
    и
    я
    ,
    п
    о
    л
    у
    ч
    е
    н
    н
    о
    г
    о
    д
    о
    1
    м
    а
    р
    т
    а
    2011
    г
    .,
    и
    л
    и
    ч
    е
    т
    ы
    р
    е
    ц
    и
    ф
    р
    ы
    д
    л
    я
    в
    о
    д
    и
    т
    е
    л
    ь
    с
    к
    о
    г
    о
    у
    д
    о
    с
    т
    о
    в
    е
    р
    е
    н
    и
    я
    ,
    п
    о
    л
    у
    ч
    е
    н
    н
    о
    г
    о
    п
    о
    с
    л
    е
    1
    м
    а
    р
    т
    а
    2011
    г
    .
    П
    р
    и
    м
    е
    р
    : 44
    А
    А
    и
    л
    и
    4403
      
    * Number -- Н
      о
      м
      е
      р
    * IssueDate -- Д
      а
      т
      а
      в
      ы
      д
      а
      ч
      и
    * Issuer -- К
      е
      м
      в
      ы
      д
      а
      н
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Series=None, Number=None, IssueDate=None, Issuer=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Series = Series
        self.validate_SeriesType7(self.Series)
        self.Series_nsprefix_ = None
        self.Number = Number
        self.validate_digits_6(self.Number)
        self.Number_nsprefix_ = "tns"
        if isinstance(IssueDate, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(IssueDate, '%Y-%m-%d').date()
        else:
            initvalue_ = IssueDate
        self.IssueDate = initvalue_
        self.IssueDate_nsprefix_ = None
        self.Issuer = Issuer
        self.validate_rus_and_num_200(self.Issuer)
        self.Issuer_nsprefix_ = "tns"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, DrivingLicenseRFType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if DrivingLicenseRFType.subclass:
            return DrivingLicenseRFType.subclass(*args_, **kwargs_)
        else:
            return DrivingLicenseRFType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Series(self):
        return self.Series
    def set_Series(self, Series):
        self.Series = Series
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_IssueDate(self):
        return self.IssueDate
    def set_IssueDate(self, IssueDate):
        self.IssueDate = IssueDate
    def get_Issuer(self):
        return self.Issuer
    def set_Issuer(self, Issuer):
        self.Issuer = Issuer
    def validate_SeriesType7(self, value):
        result = True
        # Validate type SeriesType7, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 4:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on SeriesType7' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_SeriesType7_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_SeriesType7_patterns_, ))
                result = False
        return result
    validate_SeriesType7_patterns_ = [['^([0-9]{2}([0-9]{2})|([А-Я]{2}))$']]
    def validate_digits_6(self, value):
        result = True
        # Validate type digits-6, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 6:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on digits-6' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_digits_6_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_digits_6_patterns_, ))
                result = False
        return result
    validate_digits_6_patterns_ = [['^(\\d{6})$']]
    def validate_rus_and_num_200(self, value):
        result = True
        # Validate type rus-and-num-200, a restriction on tns:rus-and-num.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 200:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on rus-and-num-200' % {"value": value, "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_rus_and_num_200_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_rus_and_num_200_patterns_, ))
                result = False
        return result
    validate_rus_and_num_200_patterns_ = [["^([а-яА-ЯёЁ\\-0-9][а-яА-ЯёЁ\\-\\s'',.0-9]*)$"]]
    def _hasContent(self):
        if (
            self.Series is not None or
            self.Number is not None or
            self.IssueDate is not None or
            self.Issuer is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='DrivingLicenseRFType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('DrivingLicenseRFType')
        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 and name_ == 'DrivingLicenseRFType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DrivingLicenseRFType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='DrivingLicenseRFType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='tns:', name_='DrivingLicenseRFType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='tns:', namespacedef_='xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='DrivingLicenseRFType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Series is not None:
            namespaceprefix_ = self.Series_nsprefix_ + ':' if (UseCapturedNS_ and self.Series_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSeries>%s</%sSeries>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Series), input_name='Series')), namespaceprefix_ , eol_))
        if self.Number is not None:
            namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Number), input_name='Number')), namespaceprefix_ , eol_))
        if self.IssueDate is not None:
            namespaceprefix_ = self.IssueDate_nsprefix_ + ':' if (UseCapturedNS_ and self.IssueDate_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssueDate>%s</%sIssueDate>%s' % (namespaceprefix_ , self.gds_format_date(self.IssueDate, input_name='IssueDate'), namespaceprefix_ , eol_))
        if self.Issuer is not None:
            namespaceprefix_ = self.Issuer_nsprefix_ + ':' if (UseCapturedNS_ and self.Issuer_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssuer>%s</%sIssuer>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Issuer), input_name='Issuer')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Series':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Series')
            value_ = self.gds_validate_string(value_, node, 'Series')
            self.Series = value_
            self.Series_nsprefix_ = child_.prefix
            # validate type SeriesType7
            self.validate_SeriesType7(self.Series)
        elif nodeName_ == 'Number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Number')
            value_ = self.gds_validate_string(value_, node, 'Number')
            self.Number = value_
            self.Number_nsprefix_ = child_.prefix
            # validate type digits-6
            self.validate_digits_6(self.Number)
        elif nodeName_ == 'IssueDate':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.IssueDate = dval_
            self.IssueDate_nsprefix_ = child_.prefix
        elif nodeName_ == 'Issuer':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Issuer')
            value_ = self.gds_validate_string(value_, node, 'Issuer')
            self.Issuer = value_
            self.Issuer_nsprefix_ = child_.prefix
            # validate type rus-and-num-200
            self.validate_rus_and_num_200(self.Issuer)
# end class DrivingLicenseRFType


class tCertificationDoc(GeneratedsSuper):
    """Organization -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    о
    р
    г
    а
    н
    а
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    г
    о
    у
    ч
    е
    т
    а
    Date -- Д
    а
    т
    а
    Number -- Н
    о
    м
    е
    р
    д
    о
    к
    у
    м
    е
    н
    т
    а
    Official -- Д
    о
    л
    ж
    н
    о
    с
    т
    н
    о
    е
    л
    и
    ц
    о
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Organization=None, Date=None, Number=None, Official=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Organization = Organization
        self.validate_s500(self.Organization)
        self.Organization_nsprefix_ = "Simple1"
        if isinstance(Date, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(Date, '%Y-%m-%d').date()
        else:
            initvalue_ = Date
        self.Date = initvalue_
        self.Date_nsprefix_ = None
        self.Number = Number
        self.validate_s100(self.Number)
        self.Number_nsprefix_ = "Simple1"
        self.Official = Official
        self.Official_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tCertificationDoc)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tCertificationDoc.subclass:
            return tCertificationDoc.subclass(*args_, **kwargs_)
        else:
            return tCertificationDoc(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Organization(self):
        return self.Organization
    def set_Organization(self, Organization):
        self.Organization = Organization
    def get_Date(self):
        return self.Date
    def set_Date(self, Date):
        self.Date = Date
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_Official(self):
        return self.Official
    def set_Official(self, Official):
        self.Official = Official
    def validate_s500(self, value):
        result = True
        # Validate type s500, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 500:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s500' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s100(self, value):
        result = True
        # Validate type s100, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 100:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s100' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.Organization is not None or
            self.Date is not None or
            self.Number is not None or
            self.Official is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Cer1:', namespacedef_='xmlns:Cer1="urn://x-artefacts-rosreestr-ru/commons/complex-types/certification-doc/1.0" xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tCertificationDoc', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tCertificationDoc')
        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 and name_ == 'tCertificationDoc':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tCertificationDoc')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tCertificationDoc', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Cer1:', name_='tCertificationDoc'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Cer1:', namespacedef_='xmlns:Cer1="urn://x-artefacts-rosreestr-ru/commons/complex-types/certification-doc/1.0" xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tCertificationDoc', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Organization is not None:
            namespaceprefix_ = self.Organization_nsprefix_ + ':' if (UseCapturedNS_ and self.Organization_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOrganization>%s</%sOrganization>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Organization), input_name='Organization')), namespaceprefix_ , eol_))
        if self.Date is not None:
            namespaceprefix_ = self.Date_nsprefix_ + ':' if (UseCapturedNS_ and self.Date_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDate>%s</%sDate>%s' % (namespaceprefix_ , self.gds_format_date(self.Date, input_name='Date'), namespaceprefix_ , eol_))
        if self.Number is not None:
            namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Number), input_name='Number')), namespaceprefix_ , eol_))
        if self.Official is not None:
            namespaceprefix_ = self.Official_nsprefix_ + ':' if (UseCapturedNS_ and self.Official_nsprefix_) else ''
            self.Official.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Official', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Organization':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Organization')
            value_ = self.gds_validate_string(value_, node, 'Organization')
            self.Organization = value_
            self.Organization_nsprefix_ = child_.prefix
            # validate type s500
            self.validate_s500(self.Organization)
        elif nodeName_ == 'Date':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.Date = dval_
            self.Date_nsprefix_ = child_.prefix
        elif nodeName_ == 'Number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Number')
            value_ = self.gds_validate_string(value_, node, 'Number')
            self.Number = value_
            self.Number_nsprefix_ = child_.prefix
            # validate type s100
            self.validate_s100(self.Number)
        elif nodeName_ == 'Official':
            obj_ = OfficialType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Official = obj_
            obj_.original_tagname_ = 'Official'
# end class tCertificationDoc


class tAddressOut(GeneratedsSuper):
    """OKATO -- О
    К
    А
    Т
    О
    KLADR -- К
    Л
    А
    Д
    Р
    OKTMO -- О
    К
    Т
    М
    О
    PostalCode -- П
    о
    ч
    т
    о
    в
    ы
    й
    и
    н
    д
    е
    к
    с
    Region -- К
    о
    д
    р
    е
    г
    и
    о
    н
    а
    District -- Р
    а
    й
    о
    н
    City -- М
    у
    н
    и
    ц
    и
    п
    а
    л
    ь
    н
    о
    е
    о
    б
    р
    а
    з
    о
    в
    а
    н
    и
    е
    UrbanDistrict -- Г
    о
    р
    о
    д
    с
    к
    о
    й
    р
    а
    й
    о
    н
    SovietVillage -- С
    е
    л
    ь
    с
    о
    в
    е
    т
    Locality -- Н
    а
    с
    е
    л
    ё
    н
    н
    ы
    й
    п
    у
    н
    к
    т
    Street -- У
    л
    и
    ц
    а
    Level1 -- Д
    о
    м
    Level2 -- К
    о
    р
    п
    у
    с
    Level3 -- С
    т
    р
    о
    е
    н
    и
    е
    Apartment -- К
    в
    а
    р
    т
    и
    р
    а
    Other -- И
    н
    о
    е
    Note -- Н
    е
    ф
    о
    р
    м
    а
    л
    и
    з
    о
    в
    а
    н
    н
    о
    е
    о
    п
    и
    с
    а
    н
    и
    е
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, AddressOrLocation=None, OKATO=None, KLADR=None, OKTMO=None, PostalCode=None, Region=None, District=None, City=None, UrbanDistrict=None, SovietVillage=None, Locality=None, Street=None, Level1=None, Level2=None, Level3=None, Apartment=None, Other=None, Note=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "adrOut4"
        self.AddressOrLocation = _cast(None, AddressOrLocation)
        self.AddressOrLocation_nsprefix_ = None
        self.OKATO = OKATO
        self.validate_OKATOType(self.OKATO)
        self.OKATO_nsprefix_ = "tns"
        self.KLADR = KLADR
        self.validate_s20(self.KLADR)
        self.KLADR_nsprefix_ = "Simple1"
        self.OKTMO = OKTMO
        self.validate_OKTMOType(self.OKTMO)
        self.OKTMO_nsprefix_ = "Simple2"
        self.PostalCode = PostalCode
        self.validate_PostalCodeRFType(self.PostalCode)
        self.PostalCode_nsprefix_ = "tns"
        self.Region = Region
        self.validate_dRegionsRF(self.Region)
        self.Region_nsprefix_ = "dRF1"
        self.District = District
        self.District_nsprefix_ = "adrOut4"
        self.City = City
        self.City_nsprefix_ = "adrOut4"
        self.UrbanDistrict = UrbanDistrict
        self.UrbanDistrict_nsprefix_ = "adrOut4"
        self.SovietVillage = SovietVillage
        self.SovietVillage_nsprefix_ = "adrOut4"
        self.Locality = Locality
        self.Locality_nsprefix_ = "adrOut4"
        self.Street = Street
        self.Street_nsprefix_ = "adrOut4"
        self.Level1 = Level1
        self.Level1_nsprefix_ = "adrOut4"
        self.Level2 = Level2
        self.Level2_nsprefix_ = "adrOut4"
        self.Level3 = Level3
        self.Level3_nsprefix_ = "adrOut4"
        self.Apartment = Apartment
        self.Apartment_nsprefix_ = "adrOut4"
        self.Other = Other
        self.validate_s2500(self.Other)
        self.Other_nsprefix_ = "Simple1"
        self.Note = Note
        self.validate_s4000(self.Note)
        self.Note_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tAddressOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tAddressOut.subclass:
            return tAddressOut.subclass(*args_, **kwargs_)
        else:
            return tAddressOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_OKATO(self):
        return self.OKATO
    def set_OKATO(self, OKATO):
        self.OKATO = OKATO
    def get_KLADR(self):
        return self.KLADR
    def set_KLADR(self, KLADR):
        self.KLADR = KLADR
    def get_OKTMO(self):
        return self.OKTMO
    def set_OKTMO(self, OKTMO):
        self.OKTMO = OKTMO
    def get_PostalCode(self):
        return self.PostalCode
    def set_PostalCode(self, PostalCode):
        self.PostalCode = PostalCode
    def get_Region(self):
        return self.Region
    def set_Region(self, Region):
        self.Region = Region
    def get_District(self):
        return self.District
    def set_District(self, District):
        self.District = District
    def get_City(self):
        return self.City
    def set_City(self, City):
        self.City = City
    def get_UrbanDistrict(self):
        return self.UrbanDistrict
    def set_UrbanDistrict(self, UrbanDistrict):
        self.UrbanDistrict = UrbanDistrict
    def get_SovietVillage(self):
        return self.SovietVillage
    def set_SovietVillage(self, SovietVillage):
        self.SovietVillage = SovietVillage
    def get_Locality(self):
        return self.Locality
    def set_Locality(self, Locality):
        self.Locality = Locality
    def get_Street(self):
        return self.Street
    def set_Street(self, Street):
        self.Street = Street
    def get_Level1(self):
        return self.Level1
    def set_Level1(self, Level1):
        self.Level1 = Level1
    def get_Level2(self):
        return self.Level2
    def set_Level2(self, Level2):
        self.Level2 = Level2
    def get_Level3(self):
        return self.Level3
    def set_Level3(self, Level3):
        self.Level3 = Level3
    def get_Apartment(self):
        return self.Apartment
    def set_Apartment(self, Apartment):
        self.Apartment = Apartment
    def get_Other(self):
        return self.Other
    def set_Other(self, Other):
        self.Other = Other
    def get_Note(self):
        return self.Note
    def set_Note(self, Note):
        self.Note = Note
    def get_AddressOrLocation(self):
        return self.AddressOrLocation
    def set_AddressOrLocation(self, AddressOrLocation):
        self.AddressOrLocation = AddressOrLocation
    def validate_OKATOType(self, value):
        result = True
        # Validate type OKATOType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 11:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on OKATOType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_OKATOType_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_OKATOType_patterns_, ))
                result = False
        return result
    validate_OKATOType_patterns_ = [['^(\\d{1,11})$']]
    def validate_s20(self, value):
        result = True
        # Validate type s20, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s20' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_OKTMOType(self, value):
        result = True
        # Validate type OKTMOType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 11:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on OKTMOType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_PostalCodeRFType(self, value):
        result = True
        # Validate type PostalCodeRFType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 6:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on PostalCodeRFType' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_PostalCodeRFType_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_PostalCodeRFType_patterns_, ))
                result = False
        return result
    validate_PostalCodeRFType_patterns_ = [['^(\\d{6})$']]
    def validate_dRegionsRF(self, value):
        result = True
        # Validate type dRegionsRF, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '83', '86', '87', '89', '91', '92', '98', '99']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dRegionsRF' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s2500(self, value):
        result = True
        # Validate type s2500, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 2500:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s2500' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s4000(self, value):
        result = True
        # Validate type s4000, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 4000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s4000' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_sAddressOrLocation(self, value):
        # Validate type adrOut4:sAddressOrLocation, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['0', '1']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on sAddressOrLocation' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.OKATO is not None or
            self.KLADR is not None or
            self.OKTMO is not None or
            self.PostalCode is not None or
            self.Region is not None or
            self.District is not None or
            self.City is not None or
            self.UrbanDistrict is not None or
            self.SovietVillage is not None or
            self.Locality is not None or
            self.Street is not None or
            self.Level1 is not None or
            self.Level2 is not None or
            self.Level3 is not None or
            self.Apartment is not None or
            self.Other is not None or
            self.Note is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1" xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:Simple2="urn://x-artefacts-rosreestr-ru/commons/simple-types/2.0.1"  xmlns:dRF1="urn://x-artefacts-rosreestr-ru/commons/directories/regions/1.0.1" ', name_='tAddressOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tAddressOut')
        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 and name_ == 'tAddressOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tAddressOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tAddressOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='adrOut4:', name_='tAddressOut'):
        if self.AddressOrLocation is not None and 'AddressOrLocation' not in already_processed:
            already_processed.add('AddressOrLocation')
            outfile.write(' AddressOrLocation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.AddressOrLocation), input_name='AddressOrLocation')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1" xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:Simple2="urn://x-artefacts-rosreestr-ru/commons/simple-types/2.0.1"  xmlns:dRF1="urn://x-artefacts-rosreestr-ru/commons/directories/regions/1.0.1" ', name_='tAddressOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.OKATO is not None:
            namespaceprefix_ = self.OKATO_nsprefix_ + ':' if (UseCapturedNS_ and self.OKATO_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOKATO>%s</%sOKATO>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.OKATO), input_name='OKATO')), namespaceprefix_ , eol_))
        if self.KLADR is not None:
            namespaceprefix_ = self.KLADR_nsprefix_ + ':' if (UseCapturedNS_ and self.KLADR_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sKLADR>%s</%sKLADR>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.KLADR), input_name='KLADR')), namespaceprefix_ , eol_))
        if self.OKTMO is not None:
            namespaceprefix_ = self.OKTMO_nsprefix_ + ':' if (UseCapturedNS_ and self.OKTMO_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOKTMO>%s</%sOKTMO>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.OKTMO), input_name='OKTMO')), namespaceprefix_ , eol_))
        if self.PostalCode is not None:
            namespaceprefix_ = self.PostalCode_nsprefix_ + ':' if (UseCapturedNS_ and self.PostalCode_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPostalCode>%s</%sPostalCode>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.PostalCode), input_name='PostalCode')), namespaceprefix_ , eol_))
        if self.Region is not None:
            namespaceprefix_ = self.Region_nsprefix_ + ':' if (UseCapturedNS_ and self.Region_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sRegion>%s</%sRegion>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Region), input_name='Region')), namespaceprefix_ , eol_))
        if self.District is not None:
            namespaceprefix_ = self.District_nsprefix_ + ':' if (UseCapturedNS_ and self.District_nsprefix_) else ''
            self.District.export(outfile, level, namespaceprefix_, namespacedef_='', name_='District', pretty_print=pretty_print)
        if self.City is not None:
            namespaceprefix_ = self.City_nsprefix_ + ':' if (UseCapturedNS_ and self.City_nsprefix_) else ''
            self.City.export(outfile, level, namespaceprefix_, namespacedef_='', name_='City', pretty_print=pretty_print)
        if self.UrbanDistrict is not None:
            namespaceprefix_ = self.UrbanDistrict_nsprefix_ + ':' if (UseCapturedNS_ and self.UrbanDistrict_nsprefix_) else ''
            self.UrbanDistrict.export(outfile, level, namespaceprefix_, namespacedef_='', name_='UrbanDistrict', pretty_print=pretty_print)
        if self.SovietVillage is not None:
            namespaceprefix_ = self.SovietVillage_nsprefix_ + ':' if (UseCapturedNS_ and self.SovietVillage_nsprefix_) else ''
            self.SovietVillage.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SovietVillage', pretty_print=pretty_print)
        if self.Locality is not None:
            namespaceprefix_ = self.Locality_nsprefix_ + ':' if (UseCapturedNS_ and self.Locality_nsprefix_) else ''
            self.Locality.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Locality', pretty_print=pretty_print)
        if self.Street is not None:
            namespaceprefix_ = self.Street_nsprefix_ + ':' if (UseCapturedNS_ and self.Street_nsprefix_) else ''
            self.Street.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Street', pretty_print=pretty_print)
        if self.Level1 is not None:
            namespaceprefix_ = self.Level1_nsprefix_ + ':' if (UseCapturedNS_ and self.Level1_nsprefix_) else ''
            self.Level1.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Level1', pretty_print=pretty_print)
        if self.Level2 is not None:
            namespaceprefix_ = self.Level2_nsprefix_ + ':' if (UseCapturedNS_ and self.Level2_nsprefix_) else ''
            self.Level2.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Level2', pretty_print=pretty_print)
        if self.Level3 is not None:
            namespaceprefix_ = self.Level3_nsprefix_ + ':' if (UseCapturedNS_ and self.Level3_nsprefix_) else ''
            self.Level3.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Level3', pretty_print=pretty_print)
        if self.Apartment is not None:
            namespaceprefix_ = self.Apartment_nsprefix_ + ':' if (UseCapturedNS_ and self.Apartment_nsprefix_) else ''
            self.Apartment.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Apartment', pretty_print=pretty_print)
        if self.Other is not None:
            namespaceprefix_ = self.Other_nsprefix_ + ':' if (UseCapturedNS_ and self.Other_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOther>%s</%sOther>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Other), input_name='Other')), namespaceprefix_ , eol_))
        if self.Note is not None:
            namespaceprefix_ = self.Note_nsprefix_ + ':' if (UseCapturedNS_ and self.Note_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNote>%s</%sNote>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Note), input_name='Note')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('AddressOrLocation', node)
        if value is not None and 'AddressOrLocation' not in already_processed:
            already_processed.add('AddressOrLocation')
            self.AddressOrLocation = value
            self.validate_sAddressOrLocation(self.AddressOrLocation)    # validate type sAddressOrLocation
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'OKATO':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'OKATO')
            value_ = self.gds_validate_string(value_, node, 'OKATO')
            self.OKATO = value_
            self.OKATO_nsprefix_ = child_.prefix
            # validate type OKATOType
            self.validate_OKATOType(self.OKATO)
        elif nodeName_ == 'KLADR':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'KLADR')
            value_ = self.gds_validate_string(value_, node, 'KLADR')
            self.KLADR = value_
            self.KLADR_nsprefix_ = child_.prefix
            # validate type s20
            self.validate_s20(self.KLADR)
        elif nodeName_ == 'OKTMO':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'OKTMO')
            value_ = self.gds_validate_string(value_, node, 'OKTMO')
            self.OKTMO = value_
            self.OKTMO_nsprefix_ = child_.prefix
            # validate type OKTMOType
            self.validate_OKTMOType(self.OKTMO)
        elif nodeName_ == 'PostalCode':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'PostalCode')
            value_ = self.gds_validate_string(value_, node, 'PostalCode')
            self.PostalCode = value_
            self.PostalCode_nsprefix_ = child_.prefix
            # validate type PostalCodeRFType
            self.validate_PostalCodeRFType(self.PostalCode)
        elif nodeName_ == 'Region':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Region')
            value_ = self.gds_validate_string(value_, node, 'Region')
            self.Region = value_
            self.Region_nsprefix_ = child_.prefix
            # validate type dRegionsRF
            self.validate_dRegionsRF(self.Region)
        elif nodeName_ == 'District':
            obj_ = tName.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.District = obj_
            obj_.original_tagname_ = 'District'
        elif nodeName_ == 'City':
            obj_ = tName.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.City = obj_
            obj_.original_tagname_ = 'City'
        elif nodeName_ == 'UrbanDistrict':
            obj_ = tUrbanDistrict.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.UrbanDistrict = obj_
            obj_.original_tagname_ = 'UrbanDistrict'
        elif nodeName_ == 'SovietVillage':
            obj_ = tSovietVillage.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SovietVillage = obj_
            obj_.original_tagname_ = 'SovietVillage'
        elif nodeName_ == 'Locality':
            obj_ = tName.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Locality = obj_
            obj_.original_tagname_ = 'Locality'
        elif nodeName_ == 'Street':
            obj_ = tName.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Street = obj_
            obj_.original_tagname_ = 'Street'
        elif nodeName_ == 'Level1':
            obj_ = tLevel1.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Level1 = obj_
            obj_.original_tagname_ = 'Level1'
        elif nodeName_ == 'Level2':
            obj_ = tLevel2.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Level2 = obj_
            obj_.original_tagname_ = 'Level2'
        elif nodeName_ == 'Level3':
            obj_ = tLevel3.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Level3 = obj_
            obj_.original_tagname_ = 'Level3'
        elif nodeName_ == 'Apartment':
            obj_ = tApartment.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Apartment = obj_
            obj_.original_tagname_ = 'Apartment'
        elif nodeName_ == 'Other':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Other')
            value_ = self.gds_validate_string(value_, node, 'Other')
            self.Other = value_
            self.Other_nsprefix_ = child_.prefix
            # validate type s2500
            self.validate_s2500(self.Other)
        elif nodeName_ == 'Note':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Note')
            value_ = self.gds_validate_string(value_, node, 'Note')
            self.Note = value_
            self.Note_nsprefix_ = child_.prefix
            # validate type s4000
            self.validate_s4000(self.Note)
# end class tAddressOut


class tName(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Name=None, Type=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "adrOut4"
        self.Name = _cast(None, Name)
        self.Name_nsprefix_ = None
        self.Type = _cast(None, Type)
        self.Type_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tName)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tName.subclass:
            return tName.subclass(*args_, **kwargs_)
        else:
            return tName(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Name(self):
        return self.Name
    def set_Name(self, Name):
        self.Name = Name
    def get_Type(self):
        return self.Type
    def set_Type(self, Type):
        self.Type = Type
    def validate_s255(self, value):
        # Validate type Simple1:s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tName', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tName')
        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 and name_ == 'tName':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tName')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tName', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='adrOut4:', name_='tName'):
        if self.Name is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            outfile.write(' Name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Name), input_name='Name')), ))
        if self.Type is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            outfile.write(' Type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Type), input_name='Type')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tName', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Name', node)
        if value is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            self.Name = value
            self.validate_s255(self.Name)    # validate type s255
        value = find_attr_value_('Type', node)
        if value is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            self.Type = value
            self.validate_s255(self.Type)    # validate type s255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tName


class tUrbanDistrict(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Name=None, Type=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "adrOut4"
        self.Name = _cast(None, Name)
        self.Name_nsprefix_ = None
        self.Type = _cast(None, Type)
        self.Type_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tUrbanDistrict)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tUrbanDistrict.subclass:
            return tUrbanDistrict.subclass(*args_, **kwargs_)
        else:
            return tUrbanDistrict(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Name(self):
        return self.Name
    def set_Name(self, Name):
        self.Name = Name
    def get_Type(self):
        return self.Type
    def set_Type(self, Type):
        self.Type = Type
    def validate_s255(self, value):
        # Validate type Simple1:s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_dUrbanDistrict(self, value):
        # Validate type dUd1:dUrbanDistrict, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['р-н']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dUrbanDistrict' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tUrbanDistrict', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tUrbanDistrict')
        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 and name_ == 'tUrbanDistrict':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tUrbanDistrict')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tUrbanDistrict', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='adrOut4:', name_='tUrbanDistrict'):
        if self.Name is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            outfile.write(' Name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Name), input_name='Name')), ))
        if self.Type is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            outfile.write(' Type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Type), input_name='Type')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tUrbanDistrict', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Name', node)
        if value is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            self.Name = value
            self.validate_s255(self.Name)    # validate type s255
        value = find_attr_value_('Type', node)
        if value is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            self.Type = value
            self.validate_dUrbanDistrict(self.Type)    # validate type dUrbanDistrict
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tUrbanDistrict


class tSovietVillage(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Name=None, Type=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "adrOut4"
        self.Name = _cast(None, Name)
        self.Name_nsprefix_ = None
        self.Type = _cast(None, Type)
        self.Type_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSovietVillage)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSovietVillage.subclass:
            return tSovietVillage.subclass(*args_, **kwargs_)
        else:
            return tSovietVillage(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Name(self):
        return self.Name
    def set_Name(self, Name):
        self.Name = Name
    def get_Type(self):
        return self.Type
    def set_Type(self, Type):
        self.Type = Type
    def validate_s255(self, value):
        # Validate type Simple1:s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_dSovietVillage(self, value):
        # Validate type dSV1:dSovietVillage, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['с/с']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dSovietVillage' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tSovietVillage', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSovietVillage')
        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 and name_ == 'tSovietVillage':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSovietVillage')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSovietVillage', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='adrOut4:', name_='tSovietVillage'):
        if self.Name is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            outfile.write(' Name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Name), input_name='Name')), ))
        if self.Type is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            outfile.write(' Type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Type), input_name='Type')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tSovietVillage', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Name', node)
        if value is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            self.Name = value
            self.validate_s255(self.Name)    # validate type s255
        value = find_attr_value_('Type', node)
        if value is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            self.Type = value
            self.validate_dSovietVillage(self.Type)    # validate type dSovietVillage
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tSovietVillage


class tLevel1(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Type=None, Value=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "adrOut4"
        self.Type = _cast(None, Type)
        self.Type_nsprefix_ = None
        self.Value = _cast(None, Value)
        self.Value_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tLevel1)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tLevel1.subclass:
            return tLevel1.subclass(*args_, **kwargs_)
        else:
            return tLevel1(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Type(self):
        return self.Type
    def set_Type(self, Type):
        self.Type = Type
    def get_Value(self):
        return self.Value
    def set_Value(self, Value):
        self.Value = Value
    def validate_dLocationLevel1Type(self, value):
        # Validate type dLl11:dLocationLevel1Type, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['д', 'ГСК', 'казарма', 'уч', 'вл', 'бокс', 'в/ч', 'сооружение']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dLocationLevel1Type' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_s255(self, value):
        # Validate type Simple1:s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tLevel1', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tLevel1')
        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 and name_ == 'tLevel1':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tLevel1')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tLevel1', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='adrOut4:', name_='tLevel1'):
        if self.Type is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            outfile.write(' Type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Type), input_name='Type')), ))
        if self.Value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            outfile.write(' Value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Value), input_name='Value')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tLevel1', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Type', node)
        if value is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            self.Type = value
            self.validate_dLocationLevel1Type(self.Type)    # validate type dLocationLevel1Type
        value = find_attr_value_('Value', node)
        if value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            self.Value = value
            self.validate_s255(self.Value)    # validate type s255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tLevel1


class tLevel2(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Type=None, Value=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "adrOut4"
        self.Type = _cast(None, Type)
        self.Type_nsprefix_ = None
        self.Value = _cast(None, Value)
        self.Value_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tLevel2)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tLevel2.subclass:
            return tLevel2.subclass(*args_, **kwargs_)
        else:
            return tLevel2(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Type(self):
        return self.Type
    def set_Type(self, Type):
        self.Type = Type
    def get_Value(self):
        return self.Value
    def set_Value(self, Value):
        self.Value = Value
    def validate_dLocationLevel2Type(self, value):
        # Validate type dLl21:dLocationLevel2Type, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['корп', 'д', 'уч', 'вл', 'гараж', 'бокс', 'строение', 'сооружение']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dLocationLevel2Type' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_s255(self, value):
        # Validate type Simple1:s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tLevel2', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tLevel2')
        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 and name_ == 'tLevel2':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tLevel2')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tLevel2', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='adrOut4:', name_='tLevel2'):
        if self.Type is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            outfile.write(' Type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Type), input_name='Type')), ))
        if self.Value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            outfile.write(' Value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Value), input_name='Value')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tLevel2', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Type', node)
        if value is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            self.Type = value
            self.validate_dLocationLevel2Type(self.Type)    # validate type dLocationLevel2Type
        value = find_attr_value_('Value', node)
        if value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            self.Value = value
            self.validate_s255(self.Value)    # validate type s255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tLevel2


class tLevel3(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Type=None, Value=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "adrOut4"
        self.Type = _cast(None, Type)
        self.Type_nsprefix_ = None
        self.Value = _cast(None, Value)
        self.Value_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tLevel3)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tLevel3.subclass:
            return tLevel3.subclass(*args_, **kwargs_)
        else:
            return tLevel3(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Type(self):
        return self.Type
    def set_Type(self, Type):
        self.Type = Type
    def get_Value(self):
        return self.Value
    def set_Value(self, Value):
        self.Value = Value
    def validate_dLocationLevel3Type(self, value):
        # Validate type dLl31:dLocationLevel3Type, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['строен', 'корп', 'блок', 'литера']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dLocationLevel3Type' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_s255(self, value):
        # Validate type Simple1:s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tLevel3', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tLevel3')
        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 and name_ == 'tLevel3':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tLevel3')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tLevel3', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='adrOut4:', name_='tLevel3'):
        if self.Type is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            outfile.write(' Type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Type), input_name='Type')), ))
        if self.Value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            outfile.write(' Value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Value), input_name='Value')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tLevel3', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Type', node)
        if value is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            self.Type = value
            self.validate_dLocationLevel3Type(self.Type)    # validate type dLocationLevel3Type
        value = find_attr_value_('Value', node)
        if value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            self.Value = value
            self.validate_s255(self.Value)    # validate type s255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tLevel3


class tApartment(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Type=None, Value=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "adrOut4"
        self.Type = _cast(None, Type)
        self.Type_nsprefix_ = None
        self.Value = _cast(None, Value)
        self.Value_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tApartment)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tApartment.subclass:
            return tApartment.subclass(*args_, **kwargs_)
        else:
            return tApartment(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Type(self):
        return self.Type
    def set_Type(self, Type):
        self.Type = Type
    def get_Value(self):
        return self.Value
    def set_Value(self, Value):
        self.Value = Value
    def validate_dApartmentType(self, value):
        # Validate type dApart1:dApartmentType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['кв', 'бокс', 'к', 'пом']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dApartmentType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_s255(self, value):
        # Validate type Simple1:s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tApartment', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tApartment')
        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 and name_ == 'tApartment':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tApartment')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tApartment', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='adrOut4:', name_='tApartment'):
        if self.Type is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            outfile.write(' Type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Type), input_name='Type')), ))
        if self.Value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            outfile.write(' Value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Value), input_name='Value')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='adrOut4:', namespacedef_='xmlns:adrOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1"', name_='tApartment', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Type', node)
        if value is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            self.Type = value
            self.validate_dApartmentType(self.Type)    # validate type dApartmentType
        value = find_attr_value_('Value', node)
        if value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            self.Value = value
            self.validate_s255(self.Value)    # validate type s255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tApartment


class tCadastralCost(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Value=None, Unit='383', extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Cos1"
        self.Value = _cast(None, Value)
        self.Value_nsprefix_ = None
        self.Unit = _cast(None, Unit)
        self.Unit_nsprefix_ = None
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tCadastralCost)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tCadastralCost.subclass:
            return tCadastralCost.subclass(*args_, **kwargs_)
        else:
            return tCadastralCost(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Value(self):
        return self.Value
    def set_Value(self, Value):
        self.Value = Value
    def get_Unit(self):
        return self.Unit
    def set_Unit(self, Unit):
        self.Unit = Unit
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_d20_2(self, value):
        # Validate type Simple1:d20_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d20_2' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Cos1:', namespacedef_='xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"', name_='tCadastralCost', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tCadastralCost')
        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 and name_ == 'tCadastralCost':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tCadastralCost')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tCadastralCost', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Cos1:', name_='tCadastralCost'):
        if self.Value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            outfile.write(' Value="%s"' % self.gds_format_decimal(self.Value, input_name='Value'))
        if self.Unit is not None and 'Unit' not in already_processed:
            already_processed.add('Unit')
            outfile.write(' Unit=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Unit), input_name='Unit')), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def _exportChildren(self, outfile, level, namespaceprefix_='Cos1:', namespacedef_='xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0"', name_='tCadastralCost', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Value', node)
        if value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            value = self.gds_parse_decimal(value, node, 'Value')
            self.Value = value
            self.validate_d20_2(self.Value)    # validate type d20_2
        value = find_attr_value_('Unit', node)
        if value is not None and 'Unit' not in already_processed:
            already_processed.add('Unit')
            self.Unit = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tCadastralCost


class tCadastralCostExt(tCadastralCost):
    """DateValuation -- Д
    а
    т
    а
    о
    п
    р
    е
    д
    е
    л
    е
    н
    и
    я
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    й
    с
    т
    о
    и
    м
    о
    с
    т
    и
    DateEntering -- Д
    а
    т
    а
    в
    н
    е
    с
    е
    н
    и
    я
    с
    в
    е
    д
    е
    н
    и
    й
    о
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    й
    с
    т
    о
    и
    м
    о
    с
    т
    и
    в
    Г
    К
    Н
    DateApproval -- Д
    а
    т
    а
    в
    с
    т
    у
    п
    л
    е
    н
    и
    я
    в
    з
    а
    к
    о
    н
    н
    у
    ю
    с
    и
    л
    у
    а
    к
    т
    а
    (
    д
    а
    т
    а
    у
    т
    в
    е
    р
    ж
    д
    е
    н
    и
    я
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    й
    с
    т
    о
    и
    м
    о
    с
    т
    и
    )
    DocNumber -- Н
    о
    м
    е
    р
    а
    к
    т
    а
    о
    б
    у
    т
    в
    е
    р
    ж
    д
    е
    н
    и
    и
    к
    а
    д
    а
    с
    т
    р
    о
    в
    о
    й
    с
    т
    о
    и
    м
    о
    с
    т
    и
      
    * DocDate -- Д
      а
      т
      а
      а
      к
      т
      а
      о
      б
      у
      т
      в
      е
      р
      ж
      д
      е
      н
      и
      и
      к
      а
      д
      а
      с
      т
      р
      о
      в
      о
      й
      с
      т
      о
      и
      м
      о
      с
      т
      и
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tCadastralCost
    def __init__(self, Value=None, Unit='383', DateValuation=None, DateEntering=None, DateApproval=None, DocNumber=None, DocDate=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("tCadastralCostExt"), self).__init__(Value, Unit,  **kwargs_)
        if isinstance(DateValuation, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(DateValuation, '%Y-%m-%d').date()
        else:
            initvalue_ = DateValuation
        self.DateValuation = initvalue_
        self.DateValuation_nsprefix_ = None
        if isinstance(DateEntering, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(DateEntering, '%Y-%m-%d').date()
        else:
            initvalue_ = DateEntering
        self.DateEntering = initvalue_
        self.DateEntering_nsprefix_ = None
        if isinstance(DateApproval, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(DateApproval, '%Y-%m-%d').date()
        else:
            initvalue_ = DateApproval
        self.DateApproval = initvalue_
        self.DateApproval_nsprefix_ = None
        self.DocNumber = DocNumber
        self.validate_s45(self.DocNumber)
        self.DocNumber_nsprefix_ = "Simple1"
        if isinstance(DocDate, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(DocDate, '%Y-%m-%d').date()
        else:
            initvalue_ = DocDate
        self.DocDate = initvalue_
        self.DocDate_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tCadastralCostExt)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tCadastralCostExt.subclass:
            return tCadastralCostExt.subclass(*args_, **kwargs_)
        else:
            return tCadastralCostExt(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_DateValuation(self):
        return self.DateValuation
    def set_DateValuation(self, DateValuation):
        self.DateValuation = DateValuation
    def get_DateEntering(self):
        return self.DateEntering
    def set_DateEntering(self, DateEntering):
        self.DateEntering = DateEntering
    def get_DateApproval(self):
        return self.DateApproval
    def set_DateApproval(self, DateApproval):
        self.DateApproval = DateApproval
    def get_DocNumber(self):
        return self.DocNumber
    def set_DocNumber(self, DocNumber):
        self.DocNumber = DocNumber
    def get_DocDate(self):
        return self.DocDate
    def set_DocDate(self, DocDate):
        self.DocDate = DocDate
    def validate_s45(self, value):
        result = True
        # Validate type s45, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 45:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s45' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.DateValuation is not None or
            self.DateEntering is not None or
            self.DateApproval is not None or
            self.DocNumber is not None or
            self.DocDate is not None or
            super(tCadastralCostExt, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Cos1:', namespacedef_='xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tCadastralCostExt', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tCadastralCostExt')
        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 and name_ == 'tCadastralCostExt':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tCadastralCostExt')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tCadastralCostExt', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Cos1:', name_='tCadastralCostExt'):
        super(tCadastralCostExt, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tCadastralCostExt')
    def _exportChildren(self, outfile, level, namespaceprefix_='Cos1:', namespacedef_='xmlns:Cos1="urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tCadastralCostExt', fromsubclass_=False, pretty_print=True):
        super(tCadastralCostExt, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DateValuation is not None:
            namespaceprefix_ = self.DateValuation_nsprefix_ + ':' if (UseCapturedNS_ and self.DateValuation_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDateValuation>%s</%sDateValuation>%s' % (namespaceprefix_ , self.gds_format_date(self.DateValuation, input_name='DateValuation'), namespaceprefix_ , eol_))
        if self.DateEntering is not None:
            namespaceprefix_ = self.DateEntering_nsprefix_ + ':' if (UseCapturedNS_ and self.DateEntering_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDateEntering>%s</%sDateEntering>%s' % (namespaceprefix_ , self.gds_format_date(self.DateEntering, input_name='DateEntering'), namespaceprefix_ , eol_))
        if self.DateApproval is not None:
            namespaceprefix_ = self.DateApproval_nsprefix_ + ':' if (UseCapturedNS_ and self.DateApproval_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDateApproval>%s</%sDateApproval>%s' % (namespaceprefix_ , self.gds_format_date(self.DateApproval, input_name='DateApproval'), namespaceprefix_ , eol_))
        if self.DocNumber is not None:
            namespaceprefix_ = self.DocNumber_nsprefix_ + ':' if (UseCapturedNS_ and self.DocNumber_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDocNumber>%s</%sDocNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.DocNumber), input_name='DocNumber')), namespaceprefix_ , eol_))
        if self.DocDate is not None:
            namespaceprefix_ = self.DocDate_nsprefix_ + ':' if (UseCapturedNS_ and self.DocDate_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDocDate>%s</%sDocDate>%s' % (namespaceprefix_ , self.gds_format_date(self.DocDate, input_name='DocDate'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(tCadastralCostExt, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'DateValuation':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.DateValuation = dval_
            self.DateValuation_nsprefix_ = child_.prefix
        elif nodeName_ == 'DateEntering':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.DateEntering = dval_
            self.DateEntering_nsprefix_ = child_.prefix
        elif nodeName_ == 'DateApproval':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.DateApproval = dval_
            self.DateApproval_nsprefix_ = child_.prefix
        elif nodeName_ == 'DocNumber':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'DocNumber')
            value_ = self.gds_validate_string(value_, node, 'DocNumber')
            self.DocNumber = value_
            self.DocNumber_nsprefix_ = child_.prefix
            # validate type s45
            self.validate_s45(self.DocNumber)
        elif nodeName_ == 'DocDate':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.DocDate = dval_
            self.DocDate_nsprefix_ = child_.prefix
        super(tCadastralCostExt, self)._buildChildren(child_, node, nodeName_, True)
# end class tCadastralCostExt


class tCoordSystems(GeneratedsSuper):
    """CoordSystem -- С
    и
    с
    т
    е
    м
    а
    к
    о
    о
    р
    д
    и
    н
    а
    т
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CoordSystem=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if CoordSystem is None:
            self.CoordSystem = []
        else:
            self.CoordSystem = CoordSystem
        self.CoordSystem_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tCoordSystems)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tCoordSystems.subclass:
            return tCoordSystems.subclass(*args_, **kwargs_)
        else:
            return tCoordSystems(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_CoordSystem(self):
        return self.CoordSystem
    def set_CoordSystem(self, CoordSystem):
        self.CoordSystem = CoordSystem
    def add_CoordSystem(self, value):
        self.CoordSystem.append(value)
    def insert_CoordSystem_at(self, index, value):
        self.CoordSystem.insert(index, value)
    def replace_CoordSystem_at(self, index, value):
        self.CoordSystem[index] = value
    def _hasContent(self):
        if (
            self.CoordSystem
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tCoordSystems', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tCoordSystems')
        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 and name_ == 'tCoordSystems':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tCoordSystems')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tCoordSystems', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tCoordSystems'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tCoordSystems', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for CoordSystem_ in self.CoordSystem:
            namespaceprefix_ = self.CoordSystem_nsprefix_ + ':' if (UseCapturedNS_ and self.CoordSystem_nsprefix_) else ''
            CoordSystem_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='CoordSystem', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'CoordSystem':
            obj_ = tCoordSystem.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.CoordSystem.append(obj_)
            obj_.original_tagname_ = 'CoordSystem'
# end class tCoordSystems


class tCoordSystem(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Name=None, CsId=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.Name = _cast(None, Name)
        self.Name_nsprefix_ = None
        self.CsId = _cast(None, CsId)
        self.CsId_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tCoordSystem)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tCoordSystem.subclass:
            return tCoordSystem.subclass(*args_, **kwargs_)
        else:
            return tCoordSystem(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Name(self):
        return self.Name
    def set_Name(self, Name):
        self.Name = Name
    def get_CsId(self):
        return self.CsId
    def set_CsId(self, CsId):
        self.CsId = CsId
    def validate_s2046(self, value):
        # Validate type Simple1:s2046, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 2046:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s2046' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_sID255(self, value):
        # Validate type Simple1:sID255, a restriction on xs:ID.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sID255' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tCoordSystem', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tCoordSystem')
        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 and name_ == 'tCoordSystem':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tCoordSystem')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tCoordSystem', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tCoordSystem'):
        if self.Name is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            outfile.write(' Name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Name), input_name='Name')), ))
        if self.CsId is not None and 'CsId' not in already_processed:
            already_processed.add('CsId')
            outfile.write(' CsId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.CsId), input_name='CsId')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tCoordSystem', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Name', node)
        if value is not None and 'Name' not in already_processed:
            already_processed.add('Name')
            self.Name = value
            self.validate_s2046(self.Name)    # validate type s2046
        value = find_attr_value_('CsId', node)
        if value is not None and 'CsId' not in already_processed:
            already_processed.add('CsId')
            self.CsId = value
            self.validate_sID255(self.CsId)    # validate type sID255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tCoordSystem


class tOrdinateInp(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, X=None, Y=None, NumGeopoint=None, DeltaGeopoint=None, PointPref=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.X = _cast(None, X)
        self.X_nsprefix_ = None
        self.Y = _cast(None, Y)
        self.Y_nsprefix_ = None
        self.NumGeopoint = _cast(None, NumGeopoint)
        self.NumGeopoint_nsprefix_ = None
        self.DeltaGeopoint = _cast(None, DeltaGeopoint)
        self.DeltaGeopoint_nsprefix_ = None
        self.PointPref = _cast(None, PointPref)
        self.PointPref_nsprefix_ = None
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tOrdinateInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tOrdinateInp.subclass:
            return tOrdinateInp.subclass(*args_, **kwargs_)
        else:
            return tOrdinateInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_X(self):
        return self.X
    def set_X(self, X):
        self.X = X
    def get_Y(self):
        return self.Y
    def set_Y(self, Y):
        self.Y = Y
    def get_NumGeopoint(self):
        return self.NumGeopoint
    def set_NumGeopoint(self, NumGeopoint):
        self.NumGeopoint = NumGeopoint
    def get_DeltaGeopoint(self):
        return self.DeltaGeopoint
    def set_DeltaGeopoint(self, DeltaGeopoint):
        self.DeltaGeopoint = DeltaGeopoint
    def get_PointPref(self):
        return self.PointPref
    def set_PointPref(self, PointPref):
        self.PointPref = PointPref
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_d38_2(self, value):
        # Validate type Simple1:d38_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 38:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d38_2' % {"value": value, "lineno": lineno} )
                result = False
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def validate_d20_2(self, value):
        # Validate type Simple1:d20_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d20_2' % {"value": value, "lineno": lineno} )
                result = False
    def validate_s30(self, value):
        # Validate type Simple1:s30, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 30:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s30' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tOrdinateInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tOrdinateInp')
        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 and name_ == 'tOrdinateInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tOrdinateInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tOrdinateInp', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tOrdinateInp'):
        if self.X is not None and 'X' not in already_processed:
            already_processed.add('X')
            outfile.write(' X="%s"' % self.gds_format_decimal(self.X, input_name='X'))
        if self.Y is not None and 'Y' not in already_processed:
            already_processed.add('Y')
            outfile.write(' Y="%s"' % self.gds_format_decimal(self.Y, input_name='Y'))
        if self.NumGeopoint is not None and 'NumGeopoint' not in already_processed:
            already_processed.add('NumGeopoint')
            outfile.write(' NumGeopoint="%s"' % self.gds_format_integer(self.NumGeopoint, input_name='NumGeopoint'))
        if self.DeltaGeopoint is not None and 'DeltaGeopoint' not in already_processed:
            already_processed.add('DeltaGeopoint')
            outfile.write(' DeltaGeopoint="%s"' % self.gds_format_decimal(self.DeltaGeopoint, input_name='DeltaGeopoint'))
        if self.PointPref is not None and 'PointPref' not in already_processed:
            already_processed.add('PointPref')
            outfile.write(' PointPref=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.PointPref), input_name='PointPref')), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tOrdinateInp', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('X', node)
        if value is not None and 'X' not in already_processed:
            already_processed.add('X')
            value = self.gds_parse_decimal(value, node, 'X')
            self.X = value
            self.validate_d38_2(self.X)    # validate type d38_2
        value = find_attr_value_('Y', node)
        if value is not None and 'Y' not in already_processed:
            already_processed.add('Y')
            value = self.gds_parse_decimal(value, node, 'Y')
            self.Y = value
            self.validate_d38_2(self.Y)    # validate type d38_2
        value = find_attr_value_('NumGeopoint', node)
        if value is not None and 'NumGeopoint' not in already_processed:
            already_processed.add('NumGeopoint')
            self.NumGeopoint = self.gds_parse_integer(value, node, 'NumGeopoint')
            if self.NumGeopoint <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.NumGeopoint)    # validate type p22
        value = find_attr_value_('DeltaGeopoint', node)
        if value is not None and 'DeltaGeopoint' not in already_processed:
            already_processed.add('DeltaGeopoint')
            value = self.gds_parse_decimal(value, node, 'DeltaGeopoint')
            self.DeltaGeopoint = value
            self.validate_d20_2(self.DeltaGeopoint)    # validate type d20_2
        value = find_attr_value_('PointPref', node)
        if value is not None and 'PointPref' not in already_processed:
            already_processed.add('PointPref')
            self.PointPref = value
            self.validate_s30(self.PointPref)    # validate type s30
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tOrdinateInp


class tOrdinateOut(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, X=None, Y=None, OrdNmb=None, NumGeopoint=None, DeltaGeopoint=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.X = _cast(None, X)
        self.X_nsprefix_ = None
        self.Y = _cast(None, Y)
        self.Y_nsprefix_ = None
        self.OrdNmb = _cast(None, OrdNmb)
        self.OrdNmb_nsprefix_ = None
        self.NumGeopoint = _cast(None, NumGeopoint)
        self.NumGeopoint_nsprefix_ = None
        self.DeltaGeopoint = _cast(None, DeltaGeopoint)
        self.DeltaGeopoint_nsprefix_ = None
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tOrdinateOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tOrdinateOut.subclass:
            return tOrdinateOut.subclass(*args_, **kwargs_)
        else:
            return tOrdinateOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_X(self):
        return self.X
    def set_X(self, X):
        self.X = X
    def get_Y(self):
        return self.Y
    def set_Y(self, Y):
        self.Y = Y
    def get_OrdNmb(self):
        return self.OrdNmb
    def set_OrdNmb(self, OrdNmb):
        self.OrdNmb = OrdNmb
    def get_NumGeopoint(self):
        return self.NumGeopoint
    def set_NumGeopoint(self, NumGeopoint):
        self.NumGeopoint = NumGeopoint
    def get_DeltaGeopoint(self):
        return self.DeltaGeopoint
    def set_DeltaGeopoint(self, DeltaGeopoint):
        self.DeltaGeopoint = DeltaGeopoint
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_d38_2(self, value):
        # Validate type Simple1:d38_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 38:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d38_2' % {"value": value, "lineno": lineno} )
                result = False
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def validate_d20_2(self, value):
        # Validate type Simple1:d20_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d20_2' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tOrdinateOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tOrdinateOut')
        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 and name_ == 'tOrdinateOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tOrdinateOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tOrdinateOut', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tOrdinateOut'):
        if self.X is not None and 'X' not in already_processed:
            already_processed.add('X')
            outfile.write(' X="%s"' % self.gds_format_decimal(self.X, input_name='X'))
        if self.Y is not None and 'Y' not in already_processed:
            already_processed.add('Y')
            outfile.write(' Y="%s"' % self.gds_format_decimal(self.Y, input_name='Y'))
        if self.OrdNmb is not None and 'OrdNmb' not in already_processed:
            already_processed.add('OrdNmb')
            outfile.write(' OrdNmb="%s"' % self.gds_format_integer(self.OrdNmb, input_name='OrdNmb'))
        if self.NumGeopoint is not None and 'NumGeopoint' not in already_processed:
            already_processed.add('NumGeopoint')
            outfile.write(' NumGeopoint="%s"' % self.gds_format_integer(self.NumGeopoint, input_name='NumGeopoint'))
        if self.DeltaGeopoint is not None and 'DeltaGeopoint' not in already_processed:
            already_processed.add('DeltaGeopoint')
            outfile.write(' DeltaGeopoint="%s"' % self.gds_format_decimal(self.DeltaGeopoint, input_name='DeltaGeopoint'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tOrdinateOut', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('X', node)
        if value is not None and 'X' not in already_processed:
            already_processed.add('X')
            value = self.gds_parse_decimal(value, node, 'X')
            self.X = value
            self.validate_d38_2(self.X)    # validate type d38_2
        value = find_attr_value_('Y', node)
        if value is not None and 'Y' not in already_processed:
            already_processed.add('Y')
            value = self.gds_parse_decimal(value, node, 'Y')
            self.Y = value
            self.validate_d38_2(self.Y)    # validate type d38_2
        value = find_attr_value_('OrdNmb', node)
        if value is not None and 'OrdNmb' not in already_processed:
            already_processed.add('OrdNmb')
            self.OrdNmb = self.gds_parse_integer(value, node, 'OrdNmb')
            if self.OrdNmb <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.OrdNmb)    # validate type p22
        value = find_attr_value_('NumGeopoint', node)
        if value is not None and 'NumGeopoint' not in already_processed:
            already_processed.add('NumGeopoint')
            self.NumGeopoint = self.gds_parse_integer(value, node, 'NumGeopoint')
            if self.NumGeopoint <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.NumGeopoint)    # validate type p22
        value = find_attr_value_('DeltaGeopoint', node)
        if value is not None and 'DeltaGeopoint' not in already_processed:
            already_processed.add('DeltaGeopoint')
            value = self.gds_parse_decimal(value, node, 'DeltaGeopoint')
            self.DeltaGeopoint = value
            self.validate_d20_2(self.DeltaGeopoint)    # validate type d20_2
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tOrdinateOut


class tOrdinateXY(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, X=None, Y=None, NumGeopoint=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.X = _cast(None, X)
        self.X_nsprefix_ = None
        self.Y = _cast(None, Y)
        self.Y_nsprefix_ = None
        self.NumGeopoint = _cast(None, NumGeopoint)
        self.NumGeopoint_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tOrdinateXY)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tOrdinateXY.subclass:
            return tOrdinateXY.subclass(*args_, **kwargs_)
        else:
            return tOrdinateXY(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_X(self):
        return self.X
    def set_X(self, X):
        self.X = X
    def get_Y(self):
        return self.Y
    def set_Y(self, Y):
        self.Y = Y
    def get_NumGeopoint(self):
        return self.NumGeopoint
    def set_NumGeopoint(self, NumGeopoint):
        self.NumGeopoint = NumGeopoint
    def validate_d38_2(self, value):
        # Validate type Simple1:d38_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 38:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d38_2' % {"value": value, "lineno": lineno} )
                result = False
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tOrdinateXY', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tOrdinateXY')
        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 and name_ == 'tOrdinateXY':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tOrdinateXY')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tOrdinateXY', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tOrdinateXY'):
        if self.X is not None and 'X' not in already_processed:
            already_processed.add('X')
            outfile.write(' X="%s"' % self.gds_format_decimal(self.X, input_name='X'))
        if self.Y is not None and 'Y' not in already_processed:
            already_processed.add('Y')
            outfile.write(' Y="%s"' % self.gds_format_decimal(self.Y, input_name='Y'))
        if self.NumGeopoint is not None and 'NumGeopoint' not in already_processed:
            already_processed.add('NumGeopoint')
            outfile.write(' NumGeopoint="%s"' % self.gds_format_integer(self.NumGeopoint, input_name='NumGeopoint'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tOrdinateXY', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('X', node)
        if value is not None and 'X' not in already_processed:
            already_processed.add('X')
            value = self.gds_parse_decimal(value, node, 'X')
            self.X = value
            self.validate_d38_2(self.X)    # validate type d38_2
        value = find_attr_value_('Y', node)
        if value is not None and 'Y' not in already_processed:
            already_processed.add('Y')
            value = self.gds_parse_decimal(value, node, 'Y')
            self.Y = value
            self.validate_d38_2(self.Y)    # validate type d38_2
        value = find_attr_value_('NumGeopoint', node)
        if value is not None and 'NumGeopoint' not in already_processed:
            already_processed.add('NumGeopoint')
            self.NumGeopoint = self.gds_parse_integer(value, node, 'NumGeopoint')
            if self.NumGeopoint <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.NumGeopoint)    # validate type p22
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tOrdinateXY


class tBorder(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Spatial=None, Point1=None, Point2=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.Spatial = _cast(None, Spatial)
        self.Spatial_nsprefix_ = None
        self.Point1 = _cast(None, Point1)
        self.Point1_nsprefix_ = None
        self.Point2 = _cast(None, Point2)
        self.Point2_nsprefix_ = None
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tBorder)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tBorder.subclass:
            return tBorder.subclass(*args_, **kwargs_)
        else:
            return tBorder(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Spatial(self):
        return self.Spatial
    def set_Spatial(self, Spatial):
        self.Spatial = Spatial
    def get_Point1(self):
        return self.Point1
    def set_Point1(self, Point1):
        self.Point1 = Point1
    def get_Point2(self):
        return self.Point2
    def set_Point2(self, Point2):
        self.Point2 = Point2
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_p22Min1(self, value):
        # Validate type Simple2:p22Min1, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if value < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on p22Min1' % {"value": value, "lineno": lineno} )
                result = False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22Min1' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tBorder', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tBorder')
        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 and name_ == 'tBorder':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tBorder')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tBorder', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tBorder'):
        if self.Spatial is not None and 'Spatial' not in already_processed:
            already_processed.add('Spatial')
            outfile.write(' Spatial="%s"' % self.gds_format_integer(self.Spatial, input_name='Spatial'))
        if self.Point1 is not None and 'Point1' not in already_processed:
            already_processed.add('Point1')
            outfile.write(' Point1="%s"' % self.gds_format_integer(self.Point1, input_name='Point1'))
        if self.Point2 is not None and 'Point2' not in already_processed:
            already_processed.add('Point2')
            outfile.write(' Point2="%s"' % self.gds_format_integer(self.Point2, input_name='Point2'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tBorder', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Spatial', node)
        if value is not None and 'Spatial' not in already_processed:
            already_processed.add('Spatial')
            self.Spatial = self.gds_parse_integer(value, node, 'Spatial')
            if self.Spatial <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22Min1(self.Spatial)    # validate type p22Min1
        value = find_attr_value_('Point1', node)
        if value is not None and 'Point1' not in already_processed:
            already_processed.add('Point1')
            self.Point1 = self.gds_parse_integer(value, node, 'Point1')
            if self.Point1 <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22Min1(self.Point1)    # validate type p22Min1
        value = find_attr_value_('Point2', node)
        if value is not None and 'Point2' not in already_processed:
            already_processed.add('Point2')
            self.Point2 = self.gds_parse_integer(value, node, 'Point2')
            if self.Point2 <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22Min1(self.Point2)    # validate type p22Min1
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tBorder


class tLength(GeneratedsSuper):
    """Length -- Г
    о
    р
    и
    з
    о
    н
    т
    а
    л
    ь
    н
    о
    е
    п
    р
    о
    л
    о
    ж
    е
    н
    и
    е
    в
    м
    е
    т
    р
    а
    х
    Definition -- О
    п
    и
    с
    а
    н
    и
    е
    п
    р
    о
    х
    о
    ж
    д
    е
    н
    и
    я
    ч
    а
    с
    т
    и
    г
    р
    а
    н
    и
    ц
    ы
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Length=None, Definition=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Length = Length
        self.validate_d20_2(self.Length)
        self.Length_nsprefix_ = "Simple1"
        self.Definition = Definition
        self.Definition_nsprefix_ = None
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tLength)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tLength.subclass:
            return tLength.subclass(*args_, **kwargs_)
        else:
            return tLength(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Length(self):
        return self.Length
    def set_Length(self, Length):
        self.Length = Length
    def get_Definition(self):
        return self.Definition
    def set_Definition(self, Definition):
        self.Definition = Definition
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_d20_2(self, value):
        result = True
        # Validate type d20_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d20_2' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.Length is not None or
            self.Definition is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tLength', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tLength')
        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 and name_ == 'tLength':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tLength')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tLength', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tLength'):
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tLength', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Length is not None:
            namespaceprefix_ = self.Length_nsprefix_ + ':' if (UseCapturedNS_ and self.Length_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sLength>%s</%sLength>%s' % (namespaceprefix_ , self.gds_format_decimal(self.Length, input_name='Length'), namespaceprefix_ , eol_))
        if self.Definition is not None:
            namespaceprefix_ = self.Definition_nsprefix_ + ':' if (UseCapturedNS_ and self.Definition_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDefinition>%s</%sDefinition>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Definition), input_name='Definition')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Length' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'Length')
            fval_ = self.gds_validate_decimal(fval_, node, 'Length')
            self.Length = fval_
            self.Length_nsprefix_ = child_.prefix
            # validate type d20_2
            self.validate_d20_2(self.Length)
        elif nodeName_ == 'Definition':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Definition')
            value_ = self.gds_validate_string(value_, node, 'Definition')
            self.Definition = value_
            self.Definition_nsprefix_ = child_.prefix
# end class tLength


class tDirectionAngle(GeneratedsSuper):
    """Degree -- Г
    р
    а
    д
    у
    с
    ы
    Minute -- М
    и
    н
    у
    т
    ы
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Degree=None, Minute=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.Degree = Degree
        self.validate_i3(self.Degree)
        self.Degree_nsprefix_ = "Simple1"
        self.Minute = Minute
        self.validate_i2(self.Minute)
        self.Minute_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tDirectionAngle)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tDirectionAngle.subclass:
            return tDirectionAngle.subclass(*args_, **kwargs_)
        else:
            return tDirectionAngle(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Degree(self):
        return self.Degree
    def set_Degree(self, Degree):
        self.Degree = Degree
    def get_Minute(self):
        return self.Minute
    def set_Minute(self, Minute):
        self.Minute = Minute
    def validate_i3(self, value):
        result = True
        # Validate type i3, a restriction on xs:integer.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 3:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on i3' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def validate_i2(self, value):
        result = True
        # Validate type i2, a restriction on xs:integer.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 2:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on i2' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.Degree is not None or
            self.Minute is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tDirectionAngle', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tDirectionAngle')
        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 and name_ == 'tDirectionAngle':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tDirectionAngle')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tDirectionAngle', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tDirectionAngle'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tDirectionAngle', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Degree is not None:
            namespaceprefix_ = self.Degree_nsprefix_ + ':' if (UseCapturedNS_ and self.Degree_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDegree>%s</%sDegree>%s' % (namespaceprefix_ , self.gds_format_integer(self.Degree, input_name='Degree'), namespaceprefix_ , eol_))
        if self.Minute is not None:
            namespaceprefix_ = self.Minute_nsprefix_ + ':' if (UseCapturedNS_ and self.Minute_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMinute>%s</%sMinute>%s' % (namespaceprefix_ , self.gds_format_integer(self.Minute, input_name='Minute'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Degree' and child_.text:
            sval_ = child_.text
            ival_ = self.gds_parse_integer(sval_, node, 'Degree')
            ival_ = self.gds_validate_integer(ival_, node, 'Degree')
            self.Degree = ival_
            self.Degree_nsprefix_ = child_.prefix
            # validate type i3
            self.validate_i3(self.Degree)
        elif nodeName_ == 'Minute' and child_.text:
            sval_ = child_.text
            ival_ = self.gds_parse_integer(sval_, node, 'Minute')
            ival_ = self.gds_validate_integer(ival_, node, 'Minute')
            self.Minute = ival_
            self.Minute_nsprefix_ = child_.prefix
            # validate type i2
            self.validate_i2(self.Minute)
# end class tDirectionAngle


class tBordersAgreement(GeneratedsSuper):
    """Border -- Ч
    а
    с
    т
    ь
    г
    р
    а
    н
    и
    ц
    ы
    (
    о
    т
    т
    о
    ч
    к
    и
    д
    о
    т
    о
    ч
    к
    и
    )
    и
    о
    т
    м
    е
    т
    к
    а
    о
    н
    а
    л
    и
    ч
    и
    и
    з
    е
    м
    е
    л
    ь
    н
    о
    г
    о
    с
    п
    о
    р
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Border=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if Border is None:
            self.Border = []
        else:
            self.Border = Border
        self.Border_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tBordersAgreement)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tBordersAgreement.subclass:
            return tBordersAgreement.subclass(*args_, **kwargs_)
        else:
            return tBordersAgreement(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Border(self):
        return self.Border
    def set_Border(self, Border):
        self.Border = Border
    def add_Border(self, value):
        self.Border.append(value)
    def insert_Border_at(self, index, value):
        self.Border.insert(index, value)
    def replace_Border_at(self, index, value):
        self.Border[index] = value
    def _hasContent(self):
        if (
            self.Border
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tBordersAgreement', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tBordersAgreement')
        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 and name_ == 'tBordersAgreement':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tBordersAgreement')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tBordersAgreement', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tBordersAgreement'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tBordersAgreement', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Border_ in self.Border:
            namespaceprefix_ = self.Border_nsprefix_ + ':' if (UseCapturedNS_ and self.Border_nsprefix_) else ''
            Border_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Border', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Border':
            obj_ = tBorderAgreement.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Border.append(obj_)
            obj_.original_tagname_ = 'Border'
# end class tBordersAgreement


class tBorderAgreement(tBorder):
    """Edge -- Р
    е
    б
    р
    о
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tBorder
    def __init__(self, Spatial=None, Point1=None, Point2=None, LandDispute=None, Edge=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        super(globals().get("tBorderAgreement"), self).__init__(Spatial, Point1, Point2,  **kwargs_)
        self.LandDispute = _cast(None, LandDispute)
        self.LandDispute_nsprefix_ = None
        self.Edge = Edge
        self.Edge_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tBorderAgreement)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tBorderAgreement.subclass:
            return tBorderAgreement.subclass(*args_, **kwargs_)
        else:
            return tBorderAgreement(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Edge(self):
        return self.Edge
    def set_Edge(self, Edge):
        self.Edge = Edge
    def get_LandDispute(self):
        return self.LandDispute
    def set_LandDispute(self, LandDispute):
        self.LandDispute = LandDispute
    def validate_s150(self, value):
        # Validate type Simple2:s150, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 150:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s150' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Edge is not None or
            super(tBorderAgreement, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tBorderAgreement', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tBorderAgreement')
        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 and name_ == 'tBorderAgreement':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tBorderAgreement')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tBorderAgreement', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tBorderAgreement'):
        super(tBorderAgreement, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tBorderAgreement')
        if self.LandDispute is not None and 'LandDispute' not in already_processed:
            already_processed.add('LandDispute')
            outfile.write(' LandDispute=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.LandDispute), input_name='LandDispute')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tBorderAgreement', fromsubclass_=False, pretty_print=True):
        super(tBorderAgreement, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Edge is not None:
            namespaceprefix_ = self.Edge_nsprefix_ + ':' if (UseCapturedNS_ and self.Edge_nsprefix_) else ''
            self.Edge.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Edge', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('LandDispute', node)
        if value is not None and 'LandDispute' not in already_processed:
            already_processed.add('LandDispute')
            self.LandDispute = value
            self.validate_s150(self.LandDispute)    # validate type s150
        super(tBorderAgreement, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Edge':
            class_obj_ = self.get_class_obj_(child_, tLength)
            obj_ = class_obj_.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Edge = obj_
            obj_.original_tagname_ = 'Edge'
        super(tBorderAgreement, self)._buildChildren(child_, node, nodeName_, True)
# end class tBorderAgreement


class tEntitySpatialZUInp(GeneratedsSuper):
    """SpatialElement -- Э
    л
    е
    м
    е
    н
    т
    к
    о
    н
    т
    у
    р
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntSys=None, SpatialElement=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.EntSys = _cast(None, EntSys)
        self.EntSys_nsprefix_ = None
        if SpatialElement is None:
            self.SpatialElement = []
        else:
            self.SpatialElement = SpatialElement
        self.SpatialElement_nsprefix_ = "Spa5"
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialZUInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialZUInp.subclass:
            return tEntitySpatialZUInp.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialZUInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpatialElement(self):
        return self.SpatialElement
    def set_SpatialElement(self, SpatialElement):
        self.SpatialElement = SpatialElement
    def add_SpatialElement(self, value):
        self.SpatialElement.append(value)
    def insert_SpatialElement_at(self, index, value):
        self.SpatialElement.insert(index, value)
    def replace_SpatialElement_at(self, index, value):
        self.SpatialElement[index] = value
    def get_EntSys(self):
        return self.EntSys
    def set_EntSys(self, EntSys):
        self.EntSys = EntSys
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_sIDREF255(self, value):
        # Validate type Simple1:sIDREF255, a restriction on xs:IDREF.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sIDREF255' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.SpatialElement
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialZUInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialZUInp')
        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 and name_ == 'tEntitySpatialZUInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialZUInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialZUInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialZUInp'):
        if self.EntSys is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            outfile.write(' EntSys=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EntSys), input_name='EntSys')), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialZUInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpatialElement_ in self.SpatialElement:
            namespaceprefix_ = self.SpatialElement_nsprefix_ + ':' if (UseCapturedNS_ and self.SpatialElement_nsprefix_) else ''
            SpatialElement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpatialElement', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('EntSys', node)
        if value is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            self.EntSys = value
            self.validate_sIDREF255(self.EntSys)    # validate type sIDREF255
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpatialElement':
            obj_ = tSpatialElementZUInp.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpatialElement.append(obj_)
            obj_.original_tagname_ = 'SpatialElement'
# end class tEntitySpatialZUInp


class tSpatialElementZUInp(GeneratedsSuper):
    """SpelementUnit -- Ч
    а
    с
    т
    ь
    э
    л
    е
    м
    е
    н
    т
    а
    (
    т
    о
    ч
    к
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, SpelementUnit=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if SpelementUnit is None:
            self.SpelementUnit = []
        else:
            self.SpelementUnit = SpelementUnit
        self.SpelementUnit_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpatialElementZUInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpatialElementZUInp.subclass:
            return tSpatialElementZUInp.subclass(*args_, **kwargs_)
        else:
            return tSpatialElementZUInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpelementUnit(self):
        return self.SpelementUnit
    def set_SpelementUnit(self, SpelementUnit):
        self.SpelementUnit = SpelementUnit
    def add_SpelementUnit(self, value):
        self.SpelementUnit.append(value)
    def insert_SpelementUnit_at(self, index, value):
        self.SpelementUnit.insert(index, value)
    def replace_SpelementUnit_at(self, index, value):
        self.SpelementUnit[index] = value
    def _hasContent(self):
        if (
            self.SpelementUnit
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementZUInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpatialElementZUInp')
        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 and name_ == 'tSpatialElementZUInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpatialElementZUInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpatialElementZUInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpatialElementZUInp'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementZUInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpelementUnit_ in self.SpelementUnit:
            namespaceprefix_ = self.SpelementUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.SpelementUnit_nsprefix_) else ''
            SpelementUnit_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpelementUnit', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpelementUnit':
            obj_ = tSpelementUnitZUInp.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpelementUnit.append(obj_)
            obj_.original_tagname_ = 'SpelementUnit'
# end class tSpatialElementZUInp


class tSpelementUnitZUInp(GeneratedsSuper):
    """Ordinate -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, TypeUnit=None, Ordinate=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.TypeUnit = _cast(None, TypeUnit)
        self.TypeUnit_nsprefix_ = None
        self.Ordinate = Ordinate
        self.Ordinate_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpelementUnitZUInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpelementUnitZUInp.subclass:
            return tSpelementUnitZUInp.subclass(*args_, **kwargs_)
        else:
            return tSpelementUnitZUInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Ordinate(self):
        return self.Ordinate
    def set_Ordinate(self, Ordinate):
        self.Ordinate = Ordinate
    def get_TypeUnit(self):
        return self.TypeUnit
    def set_TypeUnit(self, TypeUnit):
        self.TypeUnit = TypeUnit
    def validate_TypeUnitType(self, value):
        # Validate type TypeUnitType, a restriction on Simple1:sType_Unit.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Точка', 'Линия', 'Дуга', 'Прямоугольник', 'Окружность']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on TypeUnitType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_TypeUnitType_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_TypeUnitType_patterns_, ))
    validate_TypeUnitType_patterns_ = [['^(Точка)$']]
    def _hasContent(self):
        if (
            self.Ordinate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitZUInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpelementUnitZUInp')
        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 and name_ == 'tSpelementUnitZUInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpelementUnitZUInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpelementUnitZUInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpelementUnitZUInp'):
        if self.TypeUnit is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            outfile.write(' TypeUnit=%s' % (quote_attrib(self.TypeUnit), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitZUInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ordinate is not None:
            namespaceprefix_ = self.Ordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.Ordinate_nsprefix_) else ''
            self.Ordinate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Ordinate', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('TypeUnit', node)
        if value is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            self.TypeUnit = value
            self.validate_TypeUnitType(self.TypeUnit)    # validate type TypeUnitType
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Ordinate':
            obj_ = OrdinateType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Ordinate = obj_
            obj_.original_tagname_ = 'Ordinate'
# end class tSpelementUnitZUInp


class tBordersInp(GeneratedsSuper):
    """Border -- Ч
    а
    с
    т
    ь
    г
    р
    а
    н
    и
    ц
    ы
    (
    о
    т
    т
    о
    ч
    к
    и
    д
    о
    т
    о
    ч
    к
    и
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Border=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Border is None:
            self.Border = []
        else:
            self.Border = Border
        self.Border_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tBordersInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tBordersInp.subclass:
            return tBordersInp.subclass(*args_, **kwargs_)
        else:
            return tBordersInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Border(self):
        return self.Border
    def set_Border(self, Border):
        self.Border = Border
    def add_Border(self, value):
        self.Border.append(value)
    def insert_Border_at(self, index, value):
        self.Border.insert(index, value)
    def replace_Border_at(self, index, value):
        self.Border[index] = value
    def _hasContent(self):
        if (
            self.Border
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tBordersInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tBordersInp')
        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 and name_ == 'tBordersInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tBordersInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tBordersInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tBordersInp'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tBordersInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Border_ in self.Border:
            namespaceprefix_ = self.Border_nsprefix_ + ':' if (UseCapturedNS_ and self.Border_nsprefix_) else ''
            Border_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Border', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Border':
            obj_ = BorderType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Border.append(obj_)
            obj_.original_tagname_ = 'Border'
# end class tBordersInp


class tEntitySpatialBordersZUInp(tEntitySpatialZUInp):
    """Borders -- О
    п
    и
    с
    а
    н
    и
    е
    ч
    а
    с
    т
    е
    й
    г
    р
    а
    н
    и
    ц
    (
    о
    т
    т
    о
    ч
    к
    и
    д
    о
    т
    о
    ч
    к
    и
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tEntitySpatialZUInp
    def __init__(self, EntSys=None, SpatialElement=None, Borders=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        super(globals().get("tEntitySpatialBordersZUInp"), self).__init__(EntSys, SpatialElement,  **kwargs_)
        self.Borders = Borders
        self.Borders_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialBordersZUInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialBordersZUInp.subclass:
            return tEntitySpatialBordersZUInp.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialBordersZUInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Borders(self):
        return self.Borders
    def set_Borders(self, Borders):
        self.Borders = Borders
    def _hasContent(self):
        if (
            self.Borders is not None or
            super(tEntitySpatialBordersZUInp, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialBordersZUInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialBordersZUInp')
        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 and name_ == 'tEntitySpatialBordersZUInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialBordersZUInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialBordersZUInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialBordersZUInp'):
        super(tEntitySpatialBordersZUInp, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialBordersZUInp')
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialBordersZUInp', fromsubclass_=False, pretty_print=True):
        super(tEntitySpatialBordersZUInp, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Borders is not None:
            namespaceprefix_ = self.Borders_nsprefix_ + ':' if (UseCapturedNS_ and self.Borders_nsprefix_) else ''
            self.Borders.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Borders', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(tEntitySpatialBordersZUInp, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Borders':
            obj_ = tBordersInp.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Borders = obj_
            obj_.original_tagname_ = 'Borders'
        super(tEntitySpatialBordersZUInp, self)._buildChildren(child_, node, nodeName_, True)
# end class tEntitySpatialBordersZUInp


class tEntitySpatialOKSInp(GeneratedsSuper):
    """SpatialElement -- Э
    л
    е
    м
    е
    н
    т
    к
    о
    н
    т
    у
    р
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntSys=None, SpatialElement=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.EntSys = _cast(None, EntSys)
        self.EntSys_nsprefix_ = None
        if SpatialElement is None:
            self.SpatialElement = []
        else:
            self.SpatialElement = SpatialElement
        self.SpatialElement_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialOKSInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialOKSInp.subclass:
            return tEntitySpatialOKSInp.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialOKSInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpatialElement(self):
        return self.SpatialElement
    def set_SpatialElement(self, SpatialElement):
        self.SpatialElement = SpatialElement
    def add_SpatialElement(self, value):
        self.SpatialElement.append(value)
    def insert_SpatialElement_at(self, index, value):
        self.SpatialElement.insert(index, value)
    def replace_SpatialElement_at(self, index, value):
        self.SpatialElement[index] = value
    def get_EntSys(self):
        return self.EntSys
    def set_EntSys(self, EntSys):
        self.EntSys = EntSys
    def validate_sIDREF255(self, value):
        # Validate type Simple1:sIDREF255, a restriction on xs:IDREF.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sIDREF255' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.SpatialElement
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tEntitySpatialOKSInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialOKSInp')
        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 and name_ == 'tEntitySpatialOKSInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialOKSInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialOKSInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialOKSInp'):
        if self.EntSys is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            outfile.write(' EntSys=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EntSys), input_name='EntSys')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tEntitySpatialOKSInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpatialElement_ in self.SpatialElement:
            namespaceprefix_ = self.SpatialElement_nsprefix_ + ':' if (UseCapturedNS_ and self.SpatialElement_nsprefix_) else ''
            SpatialElement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpatialElement', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('EntSys', node)
        if value is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            self.EntSys = value
            self.validate_sIDREF255(self.EntSys)    # validate type sIDREF255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpatialElement':
            obj_ = SpatialElementType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpatialElement.append(obj_)
            obj_.original_tagname_ = 'SpatialElement'
# end class tEntitySpatialOKSInp


class tSpatialElementOKSInp(GeneratedsSuper):
    """SpelementUnit -- Ч
    а
    с
    т
    ь
    э
    л
    е
    м
    е
    н
    т
    а
    (
    т
    о
    ч
    к
    а
    ,
    о
    к
    р
    у
    ж
    н
    о
    с
    т
    ь
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, SpelementUnit=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if SpelementUnit is None:
            self.SpelementUnit = []
        else:
            self.SpelementUnit = SpelementUnit
        self.SpelementUnit_nsprefix_ = "Spa5"
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpatialElementOKSInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpatialElementOKSInp.subclass:
            return tSpatialElementOKSInp.subclass(*args_, **kwargs_)
        else:
            return tSpatialElementOKSInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpelementUnit(self):
        return self.SpelementUnit
    def set_SpelementUnit(self, SpelementUnit):
        self.SpelementUnit = SpelementUnit
    def add_SpelementUnit(self, value):
        self.SpelementUnit.append(value)
    def insert_SpelementUnit_at(self, index, value):
        self.SpelementUnit.insert(index, value)
    def replace_SpelementUnit_at(self, index, value):
        self.SpelementUnit[index] = value
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def _hasContent(self):
        if (
            self.SpelementUnit
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementOKSInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpatialElementOKSInp')
        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 and name_ == 'tSpatialElementOKSInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpatialElementOKSInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpatialElementOKSInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpatialElementOKSInp'):
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementOKSInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpelementUnit_ in self.SpelementUnit:
            namespaceprefix_ = self.SpelementUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.SpelementUnit_nsprefix_) else ''
            SpelementUnit_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpelementUnit', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpelementUnit':
            obj_ = tSpelementUnitOKSInp.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpelementUnit.append(obj_)
            obj_.original_tagname_ = 'SpelementUnit'
# end class tSpatialElementOKSInp


class tSpelementUnitOKSInp(GeneratedsSuper):
    """Ordinate -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    R -- Р
    а
    д
    и
    у
    с
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, TypeUnit=None, SuNmb=None, Ordinate=None, R=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.TypeUnit = _cast(None, TypeUnit)
        self.TypeUnit_nsprefix_ = None
        self.SuNmb = _cast(None, SuNmb)
        self.SuNmb_nsprefix_ = None
        self.Ordinate = Ordinate
        self.Ordinate_nsprefix_ = None
        self.R = R
        self.validate_d38_2(self.R)
        self.R_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpelementUnitOKSInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpelementUnitOKSInp.subclass:
            return tSpelementUnitOKSInp.subclass(*args_, **kwargs_)
        else:
            return tSpelementUnitOKSInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Ordinate(self):
        return self.Ordinate
    def set_Ordinate(self, Ordinate):
        self.Ordinate = Ordinate
    def get_R(self):
        return self.R
    def set_R(self, R):
        self.R = R
    def get_TypeUnit(self):
        return self.TypeUnit
    def set_TypeUnit(self, TypeUnit):
        self.TypeUnit = TypeUnit
    def get_SuNmb(self):
        return self.SuNmb
    def set_SuNmb(self, SuNmb):
        self.SuNmb = SuNmb
    def validate_d38_2(self, value):
        result = True
        # Validate type d38_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 38:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d38_2' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def validate_TypeUnitType9(self, value):
        # Validate type TypeUnitType9, a restriction on Simple1:sType_Unit.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Точка', 'Линия', 'Дуга', 'Прямоугольник', 'Окружность']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on TypeUnitType9' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_TypeUnitType9_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_TypeUnitType9_patterns_, ))
    validate_TypeUnitType9_patterns_ = [['^(Точка)$', '^(Окружность)$']]
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Ordinate is not None or
            self.R is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tSpelementUnitOKSInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpelementUnitOKSInp')
        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 and name_ == 'tSpelementUnitOKSInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpelementUnitOKSInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpelementUnitOKSInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpelementUnitOKSInp'):
        if self.TypeUnit is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            outfile.write(' TypeUnit=%s' % (quote_attrib(self.TypeUnit), ))
        if self.SuNmb is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            outfile.write(' SuNmb="%s"' % self.gds_format_integer(self.SuNmb, input_name='SuNmb'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tSpelementUnitOKSInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ordinate is not None:
            namespaceprefix_ = self.Ordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.Ordinate_nsprefix_) else ''
            self.Ordinate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Ordinate', pretty_print=pretty_print)
        if self.R is not None:
            namespaceprefix_ = self.R_nsprefix_ + ':' if (UseCapturedNS_ and self.R_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sR>%s</%sR>%s' % (namespaceprefix_ , self.gds_format_decimal(self.R, input_name='R'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('TypeUnit', node)
        if value is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            self.TypeUnit = value
            self.validate_TypeUnitType9(self.TypeUnit)    # validate type TypeUnitType9
        value = find_attr_value_('SuNmb', node)
        if value is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            self.SuNmb = self.gds_parse_integer(value, node, 'SuNmb')
            if self.SuNmb <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.SuNmb)    # validate type p22
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Ordinate':
            obj_ = OrdinateType8.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Ordinate = obj_
            obj_.original_tagname_ = 'Ordinate'
        elif nodeName_ == 'R' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'R')
            fval_ = self.gds_validate_decimal(fval_, node, 'R')
            self.R = fval_
            self.R_nsprefix_ = child_.prefix
            # validate type d38_2
            self.validate_d38_2(self.R)
# end class tSpelementUnitOKSInp


class tEntitySpatialZUOut(GeneratedsSuper):
    """SpatialElement -- Э
    л
    е
    м
    е
    н
    т
    к
    о
    н
    т
    у
    р
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntSys=None, SpatialElement=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.EntSys = _cast(None, EntSys)
        self.EntSys_nsprefix_ = None
        if SpatialElement is None:
            self.SpatialElement = []
        else:
            self.SpatialElement = SpatialElement
        self.SpatialElement_nsprefix_ = "Spa5"
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialZUOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialZUOut.subclass:
            return tEntitySpatialZUOut.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialZUOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpatialElement(self):
        return self.SpatialElement
    def set_SpatialElement(self, SpatialElement):
        self.SpatialElement = SpatialElement
    def add_SpatialElement(self, value):
        self.SpatialElement.append(value)
    def insert_SpatialElement_at(self, index, value):
        self.SpatialElement.insert(index, value)
    def replace_SpatialElement_at(self, index, value):
        self.SpatialElement[index] = value
    def get_EntSys(self):
        return self.EntSys
    def set_EntSys(self, EntSys):
        self.EntSys = EntSys
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_sIDREF255(self, value):
        # Validate type Simple1:sIDREF255, a restriction on xs:IDREF.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sIDREF255' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.SpatialElement
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialZUOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialZUOut')
        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 and name_ == 'tEntitySpatialZUOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialZUOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialZUOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialZUOut'):
        if self.EntSys is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            outfile.write(' EntSys=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EntSys), input_name='EntSys')), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialZUOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpatialElement_ in self.SpatialElement:
            namespaceprefix_ = self.SpatialElement_nsprefix_ + ':' if (UseCapturedNS_ and self.SpatialElement_nsprefix_) else ''
            SpatialElement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpatialElement', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('EntSys', node)
        if value is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            self.EntSys = value
            self.validate_sIDREF255(self.EntSys)    # validate type sIDREF255
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpatialElement':
            obj_ = tSpatialElementZUOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpatialElement.append(obj_)
            obj_.original_tagname_ = 'SpatialElement'
# end class tEntitySpatialZUOut


class tSpatialElementZUOut(GeneratedsSuper):
    """SpelementUnit -- Ч
    а
    с
    т
    ь
    э
    л
    е
    м
    е
    н
    т
    а
    (
    Т
    о
    ч
    к
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, SpelementUnit=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if SpelementUnit is None:
            self.SpelementUnit = []
        else:
            self.SpelementUnit = SpelementUnit
        self.SpelementUnit_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpatialElementZUOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpatialElementZUOut.subclass:
            return tSpatialElementZUOut.subclass(*args_, **kwargs_)
        else:
            return tSpatialElementZUOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpelementUnit(self):
        return self.SpelementUnit
    def set_SpelementUnit(self, SpelementUnit):
        self.SpelementUnit = SpelementUnit
    def add_SpelementUnit(self, value):
        self.SpelementUnit.append(value)
    def insert_SpelementUnit_at(self, index, value):
        self.SpelementUnit.insert(index, value)
    def replace_SpelementUnit_at(self, index, value):
        self.SpelementUnit[index] = value
    def _hasContent(self):
        if (
            self.SpelementUnit
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementZUOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpatialElementZUOut')
        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 and name_ == 'tSpatialElementZUOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpatialElementZUOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpatialElementZUOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpatialElementZUOut'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementZUOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpelementUnit_ in self.SpelementUnit:
            namespaceprefix_ = self.SpelementUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.SpelementUnit_nsprefix_) else ''
            SpelementUnit_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpelementUnit', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpelementUnit':
            obj_ = tSpelementUnitZUOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpelementUnit.append(obj_)
            obj_.original_tagname_ = 'SpelementUnit'
# end class tSpatialElementZUOut


class tSpelementUnitZUOut(GeneratedsSuper):
    """Ordinate -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, TypeUnit=None, SuNmb=None, Ordinate=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.TypeUnit = _cast(None, TypeUnit)
        self.TypeUnit_nsprefix_ = None
        self.SuNmb = _cast(None, SuNmb)
        self.SuNmb_nsprefix_ = None
        self.Ordinate = Ordinate
        self.Ordinate_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpelementUnitZUOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpelementUnitZUOut.subclass:
            return tSpelementUnitZUOut.subclass(*args_, **kwargs_)
        else:
            return tSpelementUnitZUOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Ordinate(self):
        return self.Ordinate
    def set_Ordinate(self, Ordinate):
        self.Ordinate = Ordinate
    def get_TypeUnit(self):
        return self.TypeUnit
    def set_TypeUnit(self, TypeUnit):
        self.TypeUnit = TypeUnit
    def get_SuNmb(self):
        return self.SuNmb
    def set_SuNmb(self, SuNmb):
        self.SuNmb = SuNmb
    def validate_TypeUnitType11(self, value):
        # Validate type TypeUnitType11, a restriction on Simple1:sType_Unit.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Точка', 'Линия', 'Дуга', 'Прямоугольник', 'Окружность']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on TypeUnitType11' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_TypeUnitType11_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_TypeUnitType11_patterns_, ))
    validate_TypeUnitType11_patterns_ = [['^(Точка)$']]
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Ordinate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitZUOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpelementUnitZUOut')
        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 and name_ == 'tSpelementUnitZUOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpelementUnitZUOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpelementUnitZUOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpelementUnitZUOut'):
        if self.TypeUnit is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            outfile.write(' TypeUnit=%s' % (quote_attrib(self.TypeUnit), ))
        if self.SuNmb is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            outfile.write(' SuNmb="%s"' % self.gds_format_integer(self.SuNmb, input_name='SuNmb'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitZUOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ordinate is not None:
            namespaceprefix_ = self.Ordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.Ordinate_nsprefix_) else ''
            self.Ordinate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Ordinate', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('TypeUnit', node)
        if value is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            self.TypeUnit = value
            self.validate_TypeUnitType11(self.TypeUnit)    # validate type TypeUnitType11
        value = find_attr_value_('SuNmb', node)
        if value is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            self.SuNmb = self.gds_parse_integer(value, node, 'SuNmb')
            if self.SuNmb <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.SuNmb)    # validate type p22
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Ordinate':
            obj_ = OrdinateType10.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Ordinate = obj_
            obj_.original_tagname_ = 'Ordinate'
# end class tSpelementUnitZUOut


class tEntitySpatialBordersZUOut(tEntitySpatialZUOut):
    """Borders -- О
    п
    и
    с
    а
    н
    и
    е
    ч
    а
    с
    т
    е
    й
    г
    р
    а
    н
    и
    ц
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tEntitySpatialZUOut
    def __init__(self, EntSys=None, SpatialElement=None, Borders=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("tEntitySpatialBordersZUOut"), self).__init__(EntSys, SpatialElement,  **kwargs_)
        self.Borders = Borders
        self.Borders_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialBordersZUOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialBordersZUOut.subclass:
            return tEntitySpatialBordersZUOut.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialBordersZUOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Borders(self):
        return self.Borders
    def set_Borders(self, Borders):
        self.Borders = Borders
    def _hasContent(self):
        if (
            self.Borders is not None or
            super(tEntitySpatialBordersZUOut, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tEntitySpatialBordersZUOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialBordersZUOut')
        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 and name_ == 'tEntitySpatialBordersZUOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialBordersZUOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialBordersZUOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialBordersZUOut'):
        super(tEntitySpatialBordersZUOut, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialBordersZUOut')
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tEntitySpatialBordersZUOut', fromsubclass_=False, pretty_print=True):
        super(tEntitySpatialBordersZUOut, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Borders is not None:
            namespaceprefix_ = self.Borders_nsprefix_ + ':' if (UseCapturedNS_ and self.Borders_nsprefix_) else ''
            self.Borders.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Borders', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(tEntitySpatialBordersZUOut, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Borders':
            obj_ = BordersType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Borders = obj_
            obj_.original_tagname_ = 'Borders'
        super(tEntitySpatialBordersZUOut, self)._buildChildren(child_, node, nodeName_, True)
# end class tEntitySpatialBordersZUOut


class tCadastralNumbersOut(GeneratedsSuper):
    """CadastralNumber -- К
    а
    д
    а
    с
    т
    р
    о
    в
    ы
    й
    н
    о
    м
    е
    р
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralNumber=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if CadastralNumber is None:
            self.CadastralNumber = []
        else:
            self.CadastralNumber = CadastralNumber
        self.CadastralNumber_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tCadastralNumbersOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tCadastralNumbersOut.subclass:
            return tCadastralNumbersOut.subclass(*args_, **kwargs_)
        else:
            return tCadastralNumbersOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_CadastralNumber(self):
        return self.CadastralNumber
    def set_CadastralNumber(self, CadastralNumber):
        self.CadastralNumber = CadastralNumber
    def add_CadastralNumber(self, value):
        self.CadastralNumber.append(value)
    def insert_CadastralNumber_at(self, index, value):
        self.CadastralNumber.insert(index, value)
    def replace_CadastralNumber_at(self, index, value):
        self.CadastralNumber[index] = value
    def validate_s40(self, value):
        result = True
        # Validate type s40, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 40:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s40' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.CadastralNumber
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tCadastralNumbersOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tCadastralNumbersOut')
        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 and name_ == 'tCadastralNumbersOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tCadastralNumbersOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tCadastralNumbersOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tCadastralNumbersOut'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tCadastralNumbersOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for CadastralNumber_ in self.CadastralNumber:
            namespaceprefix_ = self.CadastralNumber_nsprefix_ + ':' if (UseCapturedNS_ and self.CadastralNumber_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCadastralNumber>%s</%sCadastralNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(CadastralNumber_), input_name='CadastralNumber')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'CadastralNumber':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'CadastralNumber')
            value_ = self.gds_validate_string(value_, node, 'CadastralNumber')
            self.CadastralNumber.append(value_)
            self.CadastralNumber_nsprefix_ = child_.prefix
            # validate type s40
            self.validate_s40(self.CadastralNumber[-1])
# end class tCadastralNumbersOut


class tEntitySpatialOKSOut(GeneratedsSuper):
    """SpatialElement -- Э
    л
    е
    м
    е
    н
    т
    к
    о
    н
    т
    у
    р
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntSys=None, SpatialElement=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.EntSys = _cast(None, EntSys)
        self.EntSys_nsprefix_ = None
        if SpatialElement is None:
            self.SpatialElement = []
        else:
            self.SpatialElement = SpatialElement
        self.SpatialElement_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialOKSOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialOKSOut.subclass:
            return tEntitySpatialOKSOut.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialOKSOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpatialElement(self):
        return self.SpatialElement
    def set_SpatialElement(self, SpatialElement):
        self.SpatialElement = SpatialElement
    def add_SpatialElement(self, value):
        self.SpatialElement.append(value)
    def insert_SpatialElement_at(self, index, value):
        self.SpatialElement.insert(index, value)
    def replace_SpatialElement_at(self, index, value):
        self.SpatialElement[index] = value
    def get_EntSys(self):
        return self.EntSys
    def set_EntSys(self, EntSys):
        self.EntSys = EntSys
    def validate_sIDREF255(self, value):
        # Validate type Simple1:sIDREF255, a restriction on xs:IDREF.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sIDREF255' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.SpatialElement
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tEntitySpatialOKSOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialOKSOut')
        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 and name_ == 'tEntitySpatialOKSOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialOKSOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialOKSOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialOKSOut'):
        if self.EntSys is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            outfile.write(' EntSys=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EntSys), input_name='EntSys')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tEntitySpatialOKSOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpatialElement_ in self.SpatialElement:
            namespaceprefix_ = self.SpatialElement_nsprefix_ + ':' if (UseCapturedNS_ and self.SpatialElement_nsprefix_) else ''
            SpatialElement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpatialElement', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('EntSys', node)
        if value is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            self.EntSys = value
            self.validate_sIDREF255(self.EntSys)    # validate type sIDREF255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpatialElement':
            obj_ = SpatialElementType13.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpatialElement.append(obj_)
            obj_.original_tagname_ = 'SpatialElement'
# end class tEntitySpatialOKSOut


class tSpatialElementOKSOut(GeneratedsSuper):
    """SpelementUnit -- Ч
    а
    с
    т
    ь
    э
    л
    е
    м
    е
    н
    т
    а
    (
    т
    о
    ч
    к
    а
    ,
    о
    к
    р
    у
    ж
    н
    о
    с
    т
    ь
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, SpelementUnit=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if SpelementUnit is None:
            self.SpelementUnit = []
        else:
            self.SpelementUnit = SpelementUnit
        self.SpelementUnit_nsprefix_ = "Spa5"
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpatialElementOKSOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpatialElementOKSOut.subclass:
            return tSpatialElementOKSOut.subclass(*args_, **kwargs_)
        else:
            return tSpatialElementOKSOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpelementUnit(self):
        return self.SpelementUnit
    def set_SpelementUnit(self, SpelementUnit):
        self.SpelementUnit = SpelementUnit
    def add_SpelementUnit(self, value):
        self.SpelementUnit.append(value)
    def insert_SpelementUnit_at(self, index, value):
        self.SpelementUnit.insert(index, value)
    def replace_SpelementUnit_at(self, index, value):
        self.SpelementUnit[index] = value
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def _hasContent(self):
        if (
            self.SpelementUnit
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementOKSOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpatialElementOKSOut')
        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 and name_ == 'tSpatialElementOKSOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpatialElementOKSOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpatialElementOKSOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpatialElementOKSOut'):
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementOKSOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpelementUnit_ in self.SpelementUnit:
            namespaceprefix_ = self.SpelementUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.SpelementUnit_nsprefix_) else ''
            SpelementUnit_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpelementUnit', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpelementUnit':
            obj_ = tSpelementUnitOKSOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpelementUnit.append(obj_)
            obj_.original_tagname_ = 'SpelementUnit'
# end class tSpatialElementOKSOut


class tSpelementUnitOKSOut(GeneratedsSuper):
    """Ordinate -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    R -- Р
    а
    д
    и
    у
    с
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, TypeUnit=None, SuNmb=None, Ordinate=None, R=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.TypeUnit = _cast(None, TypeUnit)
        self.TypeUnit_nsprefix_ = None
        self.SuNmb = _cast(None, SuNmb)
        self.SuNmb_nsprefix_ = None
        self.Ordinate = Ordinate
        self.Ordinate_nsprefix_ = None
        self.R = R
        self.validate_d38_2(self.R)
        self.R_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpelementUnitOKSOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpelementUnitOKSOut.subclass:
            return tSpelementUnitOKSOut.subclass(*args_, **kwargs_)
        else:
            return tSpelementUnitOKSOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Ordinate(self):
        return self.Ordinate
    def set_Ordinate(self, Ordinate):
        self.Ordinate = Ordinate
    def get_R(self):
        return self.R
    def set_R(self, R):
        self.R = R
    def get_TypeUnit(self):
        return self.TypeUnit
    def set_TypeUnit(self, TypeUnit):
        self.TypeUnit = TypeUnit
    def get_SuNmb(self):
        return self.SuNmb
    def set_SuNmb(self, SuNmb):
        self.SuNmb = SuNmb
    def validate_d38_2(self, value):
        result = True
        # Validate type d38_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 38:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d38_2' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def validate_TypeUnitType16(self, value):
        # Validate type TypeUnitType16, a restriction on Simple1:sType_Unit.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Точка', 'Линия', 'Дуга', 'Прямоугольник', 'Окружность']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on TypeUnitType16' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_TypeUnitType16_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_TypeUnitType16_patterns_, ))
    validate_TypeUnitType16_patterns_ = [['^(Точка)$', '^(Окружность)$']]
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Ordinate is not None or
            self.R is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tSpelementUnitOKSOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpelementUnitOKSOut')
        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 and name_ == 'tSpelementUnitOKSOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpelementUnitOKSOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpelementUnitOKSOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpelementUnitOKSOut'):
        if self.TypeUnit is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            outfile.write(' TypeUnit=%s' % (quote_attrib(self.TypeUnit), ))
        if self.SuNmb is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            outfile.write(' SuNmb="%s"' % self.gds_format_integer(self.SuNmb, input_name='SuNmb'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='tSpelementUnitOKSOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ordinate is not None:
            namespaceprefix_ = self.Ordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.Ordinate_nsprefix_) else ''
            self.Ordinate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Ordinate', pretty_print=pretty_print)
        if self.R is not None:
            namespaceprefix_ = self.R_nsprefix_ + ':' if (UseCapturedNS_ and self.R_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sR>%s</%sR>%s' % (namespaceprefix_ , self.gds_format_decimal(self.R, input_name='R'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('TypeUnit', node)
        if value is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            self.TypeUnit = value
            self.validate_TypeUnitType16(self.TypeUnit)    # validate type TypeUnitType16
        value = find_attr_value_('SuNmb', node)
        if value is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            self.SuNmb = self.gds_parse_integer(value, node, 'SuNmb')
            if self.SuNmb <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.SuNmb)    # validate type p22
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Ordinate':
            obj_ = OrdinateType15.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Ordinate = obj_
            obj_.original_tagname_ = 'Ordinate'
        elif nodeName_ == 'R' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'R')
            fval_ = self.gds_validate_decimal(fval_, node, 'R')
            self.R = fval_
            self.R_nsprefix_ = child_.prefix
            # validate type d38_2
            self.validate_d38_2(self.R)
# end class tSpelementUnitOKSOut


class tEntitySpatialLandInp(GeneratedsSuper):
    """SpatialElement -- Э
    л
    е
    м
    е
    н
    т
    к
    о
    н
    т
    у
    р
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntSys=None, SpatialElement=None, extensiontype_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.EntSys = _cast(None, EntSys)
        self.EntSys_nsprefix_ = None
        if SpatialElement is None:
            self.SpatialElement = []
        else:
            self.SpatialElement = SpatialElement
        self.SpatialElement_nsprefix_ = "Spa5"
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialLandInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialLandInp.subclass:
            return tEntitySpatialLandInp.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialLandInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpatialElement(self):
        return self.SpatialElement
    def set_SpatialElement(self, SpatialElement):
        self.SpatialElement = SpatialElement
    def add_SpatialElement(self, value):
        self.SpatialElement.append(value)
    def insert_SpatialElement_at(self, index, value):
        self.SpatialElement.insert(index, value)
    def replace_SpatialElement_at(self, index, value):
        self.SpatialElement[index] = value
    def get_EntSys(self):
        return self.EntSys
    def set_EntSys(self, EntSys):
        self.EntSys = EntSys
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_sIDREF255(self, value):
        # Validate type Simple1:sIDREF255, a restriction on xs:IDREF.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sIDREF255' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.SpatialElement
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialLandInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialLandInp')
        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 and name_ == 'tEntitySpatialLandInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialLandInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialLandInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialLandInp'):
        if self.EntSys is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            outfile.write(' EntSys=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EntSys), input_name='EntSys')), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            if ":" not in self.extensiontype_:
                imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '')
                outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_))
            else:
                outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialLandInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpatialElement_ in self.SpatialElement:
            namespaceprefix_ = self.SpatialElement_nsprefix_ + ':' if (UseCapturedNS_ and self.SpatialElement_nsprefix_) else ''
            SpatialElement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpatialElement', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('EntSys', node)
        if value is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            self.EntSys = value
            self.validate_sIDREF255(self.EntSys)    # validate type sIDREF255
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpatialElement':
            obj_ = tSpatialElementLandInp.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpatialElement.append(obj_)
            obj_.original_tagname_ = 'SpatialElement'
# end class tEntitySpatialLandInp


class tSpatialElementLandInp(GeneratedsSuper):
    """SpelementUnit -- Ч
    а
    с
    т
    ь
    э
    л
    е
    м
    е
    н
    т
    а
    (
    т
    о
    ч
    к
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, SpelementUnit=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if SpelementUnit is None:
            self.SpelementUnit = []
        else:
            self.SpelementUnit = SpelementUnit
        self.SpelementUnit_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpatialElementLandInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpatialElementLandInp.subclass:
            return tSpatialElementLandInp.subclass(*args_, **kwargs_)
        else:
            return tSpatialElementLandInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpelementUnit(self):
        return self.SpelementUnit
    def set_SpelementUnit(self, SpelementUnit):
        self.SpelementUnit = SpelementUnit
    def add_SpelementUnit(self, value):
        self.SpelementUnit.append(value)
    def insert_SpelementUnit_at(self, index, value):
        self.SpelementUnit.insert(index, value)
    def replace_SpelementUnit_at(self, index, value):
        self.SpelementUnit[index] = value
    def _hasContent(self):
        if (
            self.SpelementUnit
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementLandInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpatialElementLandInp')
        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 and name_ == 'tSpatialElementLandInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpatialElementLandInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpatialElementLandInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpatialElementLandInp'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementLandInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpelementUnit_ in self.SpelementUnit:
            namespaceprefix_ = self.SpelementUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.SpelementUnit_nsprefix_) else ''
            SpelementUnit_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpelementUnit', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpelementUnit':
            obj_ = tSpelementUnitLandInp.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpelementUnit.append(obj_)
            obj_.original_tagname_ = 'SpelementUnit'
# end class tSpatialElementLandInp


class tSpelementUnitLandInp(GeneratedsSuper):
    """Ordinate -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, TypeUnit=None, SuNmb=None, Ordinate=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.TypeUnit = _cast(None, TypeUnit)
        self.TypeUnit_nsprefix_ = None
        self.SuNmb = _cast(None, SuNmb)
        self.SuNmb_nsprefix_ = None
        self.Ordinate = Ordinate
        self.Ordinate_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpelementUnitLandInp)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpelementUnitLandInp.subclass:
            return tSpelementUnitLandInp.subclass(*args_, **kwargs_)
        else:
            return tSpelementUnitLandInp(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Ordinate(self):
        return self.Ordinate
    def set_Ordinate(self, Ordinate):
        self.Ordinate = Ordinate
    def get_TypeUnit(self):
        return self.TypeUnit
    def set_TypeUnit(self, TypeUnit):
        self.TypeUnit = TypeUnit
    def get_SuNmb(self):
        return self.SuNmb
    def set_SuNmb(self, SuNmb):
        self.SuNmb = SuNmb
    def validate_TypeUnitType18(self, value):
        # Validate type TypeUnitType18, a restriction on Simple1:sType_Unit.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Точка', 'Линия', 'Дуга', 'Прямоугольник', 'Окружность']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on TypeUnitType18' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_TypeUnitType18_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_TypeUnitType18_patterns_, ))
    validate_TypeUnitType18_patterns_ = [['^(Точка)$']]
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Ordinate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitLandInp', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpelementUnitLandInp')
        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 and name_ == 'tSpelementUnitLandInp':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpelementUnitLandInp')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpelementUnitLandInp', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpelementUnitLandInp'):
        if self.TypeUnit is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            outfile.write(' TypeUnit=%s' % (quote_attrib(self.TypeUnit), ))
        if self.SuNmb is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            outfile.write(' SuNmb="%s"' % self.gds_format_integer(self.SuNmb, input_name='SuNmb'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitLandInp', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ordinate is not None:
            namespaceprefix_ = self.Ordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.Ordinate_nsprefix_) else ''
            self.Ordinate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Ordinate', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('TypeUnit', node)
        if value is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            self.TypeUnit = value
            self.validate_TypeUnitType18(self.TypeUnit)    # validate type TypeUnitType18
        value = find_attr_value_('SuNmb', node)
        if value is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            self.SuNmb = self.gds_parse_integer(value, node, 'SuNmb')
            if self.SuNmb <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.SuNmb)    # validate type p22
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Ordinate':
            obj_ = OrdinateType17.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Ordinate = obj_
            obj_.original_tagname_ = 'Ordinate'
# end class tSpelementUnitLandInp


class tEntitySpatialBordersLand(tEntitySpatialLandInp):
    """Borders -- О
    п
    и
    с
    а
    н
    и
    е
    ч
    а
    с
    т
    е
    й
    г
    р
    а
    н
    и
    ц
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tEntitySpatialLandInp
    def __init__(self, EntSys=None, SpatialElement=None, Borders=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("tEntitySpatialBordersLand"), self).__init__(EntSys, SpatialElement,  **kwargs_)
        self.Borders = Borders
        self.Borders_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialBordersLand)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialBordersLand.subclass:
            return tEntitySpatialBordersLand.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialBordersLand(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Borders(self):
        return self.Borders
    def set_Borders(self, Borders):
        self.Borders = Borders
    def _hasContent(self):
        if (
            self.Borders is not None or
            super(tEntitySpatialBordersLand, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tEntitySpatialBordersLand', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialBordersLand')
        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 and name_ == 'tEntitySpatialBordersLand':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialBordersLand')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialBordersLand', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialBordersLand'):
        super(tEntitySpatialBordersLand, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialBordersLand')
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tEntitySpatialBordersLand', fromsubclass_=False, pretty_print=True):
        super(tEntitySpatialBordersLand, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Borders is not None:
            namespaceprefix_ = self.Borders_nsprefix_ + ':' if (UseCapturedNS_ and self.Borders_nsprefix_) else ''
            self.Borders.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Borders', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(tEntitySpatialBordersLand, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Borders':
            obj_ = BordersType19.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Borders = obj_
            obj_.original_tagname_ = 'Borders'
        super(tEntitySpatialBordersLand, self)._buildChildren(child_, node, nodeName_, True)
# end class tEntitySpatialBordersLand


class tBorderLand(tBorder):
    """Edge -- Р
    е
    б
    р
    о
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tBorder
    def __init__(self, Spatial=None, Point1=None, Point2=None, Edge=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("tBorderLand"), self).__init__(Spatial, Point1, Point2,  **kwargs_)
        self.Edge = Edge
        self.Edge_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tBorderLand)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tBorderLand.subclass:
            return tBorderLand.subclass(*args_, **kwargs_)
        else:
            return tBorderLand(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Edge(self):
        return self.Edge
    def set_Edge(self, Edge):
        self.Edge = Edge
    def _hasContent(self):
        if (
            self.Edge is not None or
            super(tBorderLand, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tBorderLand', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tBorderLand')
        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 and name_ == 'tBorderLand':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tBorderLand')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tBorderLand', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tBorderLand'):
        super(tBorderLand, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tBorderLand')
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tBorderLand', fromsubclass_=False, pretty_print=True):
        super(tBorderLand, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Edge is not None:
            namespaceprefix_ = self.Edge_nsprefix_ + ':' if (UseCapturedNS_ and self.Edge_nsprefix_) else ''
            self.Edge.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Edge', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(tBorderLand, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Edge':
            obj_ = EdgeType20.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Edge = obj_
            obj_.original_tagname_ = 'Edge'
        super(tBorderLand, self)._buildChildren(child_, node, nodeName_, True)
# end class tBorderLand


class tEntitySpatialLandOut(GeneratedsSuper):
    """SpatialElement -- Э
    л
    е
    м
    е
    н
    т
    к
    о
    н
    т
    у
    р
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntSys=None, SpatialElement=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.EntSys = _cast(None, EntSys)
        self.EntSys_nsprefix_ = None
        if SpatialElement is None:
            self.SpatialElement = []
        else:
            self.SpatialElement = SpatialElement
        self.SpatialElement_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialLandOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialLandOut.subclass:
            return tEntitySpatialLandOut.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialLandOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpatialElement(self):
        return self.SpatialElement
    def set_SpatialElement(self, SpatialElement):
        self.SpatialElement = SpatialElement
    def add_SpatialElement(self, value):
        self.SpatialElement.append(value)
    def insert_SpatialElement_at(self, index, value):
        self.SpatialElement.insert(index, value)
    def replace_SpatialElement_at(self, index, value):
        self.SpatialElement[index] = value
    def get_EntSys(self):
        return self.EntSys
    def set_EntSys(self, EntSys):
        self.EntSys = EntSys
    def validate_sIDREF255(self, value):
        # Validate type Simple1:sIDREF255, a restriction on xs:IDREF.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sIDREF255' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.SpatialElement
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialLandOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialLandOut')
        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 and name_ == 'tEntitySpatialLandOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialLandOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialLandOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialLandOut'):
        if self.EntSys is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            outfile.write(' EntSys=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EntSys), input_name='EntSys')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialLandOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpatialElement_ in self.SpatialElement:
            namespaceprefix_ = self.SpatialElement_nsprefix_ + ':' if (UseCapturedNS_ and self.SpatialElement_nsprefix_) else ''
            SpatialElement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpatialElement', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('EntSys', node)
        if value is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            self.EntSys = value
            self.validate_sIDREF255(self.EntSys)    # validate type sIDREF255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpatialElement':
            obj_ = tSpatialElementLandOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpatialElement.append(obj_)
            obj_.original_tagname_ = 'SpatialElement'
# end class tEntitySpatialLandOut


class tSpatialElementLandOut(GeneratedsSuper):
    """SpelementUnit -- Ч
    а
    с
    т
    ь
    э
    л
    е
    м
    е
    н
    т
    а
    (
    т
    о
    ч
    к
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, SpelementUnit=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if SpelementUnit is None:
            self.SpelementUnit = []
        else:
            self.SpelementUnit = SpelementUnit
        self.SpelementUnit_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpatialElementLandOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpatialElementLandOut.subclass:
            return tSpatialElementLandOut.subclass(*args_, **kwargs_)
        else:
            return tSpatialElementLandOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpelementUnit(self):
        return self.SpelementUnit
    def set_SpelementUnit(self, SpelementUnit):
        self.SpelementUnit = SpelementUnit
    def add_SpelementUnit(self, value):
        self.SpelementUnit.append(value)
    def insert_SpelementUnit_at(self, index, value):
        self.SpelementUnit.insert(index, value)
    def replace_SpelementUnit_at(self, index, value):
        self.SpelementUnit[index] = value
    def _hasContent(self):
        if (
            self.SpelementUnit
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementLandOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpatialElementLandOut')
        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 and name_ == 'tSpatialElementLandOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpatialElementLandOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpatialElementLandOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpatialElementLandOut'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementLandOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpelementUnit_ in self.SpelementUnit:
            namespaceprefix_ = self.SpelementUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.SpelementUnit_nsprefix_) else ''
            SpelementUnit_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpelementUnit', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpelementUnit':
            obj_ = tSpelementUnitLandOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpelementUnit.append(obj_)
            obj_.original_tagname_ = 'SpelementUnit'
# end class tSpatialElementLandOut


class tSpelementUnitLandOut(GeneratedsSuper):
    """Ordinate -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, TypeUnit=None, SuNmb=None, Ordinate=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.TypeUnit = _cast(None, TypeUnit)
        self.TypeUnit_nsprefix_ = None
        self.SuNmb = _cast(None, SuNmb)
        self.SuNmb_nsprefix_ = None
        self.Ordinate = Ordinate
        self.Ordinate_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpelementUnitLandOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpelementUnitLandOut.subclass:
            return tSpelementUnitLandOut.subclass(*args_, **kwargs_)
        else:
            return tSpelementUnitLandOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Ordinate(self):
        return self.Ordinate
    def set_Ordinate(self, Ordinate):
        self.Ordinate = Ordinate
    def get_TypeUnit(self):
        return self.TypeUnit
    def set_TypeUnit(self, TypeUnit):
        self.TypeUnit = TypeUnit
    def get_SuNmb(self):
        return self.SuNmb
    def set_SuNmb(self, SuNmb):
        self.SuNmb = SuNmb
    def validate_TypeUnitType22(self, value):
        # Validate type TypeUnitType22, a restriction on Simple1:sType_Unit.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Точка', 'Линия', 'Дуга', 'Прямоугольник', 'Окружность']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on TypeUnitType22' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_TypeUnitType22_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_TypeUnitType22_patterns_, ))
    validate_TypeUnitType22_patterns_ = [['^(Точка)$']]
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Ordinate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitLandOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpelementUnitLandOut')
        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 and name_ == 'tSpelementUnitLandOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpelementUnitLandOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpelementUnitLandOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpelementUnitLandOut'):
        if self.TypeUnit is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            outfile.write(' TypeUnit=%s' % (quote_attrib(self.TypeUnit), ))
        if self.SuNmb is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            outfile.write(' SuNmb="%s"' % self.gds_format_integer(self.SuNmb, input_name='SuNmb'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitLandOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ordinate is not None:
            namespaceprefix_ = self.Ordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.Ordinate_nsprefix_) else ''
            self.Ordinate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Ordinate', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('TypeUnit', node)
        if value is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            self.TypeUnit = value
            self.validate_TypeUnitType22(self.TypeUnit)    # validate type TypeUnitType22
        value = find_attr_value_('SuNmb', node)
        if value is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            self.SuNmb = self.gds_parse_integer(value, node, 'SuNmb')
            if self.SuNmb <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.SuNmb)    # validate type p22
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Ordinate':
            obj_ = OrdinateType21.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Ordinate = obj_
            obj_.original_tagname_ = 'Ordinate'
# end class tSpelementUnitLandOut


class tEntitySpatialLandKVOut(GeneratedsSuper):
    """SpatialElement -- Э
    л
    е
    м
    е
    н
    т
    к
    о
    н
    т
    у
    р
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntSys=None, SpatialElement=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.EntSys = _cast(None, EntSys)
        self.EntSys_nsprefix_ = None
        if SpatialElement is None:
            self.SpatialElement = []
        else:
            self.SpatialElement = SpatialElement
        self.SpatialElement_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatialLandKVOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatialLandKVOut.subclass:
            return tEntitySpatialLandKVOut.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatialLandKVOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpatialElement(self):
        return self.SpatialElement
    def set_SpatialElement(self, SpatialElement):
        self.SpatialElement = SpatialElement
    def add_SpatialElement(self, value):
        self.SpatialElement.append(value)
    def insert_SpatialElement_at(self, index, value):
        self.SpatialElement.insert(index, value)
    def replace_SpatialElement_at(self, index, value):
        self.SpatialElement[index] = value
    def get_EntSys(self):
        return self.EntSys
    def set_EntSys(self, EntSys):
        self.EntSys = EntSys
    def validate_sIDREF255(self, value):
        # Validate type Simple1:sIDREF255, a restriction on xs:IDREF.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sIDREF255' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.SpatialElement
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialLandKVOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatialLandKVOut')
        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 and name_ == 'tEntitySpatialLandKVOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatialLandKVOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatialLandKVOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatialLandKVOut'):
        if self.EntSys is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            outfile.write(' EntSys=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EntSys), input_name='EntSys')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatialLandKVOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpatialElement_ in self.SpatialElement:
            namespaceprefix_ = self.SpatialElement_nsprefix_ + ':' if (UseCapturedNS_ and self.SpatialElement_nsprefix_) else ''
            SpatialElement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpatialElement', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('EntSys', node)
        if value is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            self.EntSys = value
            self.validate_sIDREF255(self.EntSys)    # validate type sIDREF255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpatialElement':
            obj_ = tSpatialElementLandKVOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpatialElement.append(obj_)
            obj_.original_tagname_ = 'SpatialElement'
# end class tEntitySpatialLandKVOut


class tSpatialElementLandKVOut(GeneratedsSuper):
    """SpelementUnit -- Ч
    а
    с
    т
    ь
    э
    л
    е
    м
    е
    н
    т
    а
    (
    т
    о
    ч
    к
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, SpelementUnit=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if SpelementUnit is None:
            self.SpelementUnit = []
        else:
            self.SpelementUnit = SpelementUnit
        self.SpelementUnit_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpatialElementLandKVOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpatialElementLandKVOut.subclass:
            return tSpatialElementLandKVOut.subclass(*args_, **kwargs_)
        else:
            return tSpatialElementLandKVOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpelementUnit(self):
        return self.SpelementUnit
    def set_SpelementUnit(self, SpelementUnit):
        self.SpelementUnit = SpelementUnit
    def add_SpelementUnit(self, value):
        self.SpelementUnit.append(value)
    def insert_SpelementUnit_at(self, index, value):
        self.SpelementUnit.insert(index, value)
    def replace_SpelementUnit_at(self, index, value):
        self.SpelementUnit[index] = value
    def _hasContent(self):
        if (
            self.SpelementUnit
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementLandKVOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpatialElementLandKVOut')
        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 and name_ == 'tSpatialElementLandKVOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpatialElementLandKVOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpatialElementLandKVOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpatialElementLandKVOut'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElementLandKVOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpelementUnit_ in self.SpelementUnit:
            namespaceprefix_ = self.SpelementUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.SpelementUnit_nsprefix_) else ''
            SpelementUnit_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpelementUnit', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpelementUnit':
            obj_ = tSpelementUnitLandKVOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpelementUnit.append(obj_)
            obj_.original_tagname_ = 'SpelementUnit'
# end class tSpatialElementLandKVOut


class tSpelementUnitLandKVOut(GeneratedsSuper):
    """Ordinate -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, TypeUnit=None, SuNmb=None, Ordinate=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.TypeUnit = _cast(None, TypeUnit)
        self.TypeUnit_nsprefix_ = None
        self.SuNmb = _cast(None, SuNmb)
        self.SuNmb_nsprefix_ = None
        self.Ordinate = Ordinate
        self.Ordinate_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpelementUnitLandKVOut)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpelementUnitLandKVOut.subclass:
            return tSpelementUnitLandKVOut.subclass(*args_, **kwargs_)
        else:
            return tSpelementUnitLandKVOut(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Ordinate(self):
        return self.Ordinate
    def set_Ordinate(self, Ordinate):
        self.Ordinate = Ordinate
    def get_TypeUnit(self):
        return self.TypeUnit
    def set_TypeUnit(self, TypeUnit):
        self.TypeUnit = TypeUnit
    def get_SuNmb(self):
        return self.SuNmb
    def set_SuNmb(self, SuNmb):
        self.SuNmb = SuNmb
    def validate_TypeUnitType24(self, value):
        # Validate type TypeUnitType24, a restriction on Simple1:sType_Unit.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Точка', 'Линия', 'Дуга', 'Прямоугольник', 'Окружность']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on TypeUnitType24' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_TypeUnitType24_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_TypeUnitType24_patterns_, ))
    validate_TypeUnitType24_patterns_ = [['^(Точка)$']]
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Ordinate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitLandKVOut', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpelementUnitLandKVOut')
        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 and name_ == 'tSpelementUnitLandKVOut':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpelementUnitLandKVOut')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpelementUnitLandKVOut', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpelementUnitLandKVOut'):
        if self.TypeUnit is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            outfile.write(' TypeUnit=%s' % (quote_attrib(self.TypeUnit), ))
        if self.SuNmb is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            outfile.write(' SuNmb="%s"' % self.gds_format_integer(self.SuNmb, input_name='SuNmb'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tSpelementUnitLandKVOut', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ordinate is not None:
            namespaceprefix_ = self.Ordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.Ordinate_nsprefix_) else ''
            self.Ordinate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Ordinate', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('TypeUnit', node)
        if value is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            self.TypeUnit = value
            self.validate_TypeUnitType24(self.TypeUnit)    # validate type TypeUnitType24
        value = find_attr_value_('SuNmb', node)
        if value is not None and 'SuNmb' not in already_processed:
            already_processed.add('SuNmb')
            self.SuNmb = self.gds_parse_integer(value, node, 'SuNmb')
            if self.SuNmb <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.SuNmb)    # validate type p22
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Ordinate':
            obj_ = OrdinateType23.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Ordinate = obj_
            obj_.original_tagname_ = 'Ordinate'
# end class tSpelementUnitLandKVOut


class tEntitySpatial(GeneratedsSuper):
    """SpatialElement -- Э
    л
    е
    м
    е
    н
    т
    к
    о
    н
    т
    у
    р
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntSys=None, SpatialElement=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.EntSys = _cast(None, EntSys)
        self.EntSys_nsprefix_ = None
        if SpatialElement is None:
            self.SpatialElement = []
        else:
            self.SpatialElement = SpatialElement
        self.SpatialElement_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tEntitySpatial)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tEntitySpatial.subclass:
            return tEntitySpatial.subclass(*args_, **kwargs_)
        else:
            return tEntitySpatial(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpatialElement(self):
        return self.SpatialElement
    def set_SpatialElement(self, SpatialElement):
        self.SpatialElement = SpatialElement
    def add_SpatialElement(self, value):
        self.SpatialElement.append(value)
    def insert_SpatialElement_at(self, index, value):
        self.SpatialElement.insert(index, value)
    def replace_SpatialElement_at(self, index, value):
        self.SpatialElement[index] = value
    def get_EntSys(self):
        return self.EntSys
    def set_EntSys(self, EntSys):
        self.EntSys = EntSys
    def validate_sIDREF255(self, value):
        # Validate type Simple1:sIDREF255, a restriction on xs:IDREF.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sIDREF255' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.SpatialElement
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatial', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tEntitySpatial')
        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 and name_ == 'tEntitySpatial':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tEntitySpatial')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tEntitySpatial', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tEntitySpatial'):
        if self.EntSys is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            outfile.write(' EntSys=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EntSys), input_name='EntSys')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tEntitySpatial', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpatialElement_ in self.SpatialElement:
            namespaceprefix_ = self.SpatialElement_nsprefix_ + ':' if (UseCapturedNS_ and self.SpatialElement_nsprefix_) else ''
            SpatialElement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpatialElement', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('EntSys', node)
        if value is not None and 'EntSys' not in already_processed:
            already_processed.add('EntSys')
            self.EntSys = value
            self.validate_sIDREF255(self.EntSys)    # validate type sIDREF255
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpatialElement':
            obj_ = tSpatialElement.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpatialElement.append(obj_)
            obj_.original_tagname_ = 'SpatialElement'
# end class tEntitySpatial


class tSpatialElement(GeneratedsSuper):
    """SpelementUnit -- Ч
    а
    с
    т
    ь
    э
    л
    е
    м
    е
    н
    т
    а
    (
    т
    о
    ч
    к
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, SpelementUnit=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        if SpelementUnit is None:
            self.SpelementUnit = []
        else:
            self.SpelementUnit = SpelementUnit
        self.SpelementUnit_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpatialElement)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpatialElement.subclass:
            return tSpatialElement.subclass(*args_, **kwargs_)
        else:
            return tSpatialElement(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_SpelementUnit(self):
        return self.SpelementUnit
    def set_SpelementUnit(self, SpelementUnit):
        self.SpelementUnit = SpelementUnit
    def add_SpelementUnit(self, value):
        self.SpelementUnit.append(value)
    def insert_SpelementUnit_at(self, index, value):
        self.SpelementUnit.insert(index, value)
    def replace_SpelementUnit_at(self, index, value):
        self.SpelementUnit[index] = value
    def _hasContent(self):
        if (
            self.SpelementUnit
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElement', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpatialElement')
        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 and name_ == 'tSpatialElement':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpatialElement')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpatialElement', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpatialElement'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpatialElement', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for SpelementUnit_ in self.SpelementUnit:
            namespaceprefix_ = self.SpelementUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.SpelementUnit_nsprefix_) else ''
            SpelementUnit_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpelementUnit', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'SpelementUnit':
            obj_ = tSpelementUnit.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpelementUnit.append(obj_)
            obj_.original_tagname_ = 'SpelementUnit'
# end class tSpatialElement


class tSpelementUnit(GeneratedsSuper):
    """Ordinate -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, TypeUnit=None, Ordinate=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        self.TypeUnit = _cast(None, TypeUnit)
        self.TypeUnit_nsprefix_ = None
        self.Ordinate = Ordinate
        self.Ordinate_nsprefix_ = "Spa5"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tSpelementUnit)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tSpelementUnit.subclass:
            return tSpelementUnit.subclass(*args_, **kwargs_)
        else:
            return tSpelementUnit(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Ordinate(self):
        return self.Ordinate
    def set_Ordinate(self, Ordinate):
        self.Ordinate = Ordinate
    def get_TypeUnit(self):
        return self.TypeUnit
    def set_TypeUnit(self, TypeUnit):
        self.TypeUnit = TypeUnit
    def validate_sType_Unit(self, value):
        # Validate type Simple1:sType_Unit, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Точка', 'Линия', 'Дуга', 'Прямоугольник', 'Окружность']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on sType_Unit' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            self.Ordinate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpelementUnit', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tSpelementUnit')
        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 and name_ == 'tSpelementUnit':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tSpelementUnit')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tSpelementUnit', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tSpelementUnit'):
        if self.TypeUnit is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            outfile.write(' TypeUnit=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.TypeUnit), input_name='TypeUnit')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tSpelementUnit', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ordinate is not None:
            namespaceprefix_ = self.Ordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.Ordinate_nsprefix_) else ''
            self.Ordinate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Ordinate', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('TypeUnit', node)
        if value is not None and 'TypeUnit' not in already_processed:
            already_processed.add('TypeUnit')
            self.TypeUnit = value
            self.validate_sType_Unit(self.TypeUnit)    # validate type sType_Unit
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Ordinate':
            obj_ = tOrdinate.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Ordinate = obj_
            obj_.original_tagname_ = 'Ordinate'
# end class tSpelementUnit


class tOrdinate(tOrdinateInp):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tOrdinateInp
    def __init__(self, X=None, Y=None, NumGeopoint=None, DeltaGeopoint=None, PointPref=None, GeopointOpred=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Spa5"
        super(globals().get("tOrdinate"), self).__init__(X, Y, NumGeopoint, DeltaGeopoint, PointPref,  **kwargs_)
        self.GeopointOpred = _cast(None, GeopointOpred)
        self.GeopointOpred_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tOrdinate)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tOrdinate.subclass:
            return tOrdinate.subclass(*args_, **kwargs_)
        else:
            return tOrdinate(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_GeopointOpred(self):
        return self.GeopointOpred
    def set_GeopointOpred(self, GeopointOpred):
        self.GeopointOpred = GeopointOpred
    def validate_dGeopointOpred(self, value):
        # Validate type dGeO1:dGeopointOpred, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['692001000000', '692002000000', '692003000000', '692004000000', '692005000000', '692006000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dGeopointOpred' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(tOrdinate, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tOrdinate', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tOrdinate')
        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 and name_ == 'tOrdinate':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tOrdinate')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tOrdinate', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Spa5:', name_='tOrdinate'):
        super(tOrdinate, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tOrdinate')
        if self.GeopointOpred is not None and 'GeopointOpred' not in already_processed:
            already_processed.add('GeopointOpred')
            outfile.write(' GeopointOpred=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.GeopointOpred), input_name='GeopointOpred')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Spa5:', namespacedef_='xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"', name_='tOrdinate', fromsubclass_=False, pretty_print=True):
        super(tOrdinate, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('GeopointOpred', node)
        if value is not None and 'GeopointOpred' not in already_processed:
            already_processed.add('GeopointOpred')
            self.GeopointOpred = value
            self.validate_dGeopointOpred(self.GeopointOpred)    # validate type dGeopointOpred
        super(tOrdinate, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(tOrdinate, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class tOrdinate


class tElementsConstruct(GeneratedsSuper):
    """Material -- М
    а
    т
    е
    р
    и
    а
    л
    с
    т
    е
    н
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Material=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Material is None:
            self.Material = []
        else:
            self.Material = Material
        self.Material_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tElementsConstruct)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tElementsConstruct.subclass:
            return tElementsConstruct.subclass(*args_, **kwargs_)
        else:
            return tElementsConstruct(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Material(self):
        return self.Material
    def set_Material(self, Material):
        self.Material = Material
    def add_Material(self, value):
        self.Material.append(value)
    def insert_Material_at(self, index, value):
        self.Material.insert(index, value)
    def replace_Material_at(self, index, value):
        self.Material[index] = value
    def _hasContent(self):
        if (
            self.Material
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tElementsConstruct', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tElementsConstruct')
        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 and name_ == 'tElementsConstruct':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tElementsConstruct')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tElementsConstruct', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Param2:', name_='tElementsConstruct'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1" xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tElementsConstruct', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Material_ in self.Material:
            namespaceprefix_ = self.Material_nsprefix_ + ':' if (UseCapturedNS_ and self.Material_nsprefix_) else ''
            Material_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Material', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Material':
            obj_ = MaterialType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Material.append(obj_)
            obj_.original_tagname_ = 'Material'
# end class tElementsConstruct


class tExploitationChar(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, YearBuilt=None, YearUsed=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Param2"
        self.YearBuilt = _cast(None, YearBuilt)
        self.YearBuilt_nsprefix_ = None
        self.YearUsed = _cast(None, YearUsed)
        self.YearUsed_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tExploitationChar)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tExploitationChar.subclass:
            return tExploitationChar.subclass(*args_, **kwargs_)
        else:
            return tExploitationChar(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_YearBuilt(self):
        return self.YearBuilt
    def set_YearBuilt(self, YearBuilt):
        self.YearBuilt = YearBuilt
    def get_YearUsed(self):
        return self.YearUsed
    def set_YearUsed(self, YearUsed):
        self.YearUsed = YearUsed
    def validate_i4(self, value):
        # Validate type Simple1:i4, a restriction on xs:int.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 4:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on i4' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tExploitationChar', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tExploitationChar')
        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 and name_ == 'tExploitationChar':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tExploitationChar')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tExploitationChar', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Param2:', name_='tExploitationChar'):
        if self.YearBuilt is not None and 'YearBuilt' not in already_processed:
            already_processed.add('YearBuilt')
            outfile.write(' YearBuilt="%s"' % self.gds_format_integer(self.YearBuilt, input_name='YearBuilt'))
        if self.YearUsed is not None and 'YearUsed' not in already_processed:
            already_processed.add('YearUsed')
            outfile.write(' YearUsed="%s"' % self.gds_format_integer(self.YearUsed, input_name='YearUsed'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tExploitationChar', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('YearBuilt', node)
        if value is not None and 'YearBuilt' not in already_processed:
            already_processed.add('YearBuilt')
            self.YearBuilt = self.gds_parse_integer(value, node, 'YearBuilt')
            self.validate_i4(self.YearBuilt)    # validate type i4
        value = find_attr_value_('YearUsed', node)
        if value is not None and 'YearUsed' not in already_processed:
            already_processed.add('YearUsed')
            self.YearUsed = self.gds_parse_integer(value, node, 'YearUsed')
            self.validate_i4(self.YearUsed)    # validate type i4
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tExploitationChar


class tFloors(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Floors=None, UndergroundFloors=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Param2"
        self.Floors = _cast(None, Floors)
        self.Floors_nsprefix_ = None
        self.UndergroundFloors = _cast(None, UndergroundFloors)
        self.UndergroundFloors_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tFloors)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tFloors.subclass:
            return tFloors.subclass(*args_, **kwargs_)
        else:
            return tFloors(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Floors(self):
        return self.Floors
    def set_Floors(self, Floors):
        self.Floors = Floors
    def get_UndergroundFloors(self):
        return self.UndergroundFloors
    def set_UndergroundFloors(self, UndergroundFloors):
        self.UndergroundFloors = UndergroundFloors
    def validate_sNe200(self, value):
        # Validate type Simple4:sNe200, a restriction on Simple4:nonEmptyString.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 200:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on sNe200' % {"value": value, "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_sNe200_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_sNe200_patterns_, ))
    validate_sNe200_patterns_ = [['^((\\s*[^\\s]\\s*)+)$']]
    def validate_s200(self, value):
        # Validate type Simple1:s200, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 200:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s200' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tFloors', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tFloors')
        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 and name_ == 'tFloors':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tFloors')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tFloors', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Param2:', name_='tFloors'):
        if self.Floors is not None and 'Floors' not in already_processed:
            already_processed.add('Floors')
            outfile.write(' Floors=%s' % (quote_attrib(self.Floors), ))
        if self.UndergroundFloors is not None and 'UndergroundFloors' not in already_processed:
            already_processed.add('UndergroundFloors')
            outfile.write(' UndergroundFloors=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.UndergroundFloors), input_name='UndergroundFloors')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tFloors', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Floors', node)
        if value is not None and 'Floors' not in already_processed:
            already_processed.add('Floors')
            self.Floors = value
            self.validate_sNe200(self.Floors)    # validate type sNe200
        value = find_attr_value_('UndergroundFloors', node)
        if value is not None and 'UndergroundFloors' not in already_processed:
            already_processed.add('UndergroundFloors')
            self.UndergroundFloors = value
            self.validate_s200(self.UndergroundFloors)    # validate type s200
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tFloors


class tKeyParameters(GeneratedsSuper):
    """KeyParameter -- О
    с
    н
    о
    в
    н
    а
    я
    х
    а
    р
    а
    к
    т
    е
    р
    и
    с
    т
    и
    к
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, KeyParameter=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Param2"
        if KeyParameter is None:
            self.KeyParameter = []
        else:
            self.KeyParameter = KeyParameter
        self.KeyParameter_nsprefix_ = "Param2"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tKeyParameters)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tKeyParameters.subclass:
            return tKeyParameters.subclass(*args_, **kwargs_)
        else:
            return tKeyParameters(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_KeyParameter(self):
        return self.KeyParameter
    def set_KeyParameter(self, KeyParameter):
        self.KeyParameter = KeyParameter
    def add_KeyParameter(self, value):
        self.KeyParameter.append(value)
    def insert_KeyParameter_at(self, index, value):
        self.KeyParameter.insert(index, value)
    def replace_KeyParameter_at(self, index, value):
        self.KeyParameter[index] = value
    def _hasContent(self):
        if (
            self.KeyParameter
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tKeyParameters', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tKeyParameters')
        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 and name_ == 'tKeyParameters':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tKeyParameters')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tKeyParameters', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Param2:', name_='tKeyParameters'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tKeyParameters', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for KeyParameter_ in self.KeyParameter:
            namespaceprefix_ = self.KeyParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.KeyParameter_nsprefix_) else ''
            KeyParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='KeyParameter', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'KeyParameter':
            obj_ = tKeyParameter.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.KeyParameter.append(obj_)
            obj_.original_tagname_ = 'KeyParameter'
# end class tKeyParameters


class tKeyParameter(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Type=None, Value=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Param2"
        self.Type = _cast(None, Type)
        self.Type_nsprefix_ = None
        self.Value = _cast(None, Value)
        self.Value_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tKeyParameter)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tKeyParameter.subclass:
            return tKeyParameter.subclass(*args_, **kwargs_)
        else:
            return tKeyParameter(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Type(self):
        return self.Type
    def set_Type(self, Type):
        self.Type = Type
    def get_Value(self):
        return self.Value
    def set_Value(self, Value):
        self.Value = Value
    def validate_dTypeParameter(self, value):
        # Validate type dTp1:dTypeParameter, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['01', '02', '03', '04', '05', '06', '07']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dTypeParameter' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_d23_1(self, value):
        # Validate type Simple2:d23_1, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 23:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d23_1' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tKeyParameter', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tKeyParameter')
        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 and name_ == 'tKeyParameter':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tKeyParameter')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tKeyParameter', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Param2:', name_='tKeyParameter'):
        if self.Type is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            outfile.write(' Type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Type), input_name='Type')), ))
        if self.Value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            outfile.write(' Value="%s"' % self.gds_format_decimal(self.Value, input_name='Value'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tKeyParameter', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Type', node)
        if value is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            self.Type = value
            self.validate_dTypeParameter(self.Type)    # validate type dTypeParameter
        value = find_attr_value_('Value', node)
        if value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            value = self.gds_parse_decimal(value, node, 'Value')
            self.Value = value
            self.validate_d23_1(self.Value)    # validate type d23_1
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tKeyParameter


class tKeyParametersSubObject(GeneratedsSuper):
    """KeyParameterSubObject -- О
    с
    н
    о
    в
    н
    а
    я
    х
    а
    р
    а
    к
    т
    е
    р
    и
    с
    т
    и
    к
    а
    ч
    а
    с
    т
    и
    (
    п
    р
    о
    т
    я
    ж
    е
    н
    н
    о
    с
    т
    ь
    ,
    п
    л
    о
    щ
    а
    д
    ь
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, KeyParameterSubObject=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Param2"
        if KeyParameterSubObject is None:
            self.KeyParameterSubObject = []
        else:
            self.KeyParameterSubObject = KeyParameterSubObject
        self.KeyParameterSubObject_nsprefix_ = "Param2"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tKeyParametersSubObject)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tKeyParametersSubObject.subclass:
            return tKeyParametersSubObject.subclass(*args_, **kwargs_)
        else:
            return tKeyParametersSubObject(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_KeyParameterSubObject(self):
        return self.KeyParameterSubObject
    def set_KeyParameterSubObject(self, KeyParameterSubObject):
        self.KeyParameterSubObject = KeyParameterSubObject
    def add_KeyParameterSubObject(self, value):
        self.KeyParameterSubObject.append(value)
    def insert_KeyParameterSubObject_at(self, index, value):
        self.KeyParameterSubObject.insert(index, value)
    def replace_KeyParameterSubObject_at(self, index, value):
        self.KeyParameterSubObject[index] = value
    def _hasContent(self):
        if (
            self.KeyParameterSubObject
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tKeyParametersSubObject', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tKeyParametersSubObject')
        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 and name_ == 'tKeyParametersSubObject':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tKeyParametersSubObject')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tKeyParametersSubObject', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Param2:', name_='tKeyParametersSubObject'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tKeyParametersSubObject', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for KeyParameterSubObject_ in self.KeyParameterSubObject:
            namespaceprefix_ = self.KeyParameterSubObject_nsprefix_ + ':' if (UseCapturedNS_ and self.KeyParameterSubObject_nsprefix_) else ''
            KeyParameterSubObject_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='KeyParameterSubObject', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'KeyParameterSubObject':
            obj_ = tKeyParameterSubObject.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.KeyParameterSubObject.append(obj_)
            obj_.original_tagname_ = 'KeyParameterSubObject'
# end class tKeyParametersSubObject


class tKeyParameterSubObject(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Type=None, Value=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "Param2"
        self.Type = _cast(None, Type)
        self.Type_nsprefix_ = None
        self.Value = _cast(None, Value)
        self.Value_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tKeyParameterSubObject)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tKeyParameterSubObject.subclass:
            return tKeyParameterSubObject.subclass(*args_, **kwargs_)
        else:
            return tKeyParameterSubObject(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Type(self):
        return self.Type
    def set_Type(self, Type):
        self.Type = Type
    def get_Value(self):
        return self.Value
    def set_Value(self, Value):
        self.Value = Value
    def validate_TypeType(self, value):
        # Validate type TypeType, a restriction on dTp1:dTypeParameter.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['01', '02', '03', '04', '05', '06', '07']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on TypeType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_TypeType_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_TypeType_patterns_, ))
    validate_TypeType_patterns_ = [['^(01)$', '^(05)$']]
    def validate_d23_1(self, value):
        # Validate type Simple2:d23_1, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 23:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d23_1' % {"value": value, "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tKeyParameterSubObject', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tKeyParameterSubObject')
        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 and name_ == 'tKeyParameterSubObject':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tKeyParameterSubObject')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tKeyParameterSubObject', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='Param2:', name_='tKeyParameterSubObject'):
        if self.Type is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            outfile.write(' Type=%s' % (quote_attrib(self.Type), ))
        if self.Value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            outfile.write(' Value="%s"' % self.gds_format_decimal(self.Value, input_name='Value'))
    def _exportChildren(self, outfile, level, namespaceprefix_='Param2:', namespacedef_='xmlns:Param2="urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1"', name_='tKeyParameterSubObject', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Type', node)
        if value is not None and 'Type' not in already_processed:
            already_processed.add('Type')
            self.Type = value
            self.validate_TypeType(self.Type)    # validate type TypeType
        value = find_attr_value_('Value', node)
        if value is not None and 'Value' not in already_processed:
            already_processed.add('Value')
            value = self.gds_parse_decimal(value, node, 'Value')
            self.Value = value
            self.validate_d23_1(self.Value)    # validate type d23_1
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class tKeyParameterSubObject


class tDocumentWithoutAppliedFile(GeneratedsSuper):
    """CodeDocument -- К
    о
    д
    д
    о
    к
    у
    м
    е
    н
    т
    а
    Name -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    д
    о
    к
    у
    м
    е
    н
    т
    а
    Series -- С
    е
    р
    и
    я
    д
    о
    к
    у
    м
    е
    н
    т
    а
    Number -- Н
    о
    м
    е
    р
    д
    о
    к
    у
    м
    е
    н
    т
    а
    Date -- Д
    а
    т
    а
    в
    ы
    д
    а
    ч
    и
    (
    п
    о
    д
    п
    и
    с
    а
    н
    и
    я
    )
    д
    о
    к
    у
    м
    е
    н
    т
    а
    IssueOrgan -- О
    р
    г
    а
    н
    и
    з
    а
    ц
    и
    я
    ,
    в
    ы
    д
    а
    в
    ш
    а
    я
    д
    о
    к
    у
    м
    е
    н
    т
    .
    А
    в
    т
    о
    р
    д
    о
    к
    у
    м
    е
    н
    т
    а
    Desc -- О
    с
    о
    б
    ы
    е
    о
    т
    м
    е
    т
    к
    и
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CodeDocument=None, Name=None, Series=None, Number=None, Date=None, IssueOrgan=None, Desc=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.CodeDocument = CodeDocument
        self.validate_dAllDocuments(self.CodeDocument)
        self.CodeDocument_nsprefix_ = "dAlOut3"
        self.Name = Name
        self.validate_s500(self.Name)
        self.Name_nsprefix_ = "Simple1"
        self.Series = Series
        self.validate_s45(self.Series)
        self.Series_nsprefix_ = "Simple1"
        self.Number = Number
        self.validate_s45(self.Number)
        self.Number_nsprefix_ = "Simple1"
        if isinstance(Date, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(Date, '%Y-%m-%d').date()
        else:
            initvalue_ = Date
        self.Date = initvalue_
        self.Date_nsprefix_ = None
        self.IssueOrgan = IssueOrgan
        self.validate_s500(self.IssueOrgan)
        self.IssueOrgan_nsprefix_ = "Simple1"
        self.Desc = Desc
        self.validate_s1000(self.Desc)
        self.Desc_nsprefix_ = "Simple1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tDocumentWithoutAppliedFile)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tDocumentWithoutAppliedFile.subclass:
            return tDocumentWithoutAppliedFile.subclass(*args_, **kwargs_)
        else:
            return tDocumentWithoutAppliedFile(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_CodeDocument(self):
        return self.CodeDocument
    def set_CodeDocument(self, CodeDocument):
        self.CodeDocument = CodeDocument
    def get_Name(self):
        return self.Name
    def set_Name(self, Name):
        self.Name = Name
    def get_Series(self):
        return self.Series
    def set_Series(self, Series):
        self.Series = Series
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_Date(self):
        return self.Date
    def set_Date(self, Date):
        self.Date = Date
    def get_IssueOrgan(self):
        return self.IssueOrgan
    def set_IssueOrgan(self, IssueOrgan):
        self.IssueOrgan = IssueOrgan
    def get_Desc(self):
        return self.Desc
    def set_Desc(self, Desc):
        self.Desc = Desc
    def validate_dAllDocuments(self, value):
        result = True
        # Validate type dAllDocuments, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['008001000000', '008001001000', '008001002000', '008001003000', '008001004000', '008001005000', '008001006000', '008001007000', '008001008000', '008001009000', '008001010000', '008001011000', '008001012000', '008001013000', '008001014000', '008001015000', '008001016000', '008001017000', '008001018000', '008001019000', '008001020000', '008001099000', '008002000000', '008002001000', '008002002000', '008002004000', '008002005000', '008002006000', '008002007000', '008002008000', '008002099000', '555001000000', '555002000000', '555003000000', '555004000000', '555005000000', '558100000000', '558101000000', '558101010000', '558101020000', '558101030000', '558101040000', '558101050000', '558101060000', '558101070000', '558101080000', '558101090000', '558101090100', '558101090200', '558101100000', '558101110000', '558101120000', '558101130000', '558101140000', '558101150000', '558101160000', '558101170000', '558101180000', '558102000000', '558102010000', '558102020000', '558102030000', '558102040000', '558102050000', '558102060000', '558102070000', '558102080000', '558102090000', '558102100000', '558102110000', '558102120000', '558102130000', '558102140000', '558102150000', '558102160000', '558102170000', '558102180000', '558102190000', '558102200000', '558102210000', '558102220000', '558103000000', '558103010000', '558103020000', '558103030000', '558103040000', '558103050000', '558103060000', '558103070000', '558103080000', '558103090000', '558104000000', '558199000000', '558200000000', '558201000000', '558202000000', '558203000000', '558204000000', '558205000000', '558205010000', '558205020000', '558205030000', '558205040000', '558205050000', '558205060000', '558206000000', '558206010000', '558206020000', '558207000000', '558208000000', '558209000000', '558210000000', '558211000000', '558211010000', '558211020000', '558211030000', '558211040000', '558212000000', '558213000000', '558213010000', '558213020000', '558213030000', '558214000000', '558214010000', '558214020000', '558214030000', '558214040000', '558216000000', '558217000000', '558218000000', '558219000000', '558220000000', '558220010000', '558220020000', '558220030000', '558221000000', '558221010000', '558221020000', '558221030000', '558221040000', '558221050000', '558221060000', '558221070000', '558221080000', '558221090000', '558221090100', '558221090200', '558221090300', '558221090400', '558221090500', '558221090600', '558221090700', '558221090800', '558221990000', '558222000000', '558223000000', '558224000000', '558225000000', '558226000000', '558227000000', '558228000000', '558229000000', '558230000000', '558231000000', '558232000000', '558233000000', '558234000000', '558235000000', '558236000000', '558237000000', '558238000000', '558239000000', '558240000000', '558241000000', '558242000000', '558243000000', '558244000000', '558245000000', '558246000000', '558247000000', '558248000000', '558249000000', '558250000000', '558251000000', '558252000000', '558253000000', '558254000000', '558254010000', '558254020000', '558254030000', '558254040000', '558254040100', '558254040200', '558254040300', '558254050000', '558254060000', '558254070000', '558254080000', '558254090000', '558254100000', '558254110000', '558254120000', '558254130000', '558254140000', '558254150000', '558254990000', '558255000000', '558256000000', '558257000000', '558257010000', '558257020000', '558257030000', '558258000000', '558259000000', '558260000000', '558261000000', '558262000000', '558263000000', '558264000000', '558265000000', '558266000000', '558267000000', '558268000000', '558269000000', '558270000000', '558271000000', '558272000000', '558273000000', '558274000000', '558275000000', '558276000000', '558277000000', '558278000000', '558279000000', '558280000000', '558281000000', '558282000000', '558283000000', '558284000000', '558285000000', '558286000000', '558299000000', '558300000000', '558301000000', '558301010000', '558301020000', '558301030000', '558301040000', '558301050000', '558301060000', '558301070000', '558301080000', '558301090000', '558301100000', '558301110000', '558301120000', '558301130000', '558301140000', '558301990000', '558400000000', '558401000000', '558401010000', '558401010100', '558401010101', '558401010102', '558401010103', '558401010104', '558401010105', '558401010106', '558401010200', '558401010201', '558401010202', '558401010203', '558401010204', '558401010205', '558401010206', '558401010207', '558401010208', '558401010209', '558401010210', '558401010211', '558401010212', '558401010213', '558401010214', '558401010215', '558401010216', '558401010217', '558401010218', '558401010219', '558401010220', '558401010299', '558401020000', '558401020100', '558401020200', '558401020300', '558401020400', '558401020500', '558401020600', '558401020700', '558401020800', '558401029900', '558401030000', '558401030100', '558401030200', '558401040000', '558401040100', '558401040200', '558401040300', '558401049900', '558401050000', '558401050100', '558401050200', '558401050300', '558401050400', '558401059900', '558401060000', '558401060100', '558401060200', '558401060300', '558401060400', '558401070000', '558401070100', '558401070200', '558401070300', '558401080000', '558401080100', '558401080200', '558401080300', '558401080400', '558401080500', '558401080600', '558401080700', '558401080800', '558401080900', '558401081000', '558401081100', '558401081200', '558401089900', '558402000000', '558402010000', '558402020000', '558402030000', '558402040000', '558402050000', '558402060000', '558402070000', '558402080000', '558402090000', '558402100000', '558402110000', '558402120000', '558402130000', '558402140000', '558402150000', '558402160000', '558402170000', '558402180000', '558402190000', '558402200000', '558402210000', '558402220000', '558402230000', '558402240000', '558402250000', '558402260000', '558402270000', '558402280000', '558402390000', '558402400000', '558402990000', '558403000000', '558403010000', '558403020000', '558403030000', '558403040000', '558403050000', '558403060000', '558403070000', '558403080000', '558403090000', '558403100000', '558403110000', '558403120000', '558403990000', '558404000000', '558404010000', '558404020000', '558404030000', '558404040000', '558405000000', '558405010000', '558405020000', '558405030000', '558405040000', '558405990000', '558500000000', '558501000000', '558501010000', '558501010100', '558501010200', '558501010300', '558501010400', '558501010500', '558501010600', '558501010700', '558501010800', '558501010900', '558501011000', '558501011100', '558501011200', '558501011300', '558501011400', '558501011500', '558501011600', '558501011700', '558501011701', '558501020000', '558501020100', '558501020200', '558501020300', '558501020400', '558501020500', '558501020600', '558501020700', '558501020800', '558501020900', '558501021000', '558501021100', '558501021200', '558501021300', '558501021400', '558501030000', '558501030100', '558501030200', '558501030300', '558501030400', '558501030500', '558501030600', '558501030601', '558501030700', '558501030800', '558501030900', '558501031000', '558501039900', '558502000000', '558502010000', '558502010100', '558502010200', '558502010300', '558502010400', '558502010500', '558502010600', '558502010700', '558502010800', '558502010900', '558502011000', '558502011100', '558502011200', '558502011300', '558502011400', '558502011500', '558502011600', '558502011700', '558502011800', '558502011900', '558502020000', '558502020100', '558502029900', '558601000000', '558602000000', '558603000000', '558699000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dAllDocuments' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s500(self, value):
        result = True
        # Validate type s500, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 500:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s500' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s45(self, value):
        result = True
        # Validate type s45, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 45:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s45' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s1000(self, value):
        result = True
        # Validate type s1000, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 1000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s1000' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.CodeDocument is not None or
            self.Name is not None or
            self.Series is not None or
            self.Number is not None or
            self.Date is not None or
            self.IssueOrgan is not None or
            self.Desc is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='DocOut4:', namespacedef_='xmlns:DocOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/document-output/4.0.1" xmlns:dAlOut3="urn://x-artefacts-rosreestr-ru/commons/directories/all-documents-out/3.0.2"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tDocumentWithoutAppliedFile', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tDocumentWithoutAppliedFile')
        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 and name_ == 'tDocumentWithoutAppliedFile':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tDocumentWithoutAppliedFile')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tDocumentWithoutAppliedFile', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='DocOut4:', name_='tDocumentWithoutAppliedFile'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='DocOut4:', namespacedef_='xmlns:DocOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/document-output/4.0.1" xmlns:dAlOut3="urn://x-artefacts-rosreestr-ru/commons/directories/all-documents-out/3.0.2"  xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tDocumentWithoutAppliedFile', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CodeDocument is not None:
            namespaceprefix_ = self.CodeDocument_nsprefix_ + ':' if (UseCapturedNS_ and self.CodeDocument_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCodeDocument>%s</%sCodeDocument>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.CodeDocument), input_name='CodeDocument')), namespaceprefix_ , eol_))
        if self.Name is not None:
            namespaceprefix_ = self.Name_nsprefix_ + ':' if (UseCapturedNS_ and self.Name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sName>%s</%sName>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Name), input_name='Name')), namespaceprefix_ , eol_))
        if self.Series is not None:
            namespaceprefix_ = self.Series_nsprefix_ + ':' if (UseCapturedNS_ and self.Series_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sSeries>%s</%sSeries>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Series), input_name='Series')), namespaceprefix_ , eol_))
        if self.Number is not None:
            namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Number), input_name='Number')), namespaceprefix_ , eol_))
        if self.Date is not None:
            namespaceprefix_ = self.Date_nsprefix_ + ':' if (UseCapturedNS_ and self.Date_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDate>%s</%sDate>%s' % (namespaceprefix_ , self.gds_format_date(self.Date, input_name='Date'), namespaceprefix_ , eol_))
        if self.IssueOrgan is not None:
            namespaceprefix_ = self.IssueOrgan_nsprefix_ + ':' if (UseCapturedNS_ and self.IssueOrgan_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sIssueOrgan>%s</%sIssueOrgan>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.IssueOrgan), input_name='IssueOrgan')), namespaceprefix_ , eol_))
        if self.Desc is not None:
            namespaceprefix_ = self.Desc_nsprefix_ + ':' if (UseCapturedNS_ and self.Desc_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDesc>%s</%sDesc>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Desc), input_name='Desc')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'CodeDocument':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'CodeDocument')
            value_ = self.gds_validate_string(value_, node, 'CodeDocument')
            self.CodeDocument = value_
            self.CodeDocument_nsprefix_ = child_.prefix
            # validate type dAllDocuments
            self.validate_dAllDocuments(self.CodeDocument)
        elif nodeName_ == 'Name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Name')
            value_ = self.gds_validate_string(value_, node, 'Name')
            self.Name = value_
            self.Name_nsprefix_ = child_.prefix
            # validate type s500
            self.validate_s500(self.Name)
        elif nodeName_ == 'Series':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Series')
            value_ = self.gds_validate_string(value_, node, 'Series')
            self.Series = value_
            self.Series_nsprefix_ = child_.prefix
            # validate type s45
            self.validate_s45(self.Series)
        elif nodeName_ == 'Number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Number')
            value_ = self.gds_validate_string(value_, node, 'Number')
            self.Number = value_
            self.Number_nsprefix_ = child_.prefix
            # validate type s45
            self.validate_s45(self.Number)
        elif nodeName_ == 'Date':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.Date = dval_
            self.Date_nsprefix_ = child_.prefix
        elif nodeName_ == 'IssueOrgan':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'IssueOrgan')
            value_ = self.gds_validate_string(value_, node, 'IssueOrgan')
            self.IssueOrgan = value_
            self.IssueOrgan_nsprefix_ = child_.prefix
            # validate type s500
            self.validate_s500(self.IssueOrgan)
        elif nodeName_ == 'Desc':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Desc')
            value_ = self.gds_validate_string(value_, node, 'Desc')
            self.Desc = value_
            self.Desc_nsprefix_ = child_.prefix
            # validate type s1000
            self.validate_s1000(self.Desc)
# end class tDocumentWithoutAppliedFile


class CadastralBlocksType(GeneratedsSuper):
    """CadastralBlock -- К
    а
    д
    а
    с
    т
    р
    о
    в
    ы
    й
    к
    в
    а
    р
    т
    а
    л
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, CadastralBlock=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if CadastralBlock is None:
            self.CadastralBlock = []
        else:
            self.CadastralBlock = CadastralBlock
        self.CadastralBlock_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, CadastralBlocksType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if CadastralBlocksType.subclass:
            return CadastralBlocksType.subclass(*args_, **kwargs_)
        else:
            return CadastralBlocksType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_CadastralBlock(self):
        return self.CadastralBlock
    def set_CadastralBlock(self, CadastralBlock):
        self.CadastralBlock = CadastralBlock
    def add_CadastralBlock(self, value):
        self.CadastralBlock.append(value)
    def insert_CadastralBlock_at(self, index, value):
        self.CadastralBlock.insert(index, value)
    def replace_CadastralBlock_at(self, index, value):
        self.CadastralBlock[index] = value
    def _hasContent(self):
        if (
            self.CadastralBlock
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='CadastralBlocksType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('CadastralBlocksType')
        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 and name_ == 'CadastralBlocksType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='CadastralBlocksType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='CadastralBlocksType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='CadastralBlocksType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='CadastralBlocksType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for CadastralBlock_ in self.CadastralBlock:
            namespaceprefix_ = self.CadastralBlock_nsprefix_ + ':' if (UseCapturedNS_ and self.CadastralBlock_nsprefix_) else ''
            CadastralBlock_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='CadastralBlock', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'CadastralBlock':
            obj_ = tCadastralBlock.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.CadastralBlock.append(obj_)
            obj_.original_tagname_ = 'CadastralBlock'
# end class CadastralBlocksType


class ParcelsType(GeneratedsSuper):
    """Parcel -- З
    е
    м
    е
    л
    ь
    н
    ы
    й
    у
    ч
    а
    с
    т
    о
    к
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Parcel=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Parcel is None:
            self.Parcel = []
        else:
            self.Parcel = Parcel
        self.Parcel_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, ParcelsType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if ParcelsType.subclass:
            return ParcelsType.subclass(*args_, **kwargs_)
        else:
            return ParcelsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Parcel(self):
        return self.Parcel
    def set_Parcel(self, Parcel):
        self.Parcel = Parcel
    def add_Parcel(self, value):
        self.Parcel.append(value)
    def insert_Parcel_at(self, index, value):
        self.Parcel.insert(index, value)
    def replace_Parcel_at(self, index, value):
        self.Parcel[index] = value
    def _hasContent(self):
        if (
            self.Parcel
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ParcelsType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('ParcelsType')
        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 and name_ == 'ParcelsType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ParcelsType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='ParcelsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ParcelsType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ParcelsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Parcel_ in self.Parcel:
            namespaceprefix_ = self.Parcel_nsprefix_ + ':' if (UseCapturedNS_ and self.Parcel_nsprefix_) else ''
            Parcel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Parcel', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Parcel':
            obj_ = tParcel.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Parcel.append(obj_)
            obj_.original_tagname_ = 'Parcel'
# end class ParcelsType


class SpatialDataType(GeneratedsSuper):
    """EntitySpatial -- О
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    г
    р
    а
    н
    и
    ц
    Documents -- Д
    о
    к
    у
    м
    е
    н
    т
    ы
    -
    о
    с
    н
    о
    в
    а
    н
    и
    я
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntitySpatial=None, Documents=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.EntitySpatial = EntitySpatial
        self.EntitySpatial_nsprefix_ = None
        self.Documents = Documents
        self.Documents_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, SpatialDataType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if SpatialDataType.subclass:
            return SpatialDataType.subclass(*args_, **kwargs_)
        else:
            return SpatialDataType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_EntitySpatial(self):
        return self.EntitySpatial
    def set_EntitySpatial(self, EntitySpatial):
        self.EntitySpatial = EntitySpatial
    def get_Documents(self):
        return self.Documents
    def set_Documents(self, Documents):
        self.Documents = Documents
    def _hasContent(self):
        if (
            self.EntitySpatial is not None or
            self.Documents is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='SpatialDataType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('SpatialDataType')
        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 and name_ == 'SpatialDataType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpatialDataType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='SpatialDataType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpatialDataType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='SpatialDataType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EntitySpatial is not None:
            namespaceprefix_ = self.EntitySpatial_nsprefix_ + ':' if (UseCapturedNS_ and self.EntitySpatial_nsprefix_) else ''
            self.EntitySpatial.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EntitySpatial', pretty_print=pretty_print)
        if self.Documents is not None:
            namespaceprefix_ = self.Documents_nsprefix_ + ':' if (UseCapturedNS_ and self.Documents_nsprefix_) else ''
            self.Documents.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Documents', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'EntitySpatial':
            obj_ = tEntitySpatialLandOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.EntitySpatial = obj_
            obj_.original_tagname_ = 'EntitySpatial'
        elif nodeName_ == 'Documents':
            obj_ = DocumentsType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Documents = obj_
            obj_.original_tagname_ = 'Documents'
# end class SpatialDataType


class DocumentsType(GeneratedsSuper):
    """Document -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    и
    р
    е
    к
    в
    и
    з
    и
    т
    ы
    д
    о
    к
    у
    м
    е
    н
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Document=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Document is None:
            self.Document = []
        else:
            self.Document = Document
        self.Document_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, DocumentsType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if DocumentsType.subclass:
            return DocumentsType.subclass(*args_, **kwargs_)
        else:
            return DocumentsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Document(self):
        return self.Document
    def set_Document(self, Document):
        self.Document = Document
    def add_Document(self, value):
        self.Document.append(value)
    def insert_Document_at(self, index, value):
        self.Document.insert(index, value)
    def replace_Document_at(self, index, value):
        self.Document[index] = value
    def _hasContent(self):
        if (
            self.Document
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:DocOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/document-output/4.0.1" ', name_='DocumentsType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('DocumentsType')
        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 and name_ == 'DocumentsType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DocumentsType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='DocumentsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='DocumentsType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:DocOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/document-output/4.0.1" ', name_='DocumentsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Document_ in self.Document:
            namespaceprefix_ = self.Document_nsprefix_ + ':' if (UseCapturedNS_ and self.Document_nsprefix_) else ''
            Document_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Document', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Document':
            obj_ = tDocumentWithoutAppliedFile.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Document.append(obj_)
            obj_.original_tagname_ = 'Document'
# end class DocumentsType


class BoundsType(GeneratedsSuper):
    """Bound -- Г
    р
    а
    н
    и
    ц
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Bound=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Bound is None:
            self.Bound = []
        else:
            self.Bound = Bound
        self.Bound_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, BoundsType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if BoundsType.subclass:
            return BoundsType.subclass(*args_, **kwargs_)
        else:
            return BoundsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Bound(self):
        return self.Bound
    def set_Bound(self, Bound):
        self.Bound = Bound
    def add_Bound(self, value):
        self.Bound.append(value)
    def insert_Bound_at(self, index, value):
        self.Bound.insert(index, value)
    def replace_Bound_at(self, index, value):
        self.Bound[index] = value
    def _hasContent(self):
        if (
            self.Bound
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BoundsType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('BoundsType')
        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 and name_ == 'BoundsType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BoundsType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BoundsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BoundsType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BoundsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Bound_ in self.Bound:
            namespaceprefix_ = self.Bound_nsprefix_ + ':' if (UseCapturedNS_ and self.Bound_nsprefix_) else ''
            Bound_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Bound', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Bound':
            obj_ = BoundType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Bound.append(obj_)
            obj_.original_tagname_ = 'Bound'
# end class BoundsType


class BoundType(GeneratedsSuper):
    """Description -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    о
    б
    ъ
    е
    к
    т
    а
    з
    е
    м
    л
    е
    у
    с
    т
    р
    о
    й
    с
    т
    в
    а
    AccountNumber -- У
    ч
    ё
    т
    н
    ы
    й
    н
    о
    м
    е
    р
    Boundaries -- У
    ч
    а
    с
    т
    к
    и
    г
    р
    а
    н
    и
    ц
    ы
    (
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    е
    г
    р
    а
    н
    и
    ц
    )
    Documents -- Д
    о
    к
    у
    м
    е
    н
    т
    ы
    -
    о
    с
    н
    о
    в
    а
    н
    и
    я
    SubjectsBoundary -- Г
    р
    а
    н
    и
    ц
    а
    м
    е
    ж
    д
    у
    с
    у
    б
    ъ
    е
    к
    т
    а
    м
    и
    Р
    о
    с
    с
    и
    й
    с
    к
    о
    й
    Ф
    е
    д
    е
    р
    а
    ц
    и
    и
    (
    н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    с
    у
    б
    ъ
    е
    к
    т
    о
    в
    Р
    Ф
    )
    MunicipalBoundary -- Г
    р
    а
    н
    и
    ц
    а
    м
    у
    н
    и
    ц
    и
    п
    а
    л
    ь
    н
    о
    г
    о
    о
    б
    р
    а
    з
    о
    в
    а
    н
    и
    я
    (
    н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    м
    у
    н
    и
    ц
    и
    п
    а
    л
    ь
    н
    о
    г
    о
    о
    б
    р
    а
    з
    о
    в
    а
    н
    и
    я
    )
    InhabitedLocalityBoundary -- Г
    р
    а
    н
    и
    ц
    а
    н
    а
    с
    е
    л
    е
    н
    н
    о
    г
    о
    п
    у
    н
    к
    т
    а
    (
    н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    н
    а
    с
    е
    л
    е
    н
    н
    о
    г
    о
    п
    у
    н
    к
    т
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Description=None, AccountNumber=None, Boundaries=None, Documents=None, SubjectsBoundary=None, MunicipalBoundary=None, InhabitedLocalityBoundary=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Description = Description
        self.validate_s1000(self.Description)
        self.Description_nsprefix_ = None
        self.AccountNumber = AccountNumber
        self.validate_s255(self.AccountNumber)
        self.AccountNumber_nsprefix_ = None
        self.Boundaries = Boundaries
        self.Boundaries_nsprefix_ = None
        self.Documents = Documents
        self.Documents_nsprefix_ = None
        self.SubjectsBoundary = SubjectsBoundary
        self.SubjectsBoundary_nsprefix_ = None
        self.MunicipalBoundary = MunicipalBoundary
        self.MunicipalBoundary_nsprefix_ = None
        self.InhabitedLocalityBoundary = InhabitedLocalityBoundary
        self.InhabitedLocalityBoundary_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, BoundType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if BoundType.subclass:
            return BoundType.subclass(*args_, **kwargs_)
        else:
            return BoundType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Description(self):
        return self.Description
    def set_Description(self, Description):
        self.Description = Description
    def get_AccountNumber(self):
        return self.AccountNumber
    def set_AccountNumber(self, AccountNumber):
        self.AccountNumber = AccountNumber
    def get_Boundaries(self):
        return self.Boundaries
    def set_Boundaries(self, Boundaries):
        self.Boundaries = Boundaries
    def get_Documents(self):
        return self.Documents
    def set_Documents(self, Documents):
        self.Documents = Documents
    def get_SubjectsBoundary(self):
        return self.SubjectsBoundary
    def set_SubjectsBoundary(self, SubjectsBoundary):
        self.SubjectsBoundary = SubjectsBoundary
    def get_MunicipalBoundary(self):
        return self.MunicipalBoundary
    def set_MunicipalBoundary(self, MunicipalBoundary):
        self.MunicipalBoundary = MunicipalBoundary
    def get_InhabitedLocalityBoundary(self):
        return self.InhabitedLocalityBoundary
    def set_InhabitedLocalityBoundary(self, InhabitedLocalityBoundary):
        self.InhabitedLocalityBoundary = InhabitedLocalityBoundary
    def validate_s1000(self, value):
        result = True
        # Validate type s1000, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 1000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s1000' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s255(self, value):
        result = True
        # Validate type s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.Description is not None or
            self.AccountNumber is not None or
            self.Boundaries is not None or
            self.Documents is not None or
            self.SubjectsBoundary is not None or
            self.MunicipalBoundary is not None or
            self.InhabitedLocalityBoundary is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BoundType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('BoundType')
        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 and name_ == 'BoundType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BoundType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BoundType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BoundType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BoundType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Description is not None:
            namespaceprefix_ = self.Description_nsprefix_ + ':' if (UseCapturedNS_ and self.Description_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDescription>%s</%sDescription>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Description), input_name='Description')), namespaceprefix_ , eol_))
        if self.AccountNumber is not None:
            namespaceprefix_ = self.AccountNumber_nsprefix_ + ':' if (UseCapturedNS_ and self.AccountNumber_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAccountNumber>%s</%sAccountNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.AccountNumber), input_name='AccountNumber')), namespaceprefix_ , eol_))
        if self.Boundaries is not None:
            namespaceprefix_ = self.Boundaries_nsprefix_ + ':' if (UseCapturedNS_ and self.Boundaries_nsprefix_) else ''
            self.Boundaries.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Boundaries', pretty_print=pretty_print)
        if self.Documents is not None:
            namespaceprefix_ = self.Documents_nsprefix_ + ':' if (UseCapturedNS_ and self.Documents_nsprefix_) else ''
            self.Documents.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Documents', pretty_print=pretty_print)
        if self.SubjectsBoundary is not None:
            namespaceprefix_ = self.SubjectsBoundary_nsprefix_ + ':' if (UseCapturedNS_ and self.SubjectsBoundary_nsprefix_) else ''
            self.SubjectsBoundary.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SubjectsBoundary', pretty_print=pretty_print)
        if self.MunicipalBoundary is not None:
            namespaceprefix_ = self.MunicipalBoundary_nsprefix_ + ':' if (UseCapturedNS_ and self.MunicipalBoundary_nsprefix_) else ''
            self.MunicipalBoundary.export(outfile, level, namespaceprefix_, namespacedef_='', name_='MunicipalBoundary', pretty_print=pretty_print)
        if self.InhabitedLocalityBoundary is not None:
            namespaceprefix_ = self.InhabitedLocalityBoundary_nsprefix_ + ':' if (UseCapturedNS_ and self.InhabitedLocalityBoundary_nsprefix_) else ''
            self.InhabitedLocalityBoundary.export(outfile, level, namespaceprefix_, namespacedef_='', name_='InhabitedLocalityBoundary', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Description':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Description')
            value_ = self.gds_validate_string(value_, node, 'Description')
            self.Description = value_
            self.Description_nsprefix_ = child_.prefix
            # validate type s1000
            self.validate_s1000(self.Description)
        elif nodeName_ == 'AccountNumber':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'AccountNumber')
            value_ = self.gds_validate_string(value_, node, 'AccountNumber')
            self.AccountNumber = value_
            self.AccountNumber_nsprefix_ = child_.prefix
            # validate type s255
            self.validate_s255(self.AccountNumber)
        elif nodeName_ == 'Boundaries':
            obj_ = BoundariesType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Boundaries = obj_
            obj_.original_tagname_ = 'Boundaries'
        elif nodeName_ == 'Documents':
            obj_ = DocumentsType2.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Documents = obj_
            obj_.original_tagname_ = 'Documents'
        elif nodeName_ == 'SubjectsBoundary':
            obj_ = SubjectsBoundaryType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SubjectsBoundary = obj_
            obj_.original_tagname_ = 'SubjectsBoundary'
        elif nodeName_ == 'MunicipalBoundary':
            obj_ = tName.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.MunicipalBoundary = obj_
            obj_.original_tagname_ = 'MunicipalBoundary'
        elif nodeName_ == 'InhabitedLocalityBoundary':
            obj_ = tName.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.InhabitedLocalityBoundary = obj_
            obj_.original_tagname_ = 'InhabitedLocalityBoundary'
# end class BoundType


class BoundariesType(GeneratedsSuper):
    """Boundary -- У
    ч
    а
    с
    т
    о
    к
    г
    р
    а
    н
    и
    ц
    ы
    (
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    е
    г
    р
    а
    н
    и
    ц
    ы
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Boundary=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Boundary is None:
            self.Boundary = []
        else:
            self.Boundary = Boundary
        self.Boundary_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, BoundariesType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if BoundariesType.subclass:
            return BoundariesType.subclass(*args_, **kwargs_)
        else:
            return BoundariesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Boundary(self):
        return self.Boundary
    def set_Boundary(self, Boundary):
        self.Boundary = Boundary
    def add_Boundary(self, value):
        self.Boundary.append(value)
    def insert_Boundary_at(self, index, value):
        self.Boundary.insert(index, value)
    def replace_Boundary_at(self, index, value):
        self.Boundary[index] = value
    def _hasContent(self):
        if (
            self.Boundary
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BoundariesType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('BoundariesType')
        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 and name_ == 'BoundariesType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BoundariesType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BoundariesType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BoundariesType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BoundariesType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Boundary_ in self.Boundary:
            namespaceprefix_ = self.Boundary_nsprefix_ + ':' if (UseCapturedNS_ and self.Boundary_nsprefix_) else ''
            Boundary_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Boundary', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Boundary':
            obj_ = BoundaryType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Boundary.append(obj_)
            obj_.original_tagname_ = 'Boundary'
# end class BoundariesType


class BoundaryType(GeneratedsSuper):
    """EntitySpatial -- О
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    г
    р
    а
    н
    и
    ц
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, EntitySpatial=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.EntitySpatial = EntitySpatial
        self.EntitySpatial_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, BoundaryType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if BoundaryType.subclass:
            return BoundaryType.subclass(*args_, **kwargs_)
        else:
            return BoundaryType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_EntitySpatial(self):
        return self.EntitySpatial
    def set_EntitySpatial(self, EntitySpatial):
        self.EntitySpatial = EntitySpatial
    def _hasContent(self):
        if (
            self.EntitySpatial is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='BoundaryType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('BoundaryType')
        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 and name_ == 'BoundaryType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BoundaryType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BoundaryType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BoundaryType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='BoundaryType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EntitySpatial is not None:
            namespaceprefix_ = self.EntitySpatial_nsprefix_ + ':' if (UseCapturedNS_ and self.EntitySpatial_nsprefix_) else ''
            self.EntitySpatial.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EntitySpatial', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'EntitySpatial':
            obj_ = tEntitySpatialLandOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.EntitySpatial = obj_
            obj_.original_tagname_ = 'EntitySpatial'
# end class BoundaryType


class DocumentsType2(GeneratedsSuper):
    """Document -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    и
    р
    е
    к
    в
    и
    з
    и
    т
    ы
    д
    о
    к
    у
    м
    е
    н
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Document=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Document is None:
            self.Document = []
        else:
            self.Document = Document
        self.Document_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, DocumentsType2)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if DocumentsType2.subclass:
            return DocumentsType2.subclass(*args_, **kwargs_)
        else:
            return DocumentsType2(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Document(self):
        return self.Document
    def set_Document(self, Document):
        self.Document = Document
    def add_Document(self, value):
        self.Document.append(value)
    def insert_Document_at(self, index, value):
        self.Document.insert(index, value)
    def replace_Document_at(self, index, value):
        self.Document[index] = value
    def _hasContent(self):
        if (
            self.Document
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:DocOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/document-output/4.0.1" ', name_='DocumentsType2', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('DocumentsType2')
        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 and name_ == 'DocumentsType2':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DocumentsType2')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='DocumentsType2', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='DocumentsType2'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:DocOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/document-output/4.0.1" ', name_='DocumentsType2', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Document_ in self.Document:
            namespaceprefix_ = self.Document_nsprefix_ + ':' if (UseCapturedNS_ and self.Document_nsprefix_) else ''
            Document_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Document', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Document':
            obj_ = tDocumentWithoutAppliedFile.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Document.append(obj_)
            obj_.original_tagname_ = 'Document'
# end class DocumentsType2


class SubjectsBoundaryType(GeneratedsSuper):
    """NameNeighbours -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    с
    м
    е
    ж
    н
    о
    г
    о
    с
    у
    б
    ъ
    е
    к
    т
    а
    Р
    о
    с
    с
    и
    й
    с
    к
    о
    й
    Ф
    е
    д
    е
    р
    а
    ц
    и
    и
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, NameNeighbours=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if NameNeighbours is None:
            self.NameNeighbours = []
        else:
            self.NameNeighbours = NameNeighbours
        self.NameNeighbours_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, SubjectsBoundaryType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if SubjectsBoundaryType.subclass:
            return SubjectsBoundaryType.subclass(*args_, **kwargs_)
        else:
            return SubjectsBoundaryType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_NameNeighbours(self):
        return self.NameNeighbours
    def set_NameNeighbours(self, NameNeighbours):
        self.NameNeighbours = NameNeighbours
    def add_NameNeighbours(self, value):
        self.NameNeighbours.append(value)
    def insert_NameNeighbours_at(self, index, value):
        self.NameNeighbours.insert(index, value)
    def replace_NameNeighbours_at(self, index, value):
        self.NameNeighbours[index] = value
    def validate_s255(self, value):
        result = True
        # Validate type s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.NameNeighbours
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='SubjectsBoundaryType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('SubjectsBoundaryType')
        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 and name_ == 'SubjectsBoundaryType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SubjectsBoundaryType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='SubjectsBoundaryType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SubjectsBoundaryType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='SubjectsBoundaryType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for NameNeighbours_ in self.NameNeighbours:
            namespaceprefix_ = self.NameNeighbours_nsprefix_ + ':' if (UseCapturedNS_ and self.NameNeighbours_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNameNeighbours>%s</%sNameNeighbours>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(NameNeighbours_), input_name='NameNeighbours')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'NameNeighbours':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'NameNeighbours')
            value_ = self.gds_validate_string(value_, node, 'NameNeighbours')
            self.NameNeighbours.append(value_)
            self.NameNeighbours_nsprefix_ = child_.prefix
            # validate type s255
            self.validate_s255(self.NameNeighbours[-1])
# end class SubjectsBoundaryType


class ZonesType(GeneratedsSuper):
    """Zone -- О
    п
    и
    с
    а
    н
    и
    е
    з
    о
    н
    ы
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Zone=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Zone is None:
            self.Zone = []
        else:
            self.Zone = Zone
        self.Zone_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, ZonesType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if ZonesType.subclass:
            return ZonesType.subclass(*args_, **kwargs_)
        else:
            return ZonesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Zone(self):
        return self.Zone
    def set_Zone(self, Zone):
        self.Zone = Zone
    def add_Zone(self, value):
        self.Zone.append(value)
    def insert_Zone_at(self, index, value):
        self.Zone.insert(index, value)
    def replace_Zone_at(self, index, value):
        self.Zone[index] = value
    def _hasContent(self):
        if (
            self.Zone
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ZonesType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('ZonesType')
        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 and name_ == 'ZonesType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ZonesType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='ZonesType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ZonesType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ZonesType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Zone_ in self.Zone:
            namespaceprefix_ = self.Zone_nsprefix_ + ':' if (UseCapturedNS_ and self.Zone_nsprefix_) else ''
            Zone_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Zone', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Zone':
            obj_ = ZoneType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Zone.append(obj_)
            obj_.original_tagname_ = 'Zone'
# end class ZonesType


class ZoneType(GeneratedsSuper):
    """Description -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    о
    б
    ъ
    е
    к
    т
    а
    з
    е
    м
    л
    е
    у
    с
    т
    р
    о
    й
    с
    т
    в
    а
    AccountNumber -- У
    ч
    ё
    т
    н
    ы
    й
    н
    о
    м
    е
    р
    EntitySpatial -- О
    п
    и
    с
    а
    н
    и
    е
    м
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    г
    р
    а
    н
    и
    ц
    Documents -- Д
    о
    к
    у
    м
    е
    н
    т
    ы
    -
    о
    с
    н
    о
    в
    а
    н
    и
    я
    TerritorialZone -- Т
    е
    р
    р
    и
    т
    о
    р
    и
    а
    л
    ь
    н
    а
    я
    з
    о
    н
    а
    SpecialZone -- З
    о
    н
    а
    с
    о
    с
    о
    б
    ы
    м
    и
    у
    с
    л
    о
    в
    и
    я
    м
    и
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    т
    е
    р
    р
    и
    т
    о
    р
    и
    й
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Description=None, AccountNumber=None, EntitySpatial=None, Documents=None, TerritorialZone=None, SpecialZone=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Description = Description
        self.validate_s1000(self.Description)
        self.Description_nsprefix_ = None
        self.AccountNumber = AccountNumber
        self.validate_s255(self.AccountNumber)
        self.AccountNumber_nsprefix_ = None
        self.EntitySpatial = EntitySpatial
        self.EntitySpatial_nsprefix_ = None
        self.Documents = Documents
        self.Documents_nsprefix_ = None
        self.TerritorialZone = TerritorialZone
        self.TerritorialZone_nsprefix_ = None
        self.SpecialZone = SpecialZone
        self.SpecialZone_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, ZoneType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if ZoneType.subclass:
            return ZoneType.subclass(*args_, **kwargs_)
        else:
            return ZoneType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Description(self):
        return self.Description
    def set_Description(self, Description):
        self.Description = Description
    def get_AccountNumber(self):
        return self.AccountNumber
    def set_AccountNumber(self, AccountNumber):
        self.AccountNumber = AccountNumber
    def get_EntitySpatial(self):
        return self.EntitySpatial
    def set_EntitySpatial(self, EntitySpatial):
        self.EntitySpatial = EntitySpatial
    def get_Documents(self):
        return self.Documents
    def set_Documents(self, Documents):
        self.Documents = Documents
    def get_TerritorialZone(self):
        return self.TerritorialZone
    def set_TerritorialZone(self, TerritorialZone):
        self.TerritorialZone = TerritorialZone
    def get_SpecialZone(self):
        return self.SpecialZone
    def set_SpecialZone(self, SpecialZone):
        self.SpecialZone = SpecialZone
    def validate_s1000(self, value):
        result = True
        # Validate type s1000, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 1000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s1000' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_s255(self, value):
        result = True
        # Validate type s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.Description is not None or
            self.AccountNumber is not None or
            self.EntitySpatial is not None or
            self.Documents is not None or
            self.TerritorialZone is not None or
            self.SpecialZone is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ZoneType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('ZoneType')
        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 and name_ == 'ZoneType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ZoneType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='ZoneType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ZoneType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1"  xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ZoneType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Description is not None:
            namespaceprefix_ = self.Description_nsprefix_ + ':' if (UseCapturedNS_ and self.Description_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDescription>%s</%sDescription>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Description), input_name='Description')), namespaceprefix_ , eol_))
        if self.AccountNumber is not None:
            namespaceprefix_ = self.AccountNumber_nsprefix_ + ':' if (UseCapturedNS_ and self.AccountNumber_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAccountNumber>%s</%sAccountNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.AccountNumber), input_name='AccountNumber')), namespaceprefix_ , eol_))
        if self.EntitySpatial is not None:
            namespaceprefix_ = self.EntitySpatial_nsprefix_ + ':' if (UseCapturedNS_ and self.EntitySpatial_nsprefix_) else ''
            self.EntitySpatial.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EntitySpatial', pretty_print=pretty_print)
        if self.Documents is not None:
            namespaceprefix_ = self.Documents_nsprefix_ + ':' if (UseCapturedNS_ and self.Documents_nsprefix_) else ''
            self.Documents.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Documents', pretty_print=pretty_print)
        if self.TerritorialZone is not None:
            namespaceprefix_ = self.TerritorialZone_nsprefix_ + ':' if (UseCapturedNS_ and self.TerritorialZone_nsprefix_) else ''
            self.TerritorialZone.export(outfile, level, namespaceprefix_, namespacedef_='', name_='TerritorialZone', pretty_print=pretty_print)
        if self.SpecialZone is not None:
            namespaceprefix_ = self.SpecialZone_nsprefix_ + ':' if (UseCapturedNS_ and self.SpecialZone_nsprefix_) else ''
            self.SpecialZone.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpecialZone', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Description':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Description')
            value_ = self.gds_validate_string(value_, node, 'Description')
            self.Description = value_
            self.Description_nsprefix_ = child_.prefix
            # validate type s1000
            self.validate_s1000(self.Description)
        elif nodeName_ == 'AccountNumber':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'AccountNumber')
            value_ = self.gds_validate_string(value_, node, 'AccountNumber')
            self.AccountNumber = value_
            self.AccountNumber_nsprefix_ = child_.prefix
            # validate type s255
            self.validate_s255(self.AccountNumber)
        elif nodeName_ == 'EntitySpatial':
            obj_ = tEntitySpatialLandOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.EntitySpatial = obj_
            obj_.original_tagname_ = 'EntitySpatial'
        elif nodeName_ == 'Documents':
            obj_ = DocumentsType3.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Documents = obj_
            obj_.original_tagname_ = 'Documents'
        elif nodeName_ == 'TerritorialZone':
            obj_ = tTerritorialZone.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.TerritorialZone = obj_
            obj_.original_tagname_ = 'TerritorialZone'
        elif nodeName_ == 'SpecialZone':
            obj_ = tSpecialZones.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.SpecialZone = obj_
            obj_.original_tagname_ = 'SpecialZone'
# end class ZoneType


class DocumentsType3(GeneratedsSuper):
    """Document -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    и
    р
    е
    к
    в
    и
    з
    и
    т
    ы
    д
    о
    к
    у
    м
    е
    н
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Document=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Document is None:
            self.Document = []
        else:
            self.Document = Document
        self.Document_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, DocumentsType3)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if DocumentsType3.subclass:
            return DocumentsType3.subclass(*args_, **kwargs_)
        else:
            return DocumentsType3(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Document(self):
        return self.Document
    def set_Document(self, Document):
        self.Document = Document
    def add_Document(self, value):
        self.Document.append(value)
    def insert_Document_at(self, index, value):
        self.Document.insert(index, value)
    def replace_Document_at(self, index, value):
        self.Document[index] = value
    def _hasContent(self):
        if (
            self.Document
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:DocOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/document-output/4.0.1" ', name_='DocumentsType3', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('DocumentsType3')
        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 and name_ == 'DocumentsType3':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DocumentsType3')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='DocumentsType3', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='DocumentsType3'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:DocOut4="urn://x-artefacts-rosreestr-ru/commons/complex-types/document-output/4.0.1" ', name_='DocumentsType3', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Document_ in self.Document:
            namespaceprefix_ = self.Document_nsprefix_ + ':' if (UseCapturedNS_ and self.Document_nsprefix_) else ''
            Document_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Document', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Document':
            obj_ = tDocumentWithoutAppliedFile.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Document.append(obj_)
            obj_.original_tagname_ = 'Document'
# end class DocumentsType3


class ContoursType(GeneratedsSuper):
    """Contour -- К
    о
    н
    т
    у
    р
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Contour=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Contour is None:
            self.Contour = []
        else:
            self.Contour = Contour
        self.Contour_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, ContoursType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if ContoursType.subclass:
            return ContoursType.subclass(*args_, **kwargs_)
        else:
            return ContoursType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Contour(self):
        return self.Contour
    def set_Contour(self, Contour):
        self.Contour = Contour
    def add_Contour(self, value):
        self.Contour.append(value)
    def insert_Contour_at(self, index, value):
        self.Contour.insert(index, value)
    def replace_Contour_at(self, index, value):
        self.Contour[index] = value
    def _hasContent(self):
        if (
            self.Contour
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ContoursType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('ContoursType')
        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 and name_ == 'ContoursType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ContoursType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='ContoursType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ContoursType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ContoursType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Contour_ in self.Contour:
            namespaceprefix_ = self.Contour_nsprefix_ + ':' if (UseCapturedNS_ and self.Contour_nsprefix_) else ''
            Contour_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Contour', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Contour':
            obj_ = tContour.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Contour.append(obj_)
            obj_.original_tagname_ = 'Contour'
# end class ContoursType


class OMSPointType(GeneratedsSuper):
    """PNmb -- Н
    о
    м
    е
    р
    п
    у
    н
    к
    т
    а
    о
    п
    о
    р
    н
    о
    й
    м
    е
    ж
    е
    в
    о
    й
    с
    е
    т
    и
    н
    а
    п
    л
    а
    н
    е
    PName -- Н
    а
    з
    в
    а
    н
    и
    е
    и
    т
    и
    п
    п
    у
    н
    к
    т
    а
    PKlass -- К
    л
    а
    с
    с
    г
    е
    о
    д
    е
    з
    и
    ч
    е
    с
    к
    о
    й
    с
    е
    т
    и
    OrdX -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    Х
    OrdY -- К
    о
    о
    р
    д
    и
    н
    а
    т
    а
    У
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, PNmb=None, PName=None, PKlass=None, OrdX=None, OrdY=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.PNmb = PNmb
        self.validate_s4000(self.PNmb)
        self.PNmb_nsprefix_ = None
        self.PName = PName
        self.validate_s4000(self.PName)
        self.PName_nsprefix_ = None
        self.PKlass = PKlass
        self.validate_s4000(self.PKlass)
        self.PKlass_nsprefix_ = None
        self.OrdX = OrdX
        self.validate_d38_2(self.OrdX)
        self.OrdX_nsprefix_ = None
        self.OrdY = OrdY
        self.validate_d38_2(self.OrdY)
        self.OrdY_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, OMSPointType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if OMSPointType.subclass:
            return OMSPointType.subclass(*args_, **kwargs_)
        else:
            return OMSPointType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_PNmb(self):
        return self.PNmb
    def set_PNmb(self, PNmb):
        self.PNmb = PNmb
    def get_PName(self):
        return self.PName
    def set_PName(self, PName):
        self.PName = PName
    def get_PKlass(self):
        return self.PKlass
    def set_PKlass(self, PKlass):
        self.PKlass = PKlass
    def get_OrdX(self):
        return self.OrdX
    def set_OrdX(self, OrdX):
        self.OrdX = OrdX
    def get_OrdY(self):
        return self.OrdY
    def set_OrdY(self, OrdY):
        self.OrdY = OrdY
    def validate_s4000(self, value):
        result = True
        # Validate type s4000, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 4000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s4000' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_d38_2(self, value):
        result = True
        # Validate type d38_2, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 38:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on d38_2' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.PNmb is not None or
            self.PName is not None or
            self.PKlass is not None or
            self.OrdX is not None or
            self.OrdY is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='OMSPointType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('OMSPointType')
        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 and name_ == 'OMSPointType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OMSPointType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='OMSPointType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OMSPointType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='OMSPointType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PNmb is not None:
            namespaceprefix_ = self.PNmb_nsprefix_ + ':' if (UseCapturedNS_ and self.PNmb_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPNmb>%s</%sPNmb>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.PNmb), input_name='PNmb')), namespaceprefix_ , eol_))
        if self.PName is not None:
            namespaceprefix_ = self.PName_nsprefix_ + ':' if (UseCapturedNS_ and self.PName_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPName>%s</%sPName>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.PName), input_name='PName')), namespaceprefix_ , eol_))
        if self.PKlass is not None:
            namespaceprefix_ = self.PKlass_nsprefix_ + ':' if (UseCapturedNS_ and self.PKlass_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPKlass>%s</%sPKlass>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.PKlass), input_name='PKlass')), namespaceprefix_ , eol_))
        if self.OrdX is not None:
            namespaceprefix_ = self.OrdX_nsprefix_ + ':' if (UseCapturedNS_ and self.OrdX_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOrdX>%s</%sOrdX>%s' % (namespaceprefix_ , self.gds_format_decimal(self.OrdX, input_name='OrdX'), namespaceprefix_ , eol_))
        if self.OrdY is not None:
            namespaceprefix_ = self.OrdY_nsprefix_ + ':' if (UseCapturedNS_ and self.OrdY_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sOrdY>%s</%sOrdY>%s' % (namespaceprefix_ , self.gds_format_decimal(self.OrdY, input_name='OrdY'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'PNmb':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'PNmb')
            value_ = self.gds_validate_string(value_, node, 'PNmb')
            self.PNmb = value_
            self.PNmb_nsprefix_ = child_.prefix
            # validate type s4000
            self.validate_s4000(self.PNmb)
        elif nodeName_ == 'PName':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'PName')
            value_ = self.gds_validate_string(value_, node, 'PName')
            self.PName = value_
            self.PName_nsprefix_ = child_.prefix
            # validate type s4000
            self.validate_s4000(self.PName)
        elif nodeName_ == 'PKlass':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'PKlass')
            value_ = self.gds_validate_string(value_, node, 'PKlass')
            self.PKlass = value_
            self.PKlass_nsprefix_ = child_.prefix
            # validate type s4000
            self.validate_s4000(self.PKlass)
        elif nodeName_ == 'OrdX' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'OrdX')
            fval_ = self.gds_validate_decimal(fval_, node, 'OrdX')
            self.OrdX = fval_
            self.OrdX_nsprefix_ = child_.prefix
            # validate type d38_2
            self.validate_d38_2(self.OrdX)
        elif nodeName_ == 'OrdY' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'OrdY')
            fval_ = self.gds_validate_decimal(fval_, node, 'OrdY')
            self.OrdY = fval_
            self.OrdY_nsprefix_ = child_.prefix
            # validate type d38_2
            self.validate_d38_2(self.OrdY)
# end class OMSPointType


class ObjectRealtyType(GeneratedsSuper):
    """Building -- З
    д
    а
    н
    и
    е
    Construction -- С
    о
    о
    р
    у
    ж
    е
    н
    и
    е
    Uncompleted -- О
    б
    ъ
    е
    к
    т
    н
    е
    з
    а
    в
    е
    р
    ш
    е
    н
    н
    о
    г
    о
    с
    т
    р
    о
    и
    т
    е
    л
    ь
    с
    т
    в
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Building=None, Construction=None, Uncompleted=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Building = Building
        self.Building_nsprefix_ = None
        self.Construction = Construction
        self.Construction_nsprefix_ = None
        self.Uncompleted = Uncompleted
        self.Uncompleted_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, ObjectRealtyType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if ObjectRealtyType.subclass:
            return ObjectRealtyType.subclass(*args_, **kwargs_)
        else:
            return ObjectRealtyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Building(self):
        return self.Building
    def set_Building(self, Building):
        self.Building = Building
    def get_Construction(self):
        return self.Construction
    def set_Construction(self, Construction):
        self.Construction = Construction
    def get_Uncompleted(self):
        return self.Uncompleted
    def set_Uncompleted(self, Uncompleted):
        self.Uncompleted = Uncompleted
    def _hasContent(self):
        if (
            self.Building is not None or
            self.Construction is not None or
            self.Uncompleted is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ObjectRealtyType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('ObjectRealtyType')
        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 and name_ == 'ObjectRealtyType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ObjectRealtyType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='ObjectRealtyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ObjectRealtyType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ObjectRealtyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Building is not None:
            namespaceprefix_ = self.Building_nsprefix_ + ':' if (UseCapturedNS_ and self.Building_nsprefix_) else ''
            self.Building.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Building', pretty_print=pretty_print)
        if self.Construction is not None:
            namespaceprefix_ = self.Construction_nsprefix_ + ':' if (UseCapturedNS_ and self.Construction_nsprefix_) else ''
            self.Construction.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Construction', pretty_print=pretty_print)
        if self.Uncompleted is not None:
            namespaceprefix_ = self.Uncompleted_nsprefix_ + ':' if (UseCapturedNS_ and self.Uncompleted_nsprefix_) else ''
            self.Uncompleted.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Uncompleted', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Building':
            obj_ = tBuilding.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Building = obj_
            obj_.original_tagname_ = 'Building'
        elif nodeName_ == 'Construction':
            obj_ = ConstructionType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Construction = obj_
            obj_.original_tagname_ = 'Construction'
        elif nodeName_ == 'Uncompleted':
            obj_ = tUncompleted.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Uncompleted = obj_
            obj_.original_tagname_ = 'Uncompleted'
# end class ObjectRealtyType


class ConstructionType(tConstruction):
    """ConditionalPartLinear -- У
    с
    л
    о
    в
    н
    а
    я
    ч
    а
    с
    т
    ь
    л
    и
    н
    е
    й
    н
    о
    г
    о
    с
    о
    о
    р
    у
    ж
    е
    н
    и
    я
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tConstruction
    def __init__(self, CadastralNumber=None, ObjectType=None, AssignationName=None, KeyParameters=None, Address=None, CadastralCost=None, EntitySpatial=None, ConditionalPartLinear=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("ConstructionType"), self).__init__(CadastralNumber, ObjectType, AssignationName, KeyParameters, Address, CadastralCost, EntitySpatial,  **kwargs_)
        self.ConditionalPartLinear = ConditionalPartLinear
        self.ConditionalPartLinear_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, ConstructionType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if ConstructionType.subclass:
            return ConstructionType.subclass(*args_, **kwargs_)
        else:
            return ConstructionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_ConditionalPartLinear(self):
        return self.ConditionalPartLinear
    def set_ConditionalPartLinear(self, ConditionalPartLinear):
        self.ConditionalPartLinear = ConditionalPartLinear
    def _hasContent(self):
        if (
            self.ConditionalPartLinear is not None or
            super(ConstructionType, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ConstructionType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('ConstructionType')
        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 and name_ == 'ConstructionType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ConstructionType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='ConstructionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ConstructionType'):
        super(ConstructionType, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ConstructionType')
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='ConstructionType', fromsubclass_=False, pretty_print=True):
        super(ConstructionType, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ConditionalPartLinear is not None:
            namespaceprefix_ = self.ConditionalPartLinear_nsprefix_ + ':' if (UseCapturedNS_ and self.ConditionalPartLinear_nsprefix_) else ''
            self.ConditionalPartLinear.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ConditionalPartLinear', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(ConstructionType, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'ConditionalPartLinear':
            obj_ = tConditionalPartLinear.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.ConditionalPartLinear = obj_
            obj_.original_tagname_ = 'ConditionalPartLinear'
        super(ConstructionType, self)._buildChildren(child_, node, nodeName_, True)
# end class ConstructionType


class OfficialType(GeneratedsSuper):
    """Appointment -- Д
    о
    л
    ж
    н
    о
    с
    т
    ь
    у
    д
    о
    с
    т
    о
    в
    е
    р
    я
    ю
    щ
    е
    г
    о
    FamilyName -- Ф
    а
    м
    и
    л
    и
    я
    FirstName -- И
    м
    я
    Patronymic -- О
    т
    ч
    е
    с
    т
    в
    о
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Appointment=None, FamilyName=None, FirstName=None, Patronymic=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Appointment = Appointment
        self.validate_s1_255(self.Appointment)
        self.Appointment_nsprefix_ = None
        self.FamilyName = FamilyName
        self.validate_rus_100(self.FamilyName)
        self.FamilyName_nsprefix_ = None
        self.FirstName = FirstName
        self.validate_rus_100(self.FirstName)
        self.FirstName_nsprefix_ = None
        self.Patronymic = Patronymic
        self.validate_rus_100(self.Patronymic)
        self.Patronymic_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, OfficialType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if OfficialType.subclass:
            return OfficialType.subclass(*args_, **kwargs_)
        else:
            return OfficialType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Appointment(self):
        return self.Appointment
    def set_Appointment(self, Appointment):
        self.Appointment = Appointment
    def get_FamilyName(self):
        return self.FamilyName
    def set_FamilyName(self, FamilyName):
        self.FamilyName = FamilyName
    def get_FirstName(self):
        return self.FirstName
    def set_FirstName(self, FirstName):
        self.FirstName = FirstName
    def get_Patronymic(self):
        return self.Patronymic
    def set_Patronymic(self, Patronymic):
        self.Patronymic = Patronymic
    def validate_s1_255(self, value):
        result = True
        # Validate type s1_255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s1_255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if len(value) < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on s1_255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_rus_100(self, value):
        result = True
        # Validate type rus-100, a restriction on tns:rus.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 100:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on rus-100' % {"value": value, "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_rus_100_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_rus_100_patterns_, ))
                result = False
        return result
    validate_rus_100_patterns_ = [["^([а-яА-ЯёЁ\\-0-9][а-яА-ЯёЁ\\-\\s'',.]*)$"]]
    def _hasContent(self):
        if (
            self.Appointment is not None or
            self.FamilyName is not None or
            self.FirstName is not None or
            self.Patronymic is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" ', name_='OfficialType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('OfficialType')
        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 and name_ == 'OfficialType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OfficialType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='OfficialType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OfficialType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0"  xmlns:tns="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" ', name_='OfficialType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Appointment is not None:
            namespaceprefix_ = self.Appointment_nsprefix_ + ':' if (UseCapturedNS_ and self.Appointment_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAppointment>%s</%sAppointment>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Appointment), input_name='Appointment')), namespaceprefix_ , eol_))
        if self.FamilyName is not None:
            namespaceprefix_ = self.FamilyName_nsprefix_ + ':' if (UseCapturedNS_ and self.FamilyName_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFamilyName>%s</%sFamilyName>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.FamilyName), input_name='FamilyName')), namespaceprefix_ , eol_))
        if self.FirstName is not None:
            namespaceprefix_ = self.FirstName_nsprefix_ + ':' if (UseCapturedNS_ and self.FirstName_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sFirstName>%s</%sFirstName>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.FirstName), input_name='FirstName')), namespaceprefix_ , eol_))
        if self.Patronymic is not None:
            namespaceprefix_ = self.Patronymic_nsprefix_ + ':' if (UseCapturedNS_ and self.Patronymic_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sPatronymic>%s</%sPatronymic>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Patronymic), input_name='Patronymic')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Appointment':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Appointment')
            value_ = self.gds_validate_string(value_, node, 'Appointment')
            self.Appointment = value_
            self.Appointment_nsprefix_ = child_.prefix
            # validate type s1_255
            self.validate_s1_255(self.Appointment)
        elif nodeName_ == 'FamilyName':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'FamilyName')
            value_ = self.gds_validate_string(value_, node, 'FamilyName')
            self.FamilyName = value_
            self.FamilyName_nsprefix_ = child_.prefix
            # validate type rus-100
            self.validate_rus_100(self.FamilyName)
        elif nodeName_ == 'FirstName':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'FirstName')
            value_ = self.gds_validate_string(value_, node, 'FirstName')
            self.FirstName = value_
            self.FirstName_nsprefix_ = child_.prefix
            # validate type rus-100
            self.validate_rus_100(self.FirstName)
        elif nodeName_ == 'Patronymic':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Patronymic')
            value_ = self.gds_validate_string(value_, node, 'Patronymic')
            self.Patronymic = value_
            self.Patronymic_nsprefix_ = child_.prefix
            # validate type rus-100
            self.validate_rus_100(self.Patronymic)
# end class OfficialType


class OrdinateType(tOrdinateInp):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tOrdinateInp
    def __init__(self, X=None, Y=None, NumGeopoint=None, DeltaGeopoint=None, PointPref=None, GeopointZacrep=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("OrdinateType"), self).__init__(X, Y, NumGeopoint, DeltaGeopoint, PointPref,  **kwargs_)
        self.GeopointZacrep = _cast(None, GeopointZacrep)
        self.GeopointZacrep_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, OrdinateType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if OrdinateType.subclass:
            return OrdinateType.subclass(*args_, **kwargs_)
        else:
            return OrdinateType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_GeopointZacrep(self):
        return self.GeopointZacrep
    def set_GeopointZacrep(self, GeopointZacrep):
        self.GeopointZacrep = GeopointZacrep
    def validate_s120(self, value):
        # Validate type Simple2:s120, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 120:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s120' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(OrdinateType, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('OrdinateType')
        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 and name_ == 'OrdinateType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='OrdinateType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OrdinateType'):
        super(OrdinateType, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType')
        if self.GeopointZacrep is not None and 'GeopointZacrep' not in already_processed:
            already_processed.add('GeopointZacrep')
            outfile.write(' GeopointZacrep=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.GeopointZacrep), input_name='GeopointZacrep')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType', fromsubclass_=False, pretty_print=True):
        super(OrdinateType, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('GeopointZacrep', node)
        if value is not None and 'GeopointZacrep' not in already_processed:
            already_processed.add('GeopointZacrep')
            self.GeopointZacrep = value
            self.validate_s120(self.GeopointZacrep)    # validate type s120
        super(OrdinateType, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(OrdinateType, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class OrdinateType


class BorderType(tBorder):
    """Edge -- Р
    е
    б
    р
    о
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tBorder
    def __init__(self, Spatial=None, Point1=None, Point2=None, Edge=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("BorderType"), self).__init__(Spatial, Point1, Point2,  **kwargs_)
        self.Edge = Edge
        self.Edge_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, BorderType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if BorderType.subclass:
            return BorderType.subclass(*args_, **kwargs_)
        else:
            return BorderType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Edge(self):
        return self.Edge
    def set_Edge(self, Edge):
        self.Edge = Edge
    def _hasContent(self):
        if (
            self.Edge is not None or
            super(BorderType, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='BorderType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('BorderType')
        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 and name_ == 'BorderType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BorderType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BorderType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BorderType'):
        super(BorderType, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BorderType')
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='BorderType', fromsubclass_=False, pretty_print=True):
        super(BorderType, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Edge is not None:
            namespaceprefix_ = self.Edge_nsprefix_ + ':' if (UseCapturedNS_ and self.Edge_nsprefix_) else ''
            self.Edge.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Edge', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(BorderType, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Edge':
            class_obj_ = self.get_class_obj_(child_, tLength)
            obj_ = class_obj_.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Edge = obj_
            obj_.original_tagname_ = 'Edge'
        super(BorderType, self)._buildChildren(child_, node, nodeName_, True)
# end class BorderType


class SpatialElementType(tSpatialElementOKSInp):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tSpatialElementOKSInp
    def __init__(self, SpelementUnit=None, Number=None, Underground=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("SpatialElementType"), self).__init__(SpelementUnit,  **kwargs_)
        self.Number = _cast(None, Number)
        self.Number_nsprefix_ = None
        self.Underground = _cast(None, Underground)
        self.Underground_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, SpatialElementType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if SpatialElementType.subclass:
            return SpatialElementType.subclass(*args_, **kwargs_)
        else:
            return SpatialElementType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_Underground(self):
        return self.Underground
    def set_Underground(self, Underground):
        self.Underground = Underground
    def validate_p22(self, value):
        # Validate type Simple1:p22, a restriction on xs:positiveInteger.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if len(str(value)) >= 22:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on p22' % {"value": value, "lineno": lineno} )
                result = False
    def validate_UndergroundType(self, value):
        # Validate type UndergroundType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['0', '1', '2']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on UndergroundType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(SpatialElementType, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpatialElementType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('SpatialElementType')
        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 and name_ == 'SpatialElementType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpatialElementType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='SpatialElementType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpatialElementType'):
        super(SpatialElementType, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpatialElementType')
        if self.Number is not None and 'Number' not in already_processed:
            already_processed.add('Number')
            outfile.write(' Number="%s"' % self.gds_format_integer(self.Number, input_name='Number'))
        if self.Underground is not None and 'Underground' not in already_processed:
            already_processed.add('Underground')
            outfile.write(' Underground=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Underground), input_name='Underground')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpatialElementType', fromsubclass_=False, pretty_print=True):
        super(SpatialElementType, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Number', node)
        if value is not None and 'Number' not in already_processed:
            already_processed.add('Number')
            self.Number = self.gds_parse_integer(value, node, 'Number')
            if self.Number <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
            self.validate_p22(self.Number)    # validate type p22
        value = find_attr_value_('Underground', node)
        if value is not None and 'Underground' not in already_processed:
            already_processed.add('Underground')
            self.Underground = value
            self.validate_UndergroundType(self.Underground)    # validate type UndergroundType
        super(SpatialElementType, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(SpatialElementType, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class SpatialElementType


class OrdinateType8(tOrdinateInp):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tOrdinateInp
    def __init__(self, X=None, Y=None, NumGeopoint=None, DeltaGeopoint=None, PointPref=None, Note=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("OrdinateType8"), self).__init__(X, Y, NumGeopoint, DeltaGeopoint, PointPref,  **kwargs_)
        self.Note = _cast(None, Note)
        self.Note_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, OrdinateType8)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if OrdinateType8.subclass:
            return OrdinateType8.subclass(*args_, **kwargs_)
        else:
            return OrdinateType8(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Note(self):
        return self.Note
    def set_Note(self, Note):
        self.Note = Note
    def validate_s1500(self, value):
        # Validate type Simple1:s1500, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 1500:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s1500' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(OrdinateType8, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType8', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('OrdinateType8')
        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 and name_ == 'OrdinateType8':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType8')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='OrdinateType8', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OrdinateType8'):
        super(OrdinateType8, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType8')
        if self.Note is not None and 'Note' not in already_processed:
            already_processed.add('Note')
            outfile.write(' Note=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Note), input_name='Note')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType8', fromsubclass_=False, pretty_print=True):
        super(OrdinateType8, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Note', node)
        if value is not None and 'Note' not in already_processed:
            already_processed.add('Note')
            self.Note = value
            self.validate_s1500(self.Note)    # validate type s1500
        super(OrdinateType8, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(OrdinateType8, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class OrdinateType8


class OrdinateType10(tOrdinateOut):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tOrdinateOut
    def __init__(self, X=None, Y=None, OrdNmb=None, NumGeopoint=None, DeltaGeopoint=None, GeopointZacrep=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("OrdinateType10"), self).__init__(X, Y, OrdNmb, NumGeopoint, DeltaGeopoint,  **kwargs_)
        self.GeopointZacrep = _cast(None, GeopointZacrep)
        self.GeopointZacrep_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, OrdinateType10)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if OrdinateType10.subclass:
            return OrdinateType10.subclass(*args_, **kwargs_)
        else:
            return OrdinateType10(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_GeopointZacrep(self):
        return self.GeopointZacrep
    def set_GeopointZacrep(self, GeopointZacrep):
        self.GeopointZacrep = GeopointZacrep
    def validate_s120(self, value):
        # Validate type Simple2:s120, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 120:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s120' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(OrdinateType10, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType10', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('OrdinateType10')
        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 and name_ == 'OrdinateType10':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType10')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='OrdinateType10', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OrdinateType10'):
        super(OrdinateType10, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType10')
        if self.GeopointZacrep is not None and 'GeopointZacrep' not in already_processed:
            already_processed.add('GeopointZacrep')
            outfile.write(' GeopointZacrep=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.GeopointZacrep), input_name='GeopointZacrep')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType10', fromsubclass_=False, pretty_print=True):
        super(OrdinateType10, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('GeopointZacrep', node)
        if value is not None and 'GeopointZacrep' not in already_processed:
            already_processed.add('GeopointZacrep')
            self.GeopointZacrep = value
            self.validate_s120(self.GeopointZacrep)    # validate type s120
        super(OrdinateType10, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(OrdinateType10, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class OrdinateType10


class BordersType(GeneratedsSuper):
    """Border -- Ч
    а
    с
    т
    ь
    г
    р
    а
    н
    и
    ц
    ы
    (
    о
    т
    т
    о
    ч
    к
    и
    д
    о
    т
    о
    ч
    к
    и
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Border=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Border is None:
            self.Border = []
        else:
            self.Border = Border
        self.Border_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, BordersType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if BordersType.subclass:
            return BordersType.subclass(*args_, **kwargs_)
        else:
            return BordersType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Border(self):
        return self.Border
    def set_Border(self, Border):
        self.Border = Border
    def add_Border(self, value):
        self.Border.append(value)
    def insert_Border_at(self, index, value):
        self.Border.insert(index, value)
    def replace_Border_at(self, index, value):
        self.Border[index] = value
    def _hasContent(self):
        if (
            self.Border
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BordersType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('BordersType')
        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 and name_ == 'BordersType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BordersType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BordersType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BordersType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BordersType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Border_ in self.Border:
            namespaceprefix_ = self.Border_nsprefix_ + ':' if (UseCapturedNS_ and self.Border_nsprefix_) else ''
            Border_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Border', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Border':
            obj_ = BorderType12.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Border.append(obj_)
            obj_.original_tagname_ = 'Border'
# end class BordersType


class BorderType12(tBorder):
    """Edge -- Р
    е
    б
    р
    о
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tBorder
    def __init__(self, Spatial=None, Point1=None, Point2=None, Edge=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("BorderType12"), self).__init__(Spatial, Point1, Point2,  **kwargs_)
        self.Edge = Edge
        self.Edge_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, BorderType12)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if BorderType12.subclass:
            return BorderType12.subclass(*args_, **kwargs_)
        else:
            return BorderType12(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Edge(self):
        return self.Edge
    def set_Edge(self, Edge):
        self.Edge = Edge
    def _hasContent(self):
        if (
            self.Edge is not None or
            super(BorderType12, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BorderType12', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('BorderType12')
        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 and name_ == 'BorderType12':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BorderType12')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BorderType12', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BorderType12'):
        super(BorderType12, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BorderType12')
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='BorderType12', fromsubclass_=False, pretty_print=True):
        super(BorderType12, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Edge is not None:
            namespaceprefix_ = self.Edge_nsprefix_ + ':' if (UseCapturedNS_ and self.Edge_nsprefix_) else ''
            self.Edge.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Edge', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(BorderType12, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Edge':
            obj_ = EdgeType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Edge = obj_
            obj_.original_tagname_ = 'Edge'
        super(BorderType12, self)._buildChildren(child_, node, nodeName_, True)
# end class BorderType12


class EdgeType(tLength):
    """Neighbours -- К
    а
    д
    а
    с
    т
    р
    о
    в
    ы
    й
    н
    о
    м
    е
    р
    з
    е
    м
    е
    л
    ь
    н
    о
    г
    о
    у
    ч
    а
    с
    т
    к
    а
    ,
    п
    р
    и
    м
    ы
    к
    а
    ю
    щ
    е
    г
    о
    к
    э
    т
    о
    й
    г
    р
    а
    н
    и
    ц
    е
    DirectionAngle -- Д
    и
    р
    е
    к
    ц
    и
    о
    н
    н
    ы
    й
    у
    г
    о
    л
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tLength
    def __init__(self, Length=None, Definition=None, Neighbours=None, DirectionAngle=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("EdgeType"), self).__init__(Length, Definition,  **kwargs_)
        self.Neighbours = Neighbours
        self.Neighbours_nsprefix_ = None
        self.DirectionAngle = DirectionAngle
        self.DirectionAngle_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, EdgeType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if EdgeType.subclass:
            return EdgeType.subclass(*args_, **kwargs_)
        else:
            return EdgeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Neighbours(self):
        return self.Neighbours
    def set_Neighbours(self, Neighbours):
        self.Neighbours = Neighbours
    def get_DirectionAngle(self):
        return self.DirectionAngle
    def set_DirectionAngle(self, DirectionAngle):
        self.DirectionAngle = DirectionAngle
    def _hasContent(self):
        if (
            self.Neighbours is not None or
            self.DirectionAngle is not None or
            super(EdgeType, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='EdgeType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('EdgeType')
        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 and name_ == 'EdgeType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='EdgeType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='EdgeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='EdgeType'):
        super(EdgeType, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='EdgeType')
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='EdgeType', fromsubclass_=False, pretty_print=True):
        super(EdgeType, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Neighbours is not None:
            namespaceprefix_ = self.Neighbours_nsprefix_ + ':' if (UseCapturedNS_ and self.Neighbours_nsprefix_) else ''
            self.Neighbours.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Neighbours', pretty_print=pretty_print)
        if self.DirectionAngle is not None:
            namespaceprefix_ = self.DirectionAngle_nsprefix_ + ':' if (UseCapturedNS_ and self.DirectionAngle_nsprefix_) else ''
            self.DirectionAngle.export(outfile, level, namespaceprefix_, namespacedef_='', name_='DirectionAngle', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(EdgeType, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Neighbours':
            obj_ = tCadastralNumbersOut.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Neighbours = obj_
            obj_.original_tagname_ = 'Neighbours'
        elif nodeName_ == 'DirectionAngle':
            obj_ = tDirectionAngle.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.DirectionAngle = obj_
            obj_.original_tagname_ = 'DirectionAngle'
        super(EdgeType, self)._buildChildren(child_, node, nodeName_, True)
# end class EdgeType


class SpatialElementType13(tSpatialElementOKSOut):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tSpatialElementOKSOut
    def __init__(self, SpelementUnit=None, Number=None, Underground=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("SpatialElementType13"), self).__init__(SpelementUnit,  **kwargs_)
        self.Number = _cast(None, Number)
        self.Number_nsprefix_ = None
        self.Underground = _cast(None, Underground)
        self.Underground_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, SpatialElementType13)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if SpatialElementType13.subclass:
            return SpatialElementType13.subclass(*args_, **kwargs_)
        else:
            return SpatialElementType13(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Number(self):
        return self.Number
    def set_Number(self, Number):
        self.Number = Number
    def get_Underground(self):
        return self.Underground
    def set_Underground(self, Underground):
        self.Underground = Underground
    def validate_s255(self, value):
        # Validate type Simple1:s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_UndergroundType14(self, value):
        # Validate type UndergroundType14, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['0', '1', '2']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on UndergroundType14' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(SpatialElementType13, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpatialElementType13', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('SpatialElementType13')
        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 and name_ == 'SpatialElementType13':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpatialElementType13')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='SpatialElementType13', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpatialElementType13'):
        super(SpatialElementType13, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpatialElementType13')
        if self.Number is not None and 'Number' not in already_processed:
            already_processed.add('Number')
            outfile.write(' Number=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Number), input_name='Number')), ))
        if self.Underground is not None and 'Underground' not in already_processed:
            already_processed.add('Underground')
            outfile.write(' Underground=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Underground), input_name='Underground')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpatialElementType13', fromsubclass_=False, pretty_print=True):
        super(SpatialElementType13, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Number', node)
        if value is not None and 'Number' not in already_processed:
            already_processed.add('Number')
            self.Number = value
            self.validate_s255(self.Number)    # validate type s255
        value = find_attr_value_('Underground', node)
        if value is not None and 'Underground' not in already_processed:
            already_processed.add('Underground')
            self.Underground = value
            self.validate_UndergroundType14(self.Underground)    # validate type UndergroundType14
        super(SpatialElementType13, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(SpatialElementType13, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class SpatialElementType13


class OrdinateType15(tOrdinateOut):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tOrdinateOut
    def __init__(self, X=None, Y=None, OrdNmb=None, NumGeopoint=None, DeltaGeopoint=None, Note=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("OrdinateType15"), self).__init__(X, Y, OrdNmb, NumGeopoint, DeltaGeopoint,  **kwargs_)
        self.Note = _cast(None, Note)
        self.Note_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, OrdinateType15)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if OrdinateType15.subclass:
            return OrdinateType15.subclass(*args_, **kwargs_)
        else:
            return OrdinateType15(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Note(self):
        return self.Note
    def set_Note(self, Note):
        self.Note = Note
    def validate_s1500(self, value):
        # Validate type Simple1:s1500, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 1500:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s1500' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(OrdinateType15, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType15', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('OrdinateType15')
        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 and name_ == 'OrdinateType15':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType15')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='OrdinateType15', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OrdinateType15'):
        super(OrdinateType15, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType15')
        if self.Note is not None and 'Note' not in already_processed:
            already_processed.add('Note')
            outfile.write(' Note=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Note), input_name='Note')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType15', fromsubclass_=False, pretty_print=True):
        super(OrdinateType15, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Note', node)
        if value is not None and 'Note' not in already_processed:
            already_processed.add('Note')
            self.Note = value
            self.validate_s1500(self.Note)    # validate type s1500
        super(OrdinateType15, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(OrdinateType15, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class OrdinateType15


class OrdinateType17(tOrdinateInp):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tOrdinateInp
    def __init__(self, X=None, Y=None, NumGeopoint=None, DeltaGeopoint=None, PointPref=None, GeopointOpred=None, GeopointZacrep=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("OrdinateType17"), self).__init__(X, Y, NumGeopoint, DeltaGeopoint, PointPref,  **kwargs_)
        self.GeopointOpred = _cast(None, GeopointOpred)
        self.GeopointOpred_nsprefix_ = None
        self.GeopointZacrep = _cast(None, GeopointZacrep)
        self.GeopointZacrep_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, OrdinateType17)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if OrdinateType17.subclass:
            return OrdinateType17.subclass(*args_, **kwargs_)
        else:
            return OrdinateType17(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_GeopointOpred(self):
        return self.GeopointOpred
    def set_GeopointOpred(self, GeopointOpred):
        self.GeopointOpred = GeopointOpred
    def get_GeopointZacrep(self):
        return self.GeopointZacrep
    def set_GeopointZacrep(self, GeopointZacrep):
        self.GeopointZacrep = GeopointZacrep
    def validate_dGeopointOpred(self, value):
        # Validate type dGeO1:dGeopointOpred, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['692001000000', '692002000000', '692003000000', '692004000000', '692005000000', '692006000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dGeopointOpred' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_s120(self, value):
        # Validate type Simple2:s120, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 120:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s120' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(OrdinateType17, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType17', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('OrdinateType17')
        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 and name_ == 'OrdinateType17':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType17')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='OrdinateType17', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OrdinateType17'):
        super(OrdinateType17, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType17')
        if self.GeopointOpred is not None and 'GeopointOpred' not in already_processed:
            already_processed.add('GeopointOpred')
            outfile.write(' GeopointOpred=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.GeopointOpred), input_name='GeopointOpred')), ))
        if self.GeopointZacrep is not None and 'GeopointZacrep' not in already_processed:
            already_processed.add('GeopointZacrep')
            outfile.write(' GeopointZacrep=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.GeopointZacrep), input_name='GeopointZacrep')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType17', fromsubclass_=False, pretty_print=True):
        super(OrdinateType17, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('GeopointOpred', node)
        if value is not None and 'GeopointOpred' not in already_processed:
            already_processed.add('GeopointOpred')
            self.GeopointOpred = value
            self.validate_dGeopointOpred(self.GeopointOpred)    # validate type dGeopointOpred
        value = find_attr_value_('GeopointZacrep', node)
        if value is not None and 'GeopointZacrep' not in already_processed:
            already_processed.add('GeopointZacrep')
            self.GeopointZacrep = value
            self.validate_s120(self.GeopointZacrep)    # validate type s120
        super(OrdinateType17, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(OrdinateType17, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class OrdinateType17


class BordersType19(GeneratedsSuper):
    """Border -- Ч
    а
    с
    т
    ь
    г
    р
    а
    н
    и
    ц
    ы
    (
    о
    т
    т
    о
    ч
    к
    и
    д
    о
    т
    о
    ч
    к
    и
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Border=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if Border is None:
            self.Border = []
        else:
            self.Border = Border
        self.Border_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, BordersType19)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if BordersType19.subclass:
            return BordersType19.subclass(*args_, **kwargs_)
        else:
            return BordersType19(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Border(self):
        return self.Border
    def set_Border(self, Border):
        self.Border = Border
    def add_Border(self, value):
        self.Border.append(value)
    def insert_Border_at(self, index, value):
        self.Border.insert(index, value)
    def replace_Border_at(self, index, value):
        self.Border[index] = value
    def _hasContent(self):
        if (
            self.Border
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='BordersType19', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('BordersType19')
        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 and name_ == 'BordersType19':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BordersType19')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BordersType19', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BordersType19'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Spa5="urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1" ', name_='BordersType19', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Border_ in self.Border:
            namespaceprefix_ = self.Border_nsprefix_ + ':' if (UseCapturedNS_ and self.Border_nsprefix_) else ''
            Border_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Border', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Border':
            obj_ = tBorderLand.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Border.append(obj_)
            obj_.original_tagname_ = 'Border'
# end class BordersType19


class EdgeType20(GeneratedsSuper):
    """Definition -- О
    п
    и
    с
    а
    н
    и
    е
    п
    р
    о
    х
    о
    ж
    д
    е
    н
    и
    я
    г
    р
    а
    н
    и
    ц
    ы
    Neighbours -- О
    б
    о
    з
    н
    а
    ч
    е
    н
    и
    е
    с
    м
    е
    ж
    н
    о
    г
    о
    о
    б
    ъ
    е
    к
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Definition=None, Neighbours=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Definition = Definition
        self.Definition_nsprefix_ = None
        self.Neighbours = Neighbours
        self.Neighbours_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, EdgeType20)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if EdgeType20.subclass:
            return EdgeType20.subclass(*args_, **kwargs_)
        else:
            return EdgeType20(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Definition(self):
        return self.Definition
    def set_Definition(self, Definition):
        self.Definition = Definition
    def get_Neighbours(self):
        return self.Neighbours
    def set_Neighbours(self, Neighbours):
        self.Neighbours = Neighbours
    def _hasContent(self):
        if (
            self.Definition is not None or
            self.Neighbours is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='EdgeType20', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('EdgeType20')
        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 and name_ == 'EdgeType20':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='EdgeType20')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='EdgeType20', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='EdgeType20'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='EdgeType20', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Definition is not None:
            namespaceprefix_ = self.Definition_nsprefix_ + ':' if (UseCapturedNS_ and self.Definition_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDefinition>%s</%sDefinition>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Definition), input_name='Definition')), namespaceprefix_ , eol_))
        if self.Neighbours is not None:
            namespaceprefix_ = self.Neighbours_nsprefix_ + ':' if (UseCapturedNS_ and self.Neighbours_nsprefix_) else ''
            self.Neighbours.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Neighbours', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'Definition':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'Definition')
            value_ = self.gds_validate_string(value_, node, 'Definition')
            self.Definition = value_
            self.Definition_nsprefix_ = child_.prefix
        elif nodeName_ == 'Neighbours':
            obj_ = NeighboursType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.Neighbours = obj_
            obj_.original_tagname_ = 'Neighbours'
# end class EdgeType20


class NeighboursType(GeneratedsSuper):
    """NeighboursName -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, NeighboursName=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if NeighboursName is None:
            self.NeighboursName = []
        else:
            self.NeighboursName = NeighboursName
        self.NeighboursName_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, NeighboursType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if NeighboursType.subclass:
            return NeighboursType.subclass(*args_, **kwargs_)
        else:
            return NeighboursType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_NeighboursName(self):
        return self.NeighboursName
    def set_NeighboursName(self, NeighboursName):
        self.NeighboursName = NeighboursName
    def add_NeighboursName(self, value):
        self.NeighboursName.append(value)
    def insert_NeighboursName_at(self, index, value):
        self.NeighboursName.insert(index, value)
    def replace_NeighboursName_at(self, index, value):
        self.NeighboursName[index] = value
    def validate_s255(self, value):
        result = True
        # Validate type s255, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 255:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s255' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def _hasContent(self):
        if (
            self.NeighboursName
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='NeighboursType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('NeighboursType')
        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 and name_ == 'NeighboursType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NeighboursType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='NeighboursType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='NeighboursType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:Simple1="urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0" ', name_='NeighboursType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for NeighboursName_ in self.NeighboursName:
            namespaceprefix_ = self.NeighboursName_nsprefix_ + ':' if (UseCapturedNS_ and self.NeighboursName_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNeighboursName>%s</%sNeighboursName>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(NeighboursName_), input_name='NeighboursName')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'NeighboursName':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'NeighboursName')
            value_ = self.gds_validate_string(value_, node, 'NeighboursName')
            self.NeighboursName.append(value_)
            self.NeighboursName_nsprefix_ = child_.prefix
            # validate type s255
            self.validate_s255(self.NeighboursName[-1])
# end class NeighboursType


class OrdinateType21(tOrdinateOut):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tOrdinateOut
    def __init__(self, X=None, Y=None, OrdNmb=None, NumGeopoint=None, DeltaGeopoint=None, GeopointOpred=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("OrdinateType21"), self).__init__(X, Y, OrdNmb, NumGeopoint, DeltaGeopoint,  **kwargs_)
        self.GeopointOpred = _cast(None, GeopointOpred)
        self.GeopointOpred_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, OrdinateType21)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if OrdinateType21.subclass:
            return OrdinateType21.subclass(*args_, **kwargs_)
        else:
            return OrdinateType21(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_GeopointOpred(self):
        return self.GeopointOpred
    def set_GeopointOpred(self, GeopointOpred):
        self.GeopointOpred = GeopointOpred
    def validate_dGeopointOpred(self, value):
        # Validate type dGeO1:dGeopointOpred, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['692001000000', '692002000000', '692003000000', '692004000000', '692005000000', '692006000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dGeopointOpred' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(OrdinateType21, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType21', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('OrdinateType21')
        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 and name_ == 'OrdinateType21':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType21')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='OrdinateType21', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OrdinateType21'):
        super(OrdinateType21, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType21')
        if self.GeopointOpred is not None and 'GeopointOpred' not in already_processed:
            already_processed.add('GeopointOpred')
            outfile.write(' GeopointOpred=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.GeopointOpred), input_name='GeopointOpred')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType21', fromsubclass_=False, pretty_print=True):
        super(OrdinateType21, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('GeopointOpred', node)
        if value is not None and 'GeopointOpred' not in already_processed:
            already_processed.add('GeopointOpred')
            self.GeopointOpred = value
            self.validate_dGeopointOpred(self.GeopointOpred)    # validate type dGeopointOpred
        super(OrdinateType21, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(OrdinateType21, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class OrdinateType21


class OrdinateType23(tOrdinateOut):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tOrdinateOut
    def __init__(self, X=None, Y=None, OrdNmb=None, NumGeopoint=None, DeltaGeopoint=None, GeopointOpred=None, GeopointZacrep=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("OrdinateType23"), self).__init__(X, Y, OrdNmb, NumGeopoint, DeltaGeopoint,  **kwargs_)
        self.GeopointOpred = _cast(None, GeopointOpred)
        self.GeopointOpred_nsprefix_ = None
        self.GeopointZacrep = _cast(None, GeopointZacrep)
        self.GeopointZacrep_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, OrdinateType23)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if OrdinateType23.subclass:
            return OrdinateType23.subclass(*args_, **kwargs_)
        else:
            return OrdinateType23(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_GeopointOpred(self):
        return self.GeopointOpred
    def set_GeopointOpred(self, GeopointOpred):
        self.GeopointOpred = GeopointOpred
    def get_GeopointZacrep(self):
        return self.GeopointZacrep
    def set_GeopointZacrep(self, GeopointZacrep):
        self.GeopointZacrep = GeopointZacrep
    def validate_dGeopointOpred(self, value):
        # Validate type dGeO1:dGeopointOpred, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['692001000000', '692002000000', '692003000000', '692004000000', '692005000000', '692006000000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dGeopointOpred' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def validate_s120(self, value):
        # Validate type Simple2:s120, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 120:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on s120' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (
            super(OrdinateType23, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType23', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('OrdinateType23')
        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 and name_ == 'OrdinateType23':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType23')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='OrdinateType23', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OrdinateType23'):
        super(OrdinateType23, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OrdinateType23')
        if self.GeopointOpred is not None and 'GeopointOpred' not in already_processed:
            already_processed.add('GeopointOpred')
            outfile.write(' GeopointOpred=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.GeopointOpred), input_name='GeopointOpred')), ))
        if self.GeopointZacrep is not None and 'GeopointZacrep' not in already_processed:
            already_processed.add('GeopointZacrep')
            outfile.write(' GeopointZacrep=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.GeopointZacrep), input_name='GeopointZacrep')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OrdinateType23', fromsubclass_=False, pretty_print=True):
        super(OrdinateType23, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('GeopointOpred', node)
        if value is not None and 'GeopointOpred' not in already_processed:
            already_processed.add('GeopointOpred')
            self.GeopointOpred = value
            self.validate_dGeopointOpred(self.GeopointOpred)    # validate type dGeopointOpred
        value = find_attr_value_('GeopointZacrep', node)
        if value is not None and 'GeopointZacrep' not in already_processed:
            already_processed.add('GeopointZacrep')
            self.GeopointZacrep = value
            self.validate_s120(self.GeopointZacrep)    # validate type s120
        super(OrdinateType23, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        super(OrdinateType23, self)._buildChildren(child_, node, nodeName_, True)
        pass
# end class OrdinateType23


class MaterialType(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, Wall=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.Wall = _cast(None, Wall)
        self.Wall_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, MaterialType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if MaterialType.subclass:
            return MaterialType.subclass(*args_, **kwargs_)
        else:
            return MaterialType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_Wall(self):
        return self.Wall
    def set_Wall(self, Wall):
        self.Wall = Wall
    def validate_dWall(self, value):
        # Validate type dWa1:dWall, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['061001000000', '061001001000', '061001001001', '061001001002', '061001001003', '061001002000', '061001002001', '061001002002', '061001002003', '061001002004', '061001002005', '061001002006', '061001003000', '061001003001', '061001003002', '061001004000', '061001005000', '061001006000', '061001006001', '061001006002', '061001006003', '061001007000', '061001007001', '061001007002', '061001007003', '061001007004', '061001007005', '061001007006', '061001008000', '061001009000']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on dWall' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
    def _hasContent(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MaterialType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('MaterialType')
        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 and name_ == 'MaterialType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='MaterialType')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='MaterialType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='MaterialType'):
        if self.Wall is not None and 'Wall' not in already_processed:
            already_processed.add('Wall')
            outfile.write(' Wall=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Wall), input_name='Wall')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MaterialType', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('Wall', node)
        if value is not None and 'Wall' not in already_processed:
            already_processed.add('Wall')
            self.Wall = value
            self.validate_dWall(self.Wall)    # validate type dWall
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class MaterialType


class tPermittedUseAll(tPermittedUse):
    """PermitedAncillary -- В
    с
    п
    о
    м
    о
    г
    а
    т
    е
    л
    ь
    н
    ы
    е
    в
    и
    д
    ы
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = tPermittedUse
    def __init__(self, TypePermittedUse=None, LandUse=None, Utilization=None, PermittedUse=None, PermitedAncillary=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        super(globals().get("tPermittedUseAll"), self).__init__(TypePermittedUse, LandUse, Utilization, PermittedUse,  **kwargs_)
        if PermitedAncillary is None:
            self.PermitedAncillary = []
        else:
            self.PermitedAncillary = PermitedAncillary
        self.PermitedAncillary_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, tPermittedUseAll)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if tPermittedUseAll.subclass:
            return tPermittedUseAll.subclass(*args_, **kwargs_)
        else:
            return tPermittedUseAll(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_PermitedAncillary(self):
        return self.PermitedAncillary
    def set_PermitedAncillary(self, PermitedAncillary):
        self.PermitedAncillary = PermitedAncillary
    def add_PermitedAncillary(self, value):
        self.PermitedAncillary.append(value)
    def insert_PermitedAncillary_at(self, index, value):
        self.PermitedAncillary.insert(index, value)
    def replace_PermitedAncillary_at(self, index, value):
        self.PermitedAncillary[index] = value
    def _hasContent(self):
        if (
            self.PermitedAncillary or
            super(tPermittedUseAll, self)._hasContent()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tPermittedUseAll', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('tPermittedUseAll')
        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 and name_ == 'tPermittedUseAll':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tPermittedUseAll')
        if self._hasContent():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tPermittedUseAll', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tPermittedUseAll'):
        super(tPermittedUseAll, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tPermittedUseAll')
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1" ', name_='tPermittedUseAll', fromsubclass_=False, pretty_print=True):
        super(tPermittedUseAll, self)._exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for PermitedAncillary_ in self.PermitedAncillary:
            namespaceprefix_ = self.PermitedAncillary_nsprefix_ + ':' if (UseCapturedNS_ and self.PermitedAncillary_nsprefix_) else ''
            PermitedAncillary_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='PermitedAncillary', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        super(tPermittedUseAll, self)._buildAttributes(node, attrs, already_processed)
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'PermitedAncillary':
            class_obj_ = self.get_class_obj_(child_, tPermittedUse)
            obj_ = class_obj_.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.PermitedAncillary.append(obj_)
            obj_.original_tagname_ = 'PermitedAncillary'
        super(tPermittedUseAll, self)._buildChildren(child_, node, nodeName_, True)
# end class tPermittedUseAll


GDSClassesMapping = {
    'AttachmentRef': AttachmentRefType,
    'BirthCertificate': SovietPassportType,
    'DrivingLicenseRF': DrivingLicenseRFType,
    'ForeignPassport': NotRestrictedDocumentType,
    'Form9Certificate': NotRestrictedDocumentType,
    'IdentityDocument': AnyIdentityDocumentType,
    'InternationalPassportRF': InternationalPassportRFType,
    'MilitaryPassport': MilitaryPassportDocumentType,
    'PassportLossCertificate': NotRestrictedDocumentType,
    'PassportRF': PassportRFType,
    'PrimaryIdentityDocument': PrimaryIdentityDocumentType,
    'ReleaseCertificate': NotRestrictedDocumentType,
    'ResidencePermitRF': InternationalPassportRFType,
    'SailorPassport': MilitaryPassportDocumentType,
    'SovietPassport': SovietPassportType,
    'TemporaryIdentityCardRF': NotRestrictedDocumentType,
}


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]
    prefix_tag = TagNamePrefix + tag
    rootClass = GDSClassesMapping.get(prefix_tag)
    if rootClass is None:
        rootClass = globals().get(prefix_tag)
    return tag, rootClass


def get_required_ns_prefix_defs(rootNode):
    '''Get all name space prefix definitions required in this XML doc.
    Return a dictionary of definitions and a char string of definitions.
    '''
    nsmap = {
        prefix: uri
        for node in rootNode.iter()
        for (prefix, uri) in node.nsmap.items()
        if prefix is not None
    }
    namespacedefs = ' '.join([
        'xmlns:{}="{}"'.format(prefix, uri)
        for prefix, uri in nsmap.items()
    ])
    return nsmap, namespacedefs


def parse(inFileName, silence=False, print_warnings=True):
    global CapturedNsmap_
    gds_collector = GdsCollector_()
    parser = None
    doc = parsexml_(inFileName, parser)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'KPT'
        rootClass = KPT
    rootObj = rootClass.factory()
    rootObj.build(rootNode, gds_collector_=gds_collector)
    CapturedNsmap_, namespacedefs = get_required_ns_prefix_defs(rootNode)
    if not SaveElementTreeNode:
        doc = None
        rootNode = None
    if not silence:
        sys.stdout.write('<?xml version="1.0" ?>\n')
        rootObj.export(
            sys.stdout, 0, name_=rootTag,
            namespacedef_=namespacedefs,
            pretty_print=True)
    if print_warnings and len(gds_collector.get_messages()) > 0:
        separator = ('-' * 50) + '\n'
        sys.stderr.write(separator)
        sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
            len(gds_collector.get_messages()), ))
        gds_collector.write_messages(sys.stderr)
        sys.stderr.write(separator)
    return rootObj


def parseEtree(inFileName, silence=False, print_warnings=True,
               mapping=None, reverse_mapping=None, nsmap=None):
    parser = None
    doc = parsexml_(inFileName, parser)
    gds_collector = GdsCollector_()
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'KPT'
        rootClass = KPT
    rootObj = rootClass.factory()
    rootObj.build(rootNode, gds_collector_=gds_collector)
    if mapping is None:
        mapping = {}
    if reverse_mapping is None:
        reverse_mapping = {}
    rootElement = rootObj.to_etree(
        None, name_=rootTag, mapping_=mapping,
        reverse_mapping_=reverse_mapping, nsmap_=nsmap)
    reverse_node_mapping = rootObj.gds_reverse_node_mapping(mapping)
    # Enable Python to collect the space used by the DOM.
    if not SaveElementTreeNode:
        doc = None
        rootNode = None
    if not silence:
        content = etree_.tostring(
            rootElement, pretty_print=True,
            xml_declaration=True, encoding="utf-8")
        sys.stdout.write(str(content))
        sys.stdout.write('\n')
    if print_warnings and len(gds_collector.get_messages()) > 0:
        separator = ('-' * 50) + '\n'
        sys.stderr.write(separator)
        sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
            len(gds_collector.get_messages()), ))
        gds_collector.write_messages(sys.stderr)
        sys.stderr.write(separator)
    return rootObj, rootElement, mapping, reverse_node_mapping


def parseString(inString, silence=False, print_warnings=True):
    '''Parse a string, create the object tree, and export it.

    Arguments:
    - inString -- A string.  This XML fragment should not start
      with an XML declaration containing an encoding.
    - silence -- A boolean.  If False, export the object.
    Returns -- The root object in the tree.
    '''
    parser = None
    rootNode= parsexmlstring_(inString, parser)
    gds_collector = GdsCollector_()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'KPT'
        rootClass = KPT
    rootObj = rootClass.factory()
    rootObj.build(rootNode, gds_collector_=gds_collector)
    if not SaveElementTreeNode:
        rootNode = None
    if not silence:
        sys.stdout.write('<?xml version="1.0" ?>\n')
        rootObj.export(
            sys.stdout, 0, name_=rootTag,
            namespacedef_='')
    if print_warnings and len(gds_collector.get_messages()) > 0:
        separator = ('-' * 50) + '\n'
        sys.stderr.write(separator)
        sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
            len(gds_collector.get_messages()), ))
        gds_collector.write_messages(sys.stderr)
        sys.stderr.write(separator)
    return rootObj


def parseLiteral(inFileName, silence=False, print_warnings=True):
    parser = None
    doc = parsexml_(inFileName, parser)
    gds_collector = GdsCollector_()
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'KPT'
        rootClass = KPT
    rootObj = rootClass.factory()
    rootObj.build(rootNode, gds_collector_=gds_collector)
    # Enable Python to collect the space used by the DOM.
    if not SaveElementTreeNode:
        doc = None
        rootNode = None
    if not silence:
        sys.stdout.write('#from kpt_10 import *\n\n')
        sys.stdout.write('import kpt_10 as model_\n\n')
        sys.stdout.write('rootObj = model_.rootClass(\n')
        rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
        sys.stdout.write(')\n')
    if print_warnings and len(gds_collector.get_messages()) > 0:
        separator = ('-' * 50) + '\n'
        sys.stderr.write(separator)
        sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
            len(gds_collector.get_messages()), ))
        gds_collector.write_messages(sys.stderr)
        sys.stderr.write(separator)
    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()

RenameMappings_ = {
    "{urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1}tName": "tName1",
}

#
# Mapping of namespaces to types defined in them
# and the file in which each is defined.
# simpleTypes are marked "ST" and complexTypes "CT".
NamespaceToDefMappings_ = {'urn://x-artefacts-rosreestr-ru/commons/complex-types/address-output/4.0.1': [('sAddressOrLocation',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_AddressOut_v04.xsd',
                                                                                'ST'),
                                                                               ('tAddressOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_AddressOut_v04.xsd',
                                                                                'CT'),
                                                                               ('tName',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_AddressOut_v04.xsd',
                                                                                'CT'),
                                                                               ('tUrbanDistrict',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_AddressOut_v04.xsd',
                                                                                'CT'),
                                                                               ('tSovietVillage',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_AddressOut_v04.xsd',
                                                                                'CT'),
                                                                               ('tLevel1',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_AddressOut_v04.xsd',
                                                                                'CT'),
                                                                               ('tLevel2',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_AddressOut_v04.xsd',
                                                                                'CT'),
                                                                               ('tLevel3',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_AddressOut_v04.xsd',
                                                                                'CT'),
                                                                               ('tApartment',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_AddressOut_v04.xsd',
                                                                                'CT')],
 'urn://x-artefacts-rosreestr-ru/commons/complex-types/cadastral-cost/1.0': [('tCadastralCost',
                                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_CadastralCost_v01.xsd',
                                                                              'CT'),
                                                                             ('tCadastralCostExt',
                                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_CadastralCost_v01.xsd',
                                                                              'CT')],
 'urn://x-artefacts-rosreestr-ru/commons/complex-types/certification-doc/1.0': [('tCertificationDoc',
                                                                                 'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_CertificationDoc_v01.xsd',
                                                                                 'CT')],
 'urn://x-artefacts-rosreestr-ru/commons/complex-types/document-output/4.0.1': [('tDocumentWithoutAppliedFile',
                                                                                 'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_DocumentOut_v04.xsd',
                                                                                 'CT')],
 'urn://x-artefacts-rosreestr-ru/commons/complex-types/entity-spatial/5.0.1': [('tCoordSystems',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tCoordSystem',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tOrdinateInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tOrdinateOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tOrdinateXY',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tBorder',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tLength',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tDirectionAngle',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tBordersAgreement',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tBorderAgreement',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialZUInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpatialElementZUInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpelementUnitZUInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tBordersInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialBordersZUInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialOKSInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpatialElementOKSInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpelementUnitOKSInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialZUOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpatialElementZUOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpelementUnitZUOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialBordersZUOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tCadastralNumbersOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialOKSOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpatialElementOKSOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpelementUnitOKSOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialLandInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpatialElementLandInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpelementUnitLandInp',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialBordersLand',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tBorderLand',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialLandOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpatialElementLandOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpelementUnitLandOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatialLandKVOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpatialElementLandKVOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpelementUnitLandKVOut',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tEntitySpatial',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpatialElement',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tSpelementUnit',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT'),
                                                                               ('tOrdinate',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_Spatial_v05.xsd',
                                                                                'CT')],
 'urn://x-artefacts-rosreestr-ru/commons/complex-types/parameters-oks/2.0.1': [('tElementsConstruct',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_ParametersOKS_v02.xsd',
                                                                                'CT'),
                                                                               ('tExploitationChar',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_ParametersOKS_v02.xsd',
                                                                                'CT'),
                                                                               ('tFloors',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_ParametersOKS_v02.xsd',
                                                                                'CT'),
                                                                               ('tKeyParameters',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_ParametersOKS_v02.xsd',
                                                                                'CT'),
                                                                               ('tKeyParameter',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_ParametersOKS_v02.xsd',
                                                                                'CT'),
                                                                               ('tKeyParametersSubObject',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_ParametersOKS_v02.xsd',
                                                                                'CT'),
                                                                               ('tKeyParameterSubObject',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/_ParametersOKS_v02.xsd',
                                                                                'CT')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/all-documents-out/3.0.2': [('dAllDocuments',
                                                                                 'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dAllDocumentsOut_v03.xsd',
                                                                                 'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/allowed-use/2.0.1': [('dAllowedUse',
                                                                           'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dAllowedUse_v02.xsd',
                                                                           'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/apartment/1.0.1': [('dApartmentType',
                                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dApartment_v01.xsd',
                                                                         'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/ass-building/1.0.1': [('dAssBuilding',
                                                                            'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dAssBuilding_v01.xsd',
                                                                            'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/categories/1.0.1': [('dCategories',
                                                                          'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dCategories_v01.xsd',
                                                                          'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/geopoint-opred/1.0.1': [('dGeopointOpred',
                                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dGeopointOpred_v01.xsd',
                                                                              'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/location-level-1/1.0.1': [('dLocationLevel1Type',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dLocationLevel1_v01.xsd',
                                                                                'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/location-level-2/1.0.1': [('dLocationLevel2Type',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dLocationLevel2_v01.xsd',
                                                                                'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/location-level-3/1.0.1': [('dLocationLevel3Type',
                                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dLocationLevel3_v01.xsd',
                                                                                'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/parcels/1.0.1': [('dParcels',
                                                                       'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dParcels_v01.xsd',
                                                                       'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/permit-use/1.0.1': [('dPermitUse',
                                                                          'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dPermitUse_v01.xsd',
                                                                          'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/realty/3.0.1': [('dRealty',
                                                                      'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dRealty_v03.xsd',
                                                                      'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/regions/1.0.1': [('dRegionsRF',
                                                                       'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dRegionsRF_v01.xsd',
                                                                       'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/soviet-village/1.0.1': [('dSovietVillage',
                                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dSovietVillage_v01.xsd',
                                                                              'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/states/1.0.1': [('dStates',
                                                                      'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dStates_v01.xsd',
                                                                      'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/type-parameter/1.0.1': [('dTypeParameter',
                                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dTypeParameter_v01.xsd',
                                                                              'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/unit/1.0.1': [('dUnit',
                                                                    'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dUnit_v01.xsd',
                                                                    'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/urban-district/1.0.1': [('dUrbanDistrict',
                                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dUrbanDistrict_v01.xsd',
                                                                              'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/utilizations/1.0.1': [('dUtilizations',
                                                                            'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dUtilizations_v01.xsd',
                                                                            'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/directories/wall/1.0.1': [('dWall',
                                                                    'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/dWall_v01.xsd',
                                                                    'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/simple-types/1.0': [('s2',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s3',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s4',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s6',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s8',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s9',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s10',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s11',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s12',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s13',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s20',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s25',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s30',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s40',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s45',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s50',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s60',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s100',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s200',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s250',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s1_255',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s255',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s500',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s512',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s1000',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s1500',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s2000',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s2046',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s2500',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('s4000',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('l1',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('l3',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('l6',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('l11',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sBIC',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sFamilyStatus',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sGUID',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sType_Unit',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sCertificate',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sName',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sName_Contour',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sCadastralBlock_R',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sCadastralNumber_R',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sCadastralBlock_R2',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sID255',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('sIDREF255',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('d4',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('d10_2',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('d20',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('d20_1',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('d20_2',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('d22_1',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('d38',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('d38_2',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('i2',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('i3',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('i4',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('i22',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('i22Min1',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('i40',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('i_Min1Max99',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('p10',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST'),
                                                             ('p22',
                                                              'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v01.xsd',
                                                              'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/simple-types/2.0.1': [('CadastralBlockType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('d21_1',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('d23_1',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('dValueHa',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('i20',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('i6Min1',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('nn1',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('nn2',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('nn20',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('OKTMOType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('p20',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('p22Min1',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('s120',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('s150',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('s5000',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('sCertificate50',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('sInBounds',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('sName500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('sRegNumberCulture',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('sRegNumberCardCulture',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('sName500JPG',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST'),
                                                               ('sName500PDF',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v02.xsd',
                                                                'ST')],
 'urn://x-artefacts-rosreestr-ru/commons/simple-types/4.1.1': [('i3Min1',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('i92Min1',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('nonEmptyString',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sCadastralNumberDistrict',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sCadastralNumberLinear',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sCadastralNumberZone',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sMapPlan500xml',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe10',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe100',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe1000',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe11',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe12',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe15',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe120',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe13',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe150',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe1500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe2',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe20',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe200',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe2000',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe2046',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe25',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe250',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe2500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe255',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe3',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe30',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe4',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe40',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe4000',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe45',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe50',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe5000',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe512',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe6',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe60',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe8',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sNe9',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sRegNumberBound',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST'),
                                                               ('sName500XML',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/P_CommonSimpleType_v04.xsd',
                                                                'ST')],
 'urn://x-artefacts-rosreestr-ru/outgoing/kpt/10.0.1': [('tCadastralBlock',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tParcel',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tContour',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tLandUnit',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tUtilization',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tAreaOut',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tAreaCadastralBlock',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tOMSPoints',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tName',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tObjectsRealty',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tBuilding',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tConstruction',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tUncompleted',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tConditionalPartLinear',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tTerritorialZone',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tSpecialZones',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tPermittedUses',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tPermittedUseAll',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tPermittedUse',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tLocation',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT'),
                                                        ('tElaborationLocation',
                                                         'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT\\KPT_v10.xsd',
                                                         'CT')],
 'urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1': [('RFC2046MimeTypesType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('PostalCodeRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('PhoneNumberRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('EmailAddressType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('LegalPersonINNType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('PhysicalPersonINNType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('SNILSType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('KPPType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('OGRNCompanyType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('OGRNSoleProprietorType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('CadastralNumberType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('OKATOType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('GenderType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('SovietStyleDocumentSeriesType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('digits-7',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('digits-6',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('digits-4',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('digits-2',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num-500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num-200',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num-100',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num-50',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-200',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-100',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-50',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-200',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-100',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-50',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-20',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-10',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('AttachmentRefType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('PrimaryIdentityDocumentType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('AnyIdentityDocumentType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('NotRestrictedDocumentType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('PassportRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('SovietPassportType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('InternationalPassportRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('MilitaryPassportDocumentType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('DrivingLicenseRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('RFC2046MimeTypesType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('PostalCodeRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('PhoneNumberRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('EmailAddressType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('LegalPersonINNType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('PhysicalPersonINNType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('SNILSType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('KPPType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('OGRNCompanyType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('OGRNSoleProprietorType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('CadastralNumberType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('OKATOType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('GenderType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('SovietStyleDocumentSeriesType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('digits-7',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('digits-6',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('digits-4',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('digits-2',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num-500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num-200',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num-100',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-and-num-50',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-200',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-100',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('rus-50',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-500',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-200',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-100',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-50',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-20',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('string-10',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'ST'),
                                                               ('AttachmentRefType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('PrimaryIdentityDocumentType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('AnyIdentityDocumentType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('NotRestrictedDocumentType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('PassportRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('SovietPassportType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('InternationalPassportRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('MilitaryPassportDocumentType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT'),
                                                               ('DrivingLicenseRFType',
                                                                'E:\\Download\\RossRestr\\KPT_v10\\KPT_v10\\KPT/../SchemaCommon/../SchemaCommonSMEV/smev-supplementary-commons-1.0.1.xsd',
                                                                'CT')]}

__all__ = [
    "AnyIdentityDocumentType",
    "AttachmentRefType",
    "BorderType",
    "BorderType12",
    "BordersType",
    "BordersType19",
    "BoundType",
    "BoundariesType",
    "BoundaryType",
    "BoundsType",
    "CadastralBlocksType",
    "ConstructionType",
    "ContoursType",
    "DocumentsType",
    "DocumentsType2",
    "DocumentsType3",
    "DrivingLicenseRFType",
    "EdgeType",
    "EdgeType20",
    "InternationalPassportRFType",
    "KPT",
    "MaterialType",
    "MilitaryPassportDocumentType",
    "NeighboursType",
    "NotRestrictedDocumentType",
    "OMSPointType",
    "ObjectRealtyType",
    "OfficialType",
    "OrdinateType",
    "OrdinateType10",
    "OrdinateType15",
    "OrdinateType17",
    "OrdinateType21",
    "OrdinateType23",
    "OrdinateType8",
    "ParcelsType",
    "PassportRFType",
    "PrimaryIdentityDocumentType",
    "SovietPassportType",
    "SpatialDataType",
    "SpatialElementType",
    "SpatialElementType13",
    "SubjectsBoundaryType",
    "ZoneType",
    "ZonesType",
    "tAddressOut",
    "tApartment",
    "tAreaCadastralBlock",
    "tAreaOut",
    "tBorder",
    "tBorderAgreement",
    "tBorderLand",
    "tBordersAgreement",
    "tBordersInp",
    "tBuilding",
    "tCadastralBlock",
    "tCadastralCost",
    "tCadastralCostExt",
    "tCadastralNumbersOut",
    "tCertificationDoc",
    "tConditionalPartLinear",
    "tConstruction",
    "tContour",
    "tCoordSystem",
    "tCoordSystems",
    "tDirectionAngle",
    "tDocumentWithoutAppliedFile",
    "tElaborationLocation",
    "tElementsConstruct",
    "tEntitySpatial",
    "tEntitySpatialBordersLand",
    "tEntitySpatialBordersZUInp",
    "tEntitySpatialBordersZUOut",
    "tEntitySpatialLandInp",
    "tEntitySpatialLandKVOut",
    "tEntitySpatialLandOut",
    "tEntitySpatialOKSInp",
    "tEntitySpatialOKSOut",
    "tEntitySpatialZUInp",
    "tEntitySpatialZUOut",
    "tExploitationChar",
    "tFloors",
    "tKeyParameter",
    "tKeyParameterSubObject",
    "tKeyParameters",
    "tKeyParametersSubObject",
    "tLandUnit",
    "tLength",
    "tLevel1",
    "tLevel2",
    "tLevel3",
    "tLocation",
    "tName",
    "tName1",
    "tOMSPoints",
    "tObjectsRealty",
    "tOrdinate",
    "tOrdinateInp",
    "tOrdinateOut",
    "tOrdinateXY",
    "tParcel",
    "tPermittedUse",
    "tPermittedUseAll",
    "tPermittedUses",
    "tSovietVillage",
    "tSpatialElement",
    "tSpatialElementLandInp",
    "tSpatialElementLandKVOut",
    "tSpatialElementLandOut",
    "tSpatialElementOKSInp",
    "tSpatialElementOKSOut",
    "tSpatialElementZUInp",
    "tSpatialElementZUOut",
    "tSpecialZones",
    "tSpelementUnit",
    "tSpelementUnitLandInp",
    "tSpelementUnitLandKVOut",
    "tSpelementUnitLandOut",
    "tSpelementUnitOKSInp",
    "tSpelementUnitOKSOut",
    "tSpelementUnitZUInp",
    "tSpelementUnitZUOut",
    "tTerritorialZone",
    "tUncompleted",
    "tUrbanDistrict",
    "tUtilization"
]
