# coding: utf-8

"""
    farm API

    farm API documentation  # noqa: E501

    OpenAPI spec version: 0.0.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class UnitConversionDto(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'base_unit_conversion_factor': 'float',
        'base_unit_id': 'int',
        'conversion_factor': 'float',
        'from_unit_id': 'int',
        'id': 'int',
        'to_unit_id': 'int'
    }

    attribute_map = {
        'base_unit_conversion_factor': 'baseUnitConversionFactor',
        'base_unit_id': 'baseUnitId',
        'conversion_factor': 'conversionFactor',
        'from_unit_id': 'fromUnitId',
        'id': 'id',
        'to_unit_id': 'toUnitId'
    }

    def __init__(self, base_unit_conversion_factor=None, base_unit_id=None, conversion_factor=None, from_unit_id=None, id=None, to_unit_id=None):  # noqa: E501
        """UnitConversionDto - a model defined in Swagger"""  # noqa: E501
        self._base_unit_conversion_factor = None
        self._base_unit_id = None
        self._conversion_factor = None
        self._from_unit_id = None
        self._id = None
        self._to_unit_id = None
        self.discriminator = None
        if base_unit_conversion_factor is not None:
            self.base_unit_conversion_factor = base_unit_conversion_factor
        if base_unit_id is not None:
            self.base_unit_id = base_unit_id
        if conversion_factor is not None:
            self.conversion_factor = conversion_factor
        if from_unit_id is not None:
            self.from_unit_id = from_unit_id
        if id is not None:
            self.id = id
        if to_unit_id is not None:
            self.to_unit_id = to_unit_id

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


        :return: The base_unit_conversion_factor of this UnitConversionDto.  # noqa: E501
        :rtype: float
        """
        return self._base_unit_conversion_factor

    @base_unit_conversion_factor.setter
    def base_unit_conversion_factor(self, base_unit_conversion_factor):
        """Sets the base_unit_conversion_factor of this UnitConversionDto.


        :param base_unit_conversion_factor: The base_unit_conversion_factor of this UnitConversionDto.  # noqa: E501
        :type: float
        """

        self._base_unit_conversion_factor = base_unit_conversion_factor

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


        :return: The base_unit_id of this UnitConversionDto.  # noqa: E501
        :rtype: int
        """
        return self._base_unit_id

    @base_unit_id.setter
    def base_unit_id(self, base_unit_id):
        """Sets the base_unit_id of this UnitConversionDto.


        :param base_unit_id: The base_unit_id of this UnitConversionDto.  # noqa: E501
        :type: int
        """

        self._base_unit_id = base_unit_id

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


        :return: The conversion_factor of this UnitConversionDto.  # noqa: E501
        :rtype: float
        """
        return self._conversion_factor

    @conversion_factor.setter
    def conversion_factor(self, conversion_factor):
        """Sets the conversion_factor of this UnitConversionDto.


        :param conversion_factor: The conversion_factor of this UnitConversionDto.  # noqa: E501
        :type: float
        """

        self._conversion_factor = conversion_factor

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


        :return: The from_unit_id of this UnitConversionDto.  # noqa: E501
        :rtype: int
        """
        return self._from_unit_id

    @from_unit_id.setter
    def from_unit_id(self, from_unit_id):
        """Sets the from_unit_id of this UnitConversionDto.


        :param from_unit_id: The from_unit_id of this UnitConversionDto.  # noqa: E501
        :type: int
        """

        self._from_unit_id = from_unit_id

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


        :return: The id of this UnitConversionDto.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this UnitConversionDto.


        :param id: The id of this UnitConversionDto.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The to_unit_id of this UnitConversionDto.  # noqa: E501
        :rtype: int
        """
        return self._to_unit_id

    @to_unit_id.setter
    def to_unit_id(self, to_unit_id):
        """Sets the to_unit_id of this UnitConversionDto.


        :param to_unit_id: The to_unit_id of this UnitConversionDto.  # noqa: E501
        :type: int
        """

        self._to_unit_id = to_unit_id

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(UnitConversionDto, dict):
            for key, value in self.items():
                result[key] = 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, UnitConversionDto):
            return False

        return self.__dict__ == other.__dict__

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