# 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 V1beta1VirtualMachinePoolUpdateStrategy(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': 'V1beta1VirtualMachineOpportunisticUpdateStrategy',
        'proactive': 'V1beta1VirtualMachinePoolProactiveUpdateStrategy',
        'unmanaged': 'V1beta1VirtualMachinePoolUnmanagedStrategy'
    }

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

    def __init__(self, opportunistic=None, proactive=None, unmanaged=None, _configuration=None):  # noqa: E501
        """V1beta1VirtualMachinePoolUpdateStrategy - 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 V1beta1VirtualMachinePoolUpdateStrategy.  # noqa: E501

        Opportunistic update only gets applied to the VM, VMI is updated naturally upon the restart. Whereas proactive it applies both the VM and VMI right away.  # noqa: E501

        :return: The opportunistic of this V1beta1VirtualMachinePoolUpdateStrategy.  # noqa: E501
        :rtype: V1beta1VirtualMachineOpportunisticUpdateStrategy
        """
        return self._opportunistic

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

        Opportunistic update only gets applied to the VM, VMI is updated naturally upon the restart. Whereas proactive it applies both the VM and VMI right away.  # noqa: E501

        :param opportunistic: The opportunistic of this V1beta1VirtualMachinePoolUpdateStrategy.  # noqa: E501
        :type: V1beta1VirtualMachineOpportunisticUpdateStrategy
        """

        self._opportunistic = opportunistic

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

        Proactive update by forcing the VMs to restart during update  # noqa: E501

        :return: The proactive of this V1beta1VirtualMachinePoolUpdateStrategy.  # noqa: E501
        :rtype: V1beta1VirtualMachinePoolProactiveUpdateStrategy
        """
        return self._proactive

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

        Proactive update by forcing the VMs to restart during update  # noqa: E501

        :param proactive: The proactive of this V1beta1VirtualMachinePoolUpdateStrategy.  # noqa: E501
        :type: V1beta1VirtualMachinePoolProactiveUpdateStrategy
        """

        self._proactive = proactive

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

        Unmanaged indicates that no automatic update of VMs within a VMPool is performed. When this is set, the VMPool controller will not update the VMs within the pool.  # noqa: E501

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

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

        Unmanaged indicates that no automatic update of VMs within a VMPool is performed. When this is set, the VMPool controller will not update the VMs within the pool.  # noqa: E501

        :param unmanaged: The unmanaged of this V1beta1VirtualMachinePoolUpdateStrategy.  # 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(V1beta1VirtualMachinePoolUpdateStrategy, 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, V1beta1VirtualMachinePoolUpdateStrategy):
            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, V1beta1VirtualMachinePoolUpdateStrategy):
            return True

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