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 V1beta1LocalSubjectAccessReview(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': 'V1beta1SubjectAccessReviewSpec', 35 'status': 'V1beta1SubjectAccessReviewStatus' 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 V1beta1LocalSubjectAccessReview - 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 V1beta1LocalSubjectAccessReview. 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 V1beta1LocalSubjectAccessReview. 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 V1beta1LocalSubjectAccessReview. 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 97 V1beta1LocalSubjectAccessReview. 98 :type: str 99 """ 100 101 self._api_version = api_version 102 103 @property 104 def kind(self): 105 """ 106 Gets the kind of this V1beta1LocalSubjectAccessReview. 107 Kind is a string value representing the REST resource this object 108 represents. Servers may infer this from the endpoint the client submits 109 requests to. Cannot be updated. In CamelCase. More info: 110 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 111 112 :return: The kind of this V1beta1LocalSubjectAccessReview. 113 :rtype: str 114 """ 115 return self._kind 116 117 @kind.setter 118 def kind(self, kind): 119 """ 120 Sets the kind of this V1beta1LocalSubjectAccessReview. 121 Kind is a string value representing the REST resource this object 122 represents. Servers may infer this from the endpoint the client submits 123 requests to. Cannot be updated. In CamelCase. More info: 124 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 125 126 :param kind: The kind of this V1beta1LocalSubjectAccessReview. 127 :type: str 128 """ 129 130 self._kind = kind 131 132 @property 133 def metadata(self): 134 """ 135 Gets the metadata of this V1beta1LocalSubjectAccessReview. 136 137 :return: The metadata of this V1beta1LocalSubjectAccessReview. 138 :rtype: V1ObjectMeta 139 """ 140 return self._metadata 141 142 @metadata.setter 143 def metadata(self, metadata): 144 """ 145 Sets the metadata of this V1beta1LocalSubjectAccessReview. 146 147 :param metadata: The metadata of this V1beta1LocalSubjectAccessReview. 148 :type: V1ObjectMeta 149 """ 150 151 self._metadata = metadata 152 153 @property 154 def spec(self): 155 """ 156 Gets the spec of this V1beta1LocalSubjectAccessReview. 157 Spec holds information about the request being evaluated. 158 spec.namespace must be equal to the namespace you made the request 159 against. If empty, it is defaulted. 160 161 :return: The spec of this V1beta1LocalSubjectAccessReview. 162 :rtype: V1beta1SubjectAccessReviewSpec 163 """ 164 return self._spec 165 166 @spec.setter 167 def spec(self, spec): 168 """ 169 Sets the spec of this V1beta1LocalSubjectAccessReview. 170 Spec holds information about the request being evaluated. 171 spec.namespace must be equal to the namespace you made the request 172 against. If empty, it is defaulted. 173 174 :param spec: The spec of this V1beta1LocalSubjectAccessReview. 175 :type: V1beta1SubjectAccessReviewSpec 176 """ 177 if spec is None: 178 raise ValueError('Invalid value for `spec`, must not be `None`') 179 180 self._spec = spec 181 182 @property 183 def status(self): 184 """ 185 Gets the status of this V1beta1LocalSubjectAccessReview. 186 Status is filled in by the server and indicates whether the request is 187 allowed or not 188 189 :return: The status of this V1beta1LocalSubjectAccessReview. 190 :rtype: V1beta1SubjectAccessReviewStatus 191 """ 192 return self._status 193 194 @status.setter 195 def status(self, status): 196 """ 197 Sets the status of this V1beta1LocalSubjectAccessReview. 198 Status is filled in by the server and indicates whether the request is 199 allowed or not 200 201 :param status: The status of this V1beta1LocalSubjectAccessReview. 202 :type: V1beta1SubjectAccessReviewStatus 203 """ 204 205 self._status = status 206 207 def to_dict(self): 208 """ 209 Returns the model properties as a dict 210 """ 211 result = {} 212 213 for attr, _ in iteritems(self.swagger_types): 214 value = getattr(self, attr) 215 if isinstance(value, list): 216 result[attr] = list( 217 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 218 elif hasattr(value, 'to_dict'): 219 result[attr] = value.to_dict() 220 elif isinstance(value, dict): 221 result[attr] = dict( 222 map( 223 lambda item: (item[0], item[1].to_dict()) 224 if hasattr(item[1], 'to_dict') else item, value.items())) 225 else: 226 result[attr] = value 227 228 return result 229 230 def to_str(self): 231 """ 232 Returns the string representation of the model 233 """ 234 return pformat(self.to_dict()) 235 236 def __repr__(self): 237 """ 238 For `print` and `pprint` 239 """ 240 return self.to_str() 241 242 def __eq__(self, other): 243 """ 244 Returns true if both objects are equal 245 """ 246 if not isinstance(other, V1beta1LocalSubjectAccessReview): 247 return False 248 249 return self.__dict__ == other.__dict__ 250 251 def __ne__(self, other): 252 """ 253 Returns true if both objects are not equal 254 """ 255 return not self == other 256