<reponame>arunmk/container-service-extension<filename>container_service_extension/lib/pksclient/models/cluster_upgrade_info.py
# coding: utf-8

"""
    PKS

    PKS API  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class ClusterUpgradeInfo(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 = {
        'cluster_name': 'str',
        'last_action': 'str',
        'last_action_state': 'str',
        'start_time': 'int',
        'end_time': 'int',
        'is_canary': 'bool'
    }

    attribute_map = {
        'cluster_name': 'cluster_name',
        'last_action': 'last_action',
        'last_action_state': 'last_action_state',
        'start_time': 'start_time',
        'end_time': 'end_time',
        'is_canary': 'is_canary'
    }

    def __init__(self, cluster_name=None, last_action=None, last_action_state=None, start_time=None, end_time=None, is_canary=False):  # noqa: E501
        """ClusterUpgradeInfo - a model defined in Swagger"""  # noqa: E501

        self._cluster_name = None
        self._last_action = None
        self._last_action_state = None
        self._start_time = None
        self._end_time = None
        self._is_canary = None
        self.discriminator = None

        if cluster_name is not None:
            self.cluster_name = cluster_name
        if last_action is not None:
            self.last_action = last_action
        if last_action_state is not None:
            self.last_action_state = last_action_state
        if start_time is not None:
            self.start_time = start_time
        if end_time is not None:
            self.end_time = end_time
        if is_canary is not None:
            self.is_canary = is_canary

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


        :return: The cluster_name of this ClusterUpgradeInfo.  # noqa: E501
        :rtype: str
        """
        return self._cluster_name

    @cluster_name.setter
    def cluster_name(self, cluster_name):
        """Sets the cluster_name of this ClusterUpgradeInfo.


        :param cluster_name: The cluster_name of this ClusterUpgradeInfo.  # noqa: E501
        :type: str
        """

        self._cluster_name = cluster_name

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


        :return: The last_action of this ClusterUpgradeInfo.  # noqa: E501
        :rtype: str
        """
        return self._last_action

    @last_action.setter
    def last_action(self, last_action):
        """Sets the last_action of this ClusterUpgradeInfo.


        :param last_action: The last_action of this ClusterUpgradeInfo.  # noqa: E501
        :type: str
        """
        allowed_values = ["CREATE", "UPDATE", "DELETE", "UPGRADE"]  # noqa: E501
        if last_action not in allowed_values:
            raise ValueError(
                "Invalid value for `last_action` ({0}), must be one of {1}"  # noqa: E501
                .format(last_action, allowed_values)
            )

        self._last_action = last_action

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


        :return: The last_action_state of this ClusterUpgradeInfo.  # noqa: E501
        :rtype: str
        """
        return self._last_action_state

    @last_action_state.setter
    def last_action_state(self, last_action_state):
        """Sets the last_action_state of this ClusterUpgradeInfo.


        :param last_action_state: The last_action_state of this ClusterUpgradeInfo.  # noqa: E501
        :type: str
        """
        allowed_values = ["in progress", "succeeded", "failed", "queued"]  # noqa: E501
        if last_action_state not in allowed_values:
            raise ValueError(
                "Invalid value for `last_action_state` ({0}), must be one of {1}"  # noqa: E501
                .format(last_action_state, allowed_values)
            )

        self._last_action_state = last_action_state

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


        :return: The start_time of this ClusterUpgradeInfo.  # noqa: E501
        :rtype: int
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """Sets the start_time of this ClusterUpgradeInfo.


        :param start_time: The start_time of this ClusterUpgradeInfo.  # noqa: E501
        :type: int
        """

        self._start_time = start_time

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


        :return: The end_time of this ClusterUpgradeInfo.  # noqa: E501
        :rtype: int
        """
        return self._end_time

    @end_time.setter
    def end_time(self, end_time):
        """Sets the end_time of this ClusterUpgradeInfo.


        :param end_time: The end_time of this ClusterUpgradeInfo.  # noqa: E501
        :type: int
        """

        self._end_time = end_time

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


        :return: The is_canary of this ClusterUpgradeInfo.  # noqa: E501
        :rtype: bool
        """
        return self._is_canary

    @is_canary.setter
    def is_canary(self, is_canary):
        """Sets the is_canary of this ClusterUpgradeInfo.


        :param is_canary: The is_canary of this ClusterUpgradeInfo.  # noqa: E501
        :type: bool
        """

        self._is_canary = is_canary

    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(ClusterUpgradeInfo, 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, ClusterUpgradeInfo):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
