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 V1beta1SelfSubjectAccessReviewSpec(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      'non_resource_attributes': 'V1beta1NonResourceAttributes',
32      'resource_attributes': 'V1beta1ResourceAttributes'
33  }
34
35  attribute_map = {
36      'non_resource_attributes': 'nonResourceAttributes',
37      'resource_attributes': 'resourceAttributes'
38  }
39
40  def __init__(self, non_resource_attributes=None, resource_attributes=None):
41    """
42        V1beta1SelfSubjectAccessReviewSpec - a model defined in Swagger
43        """
44
45    self._non_resource_attributes = None
46    self._resource_attributes = None
47    self.discriminator = None
48
49    if non_resource_attributes is not None:
50      self.non_resource_attributes = non_resource_attributes
51    if resource_attributes is not None:
52      self.resource_attributes = resource_attributes
53
54  @property
55  def non_resource_attributes(self):
56    """
57        Gets the non_resource_attributes of this
58        V1beta1SelfSubjectAccessReviewSpec.
59        NonResourceAttributes describes information for a non-resource access
60        request
61
62        :return: The non_resource_attributes of this
63        V1beta1SelfSubjectAccessReviewSpec.
64        :rtype: V1beta1NonResourceAttributes
65        """
66    return self._non_resource_attributes
67
68  @non_resource_attributes.setter
69  def non_resource_attributes(self, non_resource_attributes):
70    """
71        Sets the non_resource_attributes of this
72        V1beta1SelfSubjectAccessReviewSpec.
73        NonResourceAttributes describes information for a non-resource access
74        request
75
76        :param non_resource_attributes: The non_resource_attributes of this
77        V1beta1SelfSubjectAccessReviewSpec.
78        :type: V1beta1NonResourceAttributes
79        """
80
81    self._non_resource_attributes = non_resource_attributes
82
83  @property
84  def resource_attributes(self):
85    """
86        Gets the resource_attributes of this V1beta1SelfSubjectAccessReviewSpec.
87        ResourceAuthorizationAttributes describes information for a resource
88        access request
89
90        :return: The resource_attributes of this
91        V1beta1SelfSubjectAccessReviewSpec.
92        :rtype: V1beta1ResourceAttributes
93        """
94    return self._resource_attributes
95
96  @resource_attributes.setter
97  def resource_attributes(self, resource_attributes):
98    """
99        Sets the resource_attributes of this V1beta1SelfSubjectAccessReviewSpec.
100        ResourceAuthorizationAttributes describes information for a resource
101        access request
102
103        :param resource_attributes: The resource_attributes of this
104        V1beta1SelfSubjectAccessReviewSpec.
105        :type: V1beta1ResourceAttributes
106        """
107
108    self._resource_attributes = resource_attributes
109
110  def to_dict(self):
111    """
112        Returns the model properties as a dict
113        """
114    result = {}
115
116    for attr, _ in iteritems(self.swagger_types):
117      value = getattr(self, attr)
118      if isinstance(value, list):
119        result[attr] = list(
120            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
121      elif hasattr(value, 'to_dict'):
122        result[attr] = value.to_dict()
123      elif isinstance(value, dict):
124        result[attr] = dict(
125            map(
126                lambda item: (item[0], item[1].to_dict())
127                if hasattr(item[1], 'to_dict') else item, value.items()))
128      else:
129        result[attr] = value
130
131    return result
132
133  def to_str(self):
134    """
135        Returns the string representation of the model
136        """
137    return pformat(self.to_dict())
138
139  def __repr__(self):
140    """
141        For `print` and `pprint`
142        """
143    return self.to_str()
144
145  def __eq__(self, other):
146    """
147        Returns true if both objects are equal
148        """
149    if not isinstance(other, V1beta1SelfSubjectAccessReviewSpec):
150      return False
151
152    return self.__dict__ == other.__dict__
153
154  def __ne__(self, other):
155    """
156        Returns true if both objects are not equal
157        """
158    return not self == other
159