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 V1TokenRequestSpec(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 'bound_object_ref': 'V1BoundObjectReference',38 'expiration_seconds': 'int'39 }40 41 attribute_map = {42 'audiences': 'audiences',43 'bound_object_ref': 'boundObjectRef',44 'expiration_seconds': 'expirationSeconds'45 }46 47 def __init__(self, audiences=None, bound_object_ref=None, expiration_seconds=None, local_vars_configuration=None): # noqa: E50148 """V1TokenRequestSpec - a model defined in OpenAPI""" # noqa: E50149 if local_vars_configuration is None:50 local_vars_configuration = Configuration()51 self.local_vars_configuration = local_vars_configuration52 53 self._audiences = None54 self._bound_object_ref = None55 self._expiration_seconds = None56 self.discriminator = None57 58 self.audiences = audiences59 if bound_object_ref is not None:60 self.bound_object_ref = bound_object_ref61 if expiration_seconds is not None:62 self.expiration_seconds = expiration_seconds63 64 @property65 def audiences(self):66 """Gets the audiences of this V1TokenRequestSpec. # noqa: E50167 68 Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences. # noqa: E50169 70 :return: The audiences of this V1TokenRequestSpec. # noqa: E50171 :rtype: list[str]72 """73 return self._audiences74 75 @audiences.setter76 def audiences(self, audiences):77 """Sets the audiences of this V1TokenRequestSpec.78 79 Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences. # noqa: E50180 81 :param audiences: The audiences of this V1TokenRequestSpec. # noqa: E50182 :type: list[str]83 """84 if self.local_vars_configuration.client_side_validation and audiences is None: # noqa: E50185 raise ValueError("Invalid value for `audiences`, must not be `None`") # noqa: E50186 87 self._audiences = audiences88 89 @property90 def bound_object_ref(self):91 """Gets the bound_object_ref of this V1TokenRequestSpec. # noqa: E50192 93 94 :return: The bound_object_ref of this V1TokenRequestSpec. # noqa: E50195 :rtype: V1BoundObjectReference96 """97 return self._bound_object_ref98 99 @bound_object_ref.setter100 def bound_object_ref(self, bound_object_ref):101 """Sets the bound_object_ref of this V1TokenRequestSpec.102 103 104 :param bound_object_ref: The bound_object_ref of this V1TokenRequestSpec. # noqa: E501105 :type: V1BoundObjectReference106 """107 108 self._bound_object_ref = bound_object_ref109 110 @property111 def expiration_seconds(self):112 """Gets the expiration_seconds of this V1TokenRequestSpec. # noqa: E501113 114 ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response. # noqa: E501115 116 :return: The expiration_seconds of this V1TokenRequestSpec. # noqa: E501117 :rtype: int118 """119 return self._expiration_seconds120 121 @expiration_seconds.setter122 def expiration_seconds(self, expiration_seconds):123 """Sets the expiration_seconds of this V1TokenRequestSpec.124 125 ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response. # noqa: E501126 127 :param expiration_seconds: The expiration_seconds of this V1TokenRequestSpec. # noqa: E501128 :type: int129 """130 131 self._expiration_seconds = expiration_seconds132 133 def to_dict(self):134 """Returns the model properties as a dict"""135 result = {}136 137 for attr, _ in six.iteritems(self.openapi_types):138 value = getattr(self, attr)139 if isinstance(value, list):140 result[attr] = list(map(141 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,142 value143 ))144 elif hasattr(value, "to_dict"):145 result[attr] = value.to_dict()146 elif isinstance(value, dict):147 result[attr] = dict(map(148 lambda item: (item[0], item[1].to_dict())149 if hasattr(item[1], "to_dict") else item,150 value.items()151 ))152 else:153 result[attr] = value154 155 return result156 157 def to_str(self):158 """Returns the string representation of the model"""159 return pprint.pformat(self.to_dict())160 161 def __repr__(self):162 """For `print` and `pprint`"""163 return self.to_str()164 165 def __eq__(self, other):166 """Returns true if both objects are equal"""167 if not isinstance(other, V1TokenRequestSpec):168 return False169 170 return self.to_dict() == other.to_dict()171 172 def __ne__(self, other):173 """Returns true if both objects are not equal"""174 if not isinstance(other, V1TokenRequestSpec):175 return True176 177 return self.to_dict() != other.to_dict()178 