File: kubernetes_node_pool_properties_for_put.py

package info (click to toggle)
python-ionoscloud 6.1.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,084 kB
  • sloc: python: 44,694; makefile: 4
file content (389 lines) | stat: -rw-r--r-- 13,871 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
# coding: utf-8

"""
    CLOUD API

     IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool.    Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on.  # noqa: E501

    The version of the OpenAPI document: 6.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from ionoscloud.configuration import Configuration


class KubernetesNodePoolPropertiesForPut(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {

        'name': 'str',

        'node_count': 'int',

        'server_type': 'KubernetesNodePoolServerType',

        'k8s_version': 'str',

        'maintenance_window': 'KubernetesMaintenanceWindow',

        'auto_scaling': 'KubernetesAutoScaling',

        'lans': 'list[KubernetesNodePoolLan]',

        'labels': 'dict(str, str)',

        'annotations': 'dict(str, str)',

        'public_ips': 'list[str]',
    }

    attribute_map = {

        'name': 'name',

        'node_count': 'nodeCount',

        'server_type': 'serverType',

        'k8s_version': 'k8sVersion',

        'maintenance_window': 'maintenanceWindow',

        'auto_scaling': 'autoScaling',

        'lans': 'lans',

        'labels': 'labels',

        'annotations': 'annotations',

        'public_ips': 'publicIps',
    }

    def __init__(self, name=None, node_count=None, server_type=None, k8s_version=None, maintenance_window=None, auto_scaling=None, lans=None, labels=None, annotations=None, public_ips=None, local_vars_configuration=None):  # noqa: E501
        """KubernetesNodePoolPropertiesForPut - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._node_count = None
        self._server_type = None
        self._k8s_version = None
        self._maintenance_window = None
        self._auto_scaling = None
        self._lans = None
        self._labels = None
        self._annotations = None
        self._public_ips = None
        self.discriminator = None

        if name is not None:
            self.name = name
        self.node_count = node_count
        if server_type is not None:
            self.server_type = server_type
        if k8s_version is not None:
            self.k8s_version = k8s_version
        if maintenance_window is not None:
            self.maintenance_window = maintenance_window
        if auto_scaling is not None:
            self.auto_scaling = auto_scaling
        if lans is not None:
            self.lans = lans
        if labels is not None:
            self.labels = labels
        if annotations is not None:
            self.annotations = annotations
        if public_ips is not None:
            self.public_ips = public_ips


    @property
    def name(self):
        """Gets the name of this KubernetesNodePoolPropertiesForPut.  # noqa: E501

        A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.  # noqa: E501

        :return: The name of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this KubernetesNodePoolPropertiesForPut.

        A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.  # noqa: E501

        :param name: The name of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type name: str
        """

        self._name = name

    @property
    def node_count(self):
        """Gets the node_count of this KubernetesNodePoolPropertiesForPut.  # noqa: E501

        The number of worker nodes of the node pool.  # noqa: E501

        :return: The node_count of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: int
        """
        return self._node_count

    @node_count.setter
    def node_count(self, node_count):
        """Sets the node_count of this KubernetesNodePoolPropertiesForPut.

        The number of worker nodes of the node pool.  # noqa: E501

        :param node_count: The node_count of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type node_count: int
        """
        if self.local_vars_configuration.client_side_validation and node_count is None:  # noqa: E501
            raise ValueError("Invalid value for `node_count`, must not be `None`")  # noqa: E501

        self._node_count = node_count

    @property
    def server_type(self):
        """Gets the server_type of this KubernetesNodePoolPropertiesForPut.  # noqa: E501


        :return: The server_type of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: KubernetesNodePoolServerType
        """
        return self._server_type

    @server_type.setter
    def server_type(self, server_type):
        """Sets the server_type of this KubernetesNodePoolPropertiesForPut.


        :param server_type: The server_type of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type server_type: KubernetesNodePoolServerType
        """

        self._server_type = server_type

    @property
    def k8s_version(self):
        """Gets the k8s_version of this KubernetesNodePoolPropertiesForPut.  # noqa: E501

        The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions.  # noqa: E501

        :return: The k8s_version of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: str
        """
        return self._k8s_version

    @k8s_version.setter
    def k8s_version(self, k8s_version):
        """Sets the k8s_version of this KubernetesNodePoolPropertiesForPut.

        The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions.  # noqa: E501

        :param k8s_version: The k8s_version of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type k8s_version: str
        """

        self._k8s_version = k8s_version

    @property
    def maintenance_window(self):
        """Gets the maintenance_window of this KubernetesNodePoolPropertiesForPut.  # noqa: E501


        :return: The maintenance_window of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: KubernetesMaintenanceWindow
        """
        return self._maintenance_window

    @maintenance_window.setter
    def maintenance_window(self, maintenance_window):
        """Sets the maintenance_window of this KubernetesNodePoolPropertiesForPut.


        :param maintenance_window: The maintenance_window of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type maintenance_window: KubernetesMaintenanceWindow
        """

        self._maintenance_window = maintenance_window

    @property
    def auto_scaling(self):
        """Gets the auto_scaling of this KubernetesNodePoolPropertiesForPut.  # noqa: E501


        :return: The auto_scaling of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: KubernetesAutoScaling
        """
        return self._auto_scaling

    @auto_scaling.setter
    def auto_scaling(self, auto_scaling):
        """Sets the auto_scaling of this KubernetesNodePoolPropertiesForPut.


        :param auto_scaling: The auto_scaling of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type auto_scaling: KubernetesAutoScaling
        """

        self._auto_scaling = auto_scaling

    @property
    def lans(self):
        """Gets the lans of this KubernetesNodePoolPropertiesForPut.  # noqa: E501

        The array of existing private LANs to attach to worker nodes.  # noqa: E501

        :return: The lans of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: list[KubernetesNodePoolLan]
        """
        return self._lans

    @lans.setter
    def lans(self, lans):
        """Sets the lans of this KubernetesNodePoolPropertiesForPut.

        The array of existing private LANs to attach to worker nodes.  # noqa: E501

        :param lans: The lans of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type lans: list[KubernetesNodePoolLan]
        """

        self._lans = lans

    @property
    def labels(self):
        """Gets the labels of this KubernetesNodePoolPropertiesForPut.  # noqa: E501

        The labels attached to the node pool.  # noqa: E501

        :return: The labels of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._labels

    @labels.setter
    def labels(self, labels):
        """Sets the labels of this KubernetesNodePoolPropertiesForPut.

        The labels attached to the node pool.  # noqa: E501

        :param labels: The labels of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type labels: dict(str, str)
        """

        self._labels = labels

    @property
    def annotations(self):
        """Gets the annotations of this KubernetesNodePoolPropertiesForPut.  # noqa: E501

        The annotations attached to the node pool.  # noqa: E501

        :return: The annotations of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._annotations

    @annotations.setter
    def annotations(self, annotations):
        """Sets the annotations of this KubernetesNodePoolPropertiesForPut.

        The annotations attached to the node pool.  # noqa: E501

        :param annotations: The annotations of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type annotations: dict(str, str)
        """

        self._annotations = annotations

    @property
    def public_ips(self):
        """Gets the public_ips of this KubernetesNodePoolPropertiesForPut.  # noqa: E501

        Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt.  # noqa: E501

        :return: The public_ips of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :rtype: list[str]
        """
        return self._public_ips

    @public_ips.setter
    def public_ips(self, public_ips):
        """Sets the public_ips of this KubernetesNodePoolPropertiesForPut.

        Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt.  # noqa: E501

        :param public_ips: The public_ips of this KubernetesNodePoolPropertiesForPut.  # noqa: E501
        :type public_ips: list[str]
        """

        self._public_ips = public_ips
    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, KubernetesNodePoolPropertiesForPut):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, KubernetesNodePoolPropertiesForPut):
            return True

        return self.to_dict() != other.to_dict()