Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_scale_status.py152 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 V1ScaleStatus(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        'replicas': 'int',37        'selector': 'str'38    }39 40    attribute_map = {41        'replicas': 'replicas',42        'selector': 'selector'43    }44 45    def __init__(self, replicas=None, selector=None, local_vars_configuration=None):  # noqa: E50146        """V1ScaleStatus - a model defined in OpenAPI"""  # noqa: E50147        if local_vars_configuration is None:48            local_vars_configuration = Configuration()49        self.local_vars_configuration = local_vars_configuration50 51        self._replicas = None52        self._selector = None53        self.discriminator = None54 55        self.replicas = replicas56        if selector is not None:57            self.selector = selector58 59    @property60    def replicas(self):61        """Gets the replicas of this V1ScaleStatus.  # noqa: E50162 63        replicas is the actual number of observed instances of the scaled object.  # noqa: E50164 65        :return: The replicas of this V1ScaleStatus.  # noqa: E50166        :rtype: int67        """68        return self._replicas69 70    @replicas.setter71    def replicas(self, replicas):72        """Sets the replicas of this V1ScaleStatus.73 74        replicas is the actual number of observed instances of the scaled object.  # noqa: E50175 76        :param replicas: The replicas of this V1ScaleStatus.  # noqa: E50177        :type: int78        """79        if self.local_vars_configuration.client_side_validation and replicas is None:  # noqa: E50180            raise ValueError("Invalid value for `replicas`, must not be `None`")  # noqa: E50181 82        self._replicas = replicas83 84    @property85    def selector(self):86        """Gets the selector of this V1ScaleStatus.  # noqa: E50187 88        selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/  # noqa: E50189 90        :return: The selector of this V1ScaleStatus.  # noqa: E50191        :rtype: str92        """93        return self._selector94 95    @selector.setter96    def selector(self, selector):97        """Sets the selector of this V1ScaleStatus.98 99        selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/  # noqa: E501100 101        :param selector: The selector of this V1ScaleStatus.  # noqa: E501102        :type: str103        """104 105        self._selector = selector106 107    def to_dict(self):108        """Returns the model properties as a dict"""109        result = {}110 111        for attr, _ in six.iteritems(self.openapi_types):112            value = getattr(self, attr)113            if isinstance(value, list):114                result[attr] = list(map(115                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,116                    value117                ))118            elif hasattr(value, "to_dict"):119                result[attr] = value.to_dict()120            elif isinstance(value, dict):121                result[attr] = dict(map(122                    lambda item: (item[0], item[1].to_dict())123                    if hasattr(item[1], "to_dict") else item,124                    value.items()125                ))126            else:127                result[attr] = value128 129        return result130 131    def to_str(self):132        """Returns the string representation of the model"""133        return pprint.pformat(self.to_dict())134 135    def __repr__(self):136        """For `print` and `pprint`"""137        return self.to_str()138 139    def __eq__(self, other):140        """Returns true if both objects are equal"""141        if not isinstance(other, V1ScaleStatus):142            return False143 144        return self.to_dict() == other.to_dict()145 146    def __ne__(self, other):147        """Returns true if both objects are not equal"""148        if not isinstance(other, V1ScaleStatus):149            return True150 151        return self.to_dict() != other.to_dict()152 
codekingpro/portable-devtools · Team Ai