1# coding: utf-8 2""" 3 Kubernetes 4 5 No description provided (generated by Swagger Codegen 6 https://github.com/swagger-api/swagger-codegen) 7 8 OpenAPI spec version: v1.14.4 9 10 Generated by: https://github.com/swagger-api/swagger-codegen.git 11""" 12 13from pprint import pformat 14from six import iteritems 15import re 16 17 18class V1LimitRangeItem(object): 19 """ 20 NOTE: This class is auto generated by the swagger code generator program. 21 Do not edit the class manually. 22 """ 23 """ 24 Attributes: 25 swagger_types (dict): The key is attribute name and the value is attribute 26 type. 27 attribute_map (dict): The key is attribute name and the value is json key 28 in definition. 29 """ 30 swagger_types = { 31 'default': 'dict(str, str)', 32 'default_request': 'dict(str, str)', 33 'max': 'dict(str, str)', 34 'max_limit_request_ratio': 'dict(str, str)', 35 'min': 'dict(str, str)', 36 'type': 'str' 37 } 38 39 attribute_map = { 40 'default': 'default', 41 'default_request': 'defaultRequest', 42 'max': 'max', 43 'max_limit_request_ratio': 'maxLimitRequestRatio', 44 'min': 'min', 45 'type': 'type' 46 } 47 48 def __init__(self, 49 default=None, 50 default_request=None, 51 max=None, 52 max_limit_request_ratio=None, 53 min=None, 54 type=None): 55 """ 56 V1LimitRangeItem - a model defined in Swagger 57 """ 58 59 self._default = None 60 self._default_request = None 61 self._max = None 62 self._max_limit_request_ratio = None 63 self._min = None 64 self._type = None 65 self.discriminator = None 66 67 if default is not None: 68 self.default = default 69 if default_request is not None: 70 self.default_request = default_request 71 if max is not None: 72 self.max = max 73 if max_limit_request_ratio is not None: 74 self.max_limit_request_ratio = max_limit_request_ratio 75 if min is not None: 76 self.min = min 77 if type is not None: 78 self.type = type 79 80 @property 81 def default(self): 82 """ 83 Gets the default of this V1LimitRangeItem. 84 Default resource requirement limit value by resource name if resource 85 limit is omitted. 86 87 :return: The default of this V1LimitRangeItem. 88 :rtype: dict(str, str) 89 """ 90 return self._default 91 92 @default.setter 93 def default(self, default): 94 """ 95 Sets the default of this V1LimitRangeItem. 96 Default resource requirement limit value by resource name if resource 97 limit is omitted. 98 99 :param default: The default of this V1LimitRangeItem. 100 :type: dict(str, str) 101 """ 102 103 self._default = default 104 105 @property 106 def default_request(self): 107 """ 108 Gets the default_request of this V1LimitRangeItem. 109 DefaultRequest is the default resource requirement request value by 110 resource name if resource request is omitted. 111 112 :return: The default_request of this V1LimitRangeItem. 113 :rtype: dict(str, str) 114 """ 115 return self._default_request 116 117 @default_request.setter 118 def default_request(self, default_request): 119 """ 120 Sets the default_request of this V1LimitRangeItem. 121 DefaultRequest is the default resource requirement request value by 122 resource name if resource request is omitted. 123 124 :param default_request: The default_request of this V1LimitRangeItem. 125 :type: dict(str, str) 126 """ 127 128 self._default_request = default_request 129 130 @property 131 def max(self): 132 """ 133 Gets the max of this V1LimitRangeItem. 134 Max usage constraints on this kind by resource name. 135 136 :return: The max of this V1LimitRangeItem. 137 :rtype: dict(str, str) 138 """ 139 return self._max 140 141 @max.setter 142 def max(self, max): 143 """ 144 Sets the max of this V1LimitRangeItem. 145 Max usage constraints on this kind by resource name. 146 147 :param max: The max of this V1LimitRangeItem. 148 :type: dict(str, str) 149 """ 150 151 self._max = max 152 153 @property 154 def max_limit_request_ratio(self): 155 """ 156 Gets the max_limit_request_ratio of this V1LimitRangeItem. 157 MaxLimitRequestRatio if specified, the named resource must have a 158 request and limit that are both non-zero where limit divided by request 159 is less than or equal to the enumerated value; this represents the max 160 burst for the named resource. 161 162 :return: The max_limit_request_ratio of this V1LimitRangeItem. 163 :rtype: dict(str, str) 164 """ 165 return self._max_limit_request_ratio 166 167 @max_limit_request_ratio.setter 168 def max_limit_request_ratio(self, max_limit_request_ratio): 169 """ 170 Sets the max_limit_request_ratio of this V1LimitRangeItem. 171 MaxLimitRequestRatio if specified, the named resource must have a 172 request and limit that are both non-zero where limit divided by request 173 is less than or equal to the enumerated value; this represents the max 174 burst for the named resource. 175 176 :param max_limit_request_ratio: The max_limit_request_ratio of this 177 V1LimitRangeItem. 178 :type: dict(str, str) 179 """ 180 181 self._max_limit_request_ratio = max_limit_request_ratio 182 183 @property 184 def min(self): 185 """ 186 Gets the min of this V1LimitRangeItem. 187 Min usage constraints on this kind by resource name. 188 189 :return: The min of this V1LimitRangeItem. 190 :rtype: dict(str, str) 191 """ 192 return self._min 193 194 @min.setter 195 def min(self, min): 196 """ 197 Sets the min of this V1LimitRangeItem. 198 Min usage constraints on this kind by resource name. 199 200 :param min: The min of this V1LimitRangeItem. 201 :type: dict(str, str) 202 """ 203 204 self._min = min 205 206 @property 207 def type(self): 208 """ 209 Gets the type of this V1LimitRangeItem. 210 Type of resource that this limit applies to. 211 212 :return: The type of this V1LimitRangeItem. 213 :rtype: str 214 """ 215 return self._type 216 217 @type.setter 218 def type(self, type): 219 """ 220 Sets the type of this V1LimitRangeItem. 221 Type of resource that this limit applies to. 222 223 :param type: The type of this V1LimitRangeItem. 224 :type: str 225 """ 226 227 self._type = type 228 229 def to_dict(self): 230 """ 231 Returns the model properties as a dict 232 """ 233 result = {} 234 235 for attr, _ in iteritems(self.swagger_types): 236 value = getattr(self, attr) 237 if isinstance(value, list): 238 result[attr] = list( 239 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 240 elif hasattr(value, 'to_dict'): 241 result[attr] = value.to_dict() 242 elif isinstance(value, dict): 243 result[attr] = dict( 244 map( 245 lambda item: (item[0], item[1].to_dict()) 246 if hasattr(item[1], 'to_dict') else item, value.items())) 247 else: 248 result[attr] = value 249 250 return result 251 252 def to_str(self): 253 """ 254 Returns the string representation of the model 255 """ 256 return pformat(self.to_dict()) 257 258 def __repr__(self): 259 """ 260 For `print` and `pprint` 261 """ 262 return self.to_str() 263 264 def __eq__(self, other): 265 """ 266 Returns true if both objects are equal 267 """ 268 if not isinstance(other, V1LimitRangeItem): 269 return False 270 271 return self.__dict__ == other.__dict__ 272 273 def __ne__(self, other): 274 """ 275 Returns true if both objects are not equal 276 """ 277 return not self == other 278