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 V1ManagedFieldsEntry(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 'fields': 'object', 33 'manager': 'str', 34 'operation': 'str', 35 'time': 'datetime' 36 } 37 38 attribute_map = { 39 'api_version': 'apiVersion', 40 'fields': 'fields', 41 'manager': 'manager', 42 'operation': 'operation', 43 'time': 'time' 44 } 45 46 def __init__(self, 47 api_version=None, 48 fields=None, 49 manager=None, 50 operation=None, 51 time=None): 52 """ 53 V1ManagedFieldsEntry - a model defined in Swagger 54 """ 55 56 self._api_version = None 57 self._fields = None 58 self._manager = None 59 self._operation = None 60 self._time = None 61 self.discriminator = None 62 63 if api_version is not None: 64 self.api_version = api_version 65 if fields is not None: 66 self.fields = fields 67 if manager is not None: 68 self.manager = manager 69 if operation is not None: 70 self.operation = operation 71 if time is not None: 72 self.time = time 73 74 @property 75 def api_version(self): 76 """ 77 Gets the api_version of this V1ManagedFieldsEntry. 78 APIVersion defines the version of this resource that this field set 79 applies to. The format is \"group/version\" just like the top-level 80 APIVersion field. It is necessary to track the version of a field set 81 because it cannot be automatically converted. 82 83 :return: The api_version of this V1ManagedFieldsEntry. 84 :rtype: str 85 """ 86 return self._api_version 87 88 @api_version.setter 89 def api_version(self, api_version): 90 """ 91 Sets the api_version of this V1ManagedFieldsEntry. 92 APIVersion defines the version of this resource that this field set 93 applies to. The format is \"group/version\" just like the top-level 94 APIVersion field. It is necessary to track the version of a field set 95 because it cannot be automatically converted. 96 97 :param api_version: The api_version of this V1ManagedFieldsEntry. 98 :type: str 99 """ 100 101 self._api_version = api_version 102 103 @property 104 def fields(self): 105 """ 106 Gets the fields of this V1ManagedFieldsEntry. 107 Fields identifies a set of fields. 108 109 :return: The fields of this V1ManagedFieldsEntry. 110 :rtype: object 111 """ 112 return self._fields 113 114 @fields.setter 115 def fields(self, fields): 116 """ 117 Sets the fields of this V1ManagedFieldsEntry. 118 Fields identifies a set of fields. 119 120 :param fields: The fields of this V1ManagedFieldsEntry. 121 :type: object 122 """ 123 124 self._fields = fields 125 126 @property 127 def manager(self): 128 """ 129 Gets the manager of this V1ManagedFieldsEntry. 130 Manager is an identifier of the workflow managing these fields. 131 132 :return: The manager of this V1ManagedFieldsEntry. 133 :rtype: str 134 """ 135 return self._manager 136 137 @manager.setter 138 def manager(self, manager): 139 """ 140 Sets the manager of this V1ManagedFieldsEntry. 141 Manager is an identifier of the workflow managing these fields. 142 143 :param manager: The manager of this V1ManagedFieldsEntry. 144 :type: str 145 """ 146 147 self._manager = manager 148 149 @property 150 def operation(self): 151 """ 152 Gets the operation of this V1ManagedFieldsEntry. 153 Operation is the type of operation which lead to this ManagedFieldsEntry 154 being created. The only valid values for this field are 'Apply' and 155 'Update'. 156 157 :return: The operation of this V1ManagedFieldsEntry. 158 :rtype: str 159 """ 160 return self._operation 161 162 @operation.setter 163 def operation(self, operation): 164 """ 165 Sets the operation of this V1ManagedFieldsEntry. 166 Operation is the type of operation which lead to this ManagedFieldsEntry 167 being created. The only valid values for this field are 'Apply' and 168 'Update'. 169 170 :param operation: The operation of this V1ManagedFieldsEntry. 171 :type: str 172 """ 173 174 self._operation = operation 175 176 @property 177 def time(self): 178 """ 179 Gets the time of this V1ManagedFieldsEntry. 180 Time is timestamp of when these fields were set. It should always be 181 empty if Operation is 'Apply' 182 183 :return: The time of this V1ManagedFieldsEntry. 184 :rtype: datetime 185 """ 186 return self._time 187 188 @time.setter 189 def time(self, time): 190 """ 191 Sets the time of this V1ManagedFieldsEntry. 192 Time is timestamp of when these fields were set. It should always be 193 empty if Operation is 'Apply' 194 195 :param time: The time of this V1ManagedFieldsEntry. 196 :type: datetime 197 """ 198 199 self._time = time 200 201 def to_dict(self): 202 """ 203 Returns the model properties as a dict 204 """ 205 result = {} 206 207 for attr, _ in iteritems(self.swagger_types): 208 value = getattr(self, attr) 209 if isinstance(value, list): 210 result[attr] = list( 211 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 212 elif hasattr(value, 'to_dict'): 213 result[attr] = value.to_dict() 214 elif isinstance(value, dict): 215 result[attr] = dict( 216 map( 217 lambda item: (item[0], item[1].to_dict()) 218 if hasattr(item[1], 'to_dict') else item, value.items())) 219 else: 220 result[attr] = value 221 222 return result 223 224 def to_str(self): 225 """ 226 Returns the string representation of the model 227 """ 228 return pformat(self.to_dict()) 229 230 def __repr__(self): 231 """ 232 For `print` and `pprint` 233 """ 234 return self.to_str() 235 236 def __eq__(self, other): 237 """ 238 Returns true if both objects are equal 239 """ 240 if not isinstance(other, V1ManagedFieldsEntry): 241 return False 242 243 return self.__dict__ == other.__dict__ 244 245 def __ne__(self, other): 246 """ 247 Returns true if both objects are not equal 248 """ 249 return not self == other 250