# 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 V1FeatureHyperv(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 = {
        'evmcs': 'V1FeatureState',
        'frequencies': 'V1FeatureState',
        'ipi': 'V1FeatureState',
        'reenlightenment': 'V1FeatureState',
        'relaxed': 'V1FeatureState',
        'reset': 'V1FeatureState',
        'runtime': 'V1FeatureState',
        'spinlocks': 'V1FeatureSpinlocks',
        'synic': 'V1FeatureState',
        'synictimer': 'V1SyNICTimer',
        'tlbflush': 'V1FeatureState',
        'vapic': 'V1FeatureState',
        'vendorid': 'V1FeatureVendorID',
        'vpindex': 'V1FeatureState'
    }

    attribute_map = {
        'evmcs': 'evmcs',
        'frequencies': 'frequencies',
        'ipi': 'ipi',
        'reenlightenment': 'reenlightenment',
        'relaxed': 'relaxed',
        'reset': 'reset',
        'runtime': 'runtime',
        'spinlocks': 'spinlocks',
        'synic': 'synic',
        'synictimer': 'synictimer',
        'tlbflush': 'tlbflush',
        'vapic': 'vapic',
        'vendorid': 'vendorid',
        'vpindex': 'vpindex'
    }

    def __init__(self, evmcs=None, frequencies=None, ipi=None, reenlightenment=None, relaxed=None, reset=None, runtime=None, spinlocks=None, synic=None, synictimer=None, tlbflush=None, vapic=None, vendorid=None, vpindex=None, _configuration=None):  # noqa: E501
        """V1FeatureHyperv - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._evmcs = None
        self._frequencies = None
        self._ipi = None
        self._reenlightenment = None
        self._relaxed = None
        self._reset = None
        self._runtime = None
        self._spinlocks = None
        self._synic = None
        self._synictimer = None
        self._tlbflush = None
        self._vapic = None
        self._vendorid = None
        self._vpindex = None
        self.discriminator = None

        if evmcs is not None:
            self.evmcs = evmcs
        if frequencies is not None:
            self.frequencies = frequencies
        if ipi is not None:
            self.ipi = ipi
        if reenlightenment is not None:
            self.reenlightenment = reenlightenment
        if relaxed is not None:
            self.relaxed = relaxed
        if reset is not None:
            self.reset = reset
        if runtime is not None:
            self.runtime = runtime
        if spinlocks is not None:
            self.spinlocks = spinlocks
        if synic is not None:
            self.synic = synic
        if synictimer is not None:
            self.synictimer = synictimer
        if tlbflush is not None:
            self.tlbflush = tlbflush
        if vapic is not None:
            self.vapic = vapic
        if vendorid is not None:
            self.vendorid = vendorid
        if vpindex is not None:
            self.vpindex = vpindex

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

        EVMCS Speeds up L2 vmexits, but disables other virtualization features. Requires vapic. Defaults to the machine type setting.  # noqa: E501

        :return: The evmcs of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._evmcs

    @evmcs.setter
    def evmcs(self, evmcs):
        """Sets the evmcs of this V1FeatureHyperv.

        EVMCS Speeds up L2 vmexits, but disables other virtualization features. Requires vapic. Defaults to the machine type setting.  # noqa: E501

        :param evmcs: The evmcs of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._evmcs = evmcs

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

        Frequencies improves the TSC clock source handling for Hyper-V on KVM. Defaults to the machine type setting.  # noqa: E501

        :return: The frequencies of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._frequencies

    @frequencies.setter
    def frequencies(self, frequencies):
        """Sets the frequencies of this V1FeatureHyperv.

        Frequencies improves the TSC clock source handling for Hyper-V on KVM. Defaults to the machine type setting.  # noqa: E501

        :param frequencies: The frequencies of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._frequencies = frequencies

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

        IPI improves performances in overcommited environments. Requires vpindex. Defaults to the machine type setting.  # noqa: E501

        :return: The ipi of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._ipi

    @ipi.setter
    def ipi(self, ipi):
        """Sets the ipi of this V1FeatureHyperv.

        IPI improves performances in overcommited environments. Requires vpindex. Defaults to the machine type setting.  # noqa: E501

        :param ipi: The ipi of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._ipi = ipi

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

        Reenlightenment enables the notifications on TSC frequency changes. Defaults to the machine type setting.  # noqa: E501

        :return: The reenlightenment of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._reenlightenment

    @reenlightenment.setter
    def reenlightenment(self, reenlightenment):
        """Sets the reenlightenment of this V1FeatureHyperv.

        Reenlightenment enables the notifications on TSC frequency changes. Defaults to the machine type setting.  # noqa: E501

        :param reenlightenment: The reenlightenment of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._reenlightenment = reenlightenment

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

        Relaxed instructs the guest OS to disable watchdog timeouts. Defaults to the machine type setting.  # noqa: E501

        :return: The relaxed of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._relaxed

    @relaxed.setter
    def relaxed(self, relaxed):
        """Sets the relaxed of this V1FeatureHyperv.

        Relaxed instructs the guest OS to disable watchdog timeouts. Defaults to the machine type setting.  # noqa: E501

        :param relaxed: The relaxed of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._relaxed = relaxed

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

        Reset enables Hyperv reboot/reset for the vmi. Requires synic. Defaults to the machine type setting.  # noqa: E501

        :return: The reset of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._reset

    @reset.setter
    def reset(self, reset):
        """Sets the reset of this V1FeatureHyperv.

        Reset enables Hyperv reboot/reset for the vmi. Requires synic. Defaults to the machine type setting.  # noqa: E501

        :param reset: The reset of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._reset = reset

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

        Runtime improves the time accounting to improve scheduling in the guest. Defaults to the machine type setting.  # noqa: E501

        :return: The runtime of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._runtime

    @runtime.setter
    def runtime(self, runtime):
        """Sets the runtime of this V1FeatureHyperv.

        Runtime improves the time accounting to improve scheduling in the guest. Defaults to the machine type setting.  # noqa: E501

        :param runtime: The runtime of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._runtime = runtime

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

        Spinlocks allows to configure the spinlock retry attempts.  # noqa: E501

        :return: The spinlocks of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureSpinlocks
        """
        return self._spinlocks

    @spinlocks.setter
    def spinlocks(self, spinlocks):
        """Sets the spinlocks of this V1FeatureHyperv.

        Spinlocks allows to configure the spinlock retry attempts.  # noqa: E501

        :param spinlocks: The spinlocks of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureSpinlocks
        """

        self._spinlocks = spinlocks

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

        SyNIC enables the Synthetic Interrupt Controller. Defaults to the machine type setting.  # noqa: E501

        :return: The synic of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._synic

    @synic.setter
    def synic(self, synic):
        """Sets the synic of this V1FeatureHyperv.

        SyNIC enables the Synthetic Interrupt Controller. Defaults to the machine type setting.  # noqa: E501

        :param synic: The synic of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._synic = synic

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

        SyNICTimer enables Synthetic Interrupt Controller Timers, reducing CPU load. Defaults to the machine type setting.  # noqa: E501

        :return: The synictimer of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1SyNICTimer
        """
        return self._synictimer

    @synictimer.setter
    def synictimer(self, synictimer):
        """Sets the synictimer of this V1FeatureHyperv.

        SyNICTimer enables Synthetic Interrupt Controller Timers, reducing CPU load. Defaults to the machine type setting.  # noqa: E501

        :param synictimer: The synictimer of this V1FeatureHyperv.  # noqa: E501
        :type: V1SyNICTimer
        """

        self._synictimer = synictimer

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

        TLBFlush improves performances in overcommited environments. Requires vpindex. Defaults to the machine type setting.  # noqa: E501

        :return: The tlbflush of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._tlbflush

    @tlbflush.setter
    def tlbflush(self, tlbflush):
        """Sets the tlbflush of this V1FeatureHyperv.

        TLBFlush improves performances in overcommited environments. Requires vpindex. Defaults to the machine type setting.  # noqa: E501

        :param tlbflush: The tlbflush of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._tlbflush = tlbflush

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

        VAPIC improves the paravirtualized handling of interrupts. Defaults to the machine type setting.  # noqa: E501

        :return: The vapic of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._vapic

    @vapic.setter
    def vapic(self, vapic):
        """Sets the vapic of this V1FeatureHyperv.

        VAPIC improves the paravirtualized handling of interrupts. Defaults to the machine type setting.  # noqa: E501

        :param vapic: The vapic of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._vapic = vapic

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

        VendorID allows setting the hypervisor vendor id. Defaults to the machine type setting.  # noqa: E501

        :return: The vendorid of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureVendorID
        """
        return self._vendorid

    @vendorid.setter
    def vendorid(self, vendorid):
        """Sets the vendorid of this V1FeatureHyperv.

        VendorID allows setting the hypervisor vendor id. Defaults to the machine type setting.  # noqa: E501

        :param vendorid: The vendorid of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureVendorID
        """

        self._vendorid = vendorid

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

        VPIndex enables the Virtual Processor Index to help windows identifying virtual processors. Defaults to the machine type setting.  # noqa: E501

        :return: The vpindex of this V1FeatureHyperv.  # noqa: E501
        :rtype: V1FeatureState
        """
        return self._vpindex

    @vpindex.setter
    def vpindex(self, vpindex):
        """Sets the vpindex of this V1FeatureHyperv.

        VPIndex enables the Virtual Processor Index to help windows identifying virtual processors. Defaults to the machine type setting.  # noqa: E501

        :param vpindex: The vpindex of this V1FeatureHyperv.  # noqa: E501
        :type: V1FeatureState
        """

        self._vpindex = vpindex

    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(V1FeatureHyperv, 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, V1FeatureHyperv):
            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, V1FeatureHyperv):
            return True

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