# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class SessionEvent(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 = {
        'event_type': 'str',
        'log_level': 'LogLevelTypes',
        'timestamp': 'datetime',
        'description': 'str',
        'cause': 'SessionEventCause',
        'id': 'str'
    }

    attribute_map = {
        'event_type': 'event_type',
        'log_level': 'log_level',
        'timestamp': 'timestamp',
        'description': 'description',
        'cause': 'cause',
        'id': 'id'
    }

    def __init__(self, event_type=None, log_level=None, timestamp=None, description=None, cause=None, id=None, local_vars_configuration=None):  # noqa: E501
        """SessionEvent - 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._event_type = None
        self._log_level = None
        self._timestamp = None
        self._description = None
        self._cause = None
        self._id = None
        self.discriminator = None

        self.event_type = event_type
        self.log_level = log_level
        self.timestamp = timestamp
        self.description = description
        if cause is not None:
            self.cause = cause
        self.id = id

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

        The category of session event.  # noqa: E501

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

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

        The category of session event.  # noqa: E501

        :param event_type: The event_type of this SessionEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and event_type is None:  # noqa: E501
            raise ValueError("Invalid value for `event_type`, must not be `None`")  # noqa: E501

        self._event_type = event_type

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

        The severity of the session event.  # noqa: E501

        :return: The log_level of this SessionEvent.  # noqa: E501
        :rtype: LogLevelTypes
        """
        return self._log_level

    @log_level.setter
    def log_level(self, log_level):
        """Sets the log_level of this SessionEvent.

        The severity of the session event.  # noqa: E501

        :param log_level: The log_level of this SessionEvent.  # noqa: E501
        :type: LogLevelTypes
        """
        if self.local_vars_configuration.client_side_validation and log_level is None:  # noqa: E501
            raise ValueError("Invalid value for `log_level`, must not be `None`")  # noqa: E501

        self._log_level = log_level

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

        The time at which the session event occurred.  # noqa: E501

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

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

        The time at which the session event occurred.  # noqa: E501

        :param timestamp: The timestamp of this SessionEvent.  # noqa: E501
        :type: datetime
        """
        if self.local_vars_configuration.client_side_validation and timestamp is None:  # noqa: E501
            raise ValueError("Invalid value for `timestamp`, must not be `None`")  # noqa: E501

        self._timestamp = timestamp

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

        A human readable description of the session event.  # noqa: E501

        :return: The description of this SessionEvent.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this SessionEvent.

        A human readable description of the session event.  # noqa: E501

        :param description: The description of this SessionEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and description is None:  # noqa: E501
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501

        self._description = description

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

        The reason why the session event occurred. None indicates an unknown cause.  # noqa: E501

        :return: The cause of this SessionEvent.  # noqa: E501
        :rtype: SessionEventCause
        """
        return self._cause

    @cause.setter
    def cause(self, cause):
        """Sets the cause of this SessionEvent.

        The reason why the session event occurred. None indicates an unknown cause.  # noqa: E501

        :param cause: The cause of this SessionEvent.  # noqa: E501
        :type: SessionEventCause
        """

        self._cause = cause

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

        A unique identifier for the session event.  # noqa: E501

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

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

        A unique identifier for the session event.  # noqa: E501

        :param id: The id of this SessionEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

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