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 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618
|
# 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 KubernetesNodePoolPropertiesForPost(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',
'datacenter_id': 'str',
'node_count': 'int',
'cpu_family': 'str',
'server_type': 'KubernetesNodePoolServerType',
'cores_count': 'int',
'ram_size': 'int',
'availability_zone': 'str',
'storage_type': 'str',
'storage_size': 'int',
'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',
'datacenter_id': 'datacenterId',
'node_count': 'nodeCount',
'cpu_family': 'cpuFamily',
'server_type': 'serverType',
'cores_count': 'coresCount',
'ram_size': 'ramSize',
'availability_zone': 'availabilityZone',
'storage_type': 'storageType',
'storage_size': 'storageSize',
'k8s_version': 'k8sVersion',
'maintenance_window': 'maintenanceWindow',
'auto_scaling': 'autoScaling',
'lans': 'lans',
'labels': 'labels',
'annotations': 'annotations',
'public_ips': 'publicIps',
}
def __init__(self, name=None, datacenter_id=None, node_count=None, cpu_family=None, server_type=None, cores_count=None, ram_size=None, availability_zone=None, storage_type=None, storage_size=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
"""KubernetesNodePoolPropertiesForPost - 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._datacenter_id = None
self._node_count = None
self._cpu_family = None
self._server_type = None
self._cores_count = None
self._ram_size = None
self._availability_zone = None
self._storage_type = None
self._storage_size = 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
self.name = name
self.datacenter_id = datacenter_id
self.node_count = node_count
if cpu_family is not None:
self.cpu_family = cpu_family
if server_type is not None:
self.server_type = server_type
self.cores_count = cores_count
self.ram_size = ram_size
self.availability_zone = availability_zone
self.storage_type = storage_type
self.storage_size = storage_size
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 KubernetesNodePoolPropertiesForPost. # 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 KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this KubernetesNodePoolPropertiesForPost.
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 KubernetesNodePoolPropertiesForPost. # noqa: E501
:type name: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name
@property
def datacenter_id(self):
"""Gets the datacenter_id of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. # noqa: E501
:return: The datacenter_id of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: str
"""
return self._datacenter_id
@datacenter_id.setter
def datacenter_id(self, datacenter_id):
"""Sets the datacenter_id of this KubernetesNodePoolPropertiesForPost.
The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. # noqa: E501
:param datacenter_id: The datacenter_id of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type datacenter_id: str
"""
if self.local_vars_configuration.client_side_validation and datacenter_id is None: # noqa: E501
raise ValueError("Invalid value for `datacenter_id`, must not be `None`") # noqa: E501
self._datacenter_id = datacenter_id
@property
def node_count(self):
"""Gets the node_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The number of worker nodes of the node pool. # noqa: E501
:return: The node_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: int
"""
return self._node_count
@node_count.setter
def node_count(self, node_count):
"""Sets the node_count of this KubernetesNodePoolPropertiesForPost.
The number of worker nodes of the node pool. # noqa: E501
:param node_count: The node_count of this KubernetesNodePoolPropertiesForPost. # 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 cpu_family(self):
"""Gets the cpu_family of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The CPU type for the nodes. # noqa: E501
:return: The cpu_family of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: str
"""
return self._cpu_family
@cpu_family.setter
def cpu_family(self, cpu_family):
"""Sets the cpu_family of this KubernetesNodePoolPropertiesForPost.
The CPU type for the nodes. # noqa: E501
:param cpu_family: The cpu_family of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type cpu_family: str
"""
self._cpu_family = cpu_family
@property
def server_type(self):
"""Gets the server_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:return: The server_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: KubernetesNodePoolServerType
"""
return self._server_type
@server_type.setter
def server_type(self, server_type):
"""Sets the server_type of this KubernetesNodePoolPropertiesForPost.
:param server_type: The server_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type server_type: KubernetesNodePoolServerType
"""
self._server_type = server_type
@property
def cores_count(self):
"""Gets the cores_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The total number of cores for the nodes. # noqa: E501
:return: The cores_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: int
"""
return self._cores_count
@cores_count.setter
def cores_count(self, cores_count):
"""Sets the cores_count of this KubernetesNodePoolPropertiesForPost.
The total number of cores for the nodes. # noqa: E501
:param cores_count: The cores_count of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type cores_count: int
"""
if self.local_vars_configuration.client_side_validation and cores_count is None: # noqa: E501
raise ValueError("Invalid value for `cores_count`, must not be `None`") # noqa: E501
self._cores_count = cores_count
@property
def ram_size(self):
"""Gets the ram_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. # noqa: E501
:return: The ram_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: int
"""
return self._ram_size
@ram_size.setter
def ram_size(self, ram_size):
"""Sets the ram_size of this KubernetesNodePoolPropertiesForPost.
The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. # noqa: E501
:param ram_size: The ram_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type ram_size: int
"""
if self.local_vars_configuration.client_side_validation and ram_size is None: # noqa: E501
raise ValueError("Invalid value for `ram_size`, must not be `None`") # noqa: E501
self._ram_size = ram_size
@property
def availability_zone(self):
"""Gets the availability_zone of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The availability zone in which the target VM should be provisioned. # noqa: E501
:return: The availability_zone of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: str
"""
return self._availability_zone
@availability_zone.setter
def availability_zone(self, availability_zone):
"""Sets the availability_zone of this KubernetesNodePoolPropertiesForPost.
The availability zone in which the target VM should be provisioned. # noqa: E501
:param availability_zone: The availability_zone of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type availability_zone: str
"""
if self.local_vars_configuration.client_side_validation and availability_zone is None: # noqa: E501
raise ValueError("Invalid value for `availability_zone`, must not be `None`") # noqa: E501
allowed_values = ["AUTO", "ZONE_1", "ZONE_2"] # noqa: E501
if self.local_vars_configuration.client_side_validation and availability_zone not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `availability_zone` ({0}), must be one of {1}" # noqa: E501
.format(availability_zone, allowed_values)
)
self._availability_zone = availability_zone
@property
def storage_type(self):
"""Gets the storage_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The storage type for the nodes. # noqa: E501
:return: The storage_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: str
"""
return self._storage_type
@storage_type.setter
def storage_type(self, storage_type):
"""Sets the storage_type of this KubernetesNodePoolPropertiesForPost.
The storage type for the nodes. # noqa: E501
:param storage_type: The storage_type of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type storage_type: str
"""
if self.local_vars_configuration.client_side_validation and storage_type is None: # noqa: E501
raise ValueError("Invalid value for `storage_type`, must not be `None`") # noqa: E501
allowed_values = ["HDD", "SSD"] # noqa: E501
if self.local_vars_configuration.client_side_validation and storage_type not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `storage_type` ({0}), must be one of {1}" # noqa: E501
.format(storage_type, allowed_values)
)
self._storage_type = storage_type
@property
def storage_size(self):
"""Gets the storage_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. # noqa: E501
:return: The storage_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: int
"""
return self._storage_size
@storage_size.setter
def storage_size(self, storage_size):
"""Sets the storage_size of this KubernetesNodePoolPropertiesForPost.
The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. # noqa: E501
:param storage_size: The storage_size of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type storage_size: int
"""
if self.local_vars_configuration.client_side_validation and storage_size is None: # noqa: E501
raise ValueError("Invalid value for `storage_size`, must not be `None`") # noqa: E501
self._storage_size = storage_size
@property
def k8s_version(self):
"""Gets the k8s_version of this KubernetesNodePoolPropertiesForPost. # 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 KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: str
"""
return self._k8s_version
@k8s_version.setter
def k8s_version(self, k8s_version):
"""Sets the k8s_version of this KubernetesNodePoolPropertiesForPost.
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 KubernetesNodePoolPropertiesForPost. # noqa: E501
:type k8s_version: str
"""
self._k8s_version = k8s_version
@property
def maintenance_window(self):
"""Gets the maintenance_window of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:return: The maintenance_window of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: KubernetesMaintenanceWindow
"""
return self._maintenance_window
@maintenance_window.setter
def maintenance_window(self, maintenance_window):
"""Sets the maintenance_window of this KubernetesNodePoolPropertiesForPost.
:param maintenance_window: The maintenance_window of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type maintenance_window: KubernetesMaintenanceWindow
"""
self._maintenance_window = maintenance_window
@property
def auto_scaling(self):
"""Gets the auto_scaling of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:return: The auto_scaling of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: KubernetesAutoScaling
"""
return self._auto_scaling
@auto_scaling.setter
def auto_scaling(self, auto_scaling):
"""Sets the auto_scaling of this KubernetesNodePoolPropertiesForPost.
:param auto_scaling: The auto_scaling of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type auto_scaling: KubernetesAutoScaling
"""
self._auto_scaling = auto_scaling
@property
def lans(self):
"""Gets the lans of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The array of existing private LANs to attach to worker nodes. # noqa: E501
:return: The lans of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: list[KubernetesNodePoolLan]
"""
return self._lans
@lans.setter
def lans(self, lans):
"""Sets the lans of this KubernetesNodePoolPropertiesForPost.
The array of existing private LANs to attach to worker nodes. # noqa: E501
:param lans: The lans of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type lans: list[KubernetesNodePoolLan]
"""
self._lans = lans
@property
def labels(self):
"""Gets the labels of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The labels attached to the node pool. # noqa: E501
:return: The labels of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: dict(str, str)
"""
return self._labels
@labels.setter
def labels(self, labels):
"""Sets the labels of this KubernetesNodePoolPropertiesForPost.
The labels attached to the node pool. # noqa: E501
:param labels: The labels of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type labels: dict(str, str)
"""
self._labels = labels
@property
def annotations(self):
"""Gets the annotations of this KubernetesNodePoolPropertiesForPost. # noqa: E501
The annotations attached to the node pool. # noqa: E501
:return: The annotations of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: dict(str, str)
"""
return self._annotations
@annotations.setter
def annotations(self, annotations):
"""Sets the annotations of this KubernetesNodePoolPropertiesForPost.
The annotations attached to the node pool. # noqa: E501
:param annotations: The annotations of this KubernetesNodePoolPropertiesForPost. # noqa: E501
:type annotations: dict(str, str)
"""
self._annotations = annotations
@property
def public_ips(self):
"""Gets the public_ips of this KubernetesNodePoolPropertiesForPost. # 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 KubernetesNodePoolPropertiesForPost. # noqa: E501
:rtype: list[str]
"""
return self._public_ips
@public_ips.setter
def public_ips(self, public_ips):
"""Sets the public_ips of this KubernetesNodePoolPropertiesForPost.
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 KubernetesNodePoolPropertiesForPost. # 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, KubernetesNodePoolPropertiesForPost):
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, KubernetesNodePoolPropertiesForPost):
return True
return self.to_dict() != other.to_dict()
|