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 V1beta1StatefulSetCondition(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 'last_transition_time': 'datetime', 32 'message': 'str', 33 'reason': 'str', 34 'status': 'str', 35 'type': 'str' 36 } 37 38 attribute_map = { 39 'last_transition_time': 'lastTransitionTime', 40 'message': 'message', 41 'reason': 'reason', 42 'status': 'status', 43 'type': 'type' 44 } 45 46 def __init__(self, 47 last_transition_time=None, 48 message=None, 49 reason=None, 50 status=None, 51 type=None): 52 """ 53 V1beta1StatefulSetCondition - a model defined in Swagger 54 """ 55 56 self._last_transition_time = None 57 self._message = None 58 self._reason = None 59 self._status = None 60 self._type = None 61 self.discriminator = None 62 63 if last_transition_time is not None: 64 self.last_transition_time = last_transition_time 65 if message is not None: 66 self.message = message 67 if reason is not None: 68 self.reason = reason 69 self.status = status 70 self.type = type 71 72 @property 73 def last_transition_time(self): 74 """ 75 Gets the last_transition_time of this V1beta1StatefulSetCondition. 76 Last time the condition transitioned from one status to another. 77 78 :return: The last_transition_time of this V1beta1StatefulSetCondition. 79 :rtype: datetime 80 """ 81 return self._last_transition_time 82 83 @last_transition_time.setter 84 def last_transition_time(self, last_transition_time): 85 """ 86 Sets the last_transition_time of this V1beta1StatefulSetCondition. 87 Last time the condition transitioned from one status to another. 88 89 :param last_transition_time: The last_transition_time of this 90 V1beta1StatefulSetCondition. 91 :type: datetime 92 """ 93 94 self._last_transition_time = last_transition_time 95 96 @property 97 def message(self): 98 """ 99 Gets the message of this V1beta1StatefulSetCondition. 100 A human readable message indicating details about the transition. 101 102 :return: The message of this V1beta1StatefulSetCondition. 103 :rtype: str 104 """ 105 return self._message 106 107 @message.setter 108 def message(self, message): 109 """ 110 Sets the message of this V1beta1StatefulSetCondition. 111 A human readable message indicating details about the transition. 112 113 :param message: The message of this V1beta1StatefulSetCondition. 114 :type: str 115 """ 116 117 self._message = message 118 119 @property 120 def reason(self): 121 """ 122 Gets the reason of this V1beta1StatefulSetCondition. 123 The reason for the condition's last transition. 124 125 :return: The reason of this V1beta1StatefulSetCondition. 126 :rtype: str 127 """ 128 return self._reason 129 130 @reason.setter 131 def reason(self, reason): 132 """ 133 Sets the reason of this V1beta1StatefulSetCondition. 134 The reason for the condition's last transition. 135 136 :param reason: The reason of this V1beta1StatefulSetCondition. 137 :type: str 138 """ 139 140 self._reason = reason 141 142 @property 143 def status(self): 144 """ 145 Gets the status of this V1beta1StatefulSetCondition. 146 Status of the condition, one of True, False, Unknown. 147 148 :return: The status of this V1beta1StatefulSetCondition. 149 :rtype: str 150 """ 151 return self._status 152 153 @status.setter 154 def status(self, status): 155 """ 156 Sets the status of this V1beta1StatefulSetCondition. 157 Status of the condition, one of True, False, Unknown. 158 159 :param status: The status of this V1beta1StatefulSetCondition. 160 :type: str 161 """ 162 if status is None: 163 raise ValueError('Invalid value for `status`, must not be `None`') 164 165 self._status = status 166 167 @property 168 def type(self): 169 """ 170 Gets the type of this V1beta1StatefulSetCondition. 171 Type of statefulset condition. 172 173 :return: The type of this V1beta1StatefulSetCondition. 174 :rtype: str 175 """ 176 return self._type 177 178 @type.setter 179 def type(self, type): 180 """ 181 Sets the type of this V1beta1StatefulSetCondition. 182 Type of statefulset condition. 183 184 :param type: The type of this V1beta1StatefulSetCondition. 185 :type: str 186 """ 187 if type is None: 188 raise ValueError('Invalid value for `type`, must not be `None`') 189 190 self._type = type 191 192 def to_dict(self): 193 """ 194 Returns the model properties as a dict 195 """ 196 result = {} 197 198 for attr, _ in iteritems(self.swagger_types): 199 value = getattr(self, attr) 200 if isinstance(value, list): 201 result[attr] = list( 202 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 203 elif hasattr(value, 'to_dict'): 204 result[attr] = value.to_dict() 205 elif isinstance(value, dict): 206 result[attr] = dict( 207 map( 208 lambda item: (item[0], item[1].to_dict()) 209 if hasattr(item[1], 'to_dict') else item, value.items())) 210 else: 211 result[attr] = value 212 213 return result 214 215 def to_str(self): 216 """ 217 Returns the string representation of the model 218 """ 219 return pformat(self.to_dict()) 220 221 def __repr__(self): 222 """ 223 For `print` and `pprint` 224 """ 225 return self.to_str() 226 227 def __eq__(self, other): 228 """ 229 Returns true if both objects are equal 230 """ 231 if not isinstance(other, V1beta1StatefulSetCondition): 232 return False 233 234 return self.__dict__ == other.__dict__ 235 236 def __ne__(self, other): 237 """ 238 Returns true if both objects are not equal 239 """ 240 return not self == other 241