# coding: utf-8

"""
    Onshape REST API

    The Onshape REST API consumed by all clients.  # noqa: E501

    The version of the OpenAPI document: 1.106
    Contact: api-support@onshape.zendesk.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class BTPTopLevelNode286(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'deprecated': 'bool',
        'symbol_name': 'BTPIdentifier8',
        'arguments_to_document': 'list[BTPArgumentDeclaration232]',
        'deprecated_explanation': 'str',
        'for_export': 'bool',
        'space_after_export': 'BTPSpace10',
        'annotation': 'BTPAnnotation231'
    }

    attribute_map = {
        'deprecated': 'deprecated',
        'symbol_name': 'symbolName',
        'arguments_to_document': 'argumentsToDocument',
        'deprecated_explanation': 'deprecatedExplanation',
        'for_export': 'forExport',
        'space_after_export': 'spaceAfterExport',
        'annotation': 'annotation'
    }

    discriminator_value_class_map = {
        'BTPTopLevelImport-285': 'BTPTopLevelImport285',
        'BTPTopLevelConstantDeclaration-283': 'BTPTopLevelConstantDeclaration283',
        'BTPTopLevelTypeDeclaration-287': 'BTPTopLevelTypeDeclaration287',
        'BTPProcedureDeclarationBase-266': 'BTPProcedureDeclarationBase266'
    }

    def __init__(self, deprecated=None, symbol_name=None, arguments_to_document=None, deprecated_explanation=None, for_export=None, space_after_export=None, annotation=None):  # noqa: E501
        """BTPTopLevelNode286 - a model defined in OpenAPI"""  # noqa: E501

        self._deprecated = None
        self._symbol_name = None
        self._arguments_to_document = None
        self._deprecated_explanation = None
        self._for_export = None
        self._space_after_export = None
        self._annotation = None
        self.discriminator = 'bt_type'

        if deprecated is not None:
            self.deprecated = deprecated
        if symbol_name is not None:
            self.symbol_name = symbol_name
        if arguments_to_document is not None:
            self.arguments_to_document = arguments_to_document
        if deprecated_explanation is not None:
            self.deprecated_explanation = deprecated_explanation
        if for_export is not None:
            self.for_export = for_export
        if space_after_export is not None:
            self.space_after_export = space_after_export
        if annotation is not None:
            self.annotation = annotation

    @property
    def deprecated(self):
        """Gets the deprecated of this BTPTopLevelNode286.  # noqa: E501


        :return: The deprecated of this BTPTopLevelNode286.  # noqa: E501
        :rtype: bool
        """
        return self._deprecated

    @deprecated.setter
    def deprecated(self, deprecated):
        """Sets the deprecated of this BTPTopLevelNode286.


        :param deprecated: The deprecated of this BTPTopLevelNode286.  # noqa: E501
        :type: bool
        """

        self._deprecated = deprecated

    @property
    def symbol_name(self):
        """Gets the symbol_name of this BTPTopLevelNode286.  # noqa: E501


        :return: The symbol_name of this BTPTopLevelNode286.  # noqa: E501
        :rtype: BTPIdentifier8
        """
        return self._symbol_name

    @symbol_name.setter
    def symbol_name(self, symbol_name):
        """Sets the symbol_name of this BTPTopLevelNode286.


        :param symbol_name: The symbol_name of this BTPTopLevelNode286.  # noqa: E501
        :type: BTPIdentifier8
        """

        self._symbol_name = symbol_name

    @property
    def arguments_to_document(self):
        """Gets the arguments_to_document of this BTPTopLevelNode286.  # noqa: E501


        :return: The arguments_to_document of this BTPTopLevelNode286.  # noqa: E501
        :rtype: list[BTPArgumentDeclaration232]
        """
        return self._arguments_to_document

    @arguments_to_document.setter
    def arguments_to_document(self, arguments_to_document):
        """Sets the arguments_to_document of this BTPTopLevelNode286.


        :param arguments_to_document: The arguments_to_document of this BTPTopLevelNode286.  # noqa: E501
        :type: list[BTPArgumentDeclaration232]
        """

        self._arguments_to_document = arguments_to_document

    @property
    def deprecated_explanation(self):
        """Gets the deprecated_explanation of this BTPTopLevelNode286.  # noqa: E501


        :return: The deprecated_explanation of this BTPTopLevelNode286.  # noqa: E501
        :rtype: str
        """
        return self._deprecated_explanation

    @deprecated_explanation.setter
    def deprecated_explanation(self, deprecated_explanation):
        """Sets the deprecated_explanation of this BTPTopLevelNode286.


        :param deprecated_explanation: The deprecated_explanation of this BTPTopLevelNode286.  # noqa: E501
        :type: str
        """

        self._deprecated_explanation = deprecated_explanation

    @property
    def for_export(self):
        """Gets the for_export of this BTPTopLevelNode286.  # noqa: E501


        :return: The for_export of this BTPTopLevelNode286.  # noqa: E501
        :rtype: bool
        """
        return self._for_export

    @for_export.setter
    def for_export(self, for_export):
        """Sets the for_export of this BTPTopLevelNode286.


        :param for_export: The for_export of this BTPTopLevelNode286.  # noqa: E501
        :type: bool
        """

        self._for_export = for_export

    @property
    def space_after_export(self):
        """Gets the space_after_export of this BTPTopLevelNode286.  # noqa: E501


        :return: The space_after_export of this BTPTopLevelNode286.  # noqa: E501
        :rtype: BTPSpace10
        """
        return self._space_after_export

    @space_after_export.setter
    def space_after_export(self, space_after_export):
        """Sets the space_after_export of this BTPTopLevelNode286.


        :param space_after_export: The space_after_export of this BTPTopLevelNode286.  # noqa: E501
        :type: BTPSpace10
        """

        self._space_after_export = space_after_export

    @property
    def annotation(self):
        """Gets the annotation of this BTPTopLevelNode286.  # noqa: E501


        :return: The annotation of this BTPTopLevelNode286.  # noqa: E501
        :rtype: BTPAnnotation231
        """
        return self._annotation

    @annotation.setter
    def annotation(self, annotation):
        """Sets the annotation of this BTPTopLevelNode286.


        :param annotation: The annotation of this BTPTopLevelNode286.  # noqa: E501
        :type: BTPAnnotation231
        """

        self._annotation = annotation

    def get_real_child_model(self, data):
        """Returns the real base class specified by the discriminator"""
        discriminator_key = self.attribute_map[self.discriminator]
        discriminator_value = data[discriminator_key]
        return self.discriminator_value_class_map.get(discriminator_value)

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, BTPTopLevelNode286):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
