# 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 ActorTableRow(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',
        'name': 'str',
        'job_id': 'str',
        'class_name': 'str',
        'serialized_runtime_env': 'str',
        'required_resources_serialized': 'str',
        'placement_group_id': 'str',
        'label_selector_serialized': 'str',
        'state': 'ActorState',
        'node_id': 'str',
        'worker_id': 'str',
        'exit_detail_serialized': 'str',
        'transition_timestamp': 'int',
        'ray_session_name': 'str',
        'exit_message': 'str'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'job_id': 'job_id',
        'class_name': 'class_name',
        'serialized_runtime_env': 'serialized_runtime_env',
        'required_resources_serialized': 'required_resources_serialized',
        'placement_group_id': 'placement_group_id',
        'label_selector_serialized': 'label_selector_serialized',
        'state': 'state',
        'node_id': 'node_id',
        'worker_id': 'worker_id',
        'exit_detail_serialized': 'exit_detail_serialized',
        'transition_timestamp': 'transition_timestamp',
        'ray_session_name': 'ray_session_name',
        'exit_message': 'exit_message'
    }

    def __init__(self, id=None, name=None, job_id=None, class_name=None, serialized_runtime_env=None, required_resources_serialized=None, placement_group_id=None, label_selector_serialized=None, state=None, node_id=None, worker_id=None, exit_detail_serialized=None, transition_timestamp=None, ray_session_name=None, exit_message=None, local_vars_configuration=None):  # noqa: E501
        """ActorTableRow - 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._name = None
        self._job_id = None
        self._class_name = None
        self._serialized_runtime_env = None
        self._required_resources_serialized = None
        self._placement_group_id = None
        self._label_selector_serialized = None
        self._state = None
        self._node_id = None
        self._worker_id = None
        self._exit_detail_serialized = None
        self._transition_timestamp = None
        self._ray_session_name = None
        self._exit_message = None
        self.discriminator = None

        self.id = id
        if name is not None:
            self.name = name
        if job_id is not None:
            self.job_id = job_id
        if class_name is not None:
            self.class_name = class_name
        if serialized_runtime_env is not None:
            self.serialized_runtime_env = serialized_runtime_env
        if required_resources_serialized is not None:
            self.required_resources_serialized = required_resources_serialized
        if placement_group_id is not None:
            self.placement_group_id = placement_group_id
        if label_selector_serialized is not None:
            self.label_selector_serialized = label_selector_serialized
        if state is not None:
            self.state = state
        if node_id is not None:
            self.node_id = node_id
        if worker_id is not None:
            self.worker_id = worker_id
        if exit_detail_serialized is not None:
            self.exit_detail_serialized = exit_detail_serialized
        if transition_timestamp is not None:
            self.transition_timestamp = transition_timestamp
        self.ray_session_name = ray_session_name
        if exit_message is not None:
            self.exit_message = exit_message

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


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

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


        :param id: The id of this ActorTableRow.  # 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 name(self):
        """Gets the name of this ActorTableRow.  # noqa: E501


        :return: The name of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ActorTableRow.


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

        self._name = name

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


        :return: The job_id of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._job_id

    @job_id.setter
    def job_id(self, job_id):
        """Sets the job_id of this ActorTableRow.


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

        self._job_id = job_id

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


        :return: The class_name of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._class_name

    @class_name.setter
    def class_name(self, class_name):
        """Sets the class_name of this ActorTableRow.


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

        self._class_name = class_name

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


        :return: The serialized_runtime_env of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._serialized_runtime_env

    @serialized_runtime_env.setter
    def serialized_runtime_env(self, serialized_runtime_env):
        """Sets the serialized_runtime_env of this ActorTableRow.


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

        self._serialized_runtime_env = serialized_runtime_env

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


        :return: The required_resources_serialized of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._required_resources_serialized

    @required_resources_serialized.setter
    def required_resources_serialized(self, required_resources_serialized):
        """Sets the required_resources_serialized of this ActorTableRow.


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

        self._required_resources_serialized = required_resources_serialized

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


        :return: The placement_group_id of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._placement_group_id

    @placement_group_id.setter
    def placement_group_id(self, placement_group_id):
        """Sets the placement_group_id of this ActorTableRow.


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

        self._placement_group_id = placement_group_id

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


        :return: The label_selector_serialized of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._label_selector_serialized

    @label_selector_serialized.setter
    def label_selector_serialized(self, label_selector_serialized):
        """Sets the label_selector_serialized of this ActorTableRow.


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

        self._label_selector_serialized = label_selector_serialized

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


        :return: The state of this ActorTableRow.  # noqa: E501
        :rtype: ActorState
        """
        return self._state

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


        :param state: The state of this ActorTableRow.  # noqa: E501
        :type: ActorState
        """

        self._state = state

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


        :return: The node_id of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._node_id

    @node_id.setter
    def node_id(self, node_id):
        """Sets the node_id of this ActorTableRow.


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

        self._node_id = node_id

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


        :return: The worker_id of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._worker_id

    @worker_id.setter
    def worker_id(self, worker_id):
        """Sets the worker_id of this ActorTableRow.


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

        self._worker_id = worker_id

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


        :return: The exit_detail_serialized of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._exit_detail_serialized

    @exit_detail_serialized.setter
    def exit_detail_serialized(self, exit_detail_serialized):
        """Sets the exit_detail_serialized of this ActorTableRow.


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

        self._exit_detail_serialized = exit_detail_serialized

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


        :return: The transition_timestamp of this ActorTableRow.  # noqa: E501
        :rtype: int
        """
        return self._transition_timestamp

    @transition_timestamp.setter
    def transition_timestamp(self, transition_timestamp):
        """Sets the transition_timestamp of this ActorTableRow.


        :param transition_timestamp: The transition_timestamp of this ActorTableRow.  # noqa: E501
        :type: int
        """

        self._transition_timestamp = transition_timestamp

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


        :return: The ray_session_name of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._ray_session_name

    @ray_session_name.setter
    def ray_session_name(self, ray_session_name):
        """Sets the ray_session_name of this ActorTableRow.


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

        self._ray_session_name = ray_session_name

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


        :return: The exit_message of this ActorTableRow.  # noqa: E501
        :rtype: str
        """
        return self._exit_message

    @exit_message.setter
    def exit_message(self, exit_message):
        """Sets the exit_message of this ActorTableRow.


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

        self._exit_message = exit_message

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

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