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 V1LocalSubjectAccessReview(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      'api_version': 'str',
32      'kind': 'str',
33      'metadata': 'V1ObjectMeta',
34      'spec': 'V1SubjectAccessReviewSpec',
35      'status': 'V1SubjectAccessReviewStatus'
36  }
37
38  attribute_map = {
39      'api_version': 'apiVersion',
40      'kind': 'kind',
41      'metadata': 'metadata',
42      'spec': 'spec',
43      'status': 'status'
44  }
45
46  def __init__(self,
47               api_version=None,
48               kind=None,
49               metadata=None,
50               spec=None,
51               status=None):
52    """
53        V1LocalSubjectAccessReview - a model defined in Swagger
54        """
55
56    self._api_version = None
57    self._kind = None
58    self._metadata = None
59    self._spec = None
60    self._status = None
61    self.discriminator = None
62
63    if api_version is not None:
64      self.api_version = api_version
65    if kind is not None:
66      self.kind = kind
67    if metadata is not None:
68      self.metadata = metadata
69    self.spec = spec
70    if status is not None:
71      self.status = status
72
73  @property
74  def api_version(self):
75    """
76        Gets the api_version of this V1LocalSubjectAccessReview.
77        APIVersion defines the versioned schema of this representation of an
78        object. Servers should convert recognized schemas to the latest internal
79        value, and may reject unrecognized values. More info:
80        https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
81
82        :return: The api_version of this V1LocalSubjectAccessReview.
83        :rtype: str
84        """
85    return self._api_version
86
87  @api_version.setter
88  def api_version(self, api_version):
89    """
90        Sets the api_version of this V1LocalSubjectAccessReview.
91        APIVersion defines the versioned schema of this representation of an
92        object. Servers should convert recognized schemas to the latest internal
93        value, and may reject unrecognized values. More info:
94        https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
95
96        :param api_version: The api_version of this V1LocalSubjectAccessReview.
97        :type: str
98        """
99
100    self._api_version = api_version
101
102  @property
103  def kind(self):
104    """
105        Gets the kind of this V1LocalSubjectAccessReview.
106        Kind is a string value representing the REST resource this object
107        represents. Servers may infer this from the endpoint the client submits
108        requests to. Cannot be updated. In CamelCase. More info:
109        https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
110
111        :return: The kind of this V1LocalSubjectAccessReview.
112        :rtype: str
113        """
114    return self._kind
115
116  @kind.setter
117  def kind(self, kind):
118    """
119        Sets the kind of this V1LocalSubjectAccessReview.
120        Kind is a string value representing the REST resource this object
121        represents. Servers may infer this from the endpoint the client submits
122        requests to. Cannot be updated. In CamelCase. More info:
123        https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
124
125        :param kind: The kind of this V1LocalSubjectAccessReview.
126        :type: str
127        """
128
129    self._kind = kind
130
131  @property
132  def metadata(self):
133    """
134        Gets the metadata of this V1LocalSubjectAccessReview.
135
136        :return: The metadata of this V1LocalSubjectAccessReview.
137        :rtype: V1ObjectMeta
138        """
139    return self._metadata
140
141  @metadata.setter
142  def metadata(self, metadata):
143    """
144        Sets the metadata of this V1LocalSubjectAccessReview.
145
146        :param metadata: The metadata of this V1LocalSubjectAccessReview.
147        :type: V1ObjectMeta
148        """
149
150    self._metadata = metadata
151
152  @property
153  def spec(self):
154    """
155        Gets the spec of this V1LocalSubjectAccessReview.
156        Spec holds information about the request being evaluated.
157        spec.namespace must be equal to the namespace you made the request
158        against.  If empty, it is defaulted.
159
160        :return: The spec of this V1LocalSubjectAccessReview.
161        :rtype: V1SubjectAccessReviewSpec
162        """
163    return self._spec
164
165  @spec.setter
166  def spec(self, spec):
167    """
168        Sets the spec of this V1LocalSubjectAccessReview.
169        Spec holds information about the request being evaluated.
170        spec.namespace must be equal to the namespace you made the request
171        against.  If empty, it is defaulted.
172
173        :param spec: The spec of this V1LocalSubjectAccessReview.
174        :type: V1SubjectAccessReviewSpec
175        """
176    if spec is None:
177      raise ValueError('Invalid value for `spec`, must not be `None`')
178
179    self._spec = spec
180
181  @property
182  def status(self):
183    """
184        Gets the status of this V1LocalSubjectAccessReview.
185        Status is filled in by the server and indicates whether the request is
186        allowed or not
187
188        :return: The status of this V1LocalSubjectAccessReview.
189        :rtype: V1SubjectAccessReviewStatus
190        """
191    return self._status
192
193  @status.setter
194  def status(self, status):
195    """
196        Sets the status of this V1LocalSubjectAccessReview.
197        Status is filled in by the server and indicates whether the request is
198        allowed or not
199
200        :param status: The status of this V1LocalSubjectAccessReview.
201        :type: V1SubjectAccessReviewStatus
202        """
203
204    self._status = status
205
206  def to_dict(self):
207    """
208        Returns the model properties as a dict
209        """
210    result = {}
211
212    for attr, _ in iteritems(self.swagger_types):
213      value = getattr(self, attr)
214      if isinstance(value, list):
215        result[attr] = list(
216            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
217      elif hasattr(value, 'to_dict'):
218        result[attr] = value.to_dict()
219      elif isinstance(value, dict):
220        result[attr] = dict(
221            map(
222                lambda item: (item[0], item[1].to_dict())
223                if hasattr(item[1], 'to_dict') else item, value.items()))
224      else:
225        result[attr] = value
226
227    return result
228
229  def to_str(self):
230    """
231        Returns the string representation of the model
232        """
233    return pformat(self.to_dict())
234
235  def __repr__(self):
236    """
237        For `print` and `pprint`
238        """
239    return self.to_str()
240
241  def __eq__(self, other):
242    """
243        Returns true if both objects are equal
244        """
245    if not isinstance(other, V1LocalSubjectAccessReview):
246      return False
247
248    return self.__dict__ == other.__dict__
249
250  def __ne__(self, other):
251    """
252        Returns true if both objects are not equal
253        """
254    return not self == other
255