# 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 ImageProperties(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 = {

        'cloud_init': 'str',

        'cpu_hot_plug': 'bool',

        'cpu_hot_unplug': 'bool',

        'description': 'str',

        'disc_scsi_hot_plug': 'bool',

        'disc_scsi_hot_unplug': 'bool',

        'disc_virtio_hot_plug': 'bool',

        'disc_virtio_hot_unplug': 'bool',

        'image_aliases': 'list[str]',

        'image_type': 'str',

        'licence_type': 'str',

        'location': 'str',

        'name': 'str',

        'nic_hot_plug': 'bool',

        'nic_hot_unplug': 'bool',

        'public': 'bool',

        'ram_hot_plug': 'bool',

        'ram_hot_unplug': 'bool',

        'size': 'float',
    }

    attribute_map = {

        'cloud_init': 'cloudInit',

        'cpu_hot_plug': 'cpuHotPlug',

        'cpu_hot_unplug': 'cpuHotUnplug',

        'description': 'description',

        'disc_scsi_hot_plug': 'discScsiHotPlug',

        'disc_scsi_hot_unplug': 'discScsiHotUnplug',

        'disc_virtio_hot_plug': 'discVirtioHotPlug',

        'disc_virtio_hot_unplug': 'discVirtioHotUnplug',

        'image_aliases': 'imageAliases',

        'image_type': 'imageType',

        'licence_type': 'licenceType',

        'location': 'location',

        'name': 'name',

        'nic_hot_plug': 'nicHotPlug',

        'nic_hot_unplug': 'nicHotUnplug',

        'public': 'public',

        'ram_hot_plug': 'ramHotPlug',

        'ram_hot_unplug': 'ramHotUnplug',

        'size': 'size',
    }

    def __init__(self, cloud_init=None, cpu_hot_plug=None, cpu_hot_unplug=None, description=None, disc_scsi_hot_plug=None, disc_scsi_hot_unplug=None, disc_virtio_hot_plug=None, disc_virtio_hot_unplug=None, image_aliases=None, image_type=None, licence_type=None, location=None, name=None, nic_hot_plug=None, nic_hot_unplug=None, public=None, ram_hot_plug=None, ram_hot_unplug=None, size=None, local_vars_configuration=None):  # noqa: E501
        """ImageProperties - 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._cloud_init = None
        self._cpu_hot_plug = None
        self._cpu_hot_unplug = None
        self._description = None
        self._disc_scsi_hot_plug = None
        self._disc_scsi_hot_unplug = None
        self._disc_virtio_hot_plug = None
        self._disc_virtio_hot_unplug = None
        self._image_aliases = None
        self._image_type = None
        self._licence_type = None
        self._location = None
        self._name = None
        self._nic_hot_plug = None
        self._nic_hot_unplug = None
        self._public = None
        self._ram_hot_plug = None
        self._ram_hot_unplug = None
        self._size = None
        self.discriminator = None

        if cloud_init is not None:
            self.cloud_init = cloud_init
        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 description is not None:
            self.description = description
        if disc_scsi_hot_plug is not None:
            self.disc_scsi_hot_plug = disc_scsi_hot_plug
        if disc_scsi_hot_unplug is not None:
            self.disc_scsi_hot_unplug = disc_scsi_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 image_aliases is not None:
            self.image_aliases = image_aliases
        if image_type is not None:
            self.image_type = image_type
        self.licence_type = licence_type
        if location is not None:
            self.location = location
        if name is not None:
            self.name = name
        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 public is not None:
            self.public = public
        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 size is not None:
            self.size = size


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

        Cloud init compatibility.  # noqa: E501

        :return: The cloud_init of this ImageProperties.  # noqa: E501
        :rtype: str
        """
        return self._cloud_init

    @cloud_init.setter
    def cloud_init(self, cloud_init):
        """Sets the cloud_init of this ImageProperties.

        Cloud init compatibility.  # noqa: E501

        :param cloud_init: The cloud_init of this ImageProperties.  # noqa: E501
        :type cloud_init: str
        """
        allowed_values = ["NONE", "V1"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and cloud_init not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `cloud_init` ({0}), must be one of {1}"  # noqa: E501
                .format(cloud_init, allowed_values)
            )

        self._cloud_init = cloud_init

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

        Hot-plug capable CPU (no reboot required).  # noqa: E501

        :return: The cpu_hot_plug of this ImageProperties.  # 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 ImageProperties.

        Hot-plug capable CPU (no reboot required).  # noqa: E501

        :param cpu_hot_plug: The cpu_hot_plug of this ImageProperties.  # 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 ImageProperties.  # noqa: E501

        Hot-unplug capable CPU (no reboot required).  # noqa: E501

        :return: The cpu_hot_unplug of this ImageProperties.  # 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 ImageProperties.

        Hot-unplug capable CPU (no reboot required).  # noqa: E501

        :param cpu_hot_unplug: The cpu_hot_unplug of this ImageProperties.  # noqa: E501
        :type cpu_hot_unplug: bool
        """

        self._cpu_hot_unplug = cpu_hot_unplug

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

        Human-readable description.  # noqa: E501

        :return: The description of this ImageProperties.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ImageProperties.

        Human-readable description.  # noqa: E501

        :param description: The description of this ImageProperties.  # noqa: E501
        :type description: str
        """

        self._description = description

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

        Hot-plug capable SCSI drive (no reboot required).  # noqa: E501

        :return: The disc_scsi_hot_plug of this ImageProperties.  # 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 ImageProperties.

        Hot-plug capable SCSI drive (no reboot required).  # noqa: E501

        :param disc_scsi_hot_plug: The disc_scsi_hot_plug of this ImageProperties.  # noqa: E501
        :type disc_scsi_hot_plug: bool
        """

        self._disc_scsi_hot_plug = disc_scsi_hot_plug

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

        Hot-unplug capable SCSI drive (no reboot required). Not supported with Windows VMs.  # noqa: E501

        :return: The disc_scsi_hot_unplug of this ImageProperties.  # 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 ImageProperties.

        Hot-unplug capable SCSI drive (no reboot required). Not supported with Windows VMs.  # noqa: E501

        :param disc_scsi_hot_unplug: The disc_scsi_hot_unplug of this ImageProperties.  # noqa: E501
        :type disc_scsi_hot_unplug: bool
        """

        self._disc_scsi_hot_unplug = disc_scsi_hot_unplug

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

        Hot-plug capable Virt-IO drive (no reboot required).  # noqa: E501

        :return: The disc_virtio_hot_plug of this ImageProperties.  # 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 ImageProperties.

        Hot-plug capable Virt-IO drive (no reboot required).  # noqa: E501

        :param disc_virtio_hot_plug: The disc_virtio_hot_plug of this ImageProperties.  # 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 ImageProperties.  # 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 ImageProperties.  # 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 ImageProperties.

        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 ImageProperties.  # noqa: E501
        :type disc_virtio_hot_unplug: bool
        """

        self._disc_virtio_hot_unplug = disc_virtio_hot_unplug

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

        List of image aliases mapped for this image  # noqa: E501

        :return: The image_aliases of this ImageProperties.  # noqa: E501
        :rtype: list[str]
        """
        return self._image_aliases

    @image_aliases.setter
    def image_aliases(self, image_aliases):
        """Sets the image_aliases of this ImageProperties.

        List of image aliases mapped for this image  # noqa: E501

        :param image_aliases: The image_aliases of this ImageProperties.  # noqa: E501
        :type image_aliases: list[str]
        """

        self._image_aliases = image_aliases

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

        The image type.  # noqa: E501

        :return: The image_type of this ImageProperties.  # noqa: E501
        :rtype: str
        """
        return self._image_type

    @image_type.setter
    def image_type(self, image_type):
        """Sets the image_type of this ImageProperties.

        The image type.  # noqa: E501

        :param image_type: The image_type of this ImageProperties.  # noqa: E501
        :type image_type: str
        """
        allowed_values = ["HDD", "CDROM", "UNKNOWN"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and image_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `image_type` ({0}), must be one of {1}"  # noqa: E501
                .format(image_type, allowed_values)
            )

        self._image_type = image_type

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

        The OS type of this image.  # noqa: E501

        :return: The licence_type of this ImageProperties.  # noqa: E501
        :rtype: str
        """
        return self._licence_type

    @licence_type.setter
    def licence_type(self, licence_type):
        """Sets the licence_type of this ImageProperties.

        The OS type of this image.  # noqa: E501

        :param licence_type: The licence_type of this ImageProperties.  # noqa: E501
        :type licence_type: str
        """
        if self.local_vars_configuration.client_side_validation and licence_type is None:  # noqa: E501
            raise ValueError("Invalid value for `licence_type`, must not be `None`")  # noqa: E501
        allowed_values = ["UNKNOWN", "WINDOWS", "WINDOWS2016", "WINDOWS2022", "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 location(self):
        """Gets the location of this ImageProperties.  # noqa: E501

        The location of this image/snapshot.  # noqa: E501

        :return: The location of this ImageProperties.  # noqa: E501
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this ImageProperties.

        The location of this image/snapshot.  # noqa: E501

        :param location: The location of this ImageProperties.  # noqa: E501
        :type location: str
        """

        self._location = location

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

        The resource name.  # noqa: E501

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

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

        The resource name.  # noqa: E501

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

        self._name = name

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

        Hot-plug capable NIC (no reboot required).  # noqa: E501

        :return: The nic_hot_plug of this ImageProperties.  # 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 ImageProperties.

        Hot-plug capable NIC (no reboot required).  # noqa: E501

        :param nic_hot_plug: The nic_hot_plug of this ImageProperties.  # 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 ImageProperties.  # noqa: E501

        Hot-unplug capable NIC (no reboot required).  # noqa: E501

        :return: The nic_hot_unplug of this ImageProperties.  # 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 ImageProperties.

        Hot-unplug capable NIC (no reboot required).  # noqa: E501

        :param nic_hot_unplug: The nic_hot_unplug of this ImageProperties.  # noqa: E501
        :type nic_hot_unplug: bool
        """

        self._nic_hot_unplug = nic_hot_unplug

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

        Indicates whether the image is part of a public repository.  # noqa: E501

        :return: The public of this ImageProperties.  # noqa: E501
        :rtype: bool
        """
        return self._public

    @public.setter
    def public(self, public):
        """Sets the public of this ImageProperties.

        Indicates whether the image is part of a public repository.  # noqa: E501

        :param public: The public of this ImageProperties.  # noqa: E501
        :type public: bool
        """

        self._public = public

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

        Hot-plug capable RAM (no reboot required).  # noqa: E501

        :return: The ram_hot_plug of this ImageProperties.  # 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 ImageProperties.

        Hot-plug capable RAM (no reboot required).  # noqa: E501

        :param ram_hot_plug: The ram_hot_plug of this ImageProperties.  # 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 ImageProperties.  # noqa: E501

        Hot-unplug capable RAM (no reboot required).  # noqa: E501

        :return: The ram_hot_unplug of this ImageProperties.  # 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 ImageProperties.

        Hot-unplug capable RAM (no reboot required).  # noqa: E501

        :param ram_hot_unplug: The ram_hot_unplug of this ImageProperties.  # noqa: E501
        :type ram_hot_unplug: bool
        """

        self._ram_hot_unplug = ram_hot_unplug

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

        The image size in GB.  # noqa: E501

        :return: The size of this ImageProperties.  # noqa: E501
        :rtype: float
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this ImageProperties.

        The image size in GB.  # noqa: E501

        :param size: The size of this ImageProperties.  # noqa: E501
        :type size: float
        """

        self._size = size
    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, ImageProperties):
            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, ImageProperties):
            return True

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