# 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 V1VolumeStatus(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 = {
        'container_disk_volume': 'V1ContainerDiskInfo',
        'hotplug_volume': 'V1HotplugVolumeStatus',
        'memory_dump_volume': 'V1DomainMemoryDumpInfo',
        'message': 'str',
        'name': 'str',
        'persistent_volume_claim_info': 'V1PersistentVolumeClaimInfo',
        'phase': 'str',
        'reason': 'str',
        'size': 'int',
        'target': 'str'
    }

    attribute_map = {
        'container_disk_volume': 'containerDiskVolume',
        'hotplug_volume': 'hotplugVolume',
        'memory_dump_volume': 'memoryDumpVolume',
        'message': 'message',
        'name': 'name',
        'persistent_volume_claim_info': 'persistentVolumeClaimInfo',
        'phase': 'phase',
        'reason': 'reason',
        'size': 'size',
        'target': 'target'
    }

    def __init__(self, container_disk_volume=None, hotplug_volume=None, memory_dump_volume=None, message=None, name='', persistent_volume_claim_info=None, phase=None, reason=None, size=None, target='', _configuration=None):  # noqa: E501
        """V1VolumeStatus - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._container_disk_volume = None
        self._hotplug_volume = None
        self._memory_dump_volume = None
        self._message = None
        self._name = None
        self._persistent_volume_claim_info = None
        self._phase = None
        self._reason = None
        self._size = None
        self._target = None
        self.discriminator = None

        if container_disk_volume is not None:
            self.container_disk_volume = container_disk_volume
        if hotplug_volume is not None:
            self.hotplug_volume = hotplug_volume
        if memory_dump_volume is not None:
            self.memory_dump_volume = memory_dump_volume
        if message is not None:
            self.message = message
        self.name = name
        if persistent_volume_claim_info is not None:
            self.persistent_volume_claim_info = persistent_volume_claim_info
        if phase is not None:
            self.phase = phase
        if reason is not None:
            self.reason = reason
        if size is not None:
            self.size = size
        self.target = target

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

        ContainerDiskVolume shows info about the containerdisk, if the volume is a containerdisk  # noqa: E501

        :return: The container_disk_volume of this V1VolumeStatus.  # noqa: E501
        :rtype: V1ContainerDiskInfo
        """
        return self._container_disk_volume

    @container_disk_volume.setter
    def container_disk_volume(self, container_disk_volume):
        """Sets the container_disk_volume of this V1VolumeStatus.

        ContainerDiskVolume shows info about the containerdisk, if the volume is a containerdisk  # noqa: E501

        :param container_disk_volume: The container_disk_volume of this V1VolumeStatus.  # noqa: E501
        :type: V1ContainerDiskInfo
        """

        self._container_disk_volume = container_disk_volume

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

        If the volume is hotplug, this will contain the hotplug status.  # noqa: E501

        :return: The hotplug_volume of this V1VolumeStatus.  # noqa: E501
        :rtype: V1HotplugVolumeStatus
        """
        return self._hotplug_volume

    @hotplug_volume.setter
    def hotplug_volume(self, hotplug_volume):
        """Sets the hotplug_volume of this V1VolumeStatus.

        If the volume is hotplug, this will contain the hotplug status.  # noqa: E501

        :param hotplug_volume: The hotplug_volume of this V1VolumeStatus.  # noqa: E501
        :type: V1HotplugVolumeStatus
        """

        self._hotplug_volume = hotplug_volume

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

        If the volume is memorydump volume, this will contain the memorydump info.  # noqa: E501

        :return: The memory_dump_volume of this V1VolumeStatus.  # noqa: E501
        :rtype: V1DomainMemoryDumpInfo
        """
        return self._memory_dump_volume

    @memory_dump_volume.setter
    def memory_dump_volume(self, memory_dump_volume):
        """Sets the memory_dump_volume of this V1VolumeStatus.

        If the volume is memorydump volume, this will contain the memorydump info.  # noqa: E501

        :param memory_dump_volume: The memory_dump_volume of this V1VolumeStatus.  # noqa: E501
        :type: V1DomainMemoryDumpInfo
        """

        self._memory_dump_volume = memory_dump_volume

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

        Message is a detailed message about the current hotplug volume phase  # noqa: E501

        :return: The message of this V1VolumeStatus.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this V1VolumeStatus.

        Message is a detailed message about the current hotplug volume phase  # noqa: E501

        :param message: The message of this V1VolumeStatus.  # noqa: E501
        :type: str
        """

        self._message = message

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

        Name is the name of the volume  # noqa: E501

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

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

        Name is the name of the volume  # noqa: E501

        :param name: The name of this V1VolumeStatus.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        PersistentVolumeClaimInfo is information about the PVC that handler requires during start flow  # noqa: E501

        :return: The persistent_volume_claim_info of this V1VolumeStatus.  # noqa: E501
        :rtype: V1PersistentVolumeClaimInfo
        """
        return self._persistent_volume_claim_info

    @persistent_volume_claim_info.setter
    def persistent_volume_claim_info(self, persistent_volume_claim_info):
        """Sets the persistent_volume_claim_info of this V1VolumeStatus.

        PersistentVolumeClaimInfo is information about the PVC that handler requires during start flow  # noqa: E501

        :param persistent_volume_claim_info: The persistent_volume_claim_info of this V1VolumeStatus.  # noqa: E501
        :type: V1PersistentVolumeClaimInfo
        """

        self._persistent_volume_claim_info = persistent_volume_claim_info

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

        Phase is the phase  # noqa: E501

        :return: The phase of this V1VolumeStatus.  # noqa: E501
        :rtype: str
        """
        return self._phase

    @phase.setter
    def phase(self, phase):
        """Sets the phase of this V1VolumeStatus.

        Phase is the phase  # noqa: E501

        :param phase: The phase of this V1VolumeStatus.  # noqa: E501
        :type: str
        """

        self._phase = phase

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

        Reason is a brief description of why we are in the current hotplug volume phase  # noqa: E501

        :return: The reason of this V1VolumeStatus.  # noqa: E501
        :rtype: str
        """
        return self._reason

    @reason.setter
    def reason(self, reason):
        """Sets the reason of this V1VolumeStatus.

        Reason is a brief description of why we are in the current hotplug volume phase  # noqa: E501

        :param reason: The reason of this V1VolumeStatus.  # noqa: E501
        :type: str
        """

        self._reason = reason

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

        Represents the size of the volume  # noqa: E501

        :return: The size of this V1VolumeStatus.  # noqa: E501
        :rtype: int
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this V1VolumeStatus.

        Represents the size of the volume  # noqa: E501

        :param size: The size of this V1VolumeStatus.  # noqa: E501
        :type: int
        """

        self._size = size

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

        Target is the target name used when adding the volume to the VM, eg: vda  # noqa: E501

        :return: The target of this V1VolumeStatus.  # noqa: E501
        :rtype: str
        """
        return self._target

    @target.setter
    def target(self, target):
        """Sets the target of this V1VolumeStatus.

        Target is the target name used when adding the volume to the VM, eg: vda  # noqa: E501

        :param target: The target of this V1VolumeStatus.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and target is None:
            raise ValueError("Invalid value for `target`, must not be `None`")  # noqa: E501

        self._target = target

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

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