# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from kps_api.models.metrics import Metrics  # noqa: F401,E501


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 = {
        'audience': 'str',
        'id': 'str',
        'is_encrypted': 'bool',
        'is_infra_entity': 'bool',
        'message': 'str',
        'metrics': 'Metrics',
        'path': 'str',
        'properties': 'dict(str, str)',
        'severity': 'str',
        'source_type': 'str',
        'state': 'str',
        'timestamp': 'datetime',
        'type': 'str',
        'version': 'str'
    }

    attribute_map = {
        'audience': 'audience',
        'id': 'id',
        'is_encrypted': 'isEncrypted',
        'is_infra_entity': 'isInfraEntity',
        'message': 'message',
        'metrics': 'metrics',
        'path': 'path',
        'properties': 'properties',
        'severity': 'severity',
        'source_type': 'sourceType',
        'state': 'state',
        'timestamp': 'timestamp',
        'type': 'type',
        'version': 'version'
    }

    def __init__(self, audience=None, id=None, is_encrypted=None, is_infra_entity=None, message=None, metrics=None, path=None, properties=None, severity=None, source_type=None, state=None, timestamp=None, type=None, version=None):  # noqa: E501
        """Event - a model defined in Swagger"""  # noqa: E501
        self._audience = None
        self._id = None
        self._is_encrypted = None
        self._is_infra_entity = None
        self._message = None
        self._metrics = None
        self._path = None
        self._properties = None
        self._severity = None
        self._source_type = None
        self._state = None
        self._timestamp = None
        self._type = None
        self._version = None
        self.discriminator = None
        if audience is not None:
            self.audience = audience
        if id is not None:
            self.id = id
        if is_encrypted is not None:
            self.is_encrypted = is_encrypted
        if is_infra_entity is not None:
            self.is_infra_entity = is_infra_entity
        if message is not None:
            self.message = message
        if metrics is not None:
            self.metrics = metrics
        if path is not None:
            self.path = path
        if properties is not None:
            self.properties = properties
        if severity is not None:
            self.severity = severity
        if source_type is not None:
            self.source_type = source_type
        if state is not None:
            self.state = state
        if timestamp is not None:
            self.timestamp = timestamp
        if type is not None:
            self.type = type
        if version is not None:
            self.version = version

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


        :return: The audience of this Event.  # noqa: E501
        :rtype: str
        """
        return self._audience

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


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

        self._audience = audience

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


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

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


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

        self._id = id

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


        :return: The is_encrypted of this Event.  # noqa: E501
        :rtype: bool
        """
        return self._is_encrypted

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


        :param is_encrypted: The is_encrypted of this Event.  # noqa: E501
        :type: bool
        """

        self._is_encrypted = is_encrypted

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


        :return: The is_infra_entity of this Event.  # noqa: E501
        :rtype: bool
        """
        return self._is_infra_entity

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


        :param is_infra_entity: The is_infra_entity of this Event.  # noqa: E501
        :type: bool
        """

        self._is_infra_entity = is_infra_entity

    @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
        """

        self._message = message

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


        :return: The metrics of this Event.  # noqa: E501
        :rtype: Metrics
        """
        return self._metrics

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


        :param metrics: The metrics of this Event.  # noqa: E501
        :type: Metrics
        """

        self._metrics = metrics

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


        :return: The path of this Event.  # noqa: E501
        :rtype: str
        """
        return self._path

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


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

        self._path = path

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


        :return: The properties of this Event.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._properties

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


        :param properties: The properties of this Event.  # noqa: E501
        :type: dict(str, str)
        """

        self._properties = properties

    @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
        """

        self._severity = severity

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


        :return: The source_type of this Event.  # noqa: E501
        :rtype: str
        """
        return self._source_type

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


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

        self._source_type = source_type

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


        :return: The state of this Event.  # noqa: E501
        :rtype: str
        """
        return self._state

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


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

        self._state = state

    @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

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


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

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


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

        self._type = type

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


        :return: The version of this Event.  # noqa: E501
        :rtype: str
        """
        return self._version

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


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

        self._version = version

    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
