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 V1beta1StorageClass(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      'allow_volume_expansion': 'bool',
32      'allowed_topologies': 'list[V1TopologySelectorTerm]',
33      'api_version': 'str',
34      'kind': 'str',
35      'metadata': 'V1ObjectMeta',
36      'mount_options': 'list[str]',
37      'parameters': 'dict(str, str)',
38      'provisioner': 'str',
39      'reclaim_policy': 'str',
40      'volume_binding_mode': 'str'
41  }
42
43  attribute_map = {
44      'allow_volume_expansion': 'allowVolumeExpansion',
45      'allowed_topologies': 'allowedTopologies',
46      'api_version': 'apiVersion',
47      'kind': 'kind',
48      'metadata': 'metadata',
49      'mount_options': 'mountOptions',
50      'parameters': 'parameters',
51      'provisioner': 'provisioner',
52      'reclaim_policy': 'reclaimPolicy',
53      'volume_binding_mode': 'volumeBindingMode'
54  }
55
56  def __init__(self,
57               allow_volume_expansion=None,
58               allowed_topologies=None,
59               api_version=None,
60               kind=None,
61               metadata=None,
62               mount_options=None,
63               parameters=None,
64               provisioner=None,
65               reclaim_policy=None,
66               volume_binding_mode=None):
67    """
68        V1beta1StorageClass - a model defined in Swagger
69        """
70
71    self._allow_volume_expansion = None
72    self._allowed_topologies = None
73    self._api_version = None
74    self._kind = None
75    self._metadata = None
76    self._mount_options = None
77    self._parameters = None
78    self._provisioner = None
79    self._reclaim_policy = None
80    self._volume_binding_mode = None
81    self.discriminator = None
82
83    if allow_volume_expansion is not None:
84      self.allow_volume_expansion = allow_volume_expansion
85    if allowed_topologies is not None:
86      self.allowed_topologies = allowed_topologies
87    if api_version is not None:
88      self.api_version = api_version
89    if kind is not None:
90      self.kind = kind
91    if metadata is not None:
92      self.metadata = metadata
93    if mount_options is not None:
94      self.mount_options = mount_options
95    if parameters is not None:
96      self.parameters = parameters
97    self.provisioner = provisioner
98    if reclaim_policy is not None:
99      self.reclaim_policy = reclaim_policy
100    if volume_binding_mode is not None:
101      self.volume_binding_mode = volume_binding_mode
102
103  @property
104  def allow_volume_expansion(self):
105    """
106        Gets the allow_volume_expansion of this V1beta1StorageClass.
107        AllowVolumeExpansion shows whether the storage class allow volume expand
108
109        :return: The allow_volume_expansion of this V1beta1StorageClass.
110        :rtype: bool
111        """
112    return self._allow_volume_expansion
113
114  @allow_volume_expansion.setter
115  def allow_volume_expansion(self, allow_volume_expansion):
116    """
117        Sets the allow_volume_expansion of this V1beta1StorageClass.
118        AllowVolumeExpansion shows whether the storage class allow volume expand
119
120        :param allow_volume_expansion: The allow_volume_expansion of this
121        V1beta1StorageClass.
122        :type: bool
123        """
124
125    self._allow_volume_expansion = allow_volume_expansion
126
127  @property
128  def allowed_topologies(self):
129    """
130        Gets the allowed_topologies of this V1beta1StorageClass.
131        Restrict the node topologies where volumes can be dynamically
132        provisioned. Each volume plugin defines its own supported topology
133        specifications. An empty TopologySelectorTerm list means there is no
134        topology restriction. This field is only honored by servers that enable
135        the VolumeScheduling feature.
136
137        :return: The allowed_topologies of this V1beta1StorageClass.
138        :rtype: list[V1TopologySelectorTerm]
139        """
140    return self._allowed_topologies
141
142  @allowed_topologies.setter
143  def allowed_topologies(self, allowed_topologies):
144    """
145        Sets the allowed_topologies of this V1beta1StorageClass.
146        Restrict the node topologies where volumes can be dynamically
147        provisioned. Each volume plugin defines its own supported topology
148        specifications. An empty TopologySelectorTerm list means there is no
149        topology restriction. This field is only honored by servers that enable
150        the VolumeScheduling feature.
151
152        :param allowed_topologies: The allowed_topologies of this
153        V1beta1StorageClass.
154        :type: list[V1TopologySelectorTerm]
155        """
156
157    self._allowed_topologies = allowed_topologies
158
159  @property
160  def api_version(self):
161    """
162        Gets the api_version of this V1beta1StorageClass.
163        APIVersion defines the versioned schema of this representation of an
164        object. Servers should convert recognized schemas to the latest internal
165        value, and may reject unrecognized values. More info:
166        https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
167
168        :return: The api_version of this V1beta1StorageClass.
169        :rtype: str
170        """
171    return self._api_version
172
173  @api_version.setter
174  def api_version(self, api_version):
175    """
176        Sets the api_version of this V1beta1StorageClass.
177        APIVersion defines the versioned schema of this representation of an
178        object. Servers should convert recognized schemas to the latest internal
179        value, and may reject unrecognized values. More info:
180        https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
181
182        :param api_version: The api_version of this V1beta1StorageClass.
183        :type: str
184        """
185
186    self._api_version = api_version
187
188  @property
189  def kind(self):
190    """
191        Gets the kind of this V1beta1StorageClass.
192        Kind is a string value representing the REST resource this object
193        represents. Servers may infer this from the endpoint the client submits
194        requests to. Cannot be updated. In CamelCase. More info:
195        https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
196
197        :return: The kind of this V1beta1StorageClass.
198        :rtype: str
199        """
200    return self._kind
201
202  @kind.setter
203  def kind(self, kind):
204    """
205        Sets the kind of this V1beta1StorageClass.
206        Kind is a string value representing the REST resource this object
207        represents. Servers may infer this from the endpoint the client submits
208        requests to. Cannot be updated. In CamelCase. More info:
209        https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
210
211        :param kind: The kind of this V1beta1StorageClass.
212        :type: str
213        """
214
215    self._kind = kind
216
217  @property
218  def metadata(self):
219    """
220        Gets the metadata of this V1beta1StorageClass.
221        Standard object's metadata. More info:
222        https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
223
224        :return: The metadata of this V1beta1StorageClass.
225        :rtype: V1ObjectMeta
226        """
227    return self._metadata
228
229  @metadata.setter
230  def metadata(self, metadata):
231    """
232        Sets the metadata of this V1beta1StorageClass.
233        Standard object's metadata. More info:
234        https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
235
236        :param metadata: The metadata of this V1beta1StorageClass.
237        :type: V1ObjectMeta
238        """
239
240    self._metadata = metadata
241
242  @property
243  def mount_options(self):
244    """
245        Gets the mount_options of this V1beta1StorageClass.
246        Dynamically provisioned PersistentVolumes of this storage class are
247        created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated
248        - mount of the PVs will simply fail if one is invalid.
249
250        :return: The mount_options of this V1beta1StorageClass.
251        :rtype: list[str]
252        """
253    return self._mount_options
254
255  @mount_options.setter
256  def mount_options(self, mount_options):
257    """
258        Sets the mount_options of this V1beta1StorageClass.
259        Dynamically provisioned PersistentVolumes of this storage class are
260        created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated
261        - mount of the PVs will simply fail if one is invalid.
262
263        :param mount_options: The mount_options of this V1beta1StorageClass.
264        :type: list[str]
265        """
266
267    self._mount_options = mount_options
268
269  @property
270  def parameters(self):
271    """
272        Gets the parameters of this V1beta1StorageClass.
273        Parameters holds the parameters for the provisioner that should create
274        volumes of this storage class.
275
276        :return: The parameters of this V1beta1StorageClass.
277        :rtype: dict(str, str)
278        """
279    return self._parameters
280
281  @parameters.setter
282  def parameters(self, parameters):
283    """
284        Sets the parameters of this V1beta1StorageClass.
285        Parameters holds the parameters for the provisioner that should create
286        volumes of this storage class.
287
288        :param parameters: The parameters of this V1beta1StorageClass.
289        :type: dict(str, str)
290        """
291
292    self._parameters = parameters
293
294  @property
295  def provisioner(self):
296    """
297        Gets the provisioner of this V1beta1StorageClass.
298        Provisioner indicates the type of the provisioner.
299
300        :return: The provisioner of this V1beta1StorageClass.
301        :rtype: str
302        """
303    return self._provisioner
304
305  @provisioner.setter
306  def provisioner(self, provisioner):
307    """
308        Sets the provisioner of this V1beta1StorageClass.
309        Provisioner indicates the type of the provisioner.
310
311        :param provisioner: The provisioner of this V1beta1StorageClass.
312        :type: str
313        """
314    if provisioner is None:
315      raise ValueError('Invalid value for `provisioner`, must not be `None`')
316
317    self._provisioner = provisioner
318
319  @property
320  def reclaim_policy(self):
321    """
322        Gets the reclaim_policy of this V1beta1StorageClass.
323        Dynamically provisioned PersistentVolumes of this storage class are
324        created with this reclaimPolicy. Defaults to Delete.
325
326        :return: The reclaim_policy of this V1beta1StorageClass.
327        :rtype: str
328        """
329    return self._reclaim_policy
330
331  @reclaim_policy.setter
332  def reclaim_policy(self, reclaim_policy):
333    """
334        Sets the reclaim_policy of this V1beta1StorageClass.
335        Dynamically provisioned PersistentVolumes of this storage class are
336        created with this reclaimPolicy. Defaults to Delete.
337
338        :param reclaim_policy: The reclaim_policy of this V1beta1StorageClass.
339        :type: str
340        """
341
342    self._reclaim_policy = reclaim_policy
343
344  @property
345  def volume_binding_mode(self):
346    """
347        Gets the volume_binding_mode of this V1beta1StorageClass.
348        VolumeBindingMode indicates how PersistentVolumeClaims should be
349        provisioned and bound.  When unset, VolumeBindingImmediate is used. This
350        field is only honored by servers that enable the VolumeScheduling
351        feature.
352
353        :return: The volume_binding_mode of this V1beta1StorageClass.
354        :rtype: str
355        """
356    return self._volume_binding_mode
357
358  @volume_binding_mode.setter
359  def volume_binding_mode(self, volume_binding_mode):
360    """
361        Sets the volume_binding_mode of this V1beta1StorageClass.
362        VolumeBindingMode indicates how PersistentVolumeClaims should be
363        provisioned and bound.  When unset, VolumeBindingImmediate is used. This
364        field is only honored by servers that enable the VolumeScheduling
365        feature.
366
367        :param volume_binding_mode: The volume_binding_mode of this
368        V1beta1StorageClass.
369        :type: str
370        """
371
372    self._volume_binding_mode = volume_binding_mode
373
374  def to_dict(self):
375    """
376        Returns the model properties as a dict
377        """
378    result = {}
379
380    for attr, _ in iteritems(self.swagger_types):
381      value = getattr(self, attr)
382      if isinstance(value, list):
383        result[attr] = list(
384            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
385      elif hasattr(value, 'to_dict'):
386        result[attr] = value.to_dict()
387      elif isinstance(value, dict):
388        result[attr] = dict(
389            map(
390                lambda item: (item[0], item[1].to_dict())
391                if hasattr(item[1], 'to_dict') else item, value.items()))
392      else:
393        result[attr] = value
394
395    return result
396
397  def to_str(self):
398    """
399        Returns the string representation of the model
400        """
401    return pformat(self.to_dict())
402
403  def __repr__(self):
404    """
405        For `print` and `pprint`
406        """
407    return self.to_str()
408
409  def __eq__(self, other):
410    """
411        Returns true if both objects are equal
412        """
413    if not isinstance(other, V1beta1StorageClass):
414      return False
415
416    return self.__dict__ == other.__dict__
417
418  def __ne__(self, other):
419    """
420        Returns true if both objects are not equal
421        """
422    return not self == other
423