# coding: utf-8

"""
    XMS API

    XMS is the controller of distributed storage system  # noqa: E501

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


import pprint
import re  # noqa: F401
import six

# from xms_client.models.host_nestview import HostNestview  # noqa: F401,E501


class Alert(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 = {
        'ack_time': 'datetime',
        'acked': 'bool',
        'alert_value': 'str',
        'create': 'datetime',
        'data': 'str',
        'extra_data': 'str',
        'host': 'HostNestview',
        'id': 'int',
        'level': 'str',
        'resource_id': 'int',
        'resource_name': 'str',
        'resource_type': 'str',
        'trigger_mode': 'str',
        'trigger_period': 'int',
        'trigger_value': 'str',
        'type': 'str'
    }

    attribute_map = {
        'ack_time': 'ack_time',
        'acked': 'acked',
        'alert_value': 'alert_value',
        'create': 'create',
        'data': 'data',
        'extra_data': 'extra_data',
        'host': 'host',
        'id': 'id',
        'level': 'level',
        'resource_id': 'resource_id',
        'resource_name': 'resource_name',
        'resource_type': 'resource_type',
        'trigger_mode': 'trigger_mode',
        'trigger_period': 'trigger_period',
        'trigger_value': 'trigger_value',
        'type': 'type'
    }

    def __init__(self, ack_time=None, acked=None, alert_value=None, create=None, data=None, extra_data=None, host=None, id=None, level=None, resource_id=None, resource_name=None, resource_type=None, trigger_mode=None, trigger_period=None, trigger_value=None, type=None):  # noqa: E501
        """Alert - a model defined in Swagger"""  # noqa: E501

        self._ack_time = None
        self._acked = None
        self._alert_value = None
        self._create = None
        self._data = None
        self._extra_data = None
        self._host = None
        self._id = None
        self._level = None
        self._resource_id = None
        self._resource_name = None
        self._resource_type = None
        self._trigger_mode = None
        self._trigger_period = None
        self._trigger_value = None
        self._type = None
        self.discriminator = None

        if ack_time is not None:
            self.ack_time = ack_time
        if acked is not None:
            self.acked = acked
        if alert_value is not None:
            self.alert_value = alert_value
        if create is not None:
            self.create = create
        if data is not None:
            self.data = data
        if extra_data is not None:
            self.extra_data = extra_data
        if host is not None:
            self.host = host
        if id is not None:
            self.id = id
        if level is not None:
            self.level = level
        if resource_id is not None:
            self.resource_id = resource_id
        if resource_name is not None:
            self.resource_name = resource_name
        if resource_type is not None:
            self.resource_type = resource_type
        if trigger_mode is not None:
            self.trigger_mode = trigger_mode
        if trigger_period is not None:
            self.trigger_period = trigger_period
        if trigger_value is not None:
            self.trigger_value = trigger_value
        if type is not None:
            self.type = type

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


        :return: The ack_time of this Alert.  # noqa: E501
        :rtype: datetime
        """
        return self._ack_time

    @ack_time.setter
    def ack_time(self, ack_time):
        """Sets the ack_time of this Alert.


        :param ack_time: The ack_time of this Alert.  # noqa: E501
        :type: datetime
        """

        self._ack_time = ack_time

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


        :return: The acked of this Alert.  # noqa: E501
        :rtype: bool
        """
        return self._acked

    @acked.setter
    def acked(self, acked):
        """Sets the acked of this Alert.


        :param acked: The acked of this Alert.  # noqa: E501
        :type: bool
        """

        self._acked = acked

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


        :return: The alert_value of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._alert_value

    @alert_value.setter
    def alert_value(self, alert_value):
        """Sets the alert_value of this Alert.


        :param alert_value: The alert_value of this Alert.  # noqa: E501
        :type: str
        """

        self._alert_value = alert_value

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


        :return: The create of this Alert.  # noqa: E501
        :rtype: datetime
        """
        return self._create

    @create.setter
    def create(self, create):
        """Sets the create of this Alert.


        :param create: The create of this Alert.  # noqa: E501
        :type: datetime
        """

        self._create = create

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


        :return: The data of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._data

    @data.setter
    def data(self, data):
        """Sets the data of this Alert.


        :param data: The data of this Alert.  # noqa: E501
        :type: str
        """

        self._data = data

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


        :return: The extra_data of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._extra_data

    @extra_data.setter
    def extra_data(self, extra_data):
        """Sets the extra_data of this Alert.


        :param extra_data: The extra_data of this Alert.  # noqa: E501
        :type: str
        """

        self._extra_data = extra_data

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


        :return: The host of this Alert.  # noqa: E501
        :rtype: HostNestview
        """
        return self._host

    @host.setter
    def host(self, host):
        """Sets the host of this Alert.


        :param host: The host of this Alert.  # noqa: E501
        :type: HostNestview
        """

        self._host = host

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


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

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


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

        self._id = id

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


        :return: The level of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._level

    @level.setter
    def level(self, level):
        """Sets the level of this Alert.


        :param level: The level of this Alert.  # noqa: E501
        :type: str
        """

        self._level = level

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


        :return: The resource_id of this Alert.  # noqa: E501
        :rtype: int
        """
        return self._resource_id

    @resource_id.setter
    def resource_id(self, resource_id):
        """Sets the resource_id of this Alert.


        :param resource_id: The resource_id of this Alert.  # noqa: E501
        :type: int
        """

        self._resource_id = resource_id

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


        :return: The resource_name of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._resource_name

    @resource_name.setter
    def resource_name(self, resource_name):
        """Sets the resource_name of this Alert.


        :param resource_name: The resource_name of this Alert.  # noqa: E501
        :type: str
        """

        self._resource_name = resource_name

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


        :return: The resource_type of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._resource_type

    @resource_type.setter
    def resource_type(self, resource_type):
        """Sets the resource_type of this Alert.


        :param resource_type: The resource_type of this Alert.  # noqa: E501
        :type: str
        """

        self._resource_type = resource_type

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


        :return: The trigger_mode of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._trigger_mode

    @trigger_mode.setter
    def trigger_mode(self, trigger_mode):
        """Sets the trigger_mode of this Alert.


        :param trigger_mode: The trigger_mode of this Alert.  # noqa: E501
        :type: str
        """

        self._trigger_mode = trigger_mode

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


        :return: The trigger_period of this Alert.  # noqa: E501
        :rtype: int
        """
        return self._trigger_period

    @trigger_period.setter
    def trigger_period(self, trigger_period):
        """Sets the trigger_period of this Alert.


        :param trigger_period: The trigger_period of this Alert.  # noqa: E501
        :type: int
        """

        self._trigger_period = trigger_period

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


        :return: The trigger_value of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._trigger_value

    @trigger_value.setter
    def trigger_value(self, trigger_value):
        """Sets the trigger_value of this Alert.


        :param trigger_value: The trigger_value of this Alert.  # noqa: E501
        :type: str
        """

        self._trigger_value = trigger_value

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


        :return: The type of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Alert.


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

        self._type = 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

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

        return self.__dict__ == other.__dict__

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