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 V1LimitRangeSpec(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 = {'limits': 'list[V1LimitRangeItem]'}
31
32  attribute_map = {'limits': 'limits'}
33
34  def __init__(self, limits=None):
35    """
36        V1LimitRangeSpec - a model defined in Swagger
37        """
38
39    self._limits = None
40    self.discriminator = None
41
42    self.limits = limits
43
44  @property
45  def limits(self):
46    """
47        Gets the limits of this V1LimitRangeSpec.
48        Limits is the list of LimitRangeItem objects that are enforced.
49
50        :return: The limits of this V1LimitRangeSpec.
51        :rtype: list[V1LimitRangeItem]
52        """
53    return self._limits
54
55  @limits.setter
56  def limits(self, limits):
57    """
58        Sets the limits of this V1LimitRangeSpec.
59        Limits is the list of LimitRangeItem objects that are enforced.
60
61        :param limits: The limits of this V1LimitRangeSpec.
62        :type: list[V1LimitRangeItem]
63        """
64    if limits is None:
65      raise ValueError('Invalid value for `limits`, must not be `None`')
66
67    self._limits = limits
68
69  def to_dict(self):
70    """
71        Returns the model properties as a dict
72        """
73    result = {}
74
75    for attr, _ in iteritems(self.swagger_types):
76      value = getattr(self, attr)
77      if isinstance(value, list):
78        result[attr] = list(
79            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
80      elif hasattr(value, 'to_dict'):
81        result[attr] = value.to_dict()
82      elif isinstance(value, dict):
83        result[attr] = dict(
84            map(
85                lambda item: (item[0], item[1].to_dict())
86                if hasattr(item[1], 'to_dict') else item, value.items()))
87      else:
88        result[attr] = value
89
90    return result
91
92  def to_str(self):
93    """
94        Returns the string representation of the model
95        """
96    return pformat(self.to_dict())
97
98  def __repr__(self):
99    """
100        For `print` and `pprint`
101        """
102    return self.to_str()
103
104  def __eq__(self, other):
105    """
106        Returns true if both objects are equal
107        """
108    if not isinstance(other, V1LimitRangeSpec):
109      return False
110
111    return self.__dict__ == other.__dict__
112
113  def __ne__(self, other):
114    """
115        Returns true if both objects are not equal
116        """
117    return not self == other
118