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