# 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 V1beta1DataVolumeSpec(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 = {
        'checkpoints': 'list[V1beta1DataVolumeCheckpoint]',
        'content_type': 'str',
        'final_checkpoint': 'bool',
        'preallocation': 'bool',
        'priority_class_name': 'str',
        'pvc': 'K8sIoApiCoreV1PersistentVolumeClaimSpec',
        'source': 'V1beta1DataVolumeSource',
        'source_ref': 'V1beta1DataVolumeSourceRef',
        'storage': 'V1beta1StorageSpec'
    }

    attribute_map = {
        'checkpoints': 'checkpoints',
        'content_type': 'contentType',
        'final_checkpoint': 'finalCheckpoint',
        'preallocation': 'preallocation',
        'priority_class_name': 'priorityClassName',
        'pvc': 'pvc',
        'source': 'source',
        'source_ref': 'sourceRef',
        'storage': 'storage'
    }

    def __init__(self, checkpoints=None, content_type=None, final_checkpoint=None, preallocation=None, priority_class_name=None, pvc=None, source=None, source_ref=None, storage=None, _configuration=None):  # noqa: E501
        """V1beta1DataVolumeSpec - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._checkpoints = None
        self._content_type = None
        self._final_checkpoint = None
        self._preallocation = None
        self._priority_class_name = None
        self._pvc = None
        self._source = None
        self._source_ref = None
        self._storage = None
        self.discriminator = None

        if checkpoints is not None:
            self.checkpoints = checkpoints
        if content_type is not None:
            self.content_type = content_type
        if final_checkpoint is not None:
            self.final_checkpoint = final_checkpoint
        if preallocation is not None:
            self.preallocation = preallocation
        if priority_class_name is not None:
            self.priority_class_name = priority_class_name
        if pvc is not None:
            self.pvc = pvc
        if source is not None:
            self.source = source
        if source_ref is not None:
            self.source_ref = source_ref
        if storage is not None:
            self.storage = storage

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

        Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import.  # noqa: E501

        :return: The checkpoints of this V1beta1DataVolumeSpec.  # noqa: E501
        :rtype: list[V1beta1DataVolumeCheckpoint]
        """
        return self._checkpoints

    @checkpoints.setter
    def checkpoints(self, checkpoints):
        """Sets the checkpoints of this V1beta1DataVolumeSpec.

        Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import.  # noqa: E501

        :param checkpoints: The checkpoints of this V1beta1DataVolumeSpec.  # noqa: E501
        :type: list[V1beta1DataVolumeCheckpoint]
        """

        self._checkpoints = checkpoints

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

        DataVolumeContentType options: \"kubevirt\", \"archive\"  # noqa: E501

        :return: The content_type of this V1beta1DataVolumeSpec.  # noqa: E501
        :rtype: str
        """
        return self._content_type

    @content_type.setter
    def content_type(self, content_type):
        """Sets the content_type of this V1beta1DataVolumeSpec.

        DataVolumeContentType options: \"kubevirt\", \"archive\"  # noqa: E501

        :param content_type: The content_type of this V1beta1DataVolumeSpec.  # noqa: E501
        :type: str
        """

        self._content_type = content_type

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

        FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint.  # noqa: E501

        :return: The final_checkpoint of this V1beta1DataVolumeSpec.  # noqa: E501
        :rtype: bool
        """
        return self._final_checkpoint

    @final_checkpoint.setter
    def final_checkpoint(self, final_checkpoint):
        """Sets the final_checkpoint of this V1beta1DataVolumeSpec.

        FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint.  # noqa: E501

        :param final_checkpoint: The final_checkpoint of this V1beta1DataVolumeSpec.  # noqa: E501
        :type: bool
        """

        self._final_checkpoint = final_checkpoint

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

        Preallocation controls whether storage for DataVolumes should be allocated in advance.  # noqa: E501

        :return: The preallocation of this V1beta1DataVolumeSpec.  # noqa: E501
        :rtype: bool
        """
        return self._preallocation

    @preallocation.setter
    def preallocation(self, preallocation):
        """Sets the preallocation of this V1beta1DataVolumeSpec.

        Preallocation controls whether storage for DataVolumes should be allocated in advance.  # noqa: E501

        :param preallocation: The preallocation of this V1beta1DataVolumeSpec.  # noqa: E501
        :type: bool
        """

        self._preallocation = preallocation

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

        PriorityClassName for Importer, Cloner and Uploader pod  # noqa: E501

        :return: The priority_class_name of this V1beta1DataVolumeSpec.  # noqa: E501
        :rtype: str
        """
        return self._priority_class_name

    @priority_class_name.setter
    def priority_class_name(self, priority_class_name):
        """Sets the priority_class_name of this V1beta1DataVolumeSpec.

        PriorityClassName for Importer, Cloner and Uploader pod  # noqa: E501

        :param priority_class_name: The priority_class_name of this V1beta1DataVolumeSpec.  # noqa: E501
        :type: str
        """

        self._priority_class_name = priority_class_name

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

        PVC is the PVC specification  # noqa: E501

        :return: The pvc of this V1beta1DataVolumeSpec.  # noqa: E501
        :rtype: K8sIoApiCoreV1PersistentVolumeClaimSpec
        """
        return self._pvc

    @pvc.setter
    def pvc(self, pvc):
        """Sets the pvc of this V1beta1DataVolumeSpec.

        PVC is the PVC specification  # noqa: E501

        :param pvc: The pvc of this V1beta1DataVolumeSpec.  # noqa: E501
        :type: K8sIoApiCoreV1PersistentVolumeClaimSpec
        """

        self._pvc = pvc

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

        Source is the src of the data for the requested DataVolume  # noqa: E501

        :return: The source of this V1beta1DataVolumeSpec.  # noqa: E501
        :rtype: V1beta1DataVolumeSource
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this V1beta1DataVolumeSpec.

        Source is the src of the data for the requested DataVolume  # noqa: E501

        :param source: The source of this V1beta1DataVolumeSpec.  # noqa: E501
        :type: V1beta1DataVolumeSource
        """

        self._source = source

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

        SourceRef is an indirect reference to the source of data for the requested DataVolume  # noqa: E501

        :return: The source_ref of this V1beta1DataVolumeSpec.  # noqa: E501
        :rtype: V1beta1DataVolumeSourceRef
        """
        return self._source_ref

    @source_ref.setter
    def source_ref(self, source_ref):
        """Sets the source_ref of this V1beta1DataVolumeSpec.

        SourceRef is an indirect reference to the source of data for the requested DataVolume  # noqa: E501

        :param source_ref: The source_ref of this V1beta1DataVolumeSpec.  # noqa: E501
        :type: V1beta1DataVolumeSourceRef
        """

        self._source_ref = source_ref

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

        Storage is the requested storage specification  # noqa: E501

        :return: The storage of this V1beta1DataVolumeSpec.  # noqa: E501
        :rtype: V1beta1StorageSpec
        """
        return self._storage

    @storage.setter
    def storage(self, storage):
        """Sets the storage of this V1beta1DataVolumeSpec.

        Storage is the requested storage specification  # noqa: E501

        :param storage: The storage of this V1beta1DataVolumeSpec.  # noqa: E501
        :type: V1beta1StorageSpec
        """

        self._storage = storage

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

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