# 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 V1InstancetypeMatcher(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 = {
        'infer_from_volume': 'str',
        'infer_from_volume_failure_policy': 'str',
        'kind': 'str',
        'name': 'str',
        'revision_name': 'str'
    }

    attribute_map = {
        'infer_from_volume': 'inferFromVolume',
        'infer_from_volume_failure_policy': 'inferFromVolumeFailurePolicy',
        'kind': 'kind',
        'name': 'name',
        'revision_name': 'revisionName'
    }

    def __init__(self, infer_from_volume=None, infer_from_volume_failure_policy=None, kind=None, name=None, revision_name=None, _configuration=None):  # noqa: E501
        """V1InstancetypeMatcher - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._infer_from_volume = None
        self._infer_from_volume_failure_policy = None
        self._kind = None
        self._name = None
        self._revision_name = None
        self.discriminator = None

        if infer_from_volume is not None:
            self.infer_from_volume = infer_from_volume
        if infer_from_volume_failure_policy is not None:
            self.infer_from_volume_failure_policy = infer_from_volume_failure_policy
        if kind is not None:
            self.kind = kind
        if name is not None:
            self.name = name
        if revision_name is not None:
            self.revision_name = revision_name

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

        InferFromVolume lists the name of a volume that should be used to infer or discover the instancetype to be used through known annotations on the underlying resource. Once applied to the InstancetypeMatcher this field is removed.  # noqa: E501

        :return: The infer_from_volume of this V1InstancetypeMatcher.  # noqa: E501
        :rtype: str
        """
        return self._infer_from_volume

    @infer_from_volume.setter
    def infer_from_volume(self, infer_from_volume):
        """Sets the infer_from_volume of this V1InstancetypeMatcher.

        InferFromVolume lists the name of a volume that should be used to infer or discover the instancetype to be used through known annotations on the underlying resource. Once applied to the InstancetypeMatcher this field is removed.  # noqa: E501

        :param infer_from_volume: The infer_from_volume of this V1InstancetypeMatcher.  # noqa: E501
        :type: str
        """

        self._infer_from_volume = infer_from_volume

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

        InferFromVolumeFailurePolicy controls what should happen on failure when inferring the instancetype. Allowed values are: \"RejectInferFromVolumeFailure\" and \"IgnoreInferFromVolumeFailure\". If not specified, \"RejectInferFromVolumeFailure\" is used by default.  # noqa: E501

        :return: The infer_from_volume_failure_policy of this V1InstancetypeMatcher.  # noqa: E501
        :rtype: str
        """
        return self._infer_from_volume_failure_policy

    @infer_from_volume_failure_policy.setter
    def infer_from_volume_failure_policy(self, infer_from_volume_failure_policy):
        """Sets the infer_from_volume_failure_policy of this V1InstancetypeMatcher.

        InferFromVolumeFailurePolicy controls what should happen on failure when inferring the instancetype. Allowed values are: \"RejectInferFromVolumeFailure\" and \"IgnoreInferFromVolumeFailure\". If not specified, \"RejectInferFromVolumeFailure\" is used by default.  # noqa: E501

        :param infer_from_volume_failure_policy: The infer_from_volume_failure_policy of this V1InstancetypeMatcher.  # noqa: E501
        :type: str
        """

        self._infer_from_volume_failure_policy = infer_from_volume_failure_policy

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

        Kind specifies which instancetype resource is referenced. Allowed values are: \"VirtualMachineInstancetype\" and \"VirtualMachineClusterInstancetype\". If not specified, \"VirtualMachineClusterInstancetype\" is used by default.  # noqa: E501

        :return: The kind of this V1InstancetypeMatcher.  # noqa: E501
        :rtype: str
        """
        return self._kind

    @kind.setter
    def kind(self, kind):
        """Sets the kind of this V1InstancetypeMatcher.

        Kind specifies which instancetype resource is referenced. Allowed values are: \"VirtualMachineInstancetype\" and \"VirtualMachineClusterInstancetype\". If not specified, \"VirtualMachineClusterInstancetype\" is used by default.  # noqa: E501

        :param kind: The kind of this V1InstancetypeMatcher.  # noqa: E501
        :type: str
        """

        self._kind = kind

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

        Name is the name of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype  # noqa: E501

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

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

        Name is the name of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype  # noqa: E501

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

        self._name = name

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

        RevisionName specifies a ControllerRevision containing a specific copy of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype to be used. This is initially captured the first time the instancetype is applied to the VirtualMachineInstance.  # noqa: E501

        :return: The revision_name of this V1InstancetypeMatcher.  # noqa: E501
        :rtype: str
        """
        return self._revision_name

    @revision_name.setter
    def revision_name(self, revision_name):
        """Sets the revision_name of this V1InstancetypeMatcher.

        RevisionName specifies a ControllerRevision containing a specific copy of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype to be used. This is initially captured the first time the instancetype is applied to the VirtualMachineInstance.  # noqa: E501

        :param revision_name: The revision_name of this V1InstancetypeMatcher.  # noqa: E501
        :type: str
        """

        self._revision_name = revision_name

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

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