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 V1PodTemplateSpec(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 = {'metadata': 'V1ObjectMeta', 'spec': 'V1PodSpec'}
31
32  attribute_map = {'metadata': 'metadata', 'spec': 'spec'}
33
34  def __init__(self, metadata=None, spec=None):
35    """
36        V1PodTemplateSpec - a model defined in Swagger
37        """
38
39    self._metadata = None
40    self._spec = None
41    self.discriminator = None
42
43    if metadata is not None:
44      self.metadata = metadata
45    if spec is not None:
46      self.spec = spec
47
48  @property
49  def metadata(self):
50    """
51        Gets the metadata of this V1PodTemplateSpec.
52        Standard object's metadata. More info:
53        https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
54
55        :return: The metadata of this V1PodTemplateSpec.
56        :rtype: V1ObjectMeta
57        """
58    return self._metadata
59
60  @metadata.setter
61  def metadata(self, metadata):
62    """
63        Sets the metadata of this V1PodTemplateSpec.
64        Standard object's metadata. More info:
65        https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
66
67        :param metadata: The metadata of this V1PodTemplateSpec.
68        :type: V1ObjectMeta
69        """
70
71    self._metadata = metadata
72
73  @property
74  def spec(self):
75    """
76        Gets the spec of this V1PodTemplateSpec.
77        Specification of the desired behavior of the pod. More info:
78        https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
79
80        :return: The spec of this V1PodTemplateSpec.
81        :rtype: V1PodSpec
82        """
83    return self._spec
84
85  @spec.setter
86  def spec(self, spec):
87    """
88        Sets the spec of this V1PodTemplateSpec.
89        Specification of the desired behavior of the pod. More info:
90        https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
91
92        :param spec: The spec of this V1PodTemplateSpec.
93        :type: V1PodSpec
94        """
95
96    self._spec = spec
97
98  def to_dict(self):
99    """
100        Returns the model properties as a dict
101        """
102    result = {}
103
104    for attr, _ in iteritems(self.swagger_types):
105      value = getattr(self, attr)
106      if isinstance(value, list):
107        result[attr] = list(
108            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
109      elif hasattr(value, 'to_dict'):
110        result[attr] = value.to_dict()
111      elif isinstance(value, dict):
112        result[attr] = dict(
113            map(
114                lambda item: (item[0], item[1].to_dict())
115                if hasattr(item[1], 'to_dict') else item, value.items()))
116      else:
117        result[attr] = value
118
119    return result
120
121  def to_str(self):
122    """
123        Returns the string representation of the model
124        """
125    return pformat(self.to_dict())
126
127  def __repr__(self):
128    """
129        For `print` and `pprint`
130        """
131    return self.to_str()
132
133  def __eq__(self, other):
134    """
135        Returns true if both objects are equal
136        """
137    if not isinstance(other, V1PodTemplateSpec):
138      return False
139
140    return self.__dict__ == other.__dict__
141
142  def __ne__(self, other):
143    """
144        Returns true if both objects are not equal
145        """
146    return not self == other
147