# 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 BTQuantityRange181(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 = {
        'units': 'str',
        'min_value': 'float',
        'max_value': 'float',
        'default_value': 'float',
        'location': 'BTLocationInfo226',
        'bt_type': 'str'
    }

    attribute_map = {
        'units': 'units',
        'min_value': 'minValue',
        'max_value': 'maxValue',
        'default_value': 'defaultValue',
        'location': 'location',
        'bt_type': 'btType'
    }

    discriminator_value_class_map = {
        'BTNullableQuantityRange-1340': 'BTNullableQuantityRange1340'
    }

    def __init__(self, units=None, min_value=None, max_value=None, default_value=None, location=None, bt_type=None):  # noqa: E501
        """BTQuantityRange181 - a model defined in OpenAPI"""  # noqa: E501

        self._units = None
        self._min_value = None
        self._max_value = None
        self._default_value = None
        self._location = None
        self._bt_type = None
        self.discriminator = 'bt_type'

        if units is not None:
            self.units = units
        if min_value is not None:
            self.min_value = min_value
        if max_value is not None:
            self.max_value = max_value
        if default_value is not None:
            self.default_value = default_value
        if location is not None:
            self.location = location
        if bt_type is not None:
            self.bt_type = bt_type

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


        :return: The units of this BTQuantityRange181.  # noqa: E501
        :rtype: str
        """
        return self._units

    @units.setter
    def units(self, units):
        """Sets the units of this BTQuantityRange181.


        :param units: The units of this BTQuantityRange181.  # noqa: E501
        :type: str
        """

        self._units = units

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


        :return: The min_value of this BTQuantityRange181.  # noqa: E501
        :rtype: float
        """
        return self._min_value

    @min_value.setter
    def min_value(self, min_value):
        """Sets the min_value of this BTQuantityRange181.


        :param min_value: The min_value of this BTQuantityRange181.  # noqa: E501
        :type: float
        """

        self._min_value = min_value

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


        :return: The max_value of this BTQuantityRange181.  # noqa: E501
        :rtype: float
        """
        return self._max_value

    @max_value.setter
    def max_value(self, max_value):
        """Sets the max_value of this BTQuantityRange181.


        :param max_value: The max_value of this BTQuantityRange181.  # noqa: E501
        :type: float
        """

        self._max_value = max_value

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


        :return: The default_value of this BTQuantityRange181.  # noqa: E501
        :rtype: float
        """
        return self._default_value

    @default_value.setter
    def default_value(self, default_value):
        """Sets the default_value of this BTQuantityRange181.


        :param default_value: The default_value of this BTQuantityRange181.  # noqa: E501
        :type: float
        """

        self._default_value = default_value

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


        :return: The location of this BTQuantityRange181.  # noqa: E501
        :rtype: BTLocationInfo226
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this BTQuantityRange181.


        :param location: The location of this BTQuantityRange181.  # noqa: E501
        :type: BTLocationInfo226
        """

        self._location = location

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


        :return: The bt_type of this BTQuantityRange181.  # noqa: E501
        :rtype: str
        """
        return self._bt_type

    @bt_type.setter
    def bt_type(self, bt_type):
        """Sets the bt_type of this BTQuantityRange181.


        :param bt_type: The bt_type of this BTQuantityRange181.  # noqa: E501
        :type: str
        """

        self._bt_type = bt_type

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

        return self.__dict__ == other.__dict__

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