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 V1StatefulSetStatus(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 'collision_count': 'int', 32 'conditions': 'list[V1StatefulSetCondition]', 33 'current_replicas': 'int', 34 'current_revision': 'str', 35 'observed_generation': 'int', 36 'ready_replicas': 'int', 37 'replicas': 'int', 38 'update_revision': 'str', 39 'updated_replicas': 'int' 40 } 41 42 attribute_map = { 43 'collision_count': 'collisionCount', 44 'conditions': 'conditions', 45 'current_replicas': 'currentReplicas', 46 'current_revision': 'currentRevision', 47 'observed_generation': 'observedGeneration', 48 'ready_replicas': 'readyReplicas', 49 'replicas': 'replicas', 50 'update_revision': 'updateRevision', 51 'updated_replicas': 'updatedReplicas' 52 } 53 54 def __init__(self, 55 collision_count=None, 56 conditions=None, 57 current_replicas=None, 58 current_revision=None, 59 observed_generation=None, 60 ready_replicas=None, 61 replicas=None, 62 update_revision=None, 63 updated_replicas=None): 64 """ 65 V1StatefulSetStatus - a model defined in Swagger 66 """ 67 68 self._collision_count = None 69 self._conditions = None 70 self._current_replicas = None 71 self._current_revision = None 72 self._observed_generation = None 73 self._ready_replicas = None 74 self._replicas = None 75 self._update_revision = None 76 self._updated_replicas = None 77 self.discriminator = None 78 79 if collision_count is not None: 80 self.collision_count = collision_count 81 if conditions is not None: 82 self.conditions = conditions 83 if current_replicas is not None: 84 self.current_replicas = current_replicas 85 if current_revision is not None: 86 self.current_revision = current_revision 87 if observed_generation is not None: 88 self.observed_generation = observed_generation 89 if ready_replicas is not None: 90 self.ready_replicas = ready_replicas 91 self.replicas = replicas 92 if update_revision is not None: 93 self.update_revision = update_revision 94 if updated_replicas is not None: 95 self.updated_replicas = updated_replicas 96 97 @property 98 def collision_count(self): 99 """ 100 Gets the collision_count of this V1StatefulSetStatus. 101 collisionCount is the count of hash collisions for the StatefulSet. The 102 StatefulSet controller uses this field as a collision avoidance 103 mechanism when it needs to create the name for the newest 104 ControllerRevision. 105 106 :return: The collision_count of this V1StatefulSetStatus. 107 :rtype: int 108 """ 109 return self._collision_count 110 111 @collision_count.setter 112 def collision_count(self, collision_count): 113 """ 114 Sets the collision_count of this V1StatefulSetStatus. 115 collisionCount is the count of hash collisions for the StatefulSet. The 116 StatefulSet controller uses this field as a collision avoidance 117 mechanism when it needs to create the name for the newest 118 ControllerRevision. 119 120 :param collision_count: The collision_count of this V1StatefulSetStatus. 121 :type: int 122 """ 123 124 self._collision_count = collision_count 125 126 @property 127 def conditions(self): 128 """ 129 Gets the conditions of this V1StatefulSetStatus. 130 Represents the latest available observations of a statefulset's current 131 state. 132 133 :return: The conditions of this V1StatefulSetStatus. 134 :rtype: list[V1StatefulSetCondition] 135 """ 136 return self._conditions 137 138 @conditions.setter 139 def conditions(self, conditions): 140 """ 141 Sets the conditions of this V1StatefulSetStatus. 142 Represents the latest available observations of a statefulset's current 143 state. 144 145 :param conditions: The conditions of this V1StatefulSetStatus. 146 :type: list[V1StatefulSetCondition] 147 """ 148 149 self._conditions = conditions 150 151 @property 152 def current_replicas(self): 153 """ 154 Gets the current_replicas of this V1StatefulSetStatus. 155 currentReplicas is the number of Pods created by the StatefulSet 156 controller from the StatefulSet version indicated by currentRevision. 157 158 :return: The current_replicas of this V1StatefulSetStatus. 159 :rtype: int 160 """ 161 return self._current_replicas 162 163 @current_replicas.setter 164 def current_replicas(self, current_replicas): 165 """ 166 Sets the current_replicas of this V1StatefulSetStatus. 167 currentReplicas is the number of Pods created by the StatefulSet 168 controller from the StatefulSet version indicated by currentRevision. 169 170 :param current_replicas: The current_replicas of this 171 V1StatefulSetStatus. 172 :type: int 173 """ 174 175 self._current_replicas = current_replicas 176 177 @property 178 def current_revision(self): 179 """ 180 Gets the current_revision of this V1StatefulSetStatus. 181 currentRevision, if not empty, indicates the version of the StatefulSet 182 used to generate Pods in the sequence [0,currentReplicas). 183 184 :return: The current_revision of this V1StatefulSetStatus. 185 :rtype: str 186 """ 187 return self._current_revision 188 189 @current_revision.setter 190 def current_revision(self, current_revision): 191 """ 192 Sets the current_revision of this V1StatefulSetStatus. 193 currentRevision, if not empty, indicates the version of the StatefulSet 194 used to generate Pods in the sequence [0,currentReplicas). 195 196 :param current_revision: The current_revision of this 197 V1StatefulSetStatus. 198 :type: str 199 """ 200 201 self._current_revision = current_revision 202 203 @property 204 def observed_generation(self): 205 """ 206 Gets the observed_generation of this V1StatefulSetStatus. 207 observedGeneration is the most recent generation observed for this 208 StatefulSet. It corresponds to the StatefulSet's generation, which is 209 updated on mutation by the API Server. 210 211 :return: The observed_generation of this V1StatefulSetStatus. 212 :rtype: int 213 """ 214 return self._observed_generation 215 216 @observed_generation.setter 217 def observed_generation(self, observed_generation): 218 """ 219 Sets the observed_generation of this V1StatefulSetStatus. 220 observedGeneration is the most recent generation observed for this 221 StatefulSet. It corresponds to the StatefulSet's generation, which is 222 updated on mutation by the API Server. 223 224 :param observed_generation: The observed_generation of this 225 V1StatefulSetStatus. 226 :type: int 227 """ 228 229 self._observed_generation = observed_generation 230 231 @property 232 def ready_replicas(self): 233 """ 234 Gets the ready_replicas of this V1StatefulSetStatus. 235 readyReplicas is the number of Pods created by the StatefulSet 236 controller that have a Ready Condition. 237 238 :return: The ready_replicas of this V1StatefulSetStatus. 239 :rtype: int 240 """ 241 return self._ready_replicas 242 243 @ready_replicas.setter 244 def ready_replicas(self, ready_replicas): 245 """ 246 Sets the ready_replicas of this V1StatefulSetStatus. 247 readyReplicas is the number of Pods created by the StatefulSet 248 controller that have a Ready Condition. 249 250 :param ready_replicas: The ready_replicas of this V1StatefulSetStatus. 251 :type: int 252 """ 253 254 self._ready_replicas = ready_replicas 255 256 @property 257 def replicas(self): 258 """ 259 Gets the replicas of this V1StatefulSetStatus. 260 replicas is the number of Pods created by the StatefulSet controller. 261 262 :return: The replicas of this V1StatefulSetStatus. 263 :rtype: int 264 """ 265 return self._replicas 266 267 @replicas.setter 268 def replicas(self, replicas): 269 """ 270 Sets the replicas of this V1StatefulSetStatus. 271 replicas is the number of Pods created by the StatefulSet controller. 272 273 :param replicas: The replicas of this V1StatefulSetStatus. 274 :type: int 275 """ 276 if replicas is None: 277 raise ValueError('Invalid value for `replicas`, must not be `None`') 278 279 self._replicas = replicas 280 281 @property 282 def update_revision(self): 283 """ 284 Gets the update_revision of this V1StatefulSetStatus. 285 updateRevision, if not empty, indicates the version of the StatefulSet 286 used to generate Pods in the sequence 287 [replicas-updatedReplicas,replicas) 288 289 :return: The update_revision of this V1StatefulSetStatus. 290 :rtype: str 291 """ 292 return self._update_revision 293 294 @update_revision.setter 295 def update_revision(self, update_revision): 296 """ 297 Sets the update_revision of this V1StatefulSetStatus. 298 updateRevision, if not empty, indicates the version of the StatefulSet 299 used to generate Pods in the sequence 300 [replicas-updatedReplicas,replicas) 301 302 :param update_revision: The update_revision of this V1StatefulSetStatus. 303 :type: str 304 """ 305 306 self._update_revision = update_revision 307 308 @property 309 def updated_replicas(self): 310 """ 311 Gets the updated_replicas of this V1StatefulSetStatus. 312 updatedReplicas is the number of Pods created by the StatefulSet 313 controller from the StatefulSet version indicated by updateRevision. 314 315 :return: The updated_replicas of this V1StatefulSetStatus. 316 :rtype: int 317 """ 318 return self._updated_replicas 319 320 @updated_replicas.setter 321 def updated_replicas(self, updated_replicas): 322 """ 323 Sets the updated_replicas of this V1StatefulSetStatus. 324 updatedReplicas is the number of Pods created by the StatefulSet 325 controller from the StatefulSet version indicated by updateRevision. 326 327 :param updated_replicas: The updated_replicas of this 328 V1StatefulSetStatus. 329 :type: int 330 """ 331 332 self._updated_replicas = updated_replicas 333 334 def to_dict(self): 335 """ 336 Returns the model properties as a dict 337 """ 338 result = {} 339 340 for attr, _ in iteritems(self.swagger_types): 341 value = getattr(self, attr) 342 if isinstance(value, list): 343 result[attr] = list( 344 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 345 elif hasattr(value, 'to_dict'): 346 result[attr] = value.to_dict() 347 elif isinstance(value, dict): 348 result[attr] = dict( 349 map( 350 lambda item: (item[0], item[1].to_dict()) 351 if hasattr(item[1], 'to_dict') else item, value.items())) 352 else: 353 result[attr] = value 354 355 return result 356 357 def to_str(self): 358 """ 359 Returns the string representation of the model 360 """ 361 return pformat(self.to_dict()) 362 363 def __repr__(self): 364 """ 365 For `print` and `pprint` 366 """ 367 return self.to_str() 368 369 def __eq__(self, other): 370 """ 371 Returns true if both objects are equal 372 """ 373 if not isinstance(other, V1StatefulSetStatus): 374 return False 375 376 return self.__dict__ == other.__dict__ 377 378 def __ne__(self, other): 379 """ 380 Returns true if both objects are not equal 381 """ 382 return not self == other 383