# coding: utf-8

"""
    KubeVirt API

    This is KubeVirt API an add-on for Kubernetes.  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: kubevirt-dev@googlegroups.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from kubevirt.configuration import Configuration


class V1beta1VirtualMachinePoolScaleInStrategy(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'opportunistic': 'V1beta1VirtualMachinePoolOpportunisticScaleInStrategy',
        'proactive': 'V1beta1VirtualMachinePoolProactiveScaleInStrategy',
        'unmanaged': 'V1beta1VirtualMachinePoolUnmanagedStrategy'
    }

    attribute_map = {
        'opportunistic': 'opportunistic',
        'proactive': 'proactive',
        'unmanaged': 'unmanaged'
    }

    def __init__(self, opportunistic=None, proactive=None, unmanaged=None, _configuration=None):  # noqa: E501
        """V1beta1VirtualMachinePoolScaleInStrategy - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._opportunistic = None
        self._proactive = None
        self._unmanaged = None
        self.discriminator = None

        if opportunistic is not None:
            self.opportunistic = opportunistic
        if proactive is not None:
            self.proactive = proactive
        if unmanaged is not None:
            self.unmanaged = unmanaged

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

        Opportunistic scale-in is a strategy when vms are deleted by some other means than the scale-in action. For example, when the VM is deleted by the user or when the VM is deleted by the node that is hosting the VM.  # noqa: E501

        :return: The opportunistic of this V1beta1VirtualMachinePoolScaleInStrategy.  # noqa: E501
        :rtype: V1beta1VirtualMachinePoolOpportunisticScaleInStrategy
        """
        return self._opportunistic

    @opportunistic.setter
    def opportunistic(self, opportunistic):
        """Sets the opportunistic of this V1beta1VirtualMachinePoolScaleInStrategy.

        Opportunistic scale-in is a strategy when vms are deleted by some other means than the scale-in action. For example, when the VM is deleted by the user or when the VM is deleted by the node that is hosting the VM.  # noqa: E501

        :param opportunistic: The opportunistic of this V1beta1VirtualMachinePoolScaleInStrategy.  # noqa: E501
        :type: V1beta1VirtualMachinePoolOpportunisticScaleInStrategy
        """

        self._opportunistic = opportunistic

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

        Proactive scale-in by forcing VMs to shutdown during scale-in (Default)  # noqa: E501

        :return: The proactive of this V1beta1VirtualMachinePoolScaleInStrategy.  # noqa: E501
        :rtype: V1beta1VirtualMachinePoolProactiveScaleInStrategy
        """
        return self._proactive

    @proactive.setter
    def proactive(self, proactive):
        """Sets the proactive of this V1beta1VirtualMachinePoolScaleInStrategy.

        Proactive scale-in by forcing VMs to shutdown during scale-in (Default)  # noqa: E501

        :param proactive: The proactive of this V1beta1VirtualMachinePoolScaleInStrategy.  # noqa: E501
        :type: V1beta1VirtualMachinePoolProactiveScaleInStrategy
        """

        self._proactive = proactive

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

        The VM is never touched after creation. Users are responsible for scaling in the pool manually.  # noqa: E501

        :return: The unmanaged of this V1beta1VirtualMachinePoolScaleInStrategy.  # noqa: E501
        :rtype: V1beta1VirtualMachinePoolUnmanagedStrategy
        """
        return self._unmanaged

    @unmanaged.setter
    def unmanaged(self, unmanaged):
        """Sets the unmanaged of this V1beta1VirtualMachinePoolScaleInStrategy.

        The VM is never touched after creation. Users are responsible for scaling in the pool manually.  # noqa: E501

        :param unmanaged: The unmanaged of this V1beta1VirtualMachinePoolScaleInStrategy.  # noqa: E501
        :type: V1beta1VirtualMachinePoolUnmanagedStrategy
        """

        self._unmanaged = unmanaged

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(V1beta1VirtualMachinePoolScaleInStrategy, dict):
            for key, value in self.items():
                result[key] = 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, V1beta1VirtualMachinePoolScaleInStrategy):
            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, V1beta1VirtualMachinePoolScaleInStrategy):
            return True

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