# 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 V1VirtualMachineInstanceMigrationSourceState(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 = {
        'domain_name': 'str',
        'domain_namespace': 'str',
        'migration_uid': 'str',
        'node': 'str',
        'node_selectors': 'dict(str, str)',
        'persistent_state_pvc_name': 'str',
        'pod': 'str',
        'selinux_context': 'str',
        'sync_address': 'str',
        'virtual_machine_instance_uid': 'str'
    }

    attribute_map = {
        'domain_name': 'domainName',
        'domain_namespace': 'domainNamespace',
        'migration_uid': 'migrationUID',
        'node': 'node',
        'node_selectors': 'nodeSelectors',
        'persistent_state_pvc_name': 'persistentStatePVCName',
        'pod': 'pod',
        'selinux_context': 'selinuxContext',
        'sync_address': 'syncAddress',
        'virtual_machine_instance_uid': 'virtualMachineInstanceUID'
    }

    def __init__(self, domain_name=None, domain_namespace=None, migration_uid=None, node=None, node_selectors=None, persistent_state_pvc_name=None, pod=None, selinux_context=None, sync_address=None, virtual_machine_instance_uid=None, _configuration=None):  # noqa: E501
        """V1VirtualMachineInstanceMigrationSourceState - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._domain_name = None
        self._domain_namespace = None
        self._migration_uid = None
        self._node = None
        self._node_selectors = None
        self._persistent_state_pvc_name = None
        self._pod = None
        self._selinux_context = None
        self._sync_address = None
        self._virtual_machine_instance_uid = None
        self.discriminator = None

        if domain_name is not None:
            self.domain_name = domain_name
        if domain_namespace is not None:
            self.domain_namespace = domain_namespace
        if migration_uid is not None:
            self.migration_uid = migration_uid
        if node is not None:
            self.node = node
        if node_selectors is not None:
            self.node_selectors = node_selectors
        if persistent_state_pvc_name is not None:
            self.persistent_state_pvc_name = persistent_state_pvc_name
        if pod is not None:
            self.pod = pod
        if selinux_context is not None:
            self.selinux_context = selinux_context
        if sync_address is not None:
            self.sync_address = sync_address
        if virtual_machine_instance_uid is not None:
            self.virtual_machine_instance_uid = virtual_machine_instance_uid

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

        The name of the domain on the source libvirt domain  # noqa: E501

        :return: The domain_name of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: str
        """
        return self._domain_name

    @domain_name.setter
    def domain_name(self, domain_name):
        """Sets the domain_name of this V1VirtualMachineInstanceMigrationSourceState.

        The name of the domain on the source libvirt domain  # noqa: E501

        :param domain_name: The domain_name of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: str
        """

        self._domain_name = domain_name

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

        Namespace used in the name of the source libvirt domain. Can be used to find and modify paths in the domain  # noqa: E501

        :return: The domain_namespace of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: str
        """
        return self._domain_namespace

    @domain_namespace.setter
    def domain_namespace(self, domain_namespace):
        """Sets the domain_namespace of this V1VirtualMachineInstanceMigrationSourceState.

        Namespace used in the name of the source libvirt domain. Can be used to find and modify paths in the domain  # noqa: E501

        :param domain_namespace: The domain_namespace of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: str
        """

        self._domain_namespace = domain_namespace

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

        The Source VirtualMachineInstanceMigration object associated with this migration  # noqa: E501

        :return: The migration_uid of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: str
        """
        return self._migration_uid

    @migration_uid.setter
    def migration_uid(self, migration_uid):
        """Sets the migration_uid of this V1VirtualMachineInstanceMigrationSourceState.

        The Source VirtualMachineInstanceMigration object associated with this migration  # noqa: E501

        :param migration_uid: The migration_uid of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: str
        """

        self._migration_uid = migration_uid

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

        The source node that the VMI originated on  # noqa: E501

        :return: The node of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: str
        """
        return self._node

    @node.setter
    def node(self, node):
        """Sets the node of this V1VirtualMachineInstanceMigrationSourceState.

        The source node that the VMI originated on  # noqa: E501

        :param node: The node of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: str
        """

        self._node = node

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

        Node selectors needed by the target to start the receiving pod.  # noqa: E501

        :return: The node_selectors of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._node_selectors

    @node_selectors.setter
    def node_selectors(self, node_selectors):
        """Sets the node_selectors of this V1VirtualMachineInstanceMigrationSourceState.

        Node selectors needed by the target to start the receiving pod.  # noqa: E501

        :param node_selectors: The node_selectors of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: dict(str, str)
        """

        self._node_selectors = node_selectors

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

        If the VMI being migrated uses persistent features (backend-storage), its source PVC name is saved here  # noqa: E501

        :return: The persistent_state_pvc_name of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: str
        """
        return self._persistent_state_pvc_name

    @persistent_state_pvc_name.setter
    def persistent_state_pvc_name(self, persistent_state_pvc_name):
        """Sets the persistent_state_pvc_name of this V1VirtualMachineInstanceMigrationSourceState.

        If the VMI being migrated uses persistent features (backend-storage), its source PVC name is saved here  # noqa: E501

        :param persistent_state_pvc_name: The persistent_state_pvc_name of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: str
        """

        self._persistent_state_pvc_name = persistent_state_pvc_name

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

        The source pod that the VMI is originated on  # noqa: E501

        :return: The pod of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: str
        """
        return self._pod

    @pod.setter
    def pod(self, pod):
        """Sets the pod of this V1VirtualMachineInstanceMigrationSourceState.

        The source pod that the VMI is originated on  # noqa: E501

        :param pod: The pod of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: str
        """

        self._pod = pod

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

        SELinuxContext is the actual SELinux context of the pod  # noqa: E501

        :return: The selinux_context of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: str
        """
        return self._selinux_context

    @selinux_context.setter
    def selinux_context(self, selinux_context):
        """Sets the selinux_context of this V1VirtualMachineInstanceMigrationSourceState.

        SELinuxContext is the actual SELinux context of the pod  # noqa: E501

        :param selinux_context: The selinux_context of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: str
        """

        self._selinux_context = selinux_context

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

        The ip address/fqdn:port combination to use to synchronize the VMI with the target.  # noqa: E501

        :return: The sync_address of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: str
        """
        return self._sync_address

    @sync_address.setter
    def sync_address(self, sync_address):
        """Sets the sync_address of this V1VirtualMachineInstanceMigrationSourceState.

        The ip address/fqdn:port combination to use to synchronize the VMI with the target.  # noqa: E501

        :param sync_address: The sync_address of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: str
        """

        self._sync_address = sync_address

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

        VirtualMachineInstanceUID is the UID of the target virtual machine instance  # noqa: E501

        :return: The virtual_machine_instance_uid of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :rtype: str
        """
        return self._virtual_machine_instance_uid

    @virtual_machine_instance_uid.setter
    def virtual_machine_instance_uid(self, virtual_machine_instance_uid):
        """Sets the virtual_machine_instance_uid of this V1VirtualMachineInstanceMigrationSourceState.

        VirtualMachineInstanceUID is the UID of the target virtual machine instance  # noqa: E501

        :param virtual_machine_instance_uid: The virtual_machine_instance_uid of this V1VirtualMachineInstanceMigrationSourceState.  # noqa: E501
        :type: str
        """

        self._virtual_machine_instance_uid = virtual_machine_instance_uid

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

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