codekingpro/portable-devtools
114k
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 V1LimitRangeItem(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 'default': 'dict(str, str)',37 'default_request': 'dict(str, str)',38 'max': 'dict(str, str)',39 'max_limit_request_ratio': 'dict(str, str)',40 'min': 'dict(str, str)',41 'type': 'str'42 }43 44 attribute_map = {45 'default': 'default',46 'default_request': 'defaultRequest',47 'max': 'max',48 'max_limit_request_ratio': 'maxLimitRequestRatio',49 'min': 'min',50 'type': 'type'51 }52 53 def __init__(self, default=None, default_request=None, max=None, max_limit_request_ratio=None, min=None, type=None, local_vars_configuration=None): # noqa: E50154 """V1LimitRangeItem - 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._default = None60 self._default_request = None61 self._max = None62 self._max_limit_request_ratio = None63 self._min = None64 self._type = None65 self.discriminator = None66 67 if default is not None:68 self.default = default69 if default_request is not None:70 self.default_request = default_request71 if max is not None:72 self.max = max73 if max_limit_request_ratio is not None:74 self.max_limit_request_ratio = max_limit_request_ratio75 if min is not None:76 self.min = min77 self.type = type78 79 @property80 def default(self):81 """Gets the default of this V1LimitRangeItem. # noqa: E50182 83 Default resource requirement limit value by resource name if resource limit is omitted. # noqa: E50184 85 :return: The default of this V1LimitRangeItem. # noqa: E50186 :rtype: dict(str, str)87 """88 return self._default89 90 @default.setter91 def default(self, default):92 """Sets the default of this V1LimitRangeItem.93 94 Default resource requirement limit value by resource name if resource limit is omitted. # noqa: E50195 96 :param default: The default of this V1LimitRangeItem. # noqa: E50197 :type: dict(str, str)98 """99 100 self._default = default101 102 @property103 def default_request(self):104 """Gets the default_request of this V1LimitRangeItem. # noqa: E501105 106 DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. # noqa: E501107 108 :return: The default_request of this V1LimitRangeItem. # noqa: E501109 :rtype: dict(str, str)110 """111 return self._default_request112 113 @default_request.setter114 def default_request(self, default_request):115 """Sets the default_request of this V1LimitRangeItem.116 117 DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. # noqa: E501118 119 :param default_request: The default_request of this V1LimitRangeItem. # noqa: E501120 :type: dict(str, str)121 """122 123 self._default_request = default_request124 125 @property126 def max(self):127 """Gets the max of this V1LimitRangeItem. # noqa: E501128 129 Max usage constraints on this kind by resource name. # noqa: E501130 131 :return: The max of this V1LimitRangeItem. # noqa: E501132 :rtype: dict(str, str)133 """134 return self._max135 136 @max.setter137 def max(self, max):138 """Sets the max of this V1LimitRangeItem.139 140 Max usage constraints on this kind by resource name. # noqa: E501141 142 :param max: The max of this V1LimitRangeItem. # noqa: E501143 :type: dict(str, str)144 """145 146 self._max = max147 148 @property149 def max_limit_request_ratio(self):150 """Gets the max_limit_request_ratio of this V1LimitRangeItem. # noqa: E501151 152 MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. # noqa: E501153 154 :return: The max_limit_request_ratio of this V1LimitRangeItem. # noqa: E501155 :rtype: dict(str, str)156 """157 return self._max_limit_request_ratio158 159 @max_limit_request_ratio.setter160 def max_limit_request_ratio(self, max_limit_request_ratio):161 """Sets the max_limit_request_ratio of this V1LimitRangeItem.162 163 MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. # noqa: E501164 165 :param max_limit_request_ratio: The max_limit_request_ratio of this V1LimitRangeItem. # noqa: E501166 :type: dict(str, str)167 """168 169 self._max_limit_request_ratio = max_limit_request_ratio170 171 @property172 def min(self):173 """Gets the min of this V1LimitRangeItem. # noqa: E501174 175 Min usage constraints on this kind by resource name. # noqa: E501176 177 :return: The min of this V1LimitRangeItem. # noqa: E501178 :rtype: dict(str, str)179 """180 return self._min181 182 @min.setter183 def min(self, min):184 """Sets the min of this V1LimitRangeItem.185 186 Min usage constraints on this kind by resource name. # noqa: E501187 188 :param min: The min of this V1LimitRangeItem. # noqa: E501189 :type: dict(str, str)190 """191 192 self._min = min193 194 @property195 def type(self):196 """Gets the type of this V1LimitRangeItem. # noqa: E501197 198 Type of resource that this limit applies to. # noqa: E501199 200 :return: The type of this V1LimitRangeItem. # noqa: E501201 :rtype: str202 """203 return self._type204 205 @type.setter206 def type(self, type):207 """Sets the type of this V1LimitRangeItem.208 209 Type of resource that this limit applies to. # noqa: E501210 211 :param type: The type of this V1LimitRangeItem. # noqa: E501212 :type: str213 """214 if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501215 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501216 217 self._type = type218 219 def to_dict(self):220 """Returns the model properties as a dict"""221 result = {}222 223 for attr, _ in six.iteritems(self.openapi_types):224 value = getattr(self, attr)225 if isinstance(value, list):226 result[attr] = list(map(227 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,228 value229 ))230 elif hasattr(value, "to_dict"):231 result[attr] = value.to_dict()232 elif isinstance(value, dict):233 result[attr] = dict(map(234 lambda item: (item[0], item[1].to_dict())235 if hasattr(item[1], "to_dict") else item,236 value.items()237 ))238 else:239 result[attr] = value240 241 return result242 243 def to_str(self):244 """Returns the string representation of the model"""245 return pprint.pformat(self.to_dict())246 247 def __repr__(self):248 """For `print` and `pprint`"""249 return self.to_str()250 251 def __eq__(self, other):252 """Returns true if both objects are equal"""253 if not isinstance(other, V1LimitRangeItem):254 return False255 256 return self.to_dict() == other.to_dict()257 258 def __ne__(self, other):259 """Returns true if both objects are not equal"""260 if not isinstance(other, V1LimitRangeItem):261 return True262 263 return self.to_dict() != other.to_dict()264 