Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_token_review_status.py205 linesDownload Raw Back to models
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 V1TokenReviewStatus(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        'audiences': 'list[str]',37        'authenticated': 'bool',38        'error': 'str',39        'user': 'V1UserInfo'40    }41 42    attribute_map = {43        'audiences': 'audiences',44        'authenticated': 'authenticated',45        'error': 'error',46        'user': 'user'47    }48 49    def __init__(self, audiences=None, authenticated=None, error=None, user=None, local_vars_configuration=None):  # noqa: E50150        """V1TokenReviewStatus - a model defined in OpenAPI"""  # noqa: E50151        if local_vars_configuration is None:52            local_vars_configuration = Configuration()53        self.local_vars_configuration = local_vars_configuration54 55        self._audiences = None56        self._authenticated = None57        self._error = None58        self._user = None59        self.discriminator = None60 61        if audiences is not None:62            self.audiences = audiences63        if authenticated is not None:64            self.authenticated = authenticated65        if error is not None:66            self.error = error67        if user is not None:68            self.user = user69 70    @property71    def audiences(self):72        """Gets the audiences of this V1TokenReviewStatus.  # noqa: E50173 74        Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.  # noqa: E50175 76        :return: The audiences of this V1TokenReviewStatus.  # noqa: E50177        :rtype: list[str]78        """79        return self._audiences80 81    @audiences.setter82    def audiences(self, audiences):83        """Sets the audiences of this V1TokenReviewStatus.84 85        Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.  # noqa: E50186 87        :param audiences: The audiences of this V1TokenReviewStatus.  # noqa: E50188        :type: list[str]89        """90 91        self._audiences = audiences92 93    @property94    def authenticated(self):95        """Gets the authenticated of this V1TokenReviewStatus.  # noqa: E50196 97        Authenticated indicates that the token was associated with a known user.  # noqa: E50198 99        :return: The authenticated of this V1TokenReviewStatus.  # noqa: E501100        :rtype: bool101        """102        return self._authenticated103 104    @authenticated.setter105    def authenticated(self, authenticated):106        """Sets the authenticated of this V1TokenReviewStatus.107 108        Authenticated indicates that the token was associated with a known user.  # noqa: E501109 110        :param authenticated: The authenticated of this V1TokenReviewStatus.  # noqa: E501111        :type: bool112        """113 114        self._authenticated = authenticated115 116    @property117    def error(self):118        """Gets the error of this V1TokenReviewStatus.  # noqa: E501119 120        Error indicates that the token couldn't be checked  # noqa: E501121 122        :return: The error of this V1TokenReviewStatus.  # noqa: E501123        :rtype: str124        """125        return self._error126 127    @error.setter128    def error(self, error):129        """Sets the error of this V1TokenReviewStatus.130 131        Error indicates that the token couldn't be checked  # noqa: E501132 133        :param error: The error of this V1TokenReviewStatus.  # noqa: E501134        :type: str135        """136 137        self._error = error138 139    @property140    def user(self):141        """Gets the user of this V1TokenReviewStatus.  # noqa: E501142 143 144        :return: The user of this V1TokenReviewStatus.  # noqa: E501145        :rtype: V1UserInfo146        """147        return self._user148 149    @user.setter150    def user(self, user):151        """Sets the user of this V1TokenReviewStatus.152 153 154        :param user: The user of this V1TokenReviewStatus.  # noqa: E501155        :type: V1UserInfo156        """157 158        self._user = user159 160    def to_dict(self):161        """Returns the model properties as a dict"""162        result = {}163 164        for attr, _ in six.iteritems(self.openapi_types):165            value = getattr(self, attr)166            if isinstance(value, list):167                result[attr] = list(map(168                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,169                    value170                ))171            elif hasattr(value, "to_dict"):172                result[attr] = value.to_dict()173            elif isinstance(value, dict):174                result[attr] = dict(map(175                    lambda item: (item[0], item[1].to_dict())176                    if hasattr(item[1], "to_dict") else item,177                    value.items()178                ))179            else:180                result[attr] = value181 182        return result183 184    def to_str(self):185        """Returns the string representation of the model"""186        return pprint.pformat(self.to_dict())187 188    def __repr__(self):189        """For `print` and `pprint`"""190        return self.to_str()191 192    def __eq__(self, other):193        """Returns true if both objects are equal"""194        if not isinstance(other, V1TokenReviewStatus):195            return False196 197        return self.to_dict() == other.to_dict()198 199    def __ne__(self, other):200        """Returns true if both objects are not equal"""201        if not isinstance(other, V1TokenReviewStatus):202            return True203 204        return self.to_dict() != other.to_dict()205 
codekingpro/portable-devtools · Team Ai