# coding: utf-8

"""
RecoverVolumeDescriptor.py

 The Clear BSD License

 Copyright (c) – 2016, NetApp, Inc. All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from pprint import pformat
from six import iteritems


class RecoverVolumeDescriptor(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        RecoverVolumeDescriptor - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'label': 'str',  # (required parameter)
            'manager': 'str',  # (required parameter)
            'capacity': 'int',  # (required parameter)
            'raid_level': 'str',  # (required parameter)
            'segment_size': 'int',  # (required parameter)
            'read_ahead': 'int',  # (required parameter)
            'offset': 'int',  # (required parameter)
            'volume_group_number': 'int',  # (required parameter)
            'drive_count': 'int',  # (required parameter)
            'drive_ref_list': 'DriveRefList',  # (required parameter)
            'volume_group_label': 'str',  # (required parameter)
            'volume_wwn': 'str',  # (required parameter)
            'volume_ssid': 'int',  # (required parameter)
            'dss_prealloc_enabled': 'bool',  # (required parameter)
            'protection_type': 'str',  # (required parameter)
            'allocate_reserved_space': 'bool'
        }

        self.attribute_map = {
            'label': 'label',  # (required parameter)
            'manager': 'manager',  # (required parameter)
            'capacity': 'capacity',  # (required parameter)
            'raid_level': 'raidLevel',  # (required parameter)
            'segment_size': 'segmentSize',  # (required parameter)
            'read_ahead': 'readAhead',  # (required parameter)
            'offset': 'offset',  # (required parameter)
            'volume_group_number': 'volumeGroupNumber',  # (required parameter)
            'drive_count': 'driveCount',  # (required parameter)
            'drive_ref_list': 'driveRefList',  # (required parameter)
            'volume_group_label': 'volumeGroupLabel',  # (required parameter)
            'volume_wwn': 'volumeWWN',  # (required parameter)
            'volume_ssid': 'volumeSSID',  # (required parameter)
            'dss_prealloc_enabled': 'dssPreallocEnabled',  # (required parameter)
            'protection_type': 'protectionType',  # (required parameter)
            'allocate_reserved_space': 'allocateReservedSpace'
        }

        self._label = None
        self._manager = None
        self._capacity = None
        self._raid_level = None
        self._segment_size = None
        self._read_ahead = None
        self._offset = None
        self._volume_group_number = None
        self._drive_count = None
        self._drive_ref_list = None
        self._volume_group_label = None
        self._volume_wwn = None
        self._volume_ssid = None
        self._dss_prealloc_enabled = None
        self._protection_type = None
        self._allocate_reserved_space = None

    @property
    def label(self):
        """
        Gets the label of this RecoverVolumeDescriptor.
        The user assigned volume name.

        :return: The label of this RecoverVolumeDescriptor.
        :rtype: str
        :required/optional: required
        """
        return self._label

    @label.setter
    def label(self, label):
        """
        Sets the label of this RecoverVolumeDescriptor.
        The user assigned volume name.

        :param label: The label of this RecoverVolumeDescriptor.
        :type: str
        """
        self._label = label

    @property
    def manager(self):
        """
        Gets the manager of this RecoverVolumeDescriptor.
        The controller that will manage the volume. This is ignored if shared volume support is active.

        :return: The manager of this RecoverVolumeDescriptor.
        :rtype: str
        :required/optional: required
        """
        return self._manager

    @manager.setter
    def manager(self, manager):
        """
        Sets the manager of this RecoverVolumeDescriptor.
        The controller that will manage the volume. This is ignored if shared volume support is active.

        :param manager: The manager of this RecoverVolumeDescriptor.
        :type: str
        """
        self._manager = manager

    @property
    def capacity(self):
        """
        Gets the capacity of this RecoverVolumeDescriptor.
        The volume capacity in megabytes.

        :return: The capacity of this RecoverVolumeDescriptor.
        :rtype: int
        :required/optional: required
        """
        return self._capacity

    @capacity.setter
    def capacity(self, capacity):
        """
        Sets the capacity of this RecoverVolumeDescriptor.
        The volume capacity in megabytes.

        :param capacity: The capacity of this RecoverVolumeDescriptor.
        :type: int
        """
        self._capacity = capacity

    @property
    def raid_level(self):
        """
        Gets the raid_level of this RecoverVolumeDescriptor.
        The RAID level of the potential volume.

        :return: The raid_level of this RecoverVolumeDescriptor.
        :rtype: str
        :required/optional: required
        """
        return self._raid_level

    @raid_level.setter
    def raid_level(self, raid_level):
        """
        Sets the raid_level of this RecoverVolumeDescriptor.
        The RAID level of the potential volume.

        :param raid_level: The raid_level of this RecoverVolumeDescriptor.
        :type: str
        """
        allowed_values = ["raidUnsupported", "raidAll", "raid0", "raid1", "raid3", "raid5", "raid6", "raidDiskPool", "__UNDEFINED"]
        if raid_level not in allowed_values:
            raise ValueError(
                "Invalid value for `raid_level`, must be one of {0}"
                .format(allowed_values)
            )
        self._raid_level = raid_level

    @property
    def segment_size(self):
        """
        Gets the segment_size of this RecoverVolumeDescriptor.
        The volume segment size (bytes).

        :return: The segment_size of this RecoverVolumeDescriptor.
        :rtype: int
        :required/optional: required
        """
        return self._segment_size

    @segment_size.setter
    def segment_size(self, segment_size):
        """
        Sets the segment_size of this RecoverVolumeDescriptor.
        The volume segment size (bytes).

        :param segment_size: The segment_size of this RecoverVolumeDescriptor.
        :type: int
        """
        self._segment_size = segment_size

    @property
    def read_ahead(self):
        """
        Gets the read_ahead of this RecoverVolumeDescriptor.
        A true (non-zero) / false (zero) indicator of whether or not automatic cache read-ahead is enabled.

        :return: The read_ahead of this RecoverVolumeDescriptor.
        :rtype: int
        :required/optional: required
        """
        return self._read_ahead

    @read_ahead.setter
    def read_ahead(self, read_ahead):
        """
        Sets the read_ahead of this RecoverVolumeDescriptor.
        A true (non-zero) / false (zero) indicator of whether or not automatic cache read-ahead is enabled.

        :param read_ahead: The read_ahead of this RecoverVolumeDescriptor.
        :type: int
        """
        self._read_ahead = read_ahead

    @property
    def offset(self):
        """
        Gets the offset of this RecoverVolumeDescriptor.
        Volume begins at this drive offset (bytes).

        :return: The offset of this RecoverVolumeDescriptor.
        :rtype: int
        :required/optional: required
        """
        return self._offset

    @offset.setter
    def offset(self, offset):
        """
        Sets the offset of this RecoverVolumeDescriptor.
        Volume begins at this drive offset (bytes).

        :param offset: The offset of this RecoverVolumeDescriptor.
        :type: int
        """
        self._offset = offset

    @property
    def volume_group_number(self):
        """
        Gets the volume_group_number of this RecoverVolumeDescriptor.
        The volume group number.

        :return: The volume_group_number of this RecoverVolumeDescriptor.
        :rtype: int
        :required/optional: required
        """
        return self._volume_group_number

    @volume_group_number.setter
    def volume_group_number(self, volume_group_number):
        """
        Sets the volume_group_number of this RecoverVolumeDescriptor.
        The volume group number.

        :param volume_group_number: The volume_group_number of this RecoverVolumeDescriptor.
        :type: int
        """
        self._volume_group_number = volume_group_number

    @property
    def drive_count(self):
        """
        Gets the drive_count of this RecoverVolumeDescriptor.
        The number of drives in the volume group.

        :return: The drive_count of this RecoverVolumeDescriptor.
        :rtype: int
        :required/optional: required
        """
        return self._drive_count

    @drive_count.setter
    def drive_count(self, drive_count):
        """
        Sets the drive_count of this RecoverVolumeDescriptor.
        The number of drives in the volume group.

        :param drive_count: The drive_count of this RecoverVolumeDescriptor.
        :type: int
        """
        self._drive_count = drive_count

    @property
    def drive_ref_list(self):
        """
        Gets the drive_ref_list of this RecoverVolumeDescriptor.
        The list of drives to be used.

        :return: The drive_ref_list of this RecoverVolumeDescriptor.
        :rtype: DriveRefList
        :required/optional: required
        """
        return self._drive_ref_list

    @drive_ref_list.setter
    def drive_ref_list(self, drive_ref_list):
        """
        Sets the drive_ref_list of this RecoverVolumeDescriptor.
        The list of drives to be used.

        :param drive_ref_list: The drive_ref_list of this RecoverVolumeDescriptor.
        :type: DriveRefList
        """
        self._drive_ref_list = drive_ref_list

    @property
    def volume_group_label(self):
        """
        Gets the volume_group_label of this RecoverVolumeDescriptor.
        The label to assign to the new volume group when unassigned drives are used for recovery.

        :return: The volume_group_label of this RecoverVolumeDescriptor.
        :rtype: str
        :required/optional: required
        """
        return self._volume_group_label

    @volume_group_label.setter
    def volume_group_label(self, volume_group_label):
        """
        Sets the volume_group_label of this RecoverVolumeDescriptor.
        The label to assign to the new volume group when unassigned drives are used for recovery.

        :param volume_group_label: The volume_group_label of this RecoverVolumeDescriptor.
        :type: str
        """
        self._volume_group_label = volume_group_label

    @property
    def volume_wwn(self):
        """
        Gets the volume_wwn of this RecoverVolumeDescriptor.
        The WWN of the volume.

        :return: The volume_wwn of this RecoverVolumeDescriptor.
        :rtype: str
        :required/optional: required
        """
        return self._volume_wwn

    @volume_wwn.setter
    def volume_wwn(self, volume_wwn):
        """
        Sets the volume_wwn of this RecoverVolumeDescriptor.
        The WWN of the volume.

        :param volume_wwn: The volume_wwn of this RecoverVolumeDescriptor.
        :type: str
        """
        self._volume_wwn = volume_wwn

    @property
    def volume_ssid(self):
        """
        Gets the volume_ssid of this RecoverVolumeDescriptor.
        The SSID of the volume.

        :return: The volume_ssid of this RecoverVolumeDescriptor.
        :rtype: int
        :required/optional: required
        """
        return self._volume_ssid

    @volume_ssid.setter
    def volume_ssid(self, volume_ssid):
        """
        Sets the volume_ssid of this RecoverVolumeDescriptor.
        The SSID of the volume.

        :param volume_ssid: The volume_ssid of this RecoverVolumeDescriptor.
        :type: int
        """
        self._volume_ssid = volume_ssid

    @property
    def dss_prealloc_enabled(self):
        """
        Gets the dss_prealloc_enabled of this RecoverVolumeDescriptor.
        True if dynamic segment sizing pre-allocation is enabled for the volume.

        :return: The dss_prealloc_enabled of this RecoverVolumeDescriptor.
        :rtype: bool
        :required/optional: required
        """
        return self._dss_prealloc_enabled

    @dss_prealloc_enabled.setter
    def dss_prealloc_enabled(self, dss_prealloc_enabled):
        """
        Sets the dss_prealloc_enabled of this RecoverVolumeDescriptor.
        True if dynamic segment sizing pre-allocation is enabled for the volume.

        :param dss_prealloc_enabled: The dss_prealloc_enabled of this RecoverVolumeDescriptor.
        :type: bool
        """
        self._dss_prealloc_enabled = dss_prealloc_enabled

    @property
    def protection_type(self):
        """
        Gets the protection_type of this RecoverVolumeDescriptor.
        The protection type of the volume.

        :return: The protection_type of this RecoverVolumeDescriptor.
        :rtype: str
        :required/optional: required
        """
        return self._protection_type

    @protection_type.setter
    def protection_type(self, protection_type):
        """
        Sets the protection_type of this RecoverVolumeDescriptor.
        The protection type of the volume.

        :param protection_type: The protection_type of this RecoverVolumeDescriptor.
        :type: str
        """
        allowed_values = ["type0Protection", "type1Protection", "type2Protection", "type3Protection", "__UNDEFINED"]
        if protection_type not in allowed_values:
            raise ValueError(
                "Invalid value for `protection_type`, must be one of {0}"
                .format(allowed_values)
            )
        self._protection_type = protection_type

    @property
    def allocate_reserved_space(self):
        """
        Gets the allocate_reserved_space of this RecoverVolumeDescriptor.
        Determines whether or not reserved space is allocated on the drives in the volume group.

        :return: The allocate_reserved_space of this RecoverVolumeDescriptor.
        :rtype: bool
        :required/optional: required
        """
        return self._allocate_reserved_space

    @allocate_reserved_space.setter
    def allocate_reserved_space(self, allocate_reserved_space):
        """
        Sets the allocate_reserved_space of this RecoverVolumeDescriptor.
        Determines whether or not reserved space is allocated on the drives in the volume group.

        :param allocate_reserved_space: The allocate_reserved_space of this RecoverVolumeDescriptor.
        :type: bool
        """
        self._allocate_reserved_space = allocate_reserved_space

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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 pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        if self is None:
           return None
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if self is None or other is None:
            return None
        return self.__dict__ == other.__dict__

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

