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 V1ServiceAccountTokenProjection(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      'audience': 'str',
32      'expiration_seconds': 'int',
33      'path': 'str'
34  }
35
36  attribute_map = {
37      'audience': 'audience',
38      'expiration_seconds': 'expirationSeconds',
39      'path': 'path'
40  }
41
42  def __init__(self, audience=None, expiration_seconds=None, path=None):
43    """
44        V1ServiceAccountTokenProjection - a model defined in Swagger
45        """
46
47    self._audience = None
48    self._expiration_seconds = None
49    self._path = None
50    self.discriminator = None
51
52    if audience is not None:
53      self.audience = audience
54    if expiration_seconds is not None:
55      self.expiration_seconds = expiration_seconds
56    self.path = path
57
58  @property
59  def audience(self):
60    """
61        Gets the audience of this V1ServiceAccountTokenProjection.
62        Audience is the intended audience of the token. A recipient of a token
63        must identify itself with an identifier specified in the audience of the
64        token, and otherwise should reject the token. The audience defaults to
65        the identifier of the apiserver.
66
67        :return: The audience of this V1ServiceAccountTokenProjection.
68        :rtype: str
69        """
70    return self._audience
71
72  @audience.setter
73  def audience(self, audience):
74    """
75        Sets the audience of this V1ServiceAccountTokenProjection.
76        Audience is the intended audience of the token. A recipient of a token
77        must identify itself with an identifier specified in the audience of the
78        token, and otherwise should reject the token. The audience defaults to
79        the identifier of the apiserver.
80
81        :param audience: The audience of this V1ServiceAccountTokenProjection.
82        :type: str
83        """
84
85    self._audience = audience
86
87  @property
88  def expiration_seconds(self):
89    """
90        Gets the expiration_seconds of this V1ServiceAccountTokenProjection.
91        ExpirationSeconds is the requested duration of validity of the service
92        account token. As the token approaches expiration, the kubelet volume
93        plugin will proactively rotate the service account token. The kubelet
94        will start trying to rotate the token if the token is older than 80
95        percent of its time to live or if the token is older than 24
96        hours.Defaults to 1 hour and must be at least 10 minutes.
97
98        :return: The expiration_seconds of this V1ServiceAccountTokenProjection.
99        :rtype: int
100        """
101    return self._expiration_seconds
102
103  @expiration_seconds.setter
104  def expiration_seconds(self, expiration_seconds):
105    """
106        Sets the expiration_seconds of this V1ServiceAccountTokenProjection.
107        ExpirationSeconds is the requested duration of validity of the service
108        account token. As the token approaches expiration, the kubelet volume
109        plugin will proactively rotate the service account token. The kubelet
110        will start trying to rotate the token if the token is older than 80
111        percent of its time to live or if the token is older than 24
112        hours.Defaults to 1 hour and must be at least 10 minutes.
113
114        :param expiration_seconds: The expiration_seconds of this
115        V1ServiceAccountTokenProjection.
116        :type: int
117        """
118
119    self._expiration_seconds = expiration_seconds
120
121  @property
122  def path(self):
123    """
124        Gets the path of this V1ServiceAccountTokenProjection.
125        Path is the path relative to the mount point of the file to project the
126        token into.
127
128        :return: The path of this V1ServiceAccountTokenProjection.
129        :rtype: str
130        """
131    return self._path
132
133  @path.setter
134  def path(self, path):
135    """
136        Sets the path of this V1ServiceAccountTokenProjection.
137        Path is the path relative to the mount point of the file to project the
138        token into.
139
140        :param path: The path of this V1ServiceAccountTokenProjection.
141        :type: str
142        """
143    if path is None:
144      raise ValueError('Invalid value for `path`, must not be `None`')
145
146    self._path = path
147
148  def to_dict(self):
149    """
150        Returns the model properties as a dict
151        """
152    result = {}
153
154    for attr, _ in iteritems(self.swagger_types):
155      value = getattr(self, attr)
156      if isinstance(value, list):
157        result[attr] = list(
158            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
159      elif hasattr(value, 'to_dict'):
160        result[attr] = value.to_dict()
161      elif isinstance(value, dict):
162        result[attr] = dict(
163            map(
164                lambda item: (item[0], item[1].to_dict())
165                if hasattr(item[1], 'to_dict') else item, value.items()))
166      else:
167        result[attr] = value
168
169    return result
170
171  def to_str(self):
172    """
173        Returns the string representation of the model
174        """
175    return pformat(self.to_dict())
176
177  def __repr__(self):
178    """
179        For `print` and `pprint`
180        """
181    return self.to_str()
182
183  def __eq__(self, other):
184    """
185        Returns true if both objects are equal
186        """
187    if not isinstance(other, V1ServiceAccountTokenProjection):
188      return False
189
190    return self.__dict__ == other.__dict__
191
192  def __ne__(self, other):
193    """
194        Returns true if both objects are not equal
195        """
196    return not self == other
197