Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_endpoint_conditions.py179 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 V1EndpointConditions(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        'ready': 'bool',37        'serving': 'bool',38        'terminating': 'bool'39    }40 41    attribute_map = {42        'ready': 'ready',43        'serving': 'serving',44        'terminating': 'terminating'45    }46 47    def __init__(self, ready=None, serving=None, terminating=None, local_vars_configuration=None):  # noqa: E50148        """V1EndpointConditions - a model defined in OpenAPI"""  # noqa: E50149        if local_vars_configuration is None:50            local_vars_configuration = Configuration()51        self.local_vars_configuration = local_vars_configuration52 53        self._ready = None54        self._serving = None55        self._terminating = None56        self.discriminator = None57 58        if ready is not None:59            self.ready = ready60        if serving is not None:61            self.serving = serving62        if terminating is not None:63            self.terminating = terminating64 65    @property66    def ready(self):67        """Gets the ready of this V1EndpointConditions.  # noqa: E50168 69        ready indicates that this endpoint is ready to receive traffic, according to whatever system is managing the endpoint. A nil value should be interpreted as \"true\". In general, an endpoint should be marked ready if it is serving and not terminating, though this can be overridden in some cases, such as when the associated Service has set the publishNotReadyAddresses flag.  # noqa: E50170 71        :return: The ready of this V1EndpointConditions.  # noqa: E50172        :rtype: bool73        """74        return self._ready75 76    @ready.setter77    def ready(self, ready):78        """Sets the ready of this V1EndpointConditions.79 80        ready indicates that this endpoint is ready to receive traffic, according to whatever system is managing the endpoint. A nil value should be interpreted as \"true\". In general, an endpoint should be marked ready if it is serving and not terminating, though this can be overridden in some cases, such as when the associated Service has set the publishNotReadyAddresses flag.  # noqa: E50181 82        :param ready: The ready of this V1EndpointConditions.  # noqa: E50183        :type: bool84        """85 86        self._ready = ready87 88    @property89    def serving(self):90        """Gets the serving of this V1EndpointConditions.  # noqa: E50191 92        serving indicates that this endpoint is able to receive traffic, according to whatever system is managing the endpoint. For endpoints backed by pods, the EndpointSlice controller will mark the endpoint as serving if the pod's Ready condition is True. A nil value should be interpreted as \"true\".  # noqa: E50193 94        :return: The serving of this V1EndpointConditions.  # noqa: E50195        :rtype: bool96        """97        return self._serving98 99    @serving.setter100    def serving(self, serving):101        """Sets the serving of this V1EndpointConditions.102 103        serving indicates that this endpoint is able to receive traffic, according to whatever system is managing the endpoint. For endpoints backed by pods, the EndpointSlice controller will mark the endpoint as serving if the pod's Ready condition is True. A nil value should be interpreted as \"true\".  # noqa: E501104 105        :param serving: The serving of this V1EndpointConditions.  # noqa: E501106        :type: bool107        """108 109        self._serving = serving110 111    @property112    def terminating(self):113        """Gets the terminating of this V1EndpointConditions.  # noqa: E501114 115        terminating indicates that this endpoint is terminating. A nil value should be interpreted as \"false\".  # noqa: E501116 117        :return: The terminating of this V1EndpointConditions.  # noqa: E501118        :rtype: bool119        """120        return self._terminating121 122    @terminating.setter123    def terminating(self, terminating):124        """Sets the terminating of this V1EndpointConditions.125 126        terminating indicates that this endpoint is terminating. A nil value should be interpreted as \"false\".  # noqa: E501127 128        :param terminating: The terminating of this V1EndpointConditions.  # noqa: E501129        :type: bool130        """131 132        self._terminating = terminating133 134    def to_dict(self):135        """Returns the model properties as a dict"""136        result = {}137 138        for attr, _ in six.iteritems(self.openapi_types):139            value = getattr(self, attr)140            if isinstance(value, list):141                result[attr] = list(map(142                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,143                    value144                ))145            elif hasattr(value, "to_dict"):146                result[attr] = value.to_dict()147            elif isinstance(value, dict):148                result[attr] = dict(map(149                    lambda item: (item[0], item[1].to_dict())150                    if hasattr(item[1], "to_dict") else item,151                    value.items()152                ))153            else:154                result[attr] = value155 156        return result157 158    def to_str(self):159        """Returns the string representation of the model"""160        return pprint.pformat(self.to_dict())161 162    def __repr__(self):163        """For `print` and `pprint`"""164        return self.to_str()165 166    def __eq__(self, other):167        """Returns true if both objects are equal"""168        if not isinstance(other, V1EndpointConditions):169            return False170 171        return self.to_dict() == other.to_dict()172 173    def __ne__(self, other):174        """Returns true if both objects are not equal"""175        if not isinstance(other, V1EndpointConditions):176            return True177 178        return self.to_dict() != other.to_dict()179 
codekingpro/portable-devtools · Team Ai