# 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

    NOTE
    ----
    standard swagger-codegen-cli for this python client has been modified
    by custom templates. The purpose of these templates is to include
    typing information in the API and Model code. Please refer to the
    main grid repository for more info
"""


import pprint
import re  # noqa: F401
from typing import TYPE_CHECKING

import six

from grid.openapi.configuration import Configuration

if TYPE_CHECKING:
    from datetime import datetime
    from grid.openapi.models import *

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: 'V1ClusterDriverStatus' = None, gridlet_version: 'str' = None, last_healthcheck_timestamp: 'datetime' = None, phase: 'V1ClusterState' = None, reason: 'str' = 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) -> 'V1ClusterDriverStatus':
        """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: 'V1ClusterDriverStatus'):
        """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) -> 'str':
        """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: 'str'):
        """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) -> 'datetime':
        """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: 'datetime'):
        """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) -> 'V1ClusterState':
        """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: 'V1ClusterState'):
        """Sets the phase of this V1ClusterStatus.


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

        self._phase = phase

    @property
    def reason(self) -> 'str':
        """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: 'str'):
        """Sets the reason of this V1ClusterStatus.


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

        self._reason = reason

    def to_dict(self) -> dict:
        """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) -> str:
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self) -> str:
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other: 'V1ClusterStatus') -> bool:
        """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: 'V1ClusterStatus') -> bool:
        """Returns true if both objects are not equal"""
        if not isinstance(other, V1ClusterStatus):
            return True

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