# 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 ClusterDashboardNode(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 = {
        'node_id': 'str',
        'node_ip': 'str',
        'name': 'str',
        'status': 'NodeStatus',
        'is_head_node': 'bool',
        'resources': 'dict(str, float)',
        'labels': 'dict(str, str)',
        'instance_type': 'str',
        'start_time_ms': 'int',
        'end_time_ms': 'int',
        'ray_session_name': 'str'
    }

    attribute_map = {
        'node_id': 'node_id',
        'node_ip': 'node_ip',
        'name': 'name',
        'status': 'status',
        'is_head_node': 'is_head_node',
        'resources': 'resources',
        'labels': 'labels',
        'instance_type': 'instance_type',
        'start_time_ms': 'start_time_ms',
        'end_time_ms': 'end_time_ms',
        'ray_session_name': 'ray_session_name'
    }

    def __init__(self, node_id=None, node_ip=None, name=None, status=None, is_head_node=None, resources=None, labels=None, instance_type=None, start_time_ms=None, end_time_ms=None, ray_session_name=None, local_vars_configuration=None):  # noqa: E501
        """ClusterDashboardNode - 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._node_id = None
        self._node_ip = None
        self._name = None
        self._status = None
        self._is_head_node = None
        self._resources = None
        self._labels = None
        self._instance_type = None
        self._start_time_ms = None
        self._end_time_ms = None
        self._ray_session_name = None
        self.discriminator = None

        self.node_id = node_id
        self.node_ip = node_ip
        self.name = name
        self.status = status
        self.is_head_node = is_head_node
        self.resources = resources
        self.labels = labels
        if instance_type is not None:
            self.instance_type = instance_type
        if start_time_ms is not None:
            self.start_time_ms = start_time_ms
        if end_time_ms is not None:
            self.end_time_ms = end_time_ms
        if ray_session_name is not None:
            self.ray_session_name = ray_session_name

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


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

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


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

        self._node_id = node_id

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


        :return: The node_ip of this ClusterDashboardNode.  # noqa: E501
        :rtype: str
        """
        return self._node_ip

    @node_ip.setter
    def node_ip(self, node_ip):
        """Sets the node_ip of this ClusterDashboardNode.


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

        self._node_ip = node_ip

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


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

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


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

        self._name = name

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


        :return: The status of this ClusterDashboardNode.  # noqa: E501
        :rtype: NodeStatus
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ClusterDashboardNode.


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

        self._status = status

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


        :return: The is_head_node of this ClusterDashboardNode.  # noqa: E501
        :rtype: bool
        """
        return self._is_head_node

    @is_head_node.setter
    def is_head_node(self, is_head_node):
        """Sets the is_head_node of this ClusterDashboardNode.


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

        self._is_head_node = is_head_node

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


        :return: The resources of this ClusterDashboardNode.  # noqa: E501
        :rtype: dict(str, float)
        """
        return self._resources

    @resources.setter
    def resources(self, resources):
        """Sets the resources of this ClusterDashboardNode.


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

        self._resources = resources

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


        :return: The labels of this ClusterDashboardNode.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._labels

    @labels.setter
    def labels(self, labels):
        """Sets the labels of this ClusterDashboardNode.


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

        self._labels = labels

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


        :return: The instance_type of this ClusterDashboardNode.  # noqa: E501
        :rtype: str
        """
        return self._instance_type

    @instance_type.setter
    def instance_type(self, instance_type):
        """Sets the instance_type of this ClusterDashboardNode.


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

        self._instance_type = instance_type

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


        :return: The start_time_ms of this ClusterDashboardNode.  # noqa: E501
        :rtype: int
        """
        return self._start_time_ms

    @start_time_ms.setter
    def start_time_ms(self, start_time_ms):
        """Sets the start_time_ms of this ClusterDashboardNode.


        :param start_time_ms: The start_time_ms of this ClusterDashboardNode.  # noqa: E501
        :type: int
        """

        self._start_time_ms = start_time_ms

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


        :return: The end_time_ms of this ClusterDashboardNode.  # noqa: E501
        :rtype: int
        """
        return self._end_time_ms

    @end_time_ms.setter
    def end_time_ms(self, end_time_ms):
        """Sets the end_time_ms of this ClusterDashboardNode.


        :param end_time_ms: The end_time_ms of this ClusterDashboardNode.  # noqa: E501
        :type: int
        """

        self._end_time_ms = end_time_ms

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


        :return: The ray_session_name of this ClusterDashboardNode.  # 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 ClusterDashboardNode.


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

        self._ray_session_name = ray_session_name

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

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