# coding: utf-8

"""
    external/v1/external_session_service.proto

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: version not set
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from grid.openapi.configuration import Configuration


class V1ClusterStatus(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 = {
        'driver_status': 'V1ClusterDriverStatus',
        'gridlet_version': 'str',
        'last_healthcheck_timestamp': 'datetime',
        'phase': 'V1ClusterState',
        'reason': 'str'
    }

    attribute_map = {
        'driver_status': 'driverStatus',
        'gridlet_version': 'gridletVersion',
        'last_healthcheck_timestamp': 'lastHealthcheckTimestamp',
        'phase': 'phase',
        'reason': 'reason'
    }

    def __init__(self, driver_status=None, gridlet_version=None, last_healthcheck_timestamp=None, phase=None, reason=None, _configuration=None):  # noqa: E501
        """V1ClusterStatus - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._driver_status = None
        self._gridlet_version = None
        self._last_healthcheck_timestamp = None
        self._phase = None
        self._reason = None
        self.discriminator = None

        if driver_status is not None:
            self.driver_status = driver_status
        if gridlet_version is not None:
            self.gridlet_version = gridlet_version
        if last_healthcheck_timestamp is not None:
            self.last_healthcheck_timestamp = last_healthcheck_timestamp
        if phase is not None:
            self.phase = phase
        if reason is not None:
            self.reason = reason

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


        :return: The driver_status of this V1ClusterStatus.  # noqa: E501
        :rtype: V1ClusterDriverStatus
        """
        return self._driver_status

    @driver_status.setter
    def driver_status(self, driver_status):
        """Sets the driver_status of this V1ClusterStatus.


        :param driver_status: The driver_status of this V1ClusterStatus.  # noqa: E501
        :type: V1ClusterDriverStatus
        """

        self._driver_status = driver_status

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


        :return: The gridlet_version of this V1ClusterStatus.  # noqa: E501
        :rtype: str
        """
        return self._gridlet_version

    @gridlet_version.setter
    def gridlet_version(self, gridlet_version):
        """Sets the gridlet_version of this V1ClusterStatus.


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

        self._gridlet_version = gridlet_version

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


        :return: The last_healthcheck_timestamp of this V1ClusterStatus.  # noqa: E501
        :rtype: datetime
        """
        return self._last_healthcheck_timestamp

    @last_healthcheck_timestamp.setter
    def last_healthcheck_timestamp(self, last_healthcheck_timestamp):
        """Sets the last_healthcheck_timestamp of this V1ClusterStatus.


        :param last_healthcheck_timestamp: The last_healthcheck_timestamp of this V1ClusterStatus.  # noqa: E501
        :type: datetime
        """

        self._last_healthcheck_timestamp = last_healthcheck_timestamp

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


        :return: The phase of this V1ClusterStatus.  # noqa: E501
        :rtype: V1ClusterState
        """
        return self._phase

    @phase.setter
    def phase(self, phase):
        """Sets the phase of this V1ClusterStatus.


        :param phase: The phase of this V1ClusterStatus.  # noqa: E501
        :type: V1ClusterState
        """

        self._phase = phase

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


        :return: The reason of this V1ClusterStatus.  # noqa: E501
        :rtype: str
        """
        return self._reason

    @reason.setter
    def reason(self, reason):
        """Sets the reason of this V1ClusterStatus.


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

        self._reason = reason

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

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