# coding: utf-8

"""
    XMS API

    XMS is the controller of distributed storage system  # noqa: E501

    OpenAPI spec version: 3.2.14
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401
import six

# from xms_client.models.cloud_datacenter_nestview import CloudDatacenterNestview  # noqa: F401,E501
# from xms_client.models.cloud_platform_nestview import CloudPlatformNestview  # noqa: F401,E501
# from xms_client.models.volume_nestview import VolumeNestview  # noqa: F401,E501


class CloudVolume(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 = {
        'block_volume': 'VolumeNestview',
        'cloud_datacenter': 'CloudDatacenterNestview',
        'cloud_platform': 'CloudPlatformNestview',
        'cloud_volume_id': 'str',
        'create': 'datetime',
        'id': 'int',
        'multi_attach': 'bool',
        'name': 'str',
        'type': 'str',
        'update': 'datetime'
    }

    attribute_map = {
        'block_volume': 'block_volume',
        'cloud_datacenter': 'cloud_datacenter',
        'cloud_platform': 'cloud_platform',
        'cloud_volume_id': 'cloud_volume_id',
        'create': 'create',
        'id': 'id',
        'multi_attach': 'multi_attach',
        'name': 'name',
        'type': 'type',
        'update': 'update'
    }

    def __init__(self, block_volume=None, cloud_datacenter=None, cloud_platform=None, cloud_volume_id=None, create=None, id=None, multi_attach=None, name=None, type=None, update=None):  # noqa: E501
        """CloudVolume - a model defined in Swagger"""  # noqa: E501

        self._block_volume = None
        self._cloud_datacenter = None
        self._cloud_platform = None
        self._cloud_volume_id = None
        self._create = None
        self._id = None
        self._multi_attach = None
        self._name = None
        self._type = None
        self._update = None
        self.discriminator = None

        if block_volume is not None:
            self.block_volume = block_volume
        if cloud_datacenter is not None:
            self.cloud_datacenter = cloud_datacenter
        if cloud_platform is not None:
            self.cloud_platform = cloud_platform
        if cloud_volume_id is not None:
            self.cloud_volume_id = cloud_volume_id
        if create is not None:
            self.create = create
        if id is not None:
            self.id = id
        if multi_attach is not None:
            self.multi_attach = multi_attach
        if name is not None:
            self.name = name
        if type is not None:
            self.type = type
        if update is not None:
            self.update = update

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


        :return: The block_volume of this CloudVolume.  # noqa: E501
        :rtype: VolumeNestview
        """
        return self._block_volume

    @block_volume.setter
    def block_volume(self, block_volume):
        """Sets the block_volume of this CloudVolume.


        :param block_volume: The block_volume of this CloudVolume.  # noqa: E501
        :type: VolumeNestview
        """

        self._block_volume = block_volume

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


        :return: The cloud_datacenter of this CloudVolume.  # noqa: E501
        :rtype: CloudDatacenterNestview
        """
        return self._cloud_datacenter

    @cloud_datacenter.setter
    def cloud_datacenter(self, cloud_datacenter):
        """Sets the cloud_datacenter of this CloudVolume.


        :param cloud_datacenter: The cloud_datacenter of this CloudVolume.  # noqa: E501
        :type: CloudDatacenterNestview
        """

        self._cloud_datacenter = cloud_datacenter

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


        :return: The cloud_platform of this CloudVolume.  # noqa: E501
        :rtype: CloudPlatformNestview
        """
        return self._cloud_platform

    @cloud_platform.setter
    def cloud_platform(self, cloud_platform):
        """Sets the cloud_platform of this CloudVolume.


        :param cloud_platform: The cloud_platform of this CloudVolume.  # noqa: E501
        :type: CloudPlatformNestview
        """

        self._cloud_platform = cloud_platform

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


        :return: The cloud_volume_id of this CloudVolume.  # noqa: E501
        :rtype: str
        """
        return self._cloud_volume_id

    @cloud_volume_id.setter
    def cloud_volume_id(self, cloud_volume_id):
        """Sets the cloud_volume_id of this CloudVolume.


        :param cloud_volume_id: The cloud_volume_id of this CloudVolume.  # noqa: E501
        :type: str
        """

        self._cloud_volume_id = cloud_volume_id

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


        :return: The create of this CloudVolume.  # noqa: E501
        :rtype: datetime
        """
        return self._create

    @create.setter
    def create(self, create):
        """Sets the create of this CloudVolume.


        :param create: The create of this CloudVolume.  # noqa: E501
        :type: datetime
        """

        self._create = create

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


        :return: The id of this CloudVolume.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this CloudVolume.


        :param id: The id of this CloudVolume.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The multi_attach of this CloudVolume.  # noqa: E501
        :rtype: bool
        """
        return self._multi_attach

    @multi_attach.setter
    def multi_attach(self, multi_attach):
        """Sets the multi_attach of this CloudVolume.


        :param multi_attach: The multi_attach of this CloudVolume.  # noqa: E501
        :type: bool
        """

        self._multi_attach = multi_attach

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


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

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


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

        self._name = name

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


        :return: The type of this CloudVolume.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this CloudVolume.


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

        self._type = type

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


        :return: The update of this CloudVolume.  # noqa: E501
        :rtype: datetime
        """
        return self._update

    @update.setter
    def update(self, update):
        """Sets the update of this CloudVolume.


        :param update: The update of this CloudVolume.  # noqa: E501
        :type: datetime
        """

        self._update = update

    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

        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, CloudVolume):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
