# 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 V1VirtualMachineInstanceMigrationTargetState(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 = {
        'attachment_pod_uid': 'str',
        'cpu_set': 'list[int]',
        'direct_migration_node_ports': 'dict(str, int)',
        'domain_detected': 'bool',
        'domain_name': 'str',
        'domain_namespace': 'str',
        'domain_ready_timestamp': 'K8sIoApimachineryPkgApisMetaV1Time',
        'migration_uid': 'str',
        'node': 'str',
        'node_address': 'str',
        'node_topology': 'str',
        'persistent_state_pvc_name': 'str',
        'pod': 'str',
        'selinux_context': 'str',
        'sync_address': 'str',
        'virtual_machine_instance_uid': 'str'
    }

    attribute_map = {
        'attachment_pod_uid': 'attachmentPodUID',
        'cpu_set': 'cpuSet',
        'direct_migration_node_ports': 'directMigrationNodePorts',
        'domain_detected': 'domainDetected',
        'domain_name': 'domainName',
        'domain_namespace': 'domainNamespace',
        'domain_ready_timestamp': 'domainReadyTimestamp',
        'migration_uid': 'migrationUID',
        'node': 'node',
        'node_address': 'nodeAddress',
        'node_topology': 'nodeTopology',
        'persistent_state_pvc_name': 'persistentStatePVCName',
        'pod': 'pod',
        'selinux_context': 'selinuxContext',
        'sync_address': 'syncAddress',
        'virtual_machine_instance_uid': 'virtualMachineInstanceUID'
    }

    def __init__(self, attachment_pod_uid=None, cpu_set=None, direct_migration_node_ports=None, domain_detected=None, domain_name=None, domain_namespace=None, domain_ready_timestamp=None, migration_uid=None, node=None, node_address=None, node_topology=None, persistent_state_pvc_name=None, pod=None, selinux_context=None, sync_address=None, virtual_machine_instance_uid=None, _configuration=None):  # noqa: E501
        """V1VirtualMachineInstanceMigrationTargetState - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._attachment_pod_uid = None
        self._cpu_set = None
        self._direct_migration_node_ports = None
        self._domain_detected = None
        self._domain_name = None
        self._domain_namespace = None
        self._domain_ready_timestamp = None
        self._migration_uid = None
        self._node = None
        self._node_address = None
        self._node_topology = 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 attachment_pod_uid is not None:
            self.attachment_pod_uid = attachment_pod_uid
        if cpu_set is not None:
            self.cpu_set = cpu_set
        if direct_migration_node_ports is not None:
            self.direct_migration_node_ports = direct_migration_node_ports
        if domain_detected is not None:
            self.domain_detected = domain_detected
        if domain_name is not None:
            self.domain_name = domain_name
        if domain_namespace is not None:
            self.domain_namespace = domain_namespace
        if domain_ready_timestamp is not None:
            self.domain_ready_timestamp = domain_ready_timestamp
        if migration_uid is not None:
            self.migration_uid = migration_uid
        if node is not None:
            self.node = node
        if node_address is not None:
            self.node_address = node_address
        if node_topology is not None:
            self.node_topology = node_topology
        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 attachment_pod_uid(self):
        """Gets the attachment_pod_uid of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501

        The UID of the target attachment pod for hotplug volumes  # noqa: E501

        :return: The attachment_pod_uid of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :rtype: str
        """
        return self._attachment_pod_uid

    @attachment_pod_uid.setter
    def attachment_pod_uid(self, attachment_pod_uid):
        """Sets the attachment_pod_uid of this V1VirtualMachineInstanceMigrationTargetState.

        The UID of the target attachment pod for hotplug volumes  # noqa: E501

        :param attachment_pod_uid: The attachment_pod_uid of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: str
        """

        self._attachment_pod_uid = attachment_pod_uid

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

        If the VMI requires dedicated CPUs, this field will hold the dedicated CPU set on the target node  # noqa: E501

        :return: The cpu_set of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :rtype: list[int]
        """
        return self._cpu_set

    @cpu_set.setter
    def cpu_set(self, cpu_set):
        """Sets the cpu_set of this V1VirtualMachineInstanceMigrationTargetState.

        If the VMI requires dedicated CPUs, this field will hold the dedicated CPU set on the target node  # noqa: E501

        :param cpu_set: The cpu_set of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: list[int]
        """

        self._cpu_set = cpu_set

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

        The list of ports opened for live migration on the destination node  # noqa: E501

        :return: The direct_migration_node_ports of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :rtype: dict(str, int)
        """
        return self._direct_migration_node_ports

    @direct_migration_node_ports.setter
    def direct_migration_node_ports(self, direct_migration_node_ports):
        """Sets the direct_migration_node_ports of this V1VirtualMachineInstanceMigrationTargetState.

        The list of ports opened for live migration on the destination node  # noqa: E501

        :param direct_migration_node_ports: The direct_migration_node_ports of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: dict(str, int)
        """

        self._direct_migration_node_ports = direct_migration_node_ports

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

        The Target Node has seen the Domain Start Event  # noqa: E501

        :return: The domain_detected of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :rtype: bool
        """
        return self._domain_detected

    @domain_detected.setter
    def domain_detected(self, domain_detected):
        """Sets the domain_detected of this V1VirtualMachineInstanceMigrationTargetState.

        The Target Node has seen the Domain Start Event  # noqa: E501

        :param domain_detected: The domain_detected of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: bool
        """

        self._domain_detected = domain_detected

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

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

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

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

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

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

        self._domain_name = domain_name

    @property
    def domain_namespace(self):
        """Gets the domain_namespace of this V1VirtualMachineInstanceMigrationTargetState.  # 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 V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :rtype: str
        """
        return self._domain_namespace

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

        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 V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: str
        """

        self._domain_namespace = domain_namespace

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

        The timestamp at which the target node detects the domain is active  # noqa: E501

        :return: The domain_ready_timestamp of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :rtype: K8sIoApimachineryPkgApisMetaV1Time
        """
        return self._domain_ready_timestamp

    @domain_ready_timestamp.setter
    def domain_ready_timestamp(self, domain_ready_timestamp):
        """Sets the domain_ready_timestamp of this V1VirtualMachineInstanceMigrationTargetState.

        The timestamp at which the target node detects the domain is active  # noqa: E501

        :param domain_ready_timestamp: The domain_ready_timestamp of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: K8sIoApimachineryPkgApisMetaV1Time
        """

        self._domain_ready_timestamp = domain_ready_timestamp

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

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

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

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

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

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

        self._migration_uid = migration_uid

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

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

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

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

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

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

        self._node = node

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

        The address of the target node to use for the migration  # noqa: E501

        :return: The node_address of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :rtype: str
        """
        return self._node_address

    @node_address.setter
    def node_address(self, node_address):
        """Sets the node_address of this V1VirtualMachineInstanceMigrationTargetState.

        The address of the target node to use for the migration  # noqa: E501

        :param node_address: The node_address of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: str
        """

        self._node_address = node_address

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

        If the VMI requires dedicated CPUs, this field will hold the numa topology on the target node  # noqa: E501

        :return: The node_topology of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :rtype: str
        """
        return self._node_topology

    @node_topology.setter
    def node_topology(self, node_topology):
        """Sets the node_topology of this V1VirtualMachineInstanceMigrationTargetState.

        If the VMI requires dedicated CPUs, this field will hold the numa topology on the target node  # noqa: E501

        :param node_topology: The node_topology of this V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: str
        """

        self._node_topology = node_topology

    @property
    def persistent_state_pvc_name(self):
        """Gets the persistent_state_pvc_name of this V1VirtualMachineInstanceMigrationTargetState.  # 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 V1VirtualMachineInstanceMigrationTargetState.  # 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 V1VirtualMachineInstanceMigrationTargetState.

        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 V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: str
        """

        self._persistent_state_pvc_name = persistent_state_pvc_name

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

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

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

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

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

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

        self._pod = pod

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

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

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

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

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

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

        self._selinux_context = selinux_context

    @property
    def sync_address(self):
        """Gets the sync_address of this V1VirtualMachineInstanceMigrationTargetState.  # 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 V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :rtype: str
        """
        return self._sync_address

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

        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 V1VirtualMachineInstanceMigrationTargetState.  # noqa: E501
        :type: str
        """

        self._sync_address = sync_address

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

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

        :return: The virtual_machine_instance_uid of this V1VirtualMachineInstanceMigrationTargetState.  # 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 V1VirtualMachineInstanceMigrationTargetState.

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

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

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