Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_resource_quota_spec.py177 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 V1ResourceQuotaSpec(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        'hard': 'dict(str, str)',37        'scope_selector': 'V1ScopeSelector',38        'scopes': 'list[str]'39    }40 41    attribute_map = {42        'hard': 'hard',43        'scope_selector': 'scopeSelector',44        'scopes': 'scopes'45    }46 47    def __init__(self, hard=None, scope_selector=None, scopes=None, local_vars_configuration=None):  # noqa: E50148        """V1ResourceQuotaSpec - 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._hard = None54        self._scope_selector = None55        self._scopes = None56        self.discriminator = None57 58        if hard is not None:59            self.hard = hard60        if scope_selector is not None:61            self.scope_selector = scope_selector62        if scopes is not None:63            self.scopes = scopes64 65    @property66    def hard(self):67        """Gets the hard of this V1ResourceQuotaSpec.  # noqa: E50168 69        hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/  # noqa: E50170 71        :return: The hard of this V1ResourceQuotaSpec.  # noqa: E50172        :rtype: dict(str, str)73        """74        return self._hard75 76    @hard.setter77    def hard(self, hard):78        """Sets the hard of this V1ResourceQuotaSpec.79 80        hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/  # noqa: E50181 82        :param hard: The hard of this V1ResourceQuotaSpec.  # noqa: E50183        :type: dict(str, str)84        """85 86        self._hard = hard87 88    @property89    def scope_selector(self):90        """Gets the scope_selector of this V1ResourceQuotaSpec.  # noqa: E50191 92 93        :return: The scope_selector of this V1ResourceQuotaSpec.  # noqa: E50194        :rtype: V1ScopeSelector95        """96        return self._scope_selector97 98    @scope_selector.setter99    def scope_selector(self, scope_selector):100        """Sets the scope_selector of this V1ResourceQuotaSpec.101 102 103        :param scope_selector: The scope_selector of this V1ResourceQuotaSpec.  # noqa: E501104        :type: V1ScopeSelector105        """106 107        self._scope_selector = scope_selector108 109    @property110    def scopes(self):111        """Gets the scopes of this V1ResourceQuotaSpec.  # noqa: E501112 113        A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.  # noqa: E501114 115        :return: The scopes of this V1ResourceQuotaSpec.  # noqa: E501116        :rtype: list[str]117        """118        return self._scopes119 120    @scopes.setter121    def scopes(self, scopes):122        """Sets the scopes of this V1ResourceQuotaSpec.123 124        A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.  # noqa: E501125 126        :param scopes: The scopes of this V1ResourceQuotaSpec.  # noqa: E501127        :type: list[str]128        """129 130        self._scopes = scopes131 132    def to_dict(self):133        """Returns the model properties as a dict"""134        result = {}135 136        for attr, _ in six.iteritems(self.openapi_types):137            value = getattr(self, attr)138            if isinstance(value, list):139                result[attr] = list(map(140                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,141                    value142                ))143            elif hasattr(value, "to_dict"):144                result[attr] = value.to_dict()145            elif isinstance(value, dict):146                result[attr] = dict(map(147                    lambda item: (item[0], item[1].to_dict())148                    if hasattr(item[1], "to_dict") else item,149                    value.items()150                ))151            else:152                result[attr] = value153 154        return result155 156    def to_str(self):157        """Returns the string representation of the model"""158        return pprint.pformat(self.to_dict())159 160    def __repr__(self):161        """For `print` and `pprint`"""162        return self.to_str()163 164    def __eq__(self, other):165        """Returns true if both objects are equal"""166        if not isinstance(other, V1ResourceQuotaSpec):167            return False168 169        return self.to_dict() == other.to_dict()170 171    def __ne__(self, other):172        """Returns true if both objects are not equal"""173        if not isinstance(other, V1ResourceQuotaSpec):174            return True175 176        return self.to_dict() != other.to_dict()177 
codekingpro/portable-devtools · Team Ai