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 V1TokenReviewSpec(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 = {'audiences': 'list[str]', 'token': 'str'}
31
32  attribute_map = {'audiences': 'audiences', 'token': 'token'}
33
34  def __init__(self, audiences=None, token=None):
35    """
36        V1TokenReviewSpec - a model defined in Swagger
37        """
38
39    self._audiences = None
40    self._token = None
41    self.discriminator = None
42
43    if audiences is not None:
44      self.audiences = audiences
45    if token is not None:
46      self.token = token
47
48  @property
49  def audiences(self):
50    """
51        Gets the audiences of this V1TokenReviewSpec.
52        Audiences is a list of the identifiers that the resource server
53        presented with the token identifies as. Audience-aware token
54        authenticators will verify that the token was intended for at least one
55        of the audiences in this list. If no audiences are provided, the
56        audience will default to the audience of the Kubernetes apiserver.
57
58        :return: The audiences of this V1TokenReviewSpec.
59        :rtype: list[str]
60        """
61    return self._audiences
62
63  @audiences.setter
64  def audiences(self, audiences):
65    """
66        Sets the audiences of this V1TokenReviewSpec.
67        Audiences is a list of the identifiers that the resource server
68        presented with the token identifies as. Audience-aware token
69        authenticators will verify that the token was intended for at least one
70        of the audiences in this list. If no audiences are provided, the
71        audience will default to the audience of the Kubernetes apiserver.
72
73        :param audiences: The audiences of this V1TokenReviewSpec.
74        :type: list[str]
75        """
76
77    self._audiences = audiences
78
79  @property
80  def token(self):
81    """
82        Gets the token of this V1TokenReviewSpec.
83        Token is the opaque bearer token.
84
85        :return: The token of this V1TokenReviewSpec.
86        :rtype: str
87        """
88    return self._token
89
90  @token.setter
91  def token(self, token):
92    """
93        Sets the token of this V1TokenReviewSpec.
94        Token is the opaque bearer token.
95
96        :param token: The token of this V1TokenReviewSpec.
97        :type: str
98        """
99
100    self._token = token
101
102  def to_dict(self):
103    """
104        Returns the model properties as a dict
105        """
106    result = {}
107
108    for attr, _ in iteritems(self.swagger_types):
109      value = getattr(self, attr)
110      if isinstance(value, list):
111        result[attr] = list(
112            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
113      elif hasattr(value, 'to_dict'):
114        result[attr] = value.to_dict()
115      elif isinstance(value, dict):
116        result[attr] = dict(
117            map(
118                lambda item: (item[0], item[1].to_dict())
119                if hasattr(item[1], 'to_dict') else item, value.items()))
120      else:
121        result[attr] = value
122
123    return result
124
125  def to_str(self):
126    """
127        Returns the string representation of the model
128        """
129    return pformat(self.to_dict())
130
131  def __repr__(self):
132    """
133        For `print` and `pprint`
134        """
135    return self.to_str()
136
137  def __eq__(self, other):
138    """
139        Returns true if both objects are equal
140        """
141    if not isinstance(other, V1TokenReviewSpec):
142      return False
143
144    return self.__dict__ == other.__dict__
145
146  def __ne__(self, other):
147    """
148        Returns true if both objects are not equal
149        """
150    return not self == other
151