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 V1ObjectReference(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      'field_path': 'str',
33      'kind': 'str',
34      'name': 'str',
35      'namespace': 'str',
36      'resource_version': 'str',
37      'uid': 'str'
38  }
39
40  attribute_map = {
41      'api_version': 'apiVersion',
42      'field_path': 'fieldPath',
43      'kind': 'kind',
44      'name': 'name',
45      'namespace': 'namespace',
46      'resource_version': 'resourceVersion',
47      'uid': 'uid'
48  }
49
50  def __init__(self,
51               api_version=None,
52               field_path=None,
53               kind=None,
54               name=None,
55               namespace=None,
56               resource_version=None,
57               uid=None):
58    """
59        V1ObjectReference - a model defined in Swagger
60        """
61
62    self._api_version = None
63    self._field_path = None
64    self._kind = None
65    self._name = None
66    self._namespace = None
67    self._resource_version = None
68    self._uid = None
69    self.discriminator = None
70
71    if api_version is not None:
72      self.api_version = api_version
73    if field_path is not None:
74      self.field_path = field_path
75    if kind is not None:
76      self.kind = kind
77    if name is not None:
78      self.name = name
79    if namespace is not None:
80      self.namespace = namespace
81    if resource_version is not None:
82      self.resource_version = resource_version
83    if uid is not None:
84      self.uid = uid
85
86  @property
87  def api_version(self):
88    """
89        Gets the api_version of this V1ObjectReference.
90        API version of the referent.
91
92        :return: The api_version of this V1ObjectReference.
93        :rtype: str
94        """
95    return self._api_version
96
97  @api_version.setter
98  def api_version(self, api_version):
99    """
100        Sets the api_version of this V1ObjectReference.
101        API version of the referent.
102
103        :param api_version: The api_version of this V1ObjectReference.
104        :type: str
105        """
106
107    self._api_version = api_version
108
109  @property
110  def field_path(self):
111    """
112        Gets the field_path of this V1ObjectReference.
113        If referring to a piece of an object instead of an entire object, this
114        string should contain a valid JSON/Go field access statement, such as
115        desiredState.manifest.containers[2]. For example, if the object
116        reference is to a container within a pod, this would take on a value
117        like: \"spec.containers{name}\" (where \"name\" refers to the name of
118        the container that triggered the event) or if no container name is
119        specified \"spec.containers[2]\" (container with index 2 in this pod).
120        This syntax is chosen only to have some well-defined way of referencing
121        a part of an object.
122
123        :return: The field_path of this V1ObjectReference.
124        :rtype: str
125        """
126    return self._field_path
127
128  @field_path.setter
129  def field_path(self, field_path):
130    """
131        Sets the field_path of this V1ObjectReference.
132        If referring to a piece of an object instead of an entire object, this
133        string should contain a valid JSON/Go field access statement, such as
134        desiredState.manifest.containers[2]. For example, if the object
135        reference is to a container within a pod, this would take on a value
136        like: \"spec.containers{name}\" (where \"name\" refers to the name of
137        the container that triggered the event) or if no container name is
138        specified \"spec.containers[2]\" (container with index 2 in this pod).
139        This syntax is chosen only to have some well-defined way of referencing
140        a part of an object.
141
142        :param field_path: The field_path of this V1ObjectReference.
143        :type: str
144        """
145
146    self._field_path = field_path
147
148  @property
149  def kind(self):
150    """
151        Gets the kind of this V1ObjectReference.
152        Kind of the referent. More info:
153        https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
154
155        :return: The kind of this V1ObjectReference.
156        :rtype: str
157        """
158    return self._kind
159
160  @kind.setter
161  def kind(self, kind):
162    """
163        Sets the kind of this V1ObjectReference.
164        Kind of the referent. More info:
165        https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
166
167        :param kind: The kind of this V1ObjectReference.
168        :type: str
169        """
170
171    self._kind = kind
172
173  @property
174  def name(self):
175    """
176        Gets the name of this V1ObjectReference.
177        Name of the referent. More info:
178        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
179
180        :return: The name of this V1ObjectReference.
181        :rtype: str
182        """
183    return self._name
184
185  @name.setter
186  def name(self, name):
187    """
188        Sets the name of this V1ObjectReference.
189        Name of the referent. More info:
190        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
191
192        :param name: The name of this V1ObjectReference.
193        :type: str
194        """
195
196    self._name = name
197
198  @property
199  def namespace(self):
200    """
201        Gets the namespace of this V1ObjectReference.
202        Namespace of the referent. More info:
203        https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
204
205        :return: The namespace of this V1ObjectReference.
206        :rtype: str
207        """
208    return self._namespace
209
210  @namespace.setter
211  def namespace(self, namespace):
212    """
213        Sets the namespace of this V1ObjectReference.
214        Namespace of the referent. More info:
215        https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
216
217        :param namespace: The namespace of this V1ObjectReference.
218        :type: str
219        """
220
221    self._namespace = namespace
222
223  @property
224  def resource_version(self):
225    """
226        Gets the resource_version of this V1ObjectReference.
227        Specific resourceVersion to which this reference is made, if any. More
228        info:
229        https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
230
231        :return: The resource_version of this V1ObjectReference.
232        :rtype: str
233        """
234    return self._resource_version
235
236  @resource_version.setter
237  def resource_version(self, resource_version):
238    """
239        Sets the resource_version of this V1ObjectReference.
240        Specific resourceVersion to which this reference is made, if any. More
241        info:
242        https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
243
244        :param resource_version: The resource_version of this V1ObjectReference.
245        :type: str
246        """
247
248    self._resource_version = resource_version
249
250  @property
251  def uid(self):
252    """
253        Gets the uid of this V1ObjectReference.
254        UID of the referent. More info:
255        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
256
257        :return: The uid of this V1ObjectReference.
258        :rtype: str
259        """
260    return self._uid
261
262  @uid.setter
263  def uid(self, uid):
264    """
265        Sets the uid of this V1ObjectReference.
266        UID of the referent. More info:
267        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
268
269        :param uid: The uid of this V1ObjectReference.
270        :type: str
271        """
272
273    self._uid = uid
274
275  def to_dict(self):
276    """
277        Returns the model properties as a dict
278        """
279    result = {}
280
281    for attr, _ in iteritems(self.swagger_types):
282      value = getattr(self, attr)
283      if isinstance(value, list):
284        result[attr] = list(
285            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
286      elif hasattr(value, 'to_dict'):
287        result[attr] = value.to_dict()
288      elif isinstance(value, dict):
289        result[attr] = dict(
290            map(
291                lambda item: (item[0], item[1].to_dict())
292                if hasattr(item[1], 'to_dict') else item, value.items()))
293      else:
294        result[attr] = value
295
296    return result
297
298  def to_str(self):
299    """
300        Returns the string representation of the model
301        """
302    return pformat(self.to_dict())
303
304  def __repr__(self):
305    """
306        For `print` and `pprint`
307        """
308    return self.to_str()
309
310  def __eq__(self, other):
311    """
312        Returns true if both objects are equal
313        """
314    if not isinstance(other, V1ObjectReference):
315      return False
316
317    return self.__dict__ == other.__dict__
318
319  def __ne__(self, other):
320    """
321        Returns true if both objects are not equal
322        """
323    return not self == other
324