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 AppsV1beta1DeploymentRollback(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 'api_version': 'str', 32 'kind': 'str', 33 'name': 'str', 34 'rollback_to': 'AppsV1beta1RollbackConfig', 35 'updated_annotations': 'dict(str, str)' 36 } 37 38 attribute_map = { 39 'api_version': 'apiVersion', 40 'kind': 'kind', 41 'name': 'name', 42 'rollback_to': 'rollbackTo', 43 'updated_annotations': 'updatedAnnotations' 44 } 45 46 def __init__(self, 47 api_version=None, 48 kind=None, 49 name=None, 50 rollback_to=None, 51 updated_annotations=None): 52 """ 53 AppsV1beta1DeploymentRollback - a model defined in Swagger 54 """ 55 56 self._api_version = None 57 self._kind = None 58 self._name = None 59 self._rollback_to = None 60 self._updated_annotations = None 61 self.discriminator = None 62 63 if api_version is not None: 64 self.api_version = api_version 65 if kind is not None: 66 self.kind = kind 67 self.name = name 68 self.rollback_to = rollback_to 69 if updated_annotations is not None: 70 self.updated_annotations = updated_annotations 71 72 @property 73 def api_version(self): 74 """ 75 Gets the api_version of this AppsV1beta1DeploymentRollback. 76 APIVersion defines the versioned schema of this representation of an 77 object. Servers should convert recognized schemas to the latest internal 78 value, and may reject unrecognized values. More info: 79 https://git.k8s.io/community/contributors/devel/api-conventions.md#resources 80 81 :return: The api_version of this AppsV1beta1DeploymentRollback. 82 :rtype: str 83 """ 84 return self._api_version 85 86 @api_version.setter 87 def api_version(self, api_version): 88 """ 89 Sets the api_version of this AppsV1beta1DeploymentRollback. 90 APIVersion defines the versioned schema of this representation of an 91 object. Servers should convert recognized schemas to the latest internal 92 value, and may reject unrecognized values. More info: 93 https://git.k8s.io/community/contributors/devel/api-conventions.md#resources 94 95 :param api_version: The api_version of this 96 AppsV1beta1DeploymentRollback. 97 :type: str 98 """ 99 100 self._api_version = api_version 101 102 @property 103 def kind(self): 104 """ 105 Gets the kind of this AppsV1beta1DeploymentRollback. 106 Kind is a string value representing the REST resource this object 107 represents. Servers may infer this from the endpoint the client submits 108 requests to. Cannot be updated. In CamelCase. More info: 109 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 110 111 :return: The kind of this AppsV1beta1DeploymentRollback. 112 :rtype: str 113 """ 114 return self._kind 115 116 @kind.setter 117 def kind(self, kind): 118 """ 119 Sets the kind of this AppsV1beta1DeploymentRollback. 120 Kind is a string value representing the REST resource this object 121 represents. Servers may infer this from the endpoint the client submits 122 requests to. Cannot be updated. In CamelCase. More info: 123 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 124 125 :param kind: The kind of this AppsV1beta1DeploymentRollback. 126 :type: str 127 """ 128 129 self._kind = kind 130 131 @property 132 def name(self): 133 """ 134 Gets the name of this AppsV1beta1DeploymentRollback. 135 Required: This must match the Name of a deployment. 136 137 :return: The name of this AppsV1beta1DeploymentRollback. 138 :rtype: str 139 """ 140 return self._name 141 142 @name.setter 143 def name(self, name): 144 """ 145 Sets the name of this AppsV1beta1DeploymentRollback. 146 Required: This must match the Name of a deployment. 147 148 :param name: The name of this AppsV1beta1DeploymentRollback. 149 :type: str 150 """ 151 if name is None: 152 raise ValueError('Invalid value for `name`, must not be `None`') 153 154 self._name = name 155 156 @property 157 def rollback_to(self): 158 """ 159 Gets the rollback_to of this AppsV1beta1DeploymentRollback. 160 The config of this deployment rollback. 161 162 :return: The rollback_to of this AppsV1beta1DeploymentRollback. 163 :rtype: AppsV1beta1RollbackConfig 164 """ 165 return self._rollback_to 166 167 @rollback_to.setter 168 def rollback_to(self, rollback_to): 169 """ 170 Sets the rollback_to of this AppsV1beta1DeploymentRollback. 171 The config of this deployment rollback. 172 173 :param rollback_to: The rollback_to of this 174 AppsV1beta1DeploymentRollback. 175 :type: AppsV1beta1RollbackConfig 176 """ 177 if rollback_to is None: 178 raise ValueError('Invalid value for `rollback_to`, must not be `None`') 179 180 self._rollback_to = rollback_to 181 182 @property 183 def updated_annotations(self): 184 """ 185 Gets the updated_annotations of this AppsV1beta1DeploymentRollback. 186 The annotations to be updated to a deployment 187 188 :return: The updated_annotations of this AppsV1beta1DeploymentRollback. 189 :rtype: dict(str, str) 190 """ 191 return self._updated_annotations 192 193 @updated_annotations.setter 194 def updated_annotations(self, updated_annotations): 195 """ 196 Sets the updated_annotations of this AppsV1beta1DeploymentRollback. 197 The annotations to be updated to a deployment 198 199 :param updated_annotations: The updated_annotations of this 200 AppsV1beta1DeploymentRollback. 201 :type: dict(str, str) 202 """ 203 204 self._updated_annotations = updated_annotations 205 206 def to_dict(self): 207 """ 208 Returns the model properties as a dict 209 """ 210 result = {} 211 212 for attr, _ in iteritems(self.swagger_types): 213 value = getattr(self, attr) 214 if isinstance(value, list): 215 result[attr] = list( 216 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 217 elif hasattr(value, 'to_dict'): 218 result[attr] = value.to_dict() 219 elif isinstance(value, dict): 220 result[attr] = dict( 221 map( 222 lambda item: (item[0], item[1].to_dict()) 223 if hasattr(item[1], 'to_dict') else item, value.items())) 224 else: 225 result[attr] = value 226 227 return result 228 229 def to_str(self): 230 """ 231 Returns the string representation of the model 232 """ 233 return pformat(self.to_dict()) 234 235 def __repr__(self): 236 """ 237 For `print` and `pprint` 238 """ 239 return self.to_str() 240 241 def __eq__(self, other): 242 """ 243 Returns true if both objects are equal 244 """ 245 if not isinstance(other, AppsV1beta1DeploymentRollback): 246 return False 247 248 return self.__dict__ == other.__dict__ 249 250 def __ne__(self, other): 251 """ 252 Returns true if both objects are not equal 253 """ 254 return not self == other 255