# 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 EventDetailInfo(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 = {
        'id': 'str',
        'scene_id': 'str',
        'name': 'str',
        'discharge_type': 'int',
        'start_time': 'datetime',
        'end_time': 'datetime',
        'location': 'str',
        'river_id': 'str',
        'chainage': 'float',
        'discharge_value': 'Null',
        'event_type': 'str',
        'components': 'list[ComponentDetailInfo]'
    }

    attribute_map = {
        'id': 'id',
        'scene_id': 'sceneId',
        'name': 'name',
        'discharge_type': 'dischargeType',
        'start_time': 'startTime',
        'end_time': 'endTime',
        'location': 'location',
        'river_id': 'riverID',
        'chainage': 'chainage',
        'discharge_value': 'dischargeValue',
        'event_type': 'eventType',
        'components': 'components'
    }

    def __init__(self, id=None, scene_id=None, name=None, discharge_type=None, start_time=None, end_time=None, location=None, river_id=None, chainage=None, discharge_value=None, event_type=None, components=None, local_vars_configuration=None):  # noqa: E501
        """EventDetailInfo - 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._id = None
        self._scene_id = None
        self._name = None
        self._discharge_type = None
        self._start_time = None
        self._end_time = None
        self._location = None
        self._river_id = None
        self._chainage = None
        self._discharge_value = None
        self._event_type = None
        self._components = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if scene_id is not None:
            self.scene_id = scene_id
        self.name = name
        if discharge_type is not None:
            self.discharge_type = discharge_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
        self.river_id = river_id
        self.chainage = chainage
        if discharge_value is not None:
            self.discharge_value = discharge_value
        self.event_type = event_type
        self.components = components

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


        :return: The id of this EventDetailInfo.  # noqa: E501
        :rtype: str
        """
        return self._id

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


        :param id: The id of this EventDetailInfo.  # noqa: E501
        :type: str
        """

        self._id = id

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

        情景id  # noqa: E501

        :return: The scene_id of this EventDetailInfo.  # noqa: E501
        :rtype: str
        """
        return self._scene_id

    @scene_id.setter
    def scene_id(self, scene_id):
        """Sets the scene_id of this EventDetailInfo.

        情景id  # noqa: E501

        :param scene_id: The scene_id of this EventDetailInfo.  # noqa: E501
        :type: str
        """

        self._scene_id = scene_id

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

        事件名  # noqa: E501

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

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

        事件名  # noqa: E501

        :param name: The name of this EventDetailInfo.  # noqa: E501
        :type: str
        """

        self._name = name

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

        0-TimeSeries(时间序列) 1-Constant(常量)   # noqa: E501

        :return: The discharge_type of this EventDetailInfo.  # noqa: E501
        :rtype: int
        """
        return self._discharge_type

    @discharge_type.setter
    def discharge_type(self, discharge_type):
        """Sets the discharge_type of this EventDetailInfo.

        0-TimeSeries(时间序列) 1-Constant(常量)   # noqa: E501

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

        self._discharge_type = discharge_type

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

        开始时间  # noqa: E501

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

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

        开始时间  # noqa: E501

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

        self._start_time = start_time

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

        结束时间  # noqa: E501

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

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

        结束时间  # noqa: E501

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

        self._end_time = end_time

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

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

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

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

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

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

        self._location = location

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


        :return: The river_id of this EventDetailInfo.  # noqa: E501
        :rtype: str
        """
        return self._river_id

    @river_id.setter
    def river_id(self, river_id):
        """Sets the river_id of this EventDetailInfo.


        :param river_id: The river_id of this EventDetailInfo.  # noqa: E501
        :type: str
        """

        self._river_id = river_id

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


        :return: The chainage of this EventDetailInfo.  # noqa: E501
        :rtype: float
        """
        return self._chainage

    @chainage.setter
    def chainage(self, chainage):
        """Sets the chainage of this EventDetailInfo.


        :param chainage: The chainage of this EventDetailInfo.  # noqa: E501
        :type: float
        """

        self._chainage = chainage

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

        排水量/泄水量  # noqa: E501

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

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

        排水量/泄水量  # noqa: E501

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

        self._discharge_value = discharge_value

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

        事件类型  # noqa: E501

        :return: The event_type of this EventDetailInfo.  # noqa: E501
        :rtype: str
        """
        return self._event_type

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

        事件类型  # noqa: E501

        :param event_type: The event_type of this EventDetailInfo.  # noqa: E501
        :type: str
        """

        self._event_type = event_type

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

        污染物（污染物事故使用）  # noqa: E501

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

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

        污染物（污染物事故使用）  # noqa: E501

        :param components: The components of this EventDetailInfo.  # noqa: E501
        :type: list[ComponentDetailInfo]
        """

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

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