codekingpro/portable-devtools
114k
1# coding: utf-82 3"""4 Kubernetes5 6 No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E5017 8 The version of the OpenAPI document: release-1.359 Generated by: https://openapi-generator.tech10"""11 12 13import pprint14import re # noqa: F40115 16import six17 18from kubernetes.client.configuration import Configuration19 20 21class V1ObjectReference(object):22 """NOTE: This class is auto generated by OpenAPI Generator.23 Ref: https://openapi-generator.tech24 25 Do not edit the class manually.26 """27 28 """29 Attributes:30 openapi_types (dict): The key is attribute name31 and the value is attribute type.32 attribute_map (dict): The key is attribute name33 and the value is json key in definition.34 """35 openapi_types = {36 'api_version': 'str',37 'field_path': 'str',38 'kind': 'str',39 'name': 'str',40 'namespace': 'str',41 'resource_version': 'str',42 'uid': 'str'43 }44 45 attribute_map = {46 'api_version': 'apiVersion',47 'field_path': 'fieldPath',48 'kind': 'kind',49 'name': 'name',50 'namespace': 'namespace',51 'resource_version': 'resourceVersion',52 'uid': 'uid'53 }54 55 def __init__(self, api_version=None, field_path=None, kind=None, name=None, namespace=None, resource_version=None, uid=None, local_vars_configuration=None): # noqa: E50156 """V1ObjectReference - a model defined in OpenAPI""" # noqa: E50157 if local_vars_configuration is None:58 local_vars_configuration = Configuration()59 self.local_vars_configuration = local_vars_configuration60 61 self._api_version = None62 self._field_path = None63 self._kind = None64 self._name = None65 self._namespace = None66 self._resource_version = None67 self._uid = None68 self.discriminator = None69 70 if api_version is not None:71 self.api_version = api_version72 if field_path is not None:73 self.field_path = field_path74 if kind is not None:75 self.kind = kind76 if name is not None:77 self.name = name78 if namespace is not None:79 self.namespace = namespace80 if resource_version is not None:81 self.resource_version = resource_version82 if uid is not None:83 self.uid = uid84 85 @property86 def api_version(self):87 """Gets the api_version of this V1ObjectReference. # noqa: E50188 89 API version of the referent. # noqa: E50190 91 :return: The api_version of this V1ObjectReference. # noqa: E50192 :rtype: str93 """94 return self._api_version95 96 @api_version.setter97 def api_version(self, api_version):98 """Sets the api_version of this V1ObjectReference.99 100 API version of the referent. # noqa: E501101 102 :param api_version: The api_version of this V1ObjectReference. # noqa: E501103 :type: str104 """105 106 self._api_version = api_version107 108 @property109 def field_path(self):110 """Gets the field_path of this V1ObjectReference. # noqa: E501111 112 If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. # noqa: E501113 114 :return: The field_path of this V1ObjectReference. # noqa: E501115 :rtype: str116 """117 return self._field_path118 119 @field_path.setter120 def field_path(self, field_path):121 """Sets the field_path of this V1ObjectReference.122 123 If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. # noqa: E501124 125 :param field_path: The field_path of this V1ObjectReference. # noqa: E501126 :type: str127 """128 129 self._field_path = field_path130 131 @property132 def kind(self):133 """Gets the kind of this V1ObjectReference. # noqa: E501134 135 Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501136 137 :return: The kind of this V1ObjectReference. # noqa: E501138 :rtype: str139 """140 return self._kind141 142 @kind.setter143 def kind(self, kind):144 """Sets the kind of this V1ObjectReference.145 146 Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501147 148 :param kind: The kind of this V1ObjectReference. # noqa: E501149 :type: str150 """151 152 self._kind = kind153 154 @property155 def name(self):156 """Gets the name of this V1ObjectReference. # noqa: E501157 158 Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501159 160 :return: The name of this V1ObjectReference. # noqa: E501161 :rtype: str162 """163 return self._name164 165 @name.setter166 def name(self, name):167 """Sets the name of this V1ObjectReference.168 169 Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501170 171 :param name: The name of this V1ObjectReference. # noqa: E501172 :type: str173 """174 175 self._name = name176 177 @property178 def namespace(self):179 """Gets the namespace of this V1ObjectReference. # noqa: E501180 181 Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ # noqa: E501182 183 :return: The namespace of this V1ObjectReference. # noqa: E501184 :rtype: str185 """186 return self._namespace187 188 @namespace.setter189 def namespace(self, namespace):190 """Sets the namespace of this V1ObjectReference.191 192 Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ # noqa: E501193 194 :param namespace: The namespace of this V1ObjectReference. # noqa: E501195 :type: str196 """197 198 self._namespace = namespace199 200 @property201 def resource_version(self):202 """Gets the resource_version of this V1ObjectReference. # noqa: E501203 204 Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency # noqa: E501205 206 :return: The resource_version of this V1ObjectReference. # noqa: E501207 :rtype: str208 """209 return self._resource_version210 211 @resource_version.setter212 def resource_version(self, resource_version):213 """Sets the resource_version of this V1ObjectReference.214 215 Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency # noqa: E501216 217 :param resource_version: The resource_version of this V1ObjectReference. # noqa: E501218 :type: str219 """220 221 self._resource_version = resource_version222 223 @property224 def uid(self):225 """Gets the uid of this V1ObjectReference. # noqa: E501226 227 UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids # noqa: E501228 229 :return: The uid of this V1ObjectReference. # noqa: E501230 :rtype: str231 """232 return self._uid233 234 @uid.setter235 def uid(self, uid):236 """Sets the uid of this V1ObjectReference.237 238 UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids # noqa: E501239 240 :param uid: The uid of this V1ObjectReference. # noqa: E501241 :type: str242 """243 244 self._uid = uid245 246 def to_dict(self):247 """Returns the model properties as a dict"""248 result = {}249 250 for attr, _ in six.iteritems(self.openapi_types):251 value = getattr(self, attr)252 if isinstance(value, list):253 result[attr] = list(map(254 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,255 value256 ))257 elif hasattr(value, "to_dict"):258 result[attr] = value.to_dict()259 elif isinstance(value, dict):260 result[attr] = dict(map(261 lambda item: (item[0], item[1].to_dict())262 if hasattr(item[1], "to_dict") else item,263 value.items()264 ))265 else:266 result[attr] = value267 268 return result269 270 def to_str(self):271 """Returns the string representation of the model"""272 return pprint.pformat(self.to_dict())273 274 def __repr__(self):275 """For `print` and `pprint`"""276 return self.to_str()277 278 def __eq__(self, other):279 """Returns true if both objects are equal"""280 if not isinstance(other, V1ObjectReference):281 return False282 283 return self.to_dict() == other.to_dict()284 285 def __ne__(self, other):286 """Returns true if both objects are not equal"""287 if not isinstance(other, V1ObjectReference):288 return True289 290 return self.to_dict() != other.to_dict()291 