# coding: utf-8

"""
    Onshape REST API

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

    OpenAPI spec version: 1.96
    Contact: api-support@onshape.zendesk.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class BTInsertionLocation(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 = {
        'order_preserving': 'bool',
        'adjacent_to_node': 'bool',
        'node_id': 'str',
        'node_id_raw': 'BTObjectId',
        'child_field_index': 'int',
        'before': 'bool',
        'type_id': 'int',
        'connection_source': 'BTConnection',
        'export_type_name': 'str',
        'unknown_class': 'bool'
    }

    attribute_map = {
        'order_preserving': 'orderPreserving',
        'adjacent_to_node': 'adjacentToNode',
        'node_id': 'nodeId',
        'node_id_raw': 'nodeIdRaw',
        'child_field_index': 'childFieldIndex',
        'before': 'before',
        'type_id': 'typeId',
        'connection_source': 'connectionSource',
        'export_type_name': 'exportTypeName',
        'unknown_class': 'unknownClass'
    }

    def __init__(self, order_preserving=None, adjacent_to_node=None, node_id=None, node_id_raw=None, child_field_index=None, before=None, type_id=None, connection_source=None, export_type_name=None, unknown_class=None):  # noqa: E501
        """BTInsertionLocation - a model defined in OpenAPI"""  # noqa: E501

        self._order_preserving = None
        self._adjacent_to_node = None
        self._node_id = None
        self._node_id_raw = None
        self._child_field_index = None
        self._before = None
        self._type_id = None
        self._connection_source = None
        self._export_type_name = None
        self._unknown_class = None
        self.discriminator = None

        if order_preserving is not None:
            self.order_preserving = order_preserving
        if adjacent_to_node is not None:
            self.adjacent_to_node = adjacent_to_node
        if node_id is not None:
            self.node_id = node_id
        if node_id_raw is not None:
            self.node_id_raw = node_id_raw
        if child_field_index is not None:
            self.child_field_index = child_field_index
        if before is not None:
            self.before = before
        if type_id is not None:
            self.type_id = type_id
        if connection_source is not None:
            self.connection_source = connection_source
        if export_type_name is not None:
            self.export_type_name = export_type_name
        if unknown_class is not None:
            self.unknown_class = unknown_class

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


        :return: The order_preserving of this BTInsertionLocation.  # noqa: E501
        :rtype: bool
        """
        return self._order_preserving

    @order_preserving.setter
    def order_preserving(self, order_preserving):
        """Sets the order_preserving of this BTInsertionLocation.


        :param order_preserving: The order_preserving of this BTInsertionLocation.  # noqa: E501
        :type: bool
        """

        self._order_preserving = order_preserving

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


        :return: The adjacent_to_node of this BTInsertionLocation.  # noqa: E501
        :rtype: bool
        """
        return self._adjacent_to_node

    @adjacent_to_node.setter
    def adjacent_to_node(self, adjacent_to_node):
        """Sets the adjacent_to_node of this BTInsertionLocation.


        :param adjacent_to_node: The adjacent_to_node of this BTInsertionLocation.  # noqa: E501
        :type: bool
        """

        self._adjacent_to_node = adjacent_to_node

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


        :return: The node_id of this BTInsertionLocation.  # noqa: E501
        :rtype: str
        """
        return self._node_id

    @node_id.setter
    def node_id(self, node_id):
        """Sets the node_id of this BTInsertionLocation.


        :param node_id: The node_id of this BTInsertionLocation.  # noqa: E501
        :type: str
        """

        self._node_id = node_id

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


        :return: The node_id_raw of this BTInsertionLocation.  # noqa: E501
        :rtype: BTObjectId
        """
        return self._node_id_raw

    @node_id_raw.setter
    def node_id_raw(self, node_id_raw):
        """Sets the node_id_raw of this BTInsertionLocation.


        :param node_id_raw: The node_id_raw of this BTInsertionLocation.  # noqa: E501
        :type: BTObjectId
        """

        self._node_id_raw = node_id_raw

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


        :return: The child_field_index of this BTInsertionLocation.  # noqa: E501
        :rtype: int
        """
        return self._child_field_index

    @child_field_index.setter
    def child_field_index(self, child_field_index):
        """Sets the child_field_index of this BTInsertionLocation.


        :param child_field_index: The child_field_index of this BTInsertionLocation.  # noqa: E501
        :type: int
        """

        self._child_field_index = child_field_index

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


        :return: The before of this BTInsertionLocation.  # noqa: E501
        :rtype: bool
        """
        return self._before

    @before.setter
    def before(self, before):
        """Sets the before of this BTInsertionLocation.


        :param before: The before of this BTInsertionLocation.  # noqa: E501
        :type: bool
        """

        self._before = before

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


        :return: The type_id of this BTInsertionLocation.  # noqa: E501
        :rtype: int
        """
        return self._type_id

    @type_id.setter
    def type_id(self, type_id):
        """Sets the type_id of this BTInsertionLocation.


        :param type_id: The type_id of this BTInsertionLocation.  # noqa: E501
        :type: int
        """

        self._type_id = type_id

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


        :return: The connection_source of this BTInsertionLocation.  # noqa: E501
        :rtype: BTConnection
        """
        return self._connection_source

    @connection_source.setter
    def connection_source(self, connection_source):
        """Sets the connection_source of this BTInsertionLocation.


        :param connection_source: The connection_source of this BTInsertionLocation.  # noqa: E501
        :type: BTConnection
        """

        self._connection_source = connection_source

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


        :return: The export_type_name of this BTInsertionLocation.  # noqa: E501
        :rtype: str
        """
        return self._export_type_name

    @export_type_name.setter
    def export_type_name(self, export_type_name):
        """Sets the export_type_name of this BTInsertionLocation.


        :param export_type_name: The export_type_name of this BTInsertionLocation.  # noqa: E501
        :type: str
        """

        self._export_type_name = export_type_name

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


        :return: The unknown_class of this BTInsertionLocation.  # noqa: E501
        :rtype: bool
        """
        return self._unknown_class

    @unknown_class.setter
    def unknown_class(self, unknown_class):
        """Sets the unknown_class of this BTInsertionLocation.


        :param unknown_class: The unknown_class of this BTInsertionLocation.  # noqa: E501
        :type: bool
        """

        self._unknown_class = unknown_class

    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, BTInsertionLocation):
            return False

        return self.__dict__ == other.__dict__

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