# coding: utf-8

"""
    AssistedInstall

    Assisted installation  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class Event(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 = {
        'cluster_id': 'str',
        'host_id': 'str',
        'infra_env_id': 'str',
        'severity': 'str',
        'category': 'str',
        'message': 'str',
        'event_time': 'datetime',
        'request_id': 'str',
        'props': 'str'
    }

    attribute_map = {
        'cluster_id': 'cluster_id',
        'host_id': 'host_id',
        'infra_env_id': 'infra_env_id',
        'severity': 'severity',
        'category': 'category',
        'message': 'message',
        'event_time': 'event_time',
        'request_id': 'request_id',
        'props': 'props'
    }

    def __init__(self, cluster_id=None, host_id=None, infra_env_id=None, severity=None, category=None, message=None, event_time=None, request_id=None, props=None):  # noqa: E501
        """Event - a model defined in Swagger"""  # noqa: E501

        self._cluster_id = None
        self._host_id = None
        self._infra_env_id = None
        self._severity = None
        self._category = None
        self._message = None
        self._event_time = None
        self._request_id = None
        self._props = None
        self.discriminator = None

        if cluster_id is not None:
            self.cluster_id = cluster_id
        if host_id is not None:
            self.host_id = host_id
        if infra_env_id is not None:
            self.infra_env_id = infra_env_id
        self.severity = severity
        if category is not None:
            self.category = category
        self.message = message
        self.event_time = event_time
        if request_id is not None:
            self.request_id = request_id
        if props is not None:
            self.props = props

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

        Unique identifier of the cluster this event relates to.  # noqa: E501

        :return: The cluster_id of this Event.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id):
        """Sets the cluster_id of this Event.

        Unique identifier of the cluster this event relates to.  # noqa: E501

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

        self._cluster_id = cluster_id

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

        Unique identifier of the host this event relates to.  # noqa: E501

        :return: The host_id of this Event.  # noqa: E501
        :rtype: str
        """
        return self._host_id

    @host_id.setter
    def host_id(self, host_id):
        """Sets the host_id of this Event.

        Unique identifier of the host this event relates to.  # noqa: E501

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

        self._host_id = host_id

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

        Unique identifier of the infra env this event relates to.  # noqa: E501

        :return: The infra_env_id of this Event.  # noqa: E501
        :rtype: str
        """
        return self._infra_env_id

    @infra_env_id.setter
    def infra_env_id(self, infra_env_id):
        """Sets the infra_env_id of this Event.

        Unique identifier of the infra env this event relates to.  # noqa: E501

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

        self._infra_env_id = infra_env_id

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


        :return: The severity of this Event.  # noqa: E501
        :rtype: str
        """
        return self._severity

    @severity.setter
    def severity(self, severity):
        """Sets the severity of this Event.


        :param severity: The severity of this Event.  # noqa: E501
        :type: str
        """
        if severity is None:
            raise ValueError("Invalid value for `severity`, must not be `None`")  # noqa: E501
        allowed_values = ["info", "warning", "error", "critical"]  # noqa: E501
        if severity not in allowed_values:
            raise ValueError(
                "Invalid value for `severity` ({0}), must be one of {1}"  # noqa: E501
                .format(severity, allowed_values)
            )

        self._severity = severity

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


        :return: The category of this Event.  # noqa: E501
        :rtype: str
        """
        return self._category

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


        :param category: The category of this Event.  # noqa: E501
        :type: str
        """
        allowed_values = ["user", "metrics"]  # noqa: E501
        if category not in allowed_values:
            raise ValueError(
                "Invalid value for `category` ({0}), must be one of {1}"  # noqa: E501
                .format(category, allowed_values)
            )

        self._category = category

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


        :return: The message of this Event.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this Event.


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

        self._message = message

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


        :return: The event_time of this Event.  # noqa: E501
        :rtype: datetime
        """
        return self._event_time

    @event_time.setter
    def event_time(self, event_time):
        """Sets the event_time of this Event.


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

        self._event_time = event_time

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

        Unique identifier of the request that caused this event to occur.  # noqa: E501

        :return: The request_id of this Event.  # noqa: E501
        :rtype: str
        """
        return self._request_id

    @request_id.setter
    def request_id(self, request_id):
        """Sets the request_id of this Event.

        Unique identifier of the request that caused this event to occur.  # noqa: E501

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

        self._request_id = request_id

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

        Additional properties for the event in JSON format.  # noqa: E501

        :return: The props of this Event.  # noqa: E501
        :rtype: str
        """
        return self._props

    @props.setter
    def props(self, props):
        """Sets the props of this Event.

        Additional properties for the event in JSON format.  # noqa: E501

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

        self._props = props

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

        return self.__dict__ == other.__dict__

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