Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_pod_condition.py293 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 V1PodCondition(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_probe_time': 'datetime',37        'last_transition_time': 'datetime',38        'message': 'str',39        'observed_generation': 'int',40        'reason': 'str',41        'status': 'str',42        'type': 'str'43    }44 45    attribute_map = {46        'last_probe_time': 'lastProbeTime',47        'last_transition_time': 'lastTransitionTime',48        'message': 'message',49        'observed_generation': 'observedGeneration',50        'reason': 'reason',51        'status': 'status',52        'type': 'type'53    }54 55    def __init__(self, last_probe_time=None, last_transition_time=None, message=None, observed_generation=None, reason=None, status=None, type=None, local_vars_configuration=None):  # noqa: E50156        """V1PodCondition - a model defined in OpenAPI"""  # noqa: E50157        if local_vars_configuration is None:58            local_vars_configuration = Configuration()59        self.local_vars_configuration = local_vars_configuration60 61        self._last_probe_time = None62        self._last_transition_time = None63        self._message = None64        self._observed_generation = None65        self._reason = None66        self._status = None67        self._type = None68        self.discriminator = None69 70        if last_probe_time is not None:71            self.last_probe_time = last_probe_time72        if last_transition_time is not None:73            self.last_transition_time = last_transition_time74        if message is not None:75            self.message = message76        if observed_generation is not None:77            self.observed_generation = observed_generation78        if reason is not None:79            self.reason = reason80        self.status = status81        self.type = type82 83    @property84    def last_probe_time(self):85        """Gets the last_probe_time of this V1PodCondition.  # noqa: E50186 87        Last time we probed the condition.  # noqa: E50188 89        :return: The last_probe_time of this V1PodCondition.  # noqa: E50190        :rtype: datetime91        """92        return self._last_probe_time93 94    @last_probe_time.setter95    def last_probe_time(self, last_probe_time):96        """Sets the last_probe_time of this V1PodCondition.97 98        Last time we probed the condition.  # noqa: E50199 100        :param last_probe_time: The last_probe_time of this V1PodCondition.  # noqa: E501101        :type: datetime102        """103 104        self._last_probe_time = last_probe_time105 106    @property107    def last_transition_time(self):108        """Gets the last_transition_time of this V1PodCondition.  # noqa: E501109 110        Last time the condition transitioned from one status to another.  # noqa: E501111 112        :return: The last_transition_time of this V1PodCondition.  # noqa: E501113        :rtype: datetime114        """115        return self._last_transition_time116 117    @last_transition_time.setter118    def last_transition_time(self, last_transition_time):119        """Sets the last_transition_time of this V1PodCondition.120 121        Last time the condition transitioned from one status to another.  # noqa: E501122 123        :param last_transition_time: The last_transition_time of this V1PodCondition.  # noqa: E501124        :type: datetime125        """126 127        self._last_transition_time = last_transition_time128 129    @property130    def message(self):131        """Gets the message of this V1PodCondition.  # noqa: E501132 133        Human-readable message indicating details about last transition.  # noqa: E501134 135        :return: The message of this V1PodCondition.  # noqa: E501136        :rtype: str137        """138        return self._message139 140    @message.setter141    def message(self, message):142        """Sets the message of this V1PodCondition.143 144        Human-readable message indicating details about last transition.  # noqa: E501145 146        :param message: The message of this V1PodCondition.  # noqa: E501147        :type: str148        """149 150        self._message = message151 152    @property153    def observed_generation(self):154        """Gets the observed_generation of this V1PodCondition.  # noqa: E501155 156        If set, this represents the .metadata.generation that the pod condition was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.  # noqa: E501157 158        :return: The observed_generation of this V1PodCondition.  # noqa: E501159        :rtype: int160        """161        return self._observed_generation162 163    @observed_generation.setter164    def observed_generation(self, observed_generation):165        """Sets the observed_generation of this V1PodCondition.166 167        If set, this represents the .metadata.generation that the pod condition was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.  # noqa: E501168 169        :param observed_generation: The observed_generation of this V1PodCondition.  # noqa: E501170        :type: int171        """172 173        self._observed_generation = observed_generation174 175    @property176    def reason(self):177        """Gets the reason of this V1PodCondition.  # noqa: E501178 179        Unique, one-word, CamelCase reason for the condition's last transition.  # noqa: E501180 181        :return: The reason of this V1PodCondition.  # noqa: E501182        :rtype: str183        """184        return self._reason185 186    @reason.setter187    def reason(self, reason):188        """Sets the reason of this V1PodCondition.189 190        Unique, one-word, CamelCase reason for the condition's last transition.  # noqa: E501191 192        :param reason: The reason of this V1PodCondition.  # noqa: E501193        :type: str194        """195 196        self._reason = reason197 198    @property199    def status(self):200        """Gets the status of this V1PodCondition.  # noqa: E501201 202        Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions  # noqa: E501203 204        :return: The status of this V1PodCondition.  # noqa: E501205        :rtype: str206        """207        return self._status208 209    @status.setter210    def status(self, status):211        """Sets the status of this V1PodCondition.212 213        Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions  # noqa: E501214 215        :param status: The status of this V1PodCondition.  # noqa: E501216        :type: str217        """218        if self.local_vars_configuration.client_side_validation and status is None:  # noqa: E501219            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501220 221        self._status = status222 223    @property224    def type(self):225        """Gets the type of this V1PodCondition.  # noqa: E501226 227        Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions  # noqa: E501228 229        :return: The type of this V1PodCondition.  # noqa: E501230        :rtype: str231        """232        return self._type233 234    @type.setter235    def type(self, type):236        """Sets the type of this V1PodCondition.237 238        Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions  # noqa: E501239 240        :param type: The type of this V1PodCondition.  # noqa: E501241        :type: str242        """243        if self.local_vars_configuration.client_side_validation and type is None:  # noqa: E501244            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501245 246        self._type = type247 248    def to_dict(self):249        """Returns the model properties as a dict"""250        result = {}251 252        for attr, _ in six.iteritems(self.openapi_types):253            value = getattr(self, attr)254            if isinstance(value, list):255                result[attr] = list(map(256                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,257                    value258                ))259            elif hasattr(value, "to_dict"):260                result[attr] = value.to_dict()261            elif isinstance(value, dict):262                result[attr] = dict(map(263                    lambda item: (item[0], item[1].to_dict())264                    if hasattr(item[1], "to_dict") else item,265                    value.items()266                ))267            else:268                result[attr] = value269 270        return result271 272    def to_str(self):273        """Returns the string representation of the model"""274        return pprint.pformat(self.to_dict())275 276    def __repr__(self):277        """For `print` and `pprint`"""278        return self.to_str()279 280    def __eq__(self, other):281        """Returns true if both objects are equal"""282        if not isinstance(other, V1PodCondition):283            return False284 285        return self.to_dict() == other.to_dict()286 287    def __ne__(self, other):288        """Returns true if both objects are not equal"""289        if not isinstance(other, V1PodCondition):290            return True291 292        return self.to_dict() != other.to_dict()293 
codekingpro/portable-devtools · Team Ai