codekingpro/portable-devtools
114k
1# coding: utf-82 3"""4 Kubernetes5 6 No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E5017 8 The version of the OpenAPI document: release-1.359 Generated by: https://openapi-generator.tech10"""11 12 13import pprint14import re # noqa: F40115 16import six17 18from kubernetes.client.configuration import Configuration19 20 21class V1TokenReview(object):22 """NOTE: This class is auto generated by OpenAPI Generator.23 Ref: https://openapi-generator.tech24 25 Do not edit the class manually.26 """27 28 """29 Attributes:30 openapi_types (dict): The key is attribute name31 and the value is attribute type.32 attribute_map (dict): The key is attribute name33 and the value is json key in definition.34 """35 openapi_types = {36 'api_version': 'str',37 'kind': 'str',38 'metadata': 'V1ObjectMeta',39 'spec': 'V1TokenReviewSpec',40 'status': 'V1TokenReviewStatus'41 }42 43 attribute_map = {44 'api_version': 'apiVersion',45 'kind': 'kind',46 'metadata': 'metadata',47 'spec': 'spec',48 'status': 'status'49 }50 51 def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E50152 """V1TokenReview - a model defined in OpenAPI""" # noqa: E50153 if local_vars_configuration is None:54 local_vars_configuration = Configuration()55 self.local_vars_configuration = local_vars_configuration56 57 self._api_version = None58 self._kind = None59 self._metadata = None60 self._spec = None61 self._status = None62 self.discriminator = None63 64 if api_version is not None:65 self.api_version = api_version66 if kind is not None:67 self.kind = kind68 if metadata is not None:69 self.metadata = metadata70 self.spec = spec71 if status is not None:72 self.status = status73 74 @property75 def api_version(self):76 """Gets the api_version of this V1TokenReview. # noqa: E50177 78 APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E50179 80 :return: The api_version of this V1TokenReview. # noqa: E50181 :rtype: str82 """83 return self._api_version84 85 @api_version.setter86 def api_version(self, api_version):87 """Sets the api_version of this V1TokenReview.88 89 APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E50190 91 :param api_version: The api_version of this V1TokenReview. # noqa: E50192 :type: str93 """94 95 self._api_version = api_version96 97 @property98 def kind(self):99 """Gets the kind of this V1TokenReview. # noqa: E501100 101 Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501102 103 :return: The kind of this V1TokenReview. # noqa: E501104 :rtype: str105 """106 return self._kind107 108 @kind.setter109 def kind(self, kind):110 """Sets the kind of this V1TokenReview.111 112 Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501113 114 :param kind: The kind of this V1TokenReview. # noqa: E501115 :type: str116 """117 118 self._kind = kind119 120 @property121 def metadata(self):122 """Gets the metadata of this V1TokenReview. # noqa: E501123 124 125 :return: The metadata of this V1TokenReview. # noqa: E501126 :rtype: V1ObjectMeta127 """128 return self._metadata129 130 @metadata.setter131 def metadata(self, metadata):132 """Sets the metadata of this V1TokenReview.133 134 135 :param metadata: The metadata of this V1TokenReview. # noqa: E501136 :type: V1ObjectMeta137 """138 139 self._metadata = metadata140 141 @property142 def spec(self):143 """Gets the spec of this V1TokenReview. # noqa: E501144 145 146 :return: The spec of this V1TokenReview. # noqa: E501147 :rtype: V1TokenReviewSpec148 """149 return self._spec150 151 @spec.setter152 def spec(self, spec):153 """Sets the spec of this V1TokenReview.154 155 156 :param spec: The spec of this V1TokenReview. # noqa: E501157 :type: V1TokenReviewSpec158 """159 if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501160 raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501161 162 self._spec = spec163 164 @property165 def status(self):166 """Gets the status of this V1TokenReview. # noqa: E501167 168 169 :return: The status of this V1TokenReview. # noqa: E501170 :rtype: V1TokenReviewStatus171 """172 return self._status173 174 @status.setter175 def status(self, status):176 """Sets the status of this V1TokenReview.177 178 179 :param status: The status of this V1TokenReview. # noqa: E501180 :type: V1TokenReviewStatus181 """182 183 self._status = status184 185 def to_dict(self):186 """Returns the model properties as a dict"""187 result = {}188 189 for attr, _ in six.iteritems(self.openapi_types):190 value = getattr(self, attr)191 if isinstance(value, list):192 result[attr] = list(map(193 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,194 value195 ))196 elif hasattr(value, "to_dict"):197 result[attr] = value.to_dict()198 elif isinstance(value, dict):199 result[attr] = dict(map(200 lambda item: (item[0], item[1].to_dict())201 if hasattr(item[1], "to_dict") else item,202 value.items()203 ))204 else:205 result[attr] = value206 207 return result208 209 def to_str(self):210 """Returns the string representation of the model"""211 return pprint.pformat(self.to_dict())212 213 def __repr__(self):214 """For `print` and `pprint`"""215 return self.to_str()216 217 def __eq__(self, other):218 """Returns true if both objects are equal"""219 if not isinstance(other, V1TokenReview):220 return False221 222 return self.to_dict() == other.to_dict()223 224 def __ne__(self, other):225 """Returns true if both objects are not equal"""226 if not isinstance(other, V1TokenReview):227 return True228 229 return self.to_dict() != other.to_dict()230 