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