Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_node_condition.py265 linesDownload Raw Back to models
1# coding: utf-82 3"""4    Kubernetes5 6    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E5017 8    The version of the OpenAPI document: release-1.359    Generated by: https://openapi-generator.tech10"""11 12 13import pprint14import re  # noqa: F40115 16import six17 18from kubernetes.client.configuration import Configuration19 20 21class V1NodeCondition(object):22    """NOTE: This class is auto generated by OpenAPI Generator.23    Ref: https://openapi-generator.tech24 25    Do not edit the class manually.26    """27 28    """29    Attributes:30      openapi_types (dict): The key is attribute name31                            and the value is attribute type.32      attribute_map (dict): The key is attribute name33                            and the value is json key in definition.34    """35    openapi_types = {36        'last_heartbeat_time': 'datetime',37        'last_transition_time': 'datetime',38        'message': 'str',39        'reason': 'str',40        'status': 'str',41        'type': 'str'42    }43 44    attribute_map = {45        'last_heartbeat_time': 'lastHeartbeatTime',46        'last_transition_time': 'lastTransitionTime',47        'message': 'message',48        'reason': 'reason',49        'status': 'status',50        'type': 'type'51    }52 53    def __init__(self, last_heartbeat_time=None, last_transition_time=None, message=None, reason=None, status=None, type=None, local_vars_configuration=None):  # noqa: E50154        """V1NodeCondition - a model defined in OpenAPI"""  # noqa: E50155        if local_vars_configuration is None:56            local_vars_configuration = Configuration()57        self.local_vars_configuration = local_vars_configuration58 59        self._last_heartbeat_time = None60        self._last_transition_time = None61        self._message = None62        self._reason = None63        self._status = None64        self._type = None65        self.discriminator = None66 67        if last_heartbeat_time is not None:68            self.last_heartbeat_time = last_heartbeat_time69        if last_transition_time is not None:70            self.last_transition_time = last_transition_time71        if message is not None:72            self.message = message73        if reason is not None:74            self.reason = reason75        self.status = status76        self.type = type77 78    @property79    def last_heartbeat_time(self):80        """Gets the last_heartbeat_time of this V1NodeCondition.  # noqa: E50181 82        Last time we got an update on a given condition.  # noqa: E50183 84        :return: The last_heartbeat_time of this V1NodeCondition.  # noqa: E50185        :rtype: datetime86        """87        return self._last_heartbeat_time88 89    @last_heartbeat_time.setter90    def last_heartbeat_time(self, last_heartbeat_time):91        """Sets the last_heartbeat_time of this V1NodeCondition.92 93        Last time we got an update on a given condition.  # noqa: E50194 95        :param last_heartbeat_time: The last_heartbeat_time of this V1NodeCondition.  # noqa: E50196        :type: datetime97        """98 99        self._last_heartbeat_time = last_heartbeat_time100 101    @property102    def last_transition_time(self):103        """Gets the last_transition_time of this V1NodeCondition.  # noqa: E501104 105        Last time the condition transit from one status to another.  # noqa: E501106 107        :return: The last_transition_time of this V1NodeCondition.  # noqa: E501108        :rtype: datetime109        """110        return self._last_transition_time111 112    @last_transition_time.setter113    def last_transition_time(self, last_transition_time):114        """Sets the last_transition_time of this V1NodeCondition.115 116        Last time the condition transit from one status to another.  # noqa: E501117 118        :param last_transition_time: The last_transition_time of this V1NodeCondition.  # noqa: E501119        :type: datetime120        """121 122        self._last_transition_time = last_transition_time123 124    @property125    def message(self):126        """Gets the message of this V1NodeCondition.  # noqa: E501127 128        Human readable message indicating details about last transition.  # noqa: E501129 130        :return: The message of this V1NodeCondition.  # noqa: E501131        :rtype: str132        """133        return self._message134 135    @message.setter136    def message(self, message):137        """Sets the message of this V1NodeCondition.138 139        Human readable message indicating details about last transition.  # noqa: E501140 141        :param message: The message of this V1NodeCondition.  # noqa: E501142        :type: str143        """144 145        self._message = message146 147    @property148    def reason(self):149        """Gets the reason of this V1NodeCondition.  # noqa: E501150 151        (brief) reason for the condition's last transition.  # noqa: E501152 153        :return: The reason of this V1NodeCondition.  # noqa: E501154        :rtype: str155        """156        return self._reason157 158    @reason.setter159    def reason(self, reason):160        """Sets the reason of this V1NodeCondition.161 162        (brief) reason for the condition's last transition.  # noqa: E501163 164        :param reason: The reason of this V1NodeCondition.  # noqa: E501165        :type: str166        """167 168        self._reason = reason169 170    @property171    def status(self):172        """Gets the status of this V1NodeCondition.  # noqa: E501173 174        Status of the condition, one of True, False, Unknown.  # noqa: E501175 176        :return: The status of this V1NodeCondition.  # noqa: E501177        :rtype: str178        """179        return self._status180 181    @status.setter182    def status(self, status):183        """Sets the status of this V1NodeCondition.184 185        Status of the condition, one of True, False, Unknown.  # noqa: E501186 187        :param status: The status of this V1NodeCondition.  # noqa: E501188        :type: str189        """190        if self.local_vars_configuration.client_side_validation and status is None:  # noqa: E501191            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501192 193        self._status = status194 195    @property196    def type(self):197        """Gets the type of this V1NodeCondition.  # noqa: E501198 199        Type of node condition.  # noqa: E501200 201        :return: The type of this V1NodeCondition.  # noqa: E501202        :rtype: str203        """204        return self._type205 206    @type.setter207    def type(self, type):208        """Sets the type of this V1NodeCondition.209 210        Type of node condition.  # noqa: E501211 212        :param type: The type of this V1NodeCondition.  # noqa: E501213        :type: str214        """215        if self.local_vars_configuration.client_side_validation and type is None:  # noqa: E501216            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501217 218        self._type = type219 220    def to_dict(self):221        """Returns the model properties as a dict"""222        result = {}223 224        for attr, _ in six.iteritems(self.openapi_types):225            value = getattr(self, attr)226            if isinstance(value, list):227                result[attr] = list(map(228                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,229                    value230                ))231            elif hasattr(value, "to_dict"):232                result[attr] = value.to_dict()233            elif isinstance(value, dict):234                result[attr] = dict(map(235                    lambda item: (item[0], item[1].to_dict())236                    if hasattr(item[1], "to_dict") else item,237                    value.items()238                ))239            else:240                result[attr] = value241 242        return result243 244    def to_str(self):245        """Returns the string representation of the model"""246        return pprint.pformat(self.to_dict())247 248    def __repr__(self):249        """For `print` and `pprint`"""250        return self.to_str()251 252    def __eq__(self, other):253        """Returns true if both objects are equal"""254        if not isinstance(other, V1NodeCondition):255            return False256 257        return self.to_dict() == other.to_dict()258 259    def __ne__(self, other):260        """Returns true if both objects are not equal"""261        if not isinstance(other, V1NodeCondition):262            return True263 264        return self.to_dict() != other.to_dict()265 
codekingpro/portable-devtools · Team Ai