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 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670
|
# 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 SnapshotProperties(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',
'description': 'str',
'location': 'str',
'size': 'float',
'sec_auth_protection': 'bool',
'cpu_hot_plug': 'bool',
'cpu_hot_unplug': 'bool',
'ram_hot_plug': 'bool',
'ram_hot_unplug': 'bool',
'nic_hot_plug': 'bool',
'nic_hot_unplug': 'bool',
'disc_virtio_hot_plug': 'bool',
'disc_virtio_hot_unplug': 'bool',
'disc_scsi_hot_plug': 'bool',
'expose_serial': 'bool',
'require_legacy_bios': 'bool',
'disc_scsi_hot_unplug': 'bool',
'licence_type': 'str',
'application_type': 'str',
}
attribute_map = {
'name': 'name',
'description': 'description',
'location': 'location',
'size': 'size',
'sec_auth_protection': 'secAuthProtection',
'cpu_hot_plug': 'cpuHotPlug',
'cpu_hot_unplug': 'cpuHotUnplug',
'ram_hot_plug': 'ramHotPlug',
'ram_hot_unplug': 'ramHotUnplug',
'nic_hot_plug': 'nicHotPlug',
'nic_hot_unplug': 'nicHotUnplug',
'disc_virtio_hot_plug': 'discVirtioHotPlug',
'disc_virtio_hot_unplug': 'discVirtioHotUnplug',
'disc_scsi_hot_plug': 'discScsiHotPlug',
'expose_serial': 'exposeSerial',
'require_legacy_bios': 'requireLegacyBios',
'disc_scsi_hot_unplug': 'discScsiHotUnplug',
'licence_type': 'licenceType',
'application_type': 'applicationType',
}
def __init__(self, name=None, description=None, location=None, size=None, sec_auth_protection=None, cpu_hot_plug=None, cpu_hot_unplug=None, ram_hot_plug=None, ram_hot_unplug=None, nic_hot_plug=None, nic_hot_unplug=None, disc_virtio_hot_plug=None, disc_virtio_hot_unplug=None, disc_scsi_hot_plug=None, expose_serial=False, require_legacy_bios=True, disc_scsi_hot_unplug=None, licence_type=None, application_type=None, local_vars_configuration=None): # noqa: E501
"""SnapshotProperties - 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._description = None
self._location = None
self._size = None
self._sec_auth_protection = None
self._cpu_hot_plug = None
self._cpu_hot_unplug = None
self._ram_hot_plug = None
self._ram_hot_unplug = None
self._nic_hot_plug = None
self._nic_hot_unplug = None
self._disc_virtio_hot_plug = None
self._disc_virtio_hot_unplug = None
self._disc_scsi_hot_plug = None
self._expose_serial = None
self._require_legacy_bios = None
self._disc_scsi_hot_unplug = None
self._licence_type = None
self._application_type = None
self.discriminator = None
if name is not None:
self.name = name
if description is not None:
self.description = description
if location is not None:
self.location = location
if size is not None:
self.size = size
if sec_auth_protection is not None:
self.sec_auth_protection = sec_auth_protection
if cpu_hot_plug is not None:
self.cpu_hot_plug = cpu_hot_plug
if cpu_hot_unplug is not None:
self.cpu_hot_unplug = cpu_hot_unplug
if ram_hot_plug is not None:
self.ram_hot_plug = ram_hot_plug
if ram_hot_unplug is not None:
self.ram_hot_unplug = ram_hot_unplug
if nic_hot_plug is not None:
self.nic_hot_plug = nic_hot_plug
if nic_hot_unplug is not None:
self.nic_hot_unplug = nic_hot_unplug
if disc_virtio_hot_plug is not None:
self.disc_virtio_hot_plug = disc_virtio_hot_plug
if disc_virtio_hot_unplug is not None:
self.disc_virtio_hot_unplug = disc_virtio_hot_unplug
if disc_scsi_hot_plug is not None:
self.disc_scsi_hot_plug = disc_scsi_hot_plug
if expose_serial is not None:
self.expose_serial = expose_serial
if require_legacy_bios is not None:
self.require_legacy_bios = require_legacy_bios
if disc_scsi_hot_unplug is not None:
self.disc_scsi_hot_unplug = disc_scsi_hot_unplug
if licence_type is not None:
self.licence_type = licence_type
if application_type is not None:
self.application_type = application_type
@property
def name(self):
"""Gets the name of this SnapshotProperties. # noqa: E501
The name of the resource. # noqa: E501
:return: The name of this SnapshotProperties. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this SnapshotProperties.
The name of the resource. # noqa: E501
:param name: The name of this SnapshotProperties. # noqa: E501
:type name: str
"""
self._name = name
@property
def description(self):
"""Gets the description of this SnapshotProperties. # noqa: E501
Human-readable description. # noqa: E501
:return: The description of this SnapshotProperties. # noqa: E501
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this SnapshotProperties.
Human-readable description. # noqa: E501
:param description: The description of this SnapshotProperties. # noqa: E501
:type description: str
"""
self._description = description
@property
def location(self):
"""Gets the location of this SnapshotProperties. # noqa: E501
Location of that image/snapshot. # noqa: E501
:return: The location of this SnapshotProperties. # noqa: E501
:rtype: str
"""
return self._location
@location.setter
def location(self, location):
"""Sets the location of this SnapshotProperties.
Location of that image/snapshot. # noqa: E501
:param location: The location of this SnapshotProperties. # noqa: E501
:type location: str
"""
self._location = location
@property
def size(self):
"""Gets the size of this SnapshotProperties. # noqa: E501
The size of the image in GB. # noqa: E501
:return: The size of this SnapshotProperties. # noqa: E501
:rtype: float
"""
return self._size
@size.setter
def size(self, size):
"""Sets the size of this SnapshotProperties.
The size of the image in GB. # noqa: E501
:param size: The size of this SnapshotProperties. # noqa: E501
:type size: float
"""
self._size = size
@property
def sec_auth_protection(self):
"""Gets the sec_auth_protection of this SnapshotProperties. # noqa: E501
Boolean value representing if the snapshot requires extra protection, such as two-step verification. # noqa: E501
:return: The sec_auth_protection of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._sec_auth_protection
@sec_auth_protection.setter
def sec_auth_protection(self, sec_auth_protection):
"""Sets the sec_auth_protection of this SnapshotProperties.
Boolean value representing if the snapshot requires extra protection, such as two-step verification. # noqa: E501
:param sec_auth_protection: The sec_auth_protection of this SnapshotProperties. # noqa: E501
:type sec_auth_protection: bool
"""
self._sec_auth_protection = sec_auth_protection
@property
def cpu_hot_plug(self):
"""Gets the cpu_hot_plug of this SnapshotProperties. # noqa: E501
Hot-plug capable CPU (no reboot required). # noqa: E501
:return: The cpu_hot_plug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._cpu_hot_plug
@cpu_hot_plug.setter
def cpu_hot_plug(self, cpu_hot_plug):
"""Sets the cpu_hot_plug of this SnapshotProperties.
Hot-plug capable CPU (no reboot required). # noqa: E501
:param cpu_hot_plug: The cpu_hot_plug of this SnapshotProperties. # noqa: E501
:type cpu_hot_plug: bool
"""
self._cpu_hot_plug = cpu_hot_plug
@property
def cpu_hot_unplug(self):
"""Gets the cpu_hot_unplug of this SnapshotProperties. # noqa: E501
Hot-unplug capable CPU (no reboot required). # noqa: E501
:return: The cpu_hot_unplug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._cpu_hot_unplug
@cpu_hot_unplug.setter
def cpu_hot_unplug(self, cpu_hot_unplug):
"""Sets the cpu_hot_unplug of this SnapshotProperties.
Hot-unplug capable CPU (no reboot required). # noqa: E501
:param cpu_hot_unplug: The cpu_hot_unplug of this SnapshotProperties. # noqa: E501
:type cpu_hot_unplug: bool
"""
self._cpu_hot_unplug = cpu_hot_unplug
@property
def ram_hot_plug(self):
"""Gets the ram_hot_plug of this SnapshotProperties. # noqa: E501
Hot-plug capable RAM (no reboot required). # noqa: E501
:return: The ram_hot_plug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._ram_hot_plug
@ram_hot_plug.setter
def ram_hot_plug(self, ram_hot_plug):
"""Sets the ram_hot_plug of this SnapshotProperties.
Hot-plug capable RAM (no reboot required). # noqa: E501
:param ram_hot_plug: The ram_hot_plug of this SnapshotProperties. # noqa: E501
:type ram_hot_plug: bool
"""
self._ram_hot_plug = ram_hot_plug
@property
def ram_hot_unplug(self):
"""Gets the ram_hot_unplug of this SnapshotProperties. # noqa: E501
Hot-unplug capable RAM (no reboot required). # noqa: E501
:return: The ram_hot_unplug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._ram_hot_unplug
@ram_hot_unplug.setter
def ram_hot_unplug(self, ram_hot_unplug):
"""Sets the ram_hot_unplug of this SnapshotProperties.
Hot-unplug capable RAM (no reboot required). # noqa: E501
:param ram_hot_unplug: The ram_hot_unplug of this SnapshotProperties. # noqa: E501
:type ram_hot_unplug: bool
"""
self._ram_hot_unplug = ram_hot_unplug
@property
def nic_hot_plug(self):
"""Gets the nic_hot_plug of this SnapshotProperties. # noqa: E501
Hot-plug capable NIC (no reboot required). # noqa: E501
:return: The nic_hot_plug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._nic_hot_plug
@nic_hot_plug.setter
def nic_hot_plug(self, nic_hot_plug):
"""Sets the nic_hot_plug of this SnapshotProperties.
Hot-plug capable NIC (no reboot required). # noqa: E501
:param nic_hot_plug: The nic_hot_plug of this SnapshotProperties. # noqa: E501
:type nic_hot_plug: bool
"""
self._nic_hot_plug = nic_hot_plug
@property
def nic_hot_unplug(self):
"""Gets the nic_hot_unplug of this SnapshotProperties. # noqa: E501
Hot-unplug capable NIC (no reboot required). # noqa: E501
:return: The nic_hot_unplug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._nic_hot_unplug
@nic_hot_unplug.setter
def nic_hot_unplug(self, nic_hot_unplug):
"""Sets the nic_hot_unplug of this SnapshotProperties.
Hot-unplug capable NIC (no reboot required). # noqa: E501
:param nic_hot_unplug: The nic_hot_unplug of this SnapshotProperties. # noqa: E501
:type nic_hot_unplug: bool
"""
self._nic_hot_unplug = nic_hot_unplug
@property
def disc_virtio_hot_plug(self):
"""Gets the disc_virtio_hot_plug of this SnapshotProperties. # noqa: E501
Hot-plug capable Virt-IO drive (no reboot required). # noqa: E501
:return: The disc_virtio_hot_plug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._disc_virtio_hot_plug
@disc_virtio_hot_plug.setter
def disc_virtio_hot_plug(self, disc_virtio_hot_plug):
"""Sets the disc_virtio_hot_plug of this SnapshotProperties.
Hot-plug capable Virt-IO drive (no reboot required). # noqa: E501
:param disc_virtio_hot_plug: The disc_virtio_hot_plug of this SnapshotProperties. # noqa: E501
:type disc_virtio_hot_plug: bool
"""
self._disc_virtio_hot_plug = disc_virtio_hot_plug
@property
def disc_virtio_hot_unplug(self):
"""Gets the disc_virtio_hot_unplug of this SnapshotProperties. # noqa: E501
Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. # noqa: E501
:return: The disc_virtio_hot_unplug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._disc_virtio_hot_unplug
@disc_virtio_hot_unplug.setter
def disc_virtio_hot_unplug(self, disc_virtio_hot_unplug):
"""Sets the disc_virtio_hot_unplug of this SnapshotProperties.
Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. # noqa: E501
:param disc_virtio_hot_unplug: The disc_virtio_hot_unplug of this SnapshotProperties. # noqa: E501
:type disc_virtio_hot_unplug: bool
"""
self._disc_virtio_hot_unplug = disc_virtio_hot_unplug
@property
def disc_scsi_hot_plug(self):
"""Gets the disc_scsi_hot_plug of this SnapshotProperties. # noqa: E501
Hot-plug capable SCSI drive (no reboot required). # noqa: E501
:return: The disc_scsi_hot_plug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._disc_scsi_hot_plug
@disc_scsi_hot_plug.setter
def disc_scsi_hot_plug(self, disc_scsi_hot_plug):
"""Sets the disc_scsi_hot_plug of this SnapshotProperties.
Hot-plug capable SCSI drive (no reboot required). # noqa: E501
:param disc_scsi_hot_plug: The disc_scsi_hot_plug of this SnapshotProperties. # noqa: E501
:type disc_scsi_hot_plug: bool
"""
self._disc_scsi_hot_plug = disc_scsi_hot_plug
@property
def expose_serial(self):
"""Gets the expose_serial of this SnapshotProperties. # noqa: E501
If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior # noqa: E501
:return: The expose_serial of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._expose_serial
@expose_serial.setter
def expose_serial(self, expose_serial):
"""Sets the expose_serial of this SnapshotProperties.
If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior # noqa: E501
:param expose_serial: The expose_serial of this SnapshotProperties. # noqa: E501
:type expose_serial: bool
"""
self._expose_serial = expose_serial
@property
def require_legacy_bios(self):
"""Gets the require_legacy_bios of this SnapshotProperties. # noqa: E501
Indicates if the image requires the legacy BIOS for compatibility or specific needs. # noqa: E501
:return: The require_legacy_bios of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._require_legacy_bios
@require_legacy_bios.setter
def require_legacy_bios(self, require_legacy_bios):
"""Sets the require_legacy_bios of this SnapshotProperties.
Indicates if the image requires the legacy BIOS for compatibility or specific needs. # noqa: E501
:param require_legacy_bios: The require_legacy_bios of this SnapshotProperties. # noqa: E501
:type require_legacy_bios: bool
"""
self._require_legacy_bios = require_legacy_bios
@property
def disc_scsi_hot_unplug(self):
"""Gets the disc_scsi_hot_unplug of this SnapshotProperties. # noqa: E501
Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines. # noqa: E501
:return: The disc_scsi_hot_unplug of this SnapshotProperties. # noqa: E501
:rtype: bool
"""
return self._disc_scsi_hot_unplug
@disc_scsi_hot_unplug.setter
def disc_scsi_hot_unplug(self, disc_scsi_hot_unplug):
"""Sets the disc_scsi_hot_unplug of this SnapshotProperties.
Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines. # noqa: E501
:param disc_scsi_hot_unplug: The disc_scsi_hot_unplug of this SnapshotProperties. # noqa: E501
:type disc_scsi_hot_unplug: bool
"""
self._disc_scsi_hot_unplug = disc_scsi_hot_unplug
@property
def licence_type(self):
"""Gets the licence_type of this SnapshotProperties. # noqa: E501
OS type of this snapshot # noqa: E501
:return: The licence_type of this SnapshotProperties. # noqa: E501
:rtype: str
"""
return self._licence_type
@licence_type.setter
def licence_type(self, licence_type):
"""Sets the licence_type of this SnapshotProperties.
OS type of this snapshot # noqa: E501
:param licence_type: The licence_type of this SnapshotProperties. # noqa: E501
:type licence_type: str
"""
allowed_values = ["UNKNOWN", "WINDOWS", "WINDOWS2016", "WINDOWS2019", "WINDOWS2022", "WINDOWS2025", "RHEL", "LINUX", "OTHER"] # noqa: E501
if self.local_vars_configuration.client_side_validation and licence_type not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `licence_type` ({0}), must be one of {1}" # noqa: E501
.format(licence_type, allowed_values)
)
self._licence_type = licence_type
@property
def application_type(self):
"""Gets the application_type of this SnapshotProperties. # noqa: E501
The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501
:return: The application_type of this SnapshotProperties. # noqa: E501
:rtype: str
"""
return self._application_type
@application_type.setter
def application_type(self, application_type):
"""Sets the application_type of this SnapshotProperties.
The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN. # noqa: E501
:param application_type: The application_type of this SnapshotProperties. # noqa: E501
:type application_type: str
"""
self._application_type = application_type
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, SnapshotProperties):
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, SnapshotProperties):
return True
return self.to_dict() != other.to_dict()
|