# coding: utf-8

"""
    wwtp-paas-infrastructure-service

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from dhicn_wwtp_infrastructure_service.configuration import Configuration


class DosageBasicInfo(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 = {
        'production_line': 'str',
        'is_intelligence': 'bool',
        'code': 'str',
        'dosage': 'float',
        'category': 'int'
    }

    attribute_map = {
        'production_line': 'productionLine',
        'is_intelligence': 'isIntelligence',
        'code': 'code',
        'dosage': 'dosage',
        'category': 'category'
    }

    def __init__(self, production_line=None, is_intelligence=None, code=None, dosage=None, category=None, local_vars_configuration=None):  # noqa: E501
        """DosageBasicInfo - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._production_line = None
        self._is_intelligence = None
        self._code = None
        self._dosage = None
        self._category = None
        self.discriminator = None

        self.production_line = production_line
        if is_intelligence is not None:
            self.is_intelligence = is_intelligence
        self.code = code
        if dosage is not None:
            self.dosage = dosage
        if category is not None:
            self.category = category

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

        该租户下的产线 product line  # noqa: E501

        :return: The production_line of this DosageBasicInfo.  # noqa: E501
        :rtype: str
        """
        return self._production_line

    @production_line.setter
    def production_line(self, production_line):
        """Sets the production_line of this DosageBasicInfo.

        该租户下的产线 product line  # noqa: E501

        :param production_line: The production_line of this DosageBasicInfo.  # noqa: E501
        :type: str
        """

        self._production_line = production_line

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

        是否为智能加药，如果是则调用加药算法，如果不是则使用手动加药量发送给下一个接口 if use intelligent dosage  # noqa: E501

        :return: The is_intelligence of this DosageBasicInfo.  # noqa: E501
        :rtype: bool
        """
        return self._is_intelligence

    @is_intelligence.setter
    def is_intelligence(self, is_intelligence):
        """Sets the is_intelligence of this DosageBasicInfo.

        是否为智能加药，如果是则调用加药算法，如果不是则使用手动加药量发送给下一个接口 if use intelligent dosage  # noqa: E501

        :param is_intelligence: The is_intelligence of this DosageBasicInfo.  # noqa: E501
        :type: bool
        """

        self._is_intelligence = is_intelligence

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

        加药量编码 dosing code  # noqa: E501

        :return: The code of this DosageBasicInfo.  # noqa: E501
        :rtype: str
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this DosageBasicInfo.

        加药量编码 dosing code  # noqa: E501

        :param code: The code of this DosageBasicInfo.  # noqa: E501
        :type: str
        """

        self._code = code

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

        加药量 dosage  # noqa: E501

        :return: The dosage of this DosageBasicInfo.  # noqa: E501
        :rtype: float
        """
        return self._dosage

    @dosage.setter
    def dosage(self, dosage):
        """Sets the dosage of this DosageBasicInfo.

        加药量 dosage  # noqa: E501

        :param dosage: The dosage of this DosageBasicInfo.  # noqa: E501
        :type: float
        """

        self._dosage = dosage

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

        加药类型 dosing type  # noqa: E501

        :return: The category of this DosageBasicInfo.  # noqa: E501
        :rtype: int
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this DosageBasicInfo.

        加药类型 dosing type  # noqa: E501

        :param category: The category of this DosageBasicInfo.  # noqa: E501
        :type: int
        """
        allowed_values = [1, 2, 3, 4]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and category not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `category` ({0}), must be one of {1}"  # noqa: E501
                .format(category, allowed_values)
            )

        self._category = category

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
