# 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 DecoratedServiceEventAPIModel(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 = {
        'id': 'str',
        'created_at': 'datetime',
        'event_type': 'ServiceEventType',
        'current_state': 'ServiceEventCurrentState',
        'goal_state': 'ServiceGoalStates',
        'level': 'ServiceEventLevel',
        'message': 'str',
        'origin': 'ServiceEventOrigin',
        'service_id': 'str',
        'service_version_name': 'str',
        'service_version_id': 'str',
        'cluster_id': 'str',
        'goal_state_initiator': 'MiniUser'
    }

    attribute_map = {
        'id': 'id',
        'created_at': 'created_at',
        'event_type': 'event_type',
        'current_state': 'current_state',
        'goal_state': 'goal_state',
        'level': 'level',
        'message': 'message',
        'origin': 'origin',
        'service_id': 'service_id',
        'service_version_name': 'service_version_name',
        'service_version_id': 'service_version_id',
        'cluster_id': 'cluster_id',
        'goal_state_initiator': 'goal_state_initiator'
    }

    def __init__(self, id=None, created_at=None, event_type=None, current_state=None, goal_state=None, level=None, message=None, origin=None, service_id=None, service_version_name=None, service_version_id=None, cluster_id=None, goal_state_initiator=None, local_vars_configuration=None):  # noqa: E501
        """DecoratedServiceEventAPIModel - 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._id = None
        self._created_at = None
        self._event_type = None
        self._current_state = None
        self._goal_state = None
        self._level = None
        self._message = None
        self._origin = None
        self._service_id = None
        self._service_version_name = None
        self._service_version_id = None
        self._cluster_id = None
        self._goal_state_initiator = None
        self.discriminator = None

        self.id = id
        self.created_at = created_at
        self.event_type = event_type
        if current_state is not None:
            self.current_state = current_state
        if goal_state is not None:
            self.goal_state = goal_state
        if level is not None:
            self.level = level
        if message is not None:
            self.message = message
        self.origin = origin
        if service_id is not None:
            self.service_id = service_id
        if service_version_name is not None:
            self.service_version_name = service_version_name
        if service_version_id is not None:
            self.service_version_id = service_version_id
        if cluster_id is not None:
            self.cluster_id = cluster_id
        if goal_state_initiator is not None:
            self.goal_state_initiator = goal_state_initiator

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

        Id of the Service event  # noqa: E501

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

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

        Id of the Service event  # noqa: E501

        :param id: The id of this DecoratedServiceEventAPIModel.  # 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

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

        The last time the state of this job was updated. This includes updates to the state and to the goal state  # noqa: E501

        :return: The created_at of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this DecoratedServiceEventAPIModel.

        The last time the state of this job was updated. This includes updates to the state and to the goal state  # noqa: E501

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

        self._created_at = created_at

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

        Type of Service Event  # noqa: E501

        :return: The event_type of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: ServiceEventType
        """
        return self._event_type

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

        Type of Service Event  # noqa: E501

        :param event_type: The event_type of this DecoratedServiceEventAPIModel.  # noqa: E501
        :type: ServiceEventType
        """
        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 current_state(self):
        """Gets the current_state of this DecoratedServiceEventAPIModel.  # noqa: E501

        Present only for Service events.  # noqa: E501

        :return: The current_state of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: ServiceEventCurrentState
        """
        return self._current_state

    @current_state.setter
    def current_state(self, current_state):
        """Sets the current_state of this DecoratedServiceEventAPIModel.

        Present only for Service events.  # noqa: E501

        :param current_state: The current_state of this DecoratedServiceEventAPIModel.  # noqa: E501
        :type: ServiceEventCurrentState
        """

        self._current_state = current_state

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

        Present only for Service events.  # noqa: E501

        :return: The goal_state of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: ServiceGoalStates
        """
        return self._goal_state

    @goal_state.setter
    def goal_state(self, goal_state):
        """Sets the goal_state of this DecoratedServiceEventAPIModel.

        Present only for Service events.  # noqa: E501

        :param goal_state: The goal_state of this DecoratedServiceEventAPIModel.  # noqa: E501
        :type: ServiceGoalStates
        """

        self._goal_state = goal_state

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


        :return: The level of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: ServiceEventLevel
        """
        return self._level

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


        :param level: The level of this DecoratedServiceEventAPIModel.  # noqa: E501
        :type: ServiceEventLevel
        """

        self._level = level

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


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

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


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

        self._message = message

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

        The origin of the Service events.  # noqa: E501

        :return: The origin of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: ServiceEventOrigin
        """
        return self._origin

    @origin.setter
    def origin(self, origin):
        """Sets the origin of this DecoratedServiceEventAPIModel.

        The origin of the Service events.  # noqa: E501

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

        self._origin = origin

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

        The id of the Service v2. Present only for Service events.  # noqa: E501

        :return: The service_id of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: str
        """
        return self._service_id

    @service_id.setter
    def service_id(self, service_id):
        """Sets the service_id of this DecoratedServiceEventAPIModel.

        The id of the Service v2. Present only for Service events.  # noqa: E501

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

        self._service_id = service_id

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

        The name of the associated Service Version. Present only for Service Version event  # noqa: E501

        :return: The service_version_name of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: str
        """
        return self._service_version_name

    @service_version_name.setter
    def service_version_name(self, service_version_name):
        """Sets the service_version_name of this DecoratedServiceEventAPIModel.

        The name of the associated Service Version. Present only for Service Version event  # noqa: E501

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

        self._service_version_name = service_version_name

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

        The id of the associated Service Version. Present only for Service Version event  # noqa: E501

        :return: The service_version_id of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: str
        """
        return self._service_version_id

    @service_version_id.setter
    def service_version_id(self, service_version_id):
        """Sets the service_version_id of this DecoratedServiceEventAPIModel.

        The id of the associated Service Version. Present only for Service Version event  # noqa: E501

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

        self._service_version_id = service_version_id

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

        The associated cluster id.Present only for Service Version event and only when the cluster is associated with the event.  # noqa: E501

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

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

        The associated cluster id.Present only for Service Version event and only when the cluster is associated with the event.  # noqa: E501

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

        self._cluster_id = cluster_id

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

        The user who initiated the service goal state change. Present only for goal state changes.  # noqa: E501

        :return: The goal_state_initiator of this DecoratedServiceEventAPIModel.  # noqa: E501
        :rtype: MiniUser
        """
        return self._goal_state_initiator

    @goal_state_initiator.setter
    def goal_state_initiator(self, goal_state_initiator):
        """Sets the goal_state_initiator of this DecoratedServiceEventAPIModel.

        The user who initiated the service goal state change. Present only for goal state changes.  # noqa: E501

        :param goal_state_initiator: The goal_state_initiator of this DecoratedServiceEventAPIModel.  # noqa: E501
        :type: MiniUser
        """

        self._goal_state_initiator = goal_state_initiator

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

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