# 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 UnitMasterDto(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 = {
        'id': 'int',
        'is_active': 'int',
        'name': 'str',
        'unit_description': 'str',
        'unit_short_code': 'str',
        'unit_symbol': 'str',
        'unit_type': 'str'
    }

    attribute_map = {
        'id': 'id',
        'is_active': 'isActive',
        'name': 'name',
        'unit_description': 'unitDescription',
        'unit_short_code': 'unitShortCode',
        'unit_symbol': 'unitSymbol',
        'unit_type': 'unitType'
    }

    def __init__(self, id=None, is_active=None, name=None, unit_description=None, unit_short_code=None, unit_symbol=None, unit_type=None):  # noqa: E501
        """UnitMasterDto - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._is_active = None
        self._name = None
        self._unit_description = None
        self._unit_short_code = None
        self._unit_symbol = None
        self._unit_type = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if is_active is not None:
            self.is_active = is_active
        self.name = name
        if unit_description is not None:
            self.unit_description = unit_description
        if unit_short_code is not None:
            self.unit_short_code = unit_short_code
        if unit_symbol is not None:
            self.unit_symbol = unit_symbol
        if unit_type is not None:
            self.unit_type = unit_type

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


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

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


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

        self._id = id

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


        :return: The is_active of this UnitMasterDto.  # noqa: E501
        :rtype: int
        """
        return self._is_active

    @is_active.setter
    def is_active(self, is_active):
        """Sets the is_active of this UnitMasterDto.


        :param is_active: The is_active of this UnitMasterDto.  # noqa: E501
        :type: int
        """

        self._is_active = is_active

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


        :return: The name of this UnitMasterDto.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this UnitMasterDto.


        :param name: The name of this UnitMasterDto.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


        :return: The unit_description of this UnitMasterDto.  # noqa: E501
        :rtype: str
        """
        return self._unit_description

    @unit_description.setter
    def unit_description(self, unit_description):
        """Sets the unit_description of this UnitMasterDto.


        :param unit_description: The unit_description of this UnitMasterDto.  # noqa: E501
        :type: str
        """

        self._unit_description = unit_description

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


        :return: The unit_short_code of this UnitMasterDto.  # noqa: E501
        :rtype: str
        """
        return self._unit_short_code

    @unit_short_code.setter
    def unit_short_code(self, unit_short_code):
        """Sets the unit_short_code of this UnitMasterDto.


        :param unit_short_code: The unit_short_code of this UnitMasterDto.  # noqa: E501
        :type: str
        """

        self._unit_short_code = unit_short_code

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


        :return: The unit_symbol of this UnitMasterDto.  # noqa: E501
        :rtype: str
        """
        return self._unit_symbol

    @unit_symbol.setter
    def unit_symbol(self, unit_symbol):
        """Sets the unit_symbol of this UnitMasterDto.


        :param unit_symbol: The unit_symbol of this UnitMasterDto.  # noqa: E501
        :type: str
        """

        self._unit_symbol = unit_symbol

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


        :return: The unit_type of this UnitMasterDto.  # noqa: E501
        :rtype: str
        """
        return self._unit_type

    @unit_type.setter
    def unit_type(self, unit_type):
        """Sets the unit_type of this UnitMasterDto.


        :param unit_type: The unit_type of this UnitMasterDto.  # noqa: E501
        :type: str
        """

        self._unit_type = unit_type

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

        return self.__dict__ == other.__dict__

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