# coding: utf-8

"""
    Paragon Insights APIs

    API interface for PI application  # noqa: E501

    OpenAPI spec version: 4.0.0
    Contact: healthbot-feedback@juniper.net
    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 = {
        'color': 'str',
        'event_name': 'str',
        'frequency': 'int',
        'timestamp': 'datetime'
    }

    attribute_map = {
        'color': 'color',
        'event_name': 'event_name',
        'frequency': 'frequency',
        'timestamp': 'timestamp'
    }

    def __init__(self, color=None, event_name=None, frequency=None, timestamp=None):  # noqa: E501
        """Event - a model defined in Swagger"""  # noqa: E501

        self._color = None
        self._event_name = None
        self._frequency = None
        self._timestamp = None
        self.discriminator = None

        if color is not None:
            self.color = color
        if event_name is not None:
            self.event_name = event_name
        if frequency is not None:
            self.frequency = frequency
        if timestamp is not None:
            self.timestamp = timestamp

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

        Event severity  # noqa: E501

        :return: The color of this Event.  # noqa: E501
        :rtype: str
        """
        return self._color

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

        Event severity  # noqa: E501

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

        self._color = color

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

        Event name  # noqa: E501

        :return: The event_name of this Event.  # noqa: E501
        :rtype: str
        """
        return self._event_name

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

        Event name  # noqa: E501

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

        self._event_name = event_name

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

        Frequency of the event.  # noqa: E501

        :return: The frequency of this Event.  # noqa: E501
        :rtype: int
        """
        return self._frequency

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

        Frequency of the event.  # noqa: E501

        :param frequency: The frequency of this Event.  # noqa: E501
        :type: int
        """

        self._frequency = frequency

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


        :return: The timestamp of this Event.  # noqa: E501
        :rtype: datetime
        """
        return self._timestamp

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


        :param timestamp: The timestamp of this Event.  # noqa: E501
        :type: datetime
        """

        self._timestamp = timestamp

    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
