# coding: utf-8

"""
    wd-domain-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_wd_domain_service.configuration import Configuration


class WqEventDetailInput(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 = {
        'event_type': 'int',
        'start_time': 'datetime',
        'end_time': 'datetime',
        'location': 'str',
        'discharge_value': 'Null',
        'components': 'list[WdComponentDetailInput]'
    }

    attribute_map = {
        'event_type': 'eventType',
        'start_time': 'startTime',
        'end_time': 'endTime',
        'location': 'location',
        'discharge_value': 'dischargeValue',
        'components': 'components'
    }

    def __init__(self, event_type=None, start_time=None, end_time=None, location=None, discharge_value=None, components=None, local_vars_configuration=None):  # noqa: E501
        """WqEventDetailInput - 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._event_type = None
        self._start_time = None
        self._end_time = None
        self._location = None
        self._discharge_value = None
        self._components = None
        self.discriminator = None

        if event_type is not None:
            self.event_type = event_type
        if start_time is not None:
            self.start_time = start_time
        if end_time is not None:
            self.end_time = end_time
        self.location = location
        if discharge_value is not None:
            self.discharge_value = discharge_value
        self.components = components

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

        0-PipeBurst(爆管) 1-CloseValve(关阀) 2-WQAccident(水质事件)   # noqa: E501

        :return: The event_type of this WqEventDetailInput.  # noqa: E501
        :rtype: int
        """
        return self._event_type

    @event_type.setter
    def event_type(self, event_type):
        """Sets the event_type of this WqEventDetailInput.

        0-PipeBurst(爆管) 1-CloseValve(关阀) 2-WQAccident(水质事件)   # noqa: E501

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

        self._event_type = event_type

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

        开始时间  # noqa: E501

        :return: The start_time of this WqEventDetailInput.  # noqa: E501
        :rtype: datetime
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """Sets the start_time of this WqEventDetailInput.

        开始时间  # noqa: E501

        :param start_time: The start_time of this WqEventDetailInput.  # noqa: E501
        :type: datetime
        """

        self._start_time = start_time

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

        结束时间  # noqa: E501

        :return: The end_time of this WqEventDetailInput.  # noqa: E501
        :rtype: datetime
        """
        return self._end_time

    @end_time.setter
    def end_time(self, end_time):
        """Sets the end_time of this WqEventDetailInput.

        结束时间  # noqa: E501

        :param end_time: The end_time of this WqEventDetailInput.  # noqa: E501
        :type: datetime
        """

        self._end_time = end_time

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

        事件位置，对于爆管事件和水质事件，填模型id  # noqa: E501

        :return: The location of this WqEventDetailInput.  # noqa: E501
        :rtype: str
        """
        return self._location

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

        事件位置，对于爆管事件和水质事件，填模型id  # noqa: E501

        :param location: The location of this WqEventDetailInput.  # noqa: E501
        :type: str
        """

        self._location = location

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

        排水量/泄水量  # noqa: E501

        :return: The discharge_value of this WqEventDetailInput.  # noqa: E501
        :rtype: Null
        """
        return self._discharge_value

    @discharge_value.setter
    def discharge_value(self, discharge_value):
        """Sets the discharge_value of this WqEventDetailInput.

        排水量/泄水量  # noqa: E501

        :param discharge_value: The discharge_value of this WqEventDetailInput.  # noqa: E501
        :type: Null
        """

        self._discharge_value = discharge_value

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

        污染物(水质事件使用)  # noqa: E501

        :return: The components of this WqEventDetailInput.  # noqa: E501
        :rtype: list[WdComponentDetailInput]
        """
        return self._components

    @components.setter
    def components(self, components):
        """Sets the components of this WqEventDetailInput.

        污染物(水质事件使用)  # noqa: E501

        :param components: The components of this WqEventDetailInput.  # noqa: E501
        :type: list[WdComponentDetailInput]
        """

        self._components = components

    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, WqEventDetailInput):
            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, WqEventDetailInput):
            return True

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