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 V1PersistentVolumeClaimCondition(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      'last_probe_time': 'datetime',
32      'last_transition_time': 'datetime',
33      'message': 'str',
34      'reason': 'str',
35      'status': 'str',
36      'type': 'str'
37  }
38
39  attribute_map = {
40      'last_probe_time': 'lastProbeTime',
41      'last_transition_time': 'lastTransitionTime',
42      'message': 'message',
43      'reason': 'reason',
44      'status': 'status',
45      'type': 'type'
46  }
47
48  def __init__(self,
49               last_probe_time=None,
50               last_transition_time=None,
51               message=None,
52               reason=None,
53               status=None,
54               type=None):
55    """
56        V1PersistentVolumeClaimCondition - a model defined in Swagger
57        """
58
59    self._last_probe_time = None
60    self._last_transition_time = None
61    self._message = None
62    self._reason = None
63    self._status = None
64    self._type = None
65    self.discriminator = None
66
67    if last_probe_time is not None:
68      self.last_probe_time = last_probe_time
69    if last_transition_time is not None:
70      self.last_transition_time = last_transition_time
71    if message is not None:
72      self.message = message
73    if reason is not None:
74      self.reason = reason
75    self.status = status
76    self.type = type
77
78  @property
79  def last_probe_time(self):
80    """
81        Gets the last_probe_time of this V1PersistentVolumeClaimCondition.
82        Last time we probed the condition.
83
84        :return: The last_probe_time of this V1PersistentVolumeClaimCondition.
85        :rtype: datetime
86        """
87    return self._last_probe_time
88
89  @last_probe_time.setter
90  def last_probe_time(self, last_probe_time):
91    """
92        Sets the last_probe_time of this V1PersistentVolumeClaimCondition.
93        Last time we probed the condition.
94
95        :param last_probe_time: The last_probe_time of this
96        V1PersistentVolumeClaimCondition.
97        :type: datetime
98        """
99
100    self._last_probe_time = last_probe_time
101
102  @property
103  def last_transition_time(self):
104    """
105        Gets the last_transition_time of this V1PersistentVolumeClaimCondition.
106        Last time the condition transitioned from one status to another.
107
108        :return: The last_transition_time of this
109        V1PersistentVolumeClaimCondition.
110        :rtype: datetime
111        """
112    return self._last_transition_time
113
114  @last_transition_time.setter
115  def last_transition_time(self, last_transition_time):
116    """
117        Sets the last_transition_time of this V1PersistentVolumeClaimCondition.
118        Last time the condition transitioned from one status to another.
119
120        :param last_transition_time: The last_transition_time of this
121        V1PersistentVolumeClaimCondition.
122        :type: datetime
123        """
124
125    self._last_transition_time = last_transition_time
126
127  @property
128  def message(self):
129    """
130        Gets the message of this V1PersistentVolumeClaimCondition.
131        Human-readable message indicating details about last transition.
132
133        :return: The message of this V1PersistentVolumeClaimCondition.
134        :rtype: str
135        """
136    return self._message
137
138  @message.setter
139  def message(self, message):
140    """
141        Sets the message of this V1PersistentVolumeClaimCondition.
142        Human-readable message indicating details about last transition.
143
144        :param message: The message of this V1PersistentVolumeClaimCondition.
145        :type: str
146        """
147
148    self._message = message
149
150  @property
151  def reason(self):
152    """
153        Gets the reason of this V1PersistentVolumeClaimCondition.
154        Unique, this should be a short, machine understandable string that gives
155        the reason for condition's last transition. If it reports
156        \"ResizeStarted\" that means the underlying persistent volume is being
157        resized.
158
159        :return: The reason of this V1PersistentVolumeClaimCondition.
160        :rtype: str
161        """
162    return self._reason
163
164  @reason.setter
165  def reason(self, reason):
166    """
167        Sets the reason of this V1PersistentVolumeClaimCondition.
168        Unique, this should be a short, machine understandable string that gives
169        the reason for condition's last transition. If it reports
170        \"ResizeStarted\" that means the underlying persistent volume is being
171        resized.
172
173        :param reason: The reason of this V1PersistentVolumeClaimCondition.
174        :type: str
175        """
176
177    self._reason = reason
178
179  @property
180  def status(self):
181    """
182        Gets the status of this V1PersistentVolumeClaimCondition.
183
184        :return: The status of this V1PersistentVolumeClaimCondition.
185        :rtype: str
186        """
187    return self._status
188
189  @status.setter
190  def status(self, status):
191    """
192        Sets the status of this V1PersistentVolumeClaimCondition.
193
194        :param status: The status of this V1PersistentVolumeClaimCondition.
195        :type: str
196        """
197    if status is None:
198      raise ValueError('Invalid value for `status`, must not be `None`')
199
200    self._status = status
201
202  @property
203  def type(self):
204    """
205        Gets the type of this V1PersistentVolumeClaimCondition.
206
207        :return: The type of this V1PersistentVolumeClaimCondition.
208        :rtype: str
209        """
210    return self._type
211
212  @type.setter
213  def type(self, type):
214    """
215        Sets the type of this V1PersistentVolumeClaimCondition.
216
217        :param type: The type of this V1PersistentVolumeClaimCondition.
218        :type: str
219        """
220    if type is None:
221      raise ValueError('Invalid value for `type`, must not be `None`')
222
223    self._type = type
224
225  def to_dict(self):
226    """
227        Returns the model properties as a dict
228        """
229    result = {}
230
231    for attr, _ in iteritems(self.swagger_types):
232      value = getattr(self, attr)
233      if isinstance(value, list):
234        result[attr] = list(
235            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
236      elif hasattr(value, 'to_dict'):
237        result[attr] = value.to_dict()
238      elif isinstance(value, dict):
239        result[attr] = dict(
240            map(
241                lambda item: (item[0], item[1].to_dict())
242                if hasattr(item[1], 'to_dict') else item, value.items()))
243      else:
244        result[attr] = value
245
246    return result
247
248  def to_str(self):
249    """
250        Returns the string representation of the model
251        """
252    return pformat(self.to_dict())
253
254  def __repr__(self):
255    """
256        For `print` and `pprint`
257        """
258    return self.to_str()
259
260  def __eq__(self, other):
261    """
262        Returns true if both objects are equal
263        """
264    if not isinstance(other, V1PersistentVolumeClaimCondition):
265      return False
266
267    return self.__dict__ == other.__dict__
268
269  def __ne__(self, other):
270    """
271        Returns true if both objects are not equal
272        """
273    return not self == other
274