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 V1ResourceQuotaSpec(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      'hard': 'dict(str, str)',
32      'scope_selector': 'V1ScopeSelector',
33      'scopes': 'list[str]'
34  }
35
36  attribute_map = {
37      'hard': 'hard',
38      'scope_selector': 'scopeSelector',
39      'scopes': 'scopes'
40  }
41
42  def __init__(self, hard=None, scope_selector=None, scopes=None):
43    """
44        V1ResourceQuotaSpec - a model defined in Swagger
45        """
46
47    self._hard = None
48    self._scope_selector = None
49    self._scopes = None
50    self.discriminator = None
51
52    if hard is not None:
53      self.hard = hard
54    if scope_selector is not None:
55      self.scope_selector = scope_selector
56    if scopes is not None:
57      self.scopes = scopes
58
59  @property
60  def hard(self):
61    """
62        Gets the hard of this V1ResourceQuotaSpec.
63        hard is the set of desired hard limits for each named resource. More
64        info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
65
66        :return: The hard of this V1ResourceQuotaSpec.
67        :rtype: dict(str, str)
68        """
69    return self._hard
70
71  @hard.setter
72  def hard(self, hard):
73    """
74        Sets the hard of this V1ResourceQuotaSpec.
75        hard is the set of desired hard limits for each named resource. More
76        info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
77
78        :param hard: The hard of this V1ResourceQuotaSpec.
79        :type: dict(str, str)
80        """
81
82    self._hard = hard
83
84  @property
85  def scope_selector(self):
86    """
87        Gets the scope_selector of this V1ResourceQuotaSpec.
88        scopeSelector is also a collection of filters like scopes that must
89        match each object tracked by a quota but expressed using
90        ScopeSelectorOperator in combination with possible values. For a
91        resource to match, both scopes AND scopeSelector (if specified in spec),
92        must be matched.
93
94        :return: The scope_selector of this V1ResourceQuotaSpec.
95        :rtype: V1ScopeSelector
96        """
97    return self._scope_selector
98
99  @scope_selector.setter
100  def scope_selector(self, scope_selector):
101    """
102        Sets the scope_selector of this V1ResourceQuotaSpec.
103        scopeSelector is also a collection of filters like scopes that must
104        match each object tracked by a quota but expressed using
105        ScopeSelectorOperator in combination with possible values. For a
106        resource to match, both scopes AND scopeSelector (if specified in spec),
107        must be matched.
108
109        :param scope_selector: The scope_selector of this V1ResourceQuotaSpec.
110        :type: V1ScopeSelector
111        """
112
113    self._scope_selector = scope_selector
114
115  @property
116  def scopes(self):
117    """
118        Gets the scopes of this V1ResourceQuotaSpec.
119        A collection of filters that must match each object tracked by a quota.
120        If not specified, the quota matches all objects.
121
122        :return: The scopes of this V1ResourceQuotaSpec.
123        :rtype: list[str]
124        """
125    return self._scopes
126
127  @scopes.setter
128  def scopes(self, scopes):
129    """
130        Sets the scopes of this V1ResourceQuotaSpec.
131        A collection of filters that must match each object tracked by a quota.
132        If not specified, the quota matches all objects.
133
134        :param scopes: The scopes of this V1ResourceQuotaSpec.
135        :type: list[str]
136        """
137
138    self._scopes = scopes
139
140  def to_dict(self):
141    """
142        Returns the model properties as a dict
143        """
144    result = {}
145
146    for attr, _ in iteritems(self.swagger_types):
147      value = getattr(self, attr)
148      if isinstance(value, list):
149        result[attr] = list(
150            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
151      elif hasattr(value, 'to_dict'):
152        result[attr] = value.to_dict()
153      elif isinstance(value, dict):
154        result[attr] = dict(
155            map(
156                lambda item: (item[0], item[1].to_dict())
157                if hasattr(item[1], 'to_dict') else item, value.items()))
158      else:
159        result[attr] = value
160
161    return result
162
163  def to_str(self):
164    """
165        Returns the string representation of the model
166        """
167    return pformat(self.to_dict())
168
169  def __repr__(self):
170    """
171        For `print` and `pprint`
172        """
173    return self.to_str()
174
175  def __eq__(self, other):
176    """
177        Returns true if both objects are equal
178        """
179    if not isinstance(other, V1ResourceQuotaSpec):
180      return False
181
182    return self.__dict__ == other.__dict__
183
184  def __ne__(self, other):
185    """
186        Returns true if both objects are not equal
187        """
188    return not self == other
189