# coding: utf-8

"""
VolumeCandidate.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 VolumeCandidate(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        VolumeCandidate - 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 = {
            'raid_level': 'str',  # (required parameter)
            'tray_loss_protection': 'bool',  # (required parameter)
            'raw_size': 'int',  # (required parameter)
            'usable_size': 'int',  # (required parameter)
            'drive_count': 'int',  # (required parameter)
            'free_extent_ref': 'str',  # (required parameter)
            'drive_ref_list': 'DriveRefList',  # (required parameter)
            'candidate_selection_type': 'str',  # (required parameter)
            'spindle_speed_match': 'bool',  # (required parameter)
            'spindle_speed': 'int',  # (required parameter)
            'phy_drive_type': 'str',  # (required parameter)
            'dss_prealloc_enabled': 'bool',  # (required parameter)
            'security_type': 'str',  # (required parameter)
            'drawer_loss_protection': 'bool',  # (required parameter)
            'drive_media_type': 'str',  # (required parameter)
            'protection_information_capable': 'bool',  # (required parameter)
            'protection_information_capabilities': 'ProtectionInformationCapabilities',  # (required parameter)
            'volume_candidate_data': 'VolumeCandidateTypeData',  # (required parameter)
            'drive_block_format': 'str',  # (required parameter)
            'allocate_reserved_space': 'bool',  # (required parameter)
            'security_level': 'str'
        }

        self.attribute_map = {
            'raid_level': 'raidLevel',  # (required parameter)
            'tray_loss_protection': 'trayLossProtection',  # (required parameter)
            'raw_size': 'rawSize',  # (required parameter)
            'usable_size': 'usableSize',  # (required parameter)
            'drive_count': 'driveCount',  # (required parameter)
            'free_extent_ref': 'freeExtentRef',  # (required parameter)
            'drive_ref_list': 'driveRefList',  # (required parameter)
            'candidate_selection_type': 'candidateSelectionType',  # (required parameter)
            'spindle_speed_match': 'spindleSpeedMatch',  # (required parameter)
            'spindle_speed': 'spindleSpeed',  # (required parameter)
            'phy_drive_type': 'phyDriveType',  # (required parameter)
            'dss_prealloc_enabled': 'dssPreallocEnabled',  # (required parameter)
            'security_type': 'securityType',  # (required parameter)
            'drawer_loss_protection': 'drawerLossProtection',  # (required parameter)
            'drive_media_type': 'driveMediaType',  # (required parameter)
            'protection_information_capable': 'protectionInformationCapable',  # (required parameter)
            'protection_information_capabilities': 'protectionInformationCapabilities',  # (required parameter)
            'volume_candidate_data': 'volumeCandidateData',  # (required parameter)
            'drive_block_format': 'driveBlockFormat',  # (required parameter)
            'allocate_reserved_space': 'allocateReservedSpace',  # (required parameter)
            'security_level': 'securityLevel'
        }

        self._raid_level = None
        self._tray_loss_protection = None
        self._raw_size = None
        self._usable_size = None
        self._drive_count = None
        self._free_extent_ref = None
        self._drive_ref_list = None
        self._candidate_selection_type = None
        self._spindle_speed_match = None
        self._spindle_speed = None
        self._phy_drive_type = None
        self._dss_prealloc_enabled = None
        self._security_type = None
        self._drawer_loss_protection = None
        self._drive_media_type = None
        self._protection_information_capable = None
        self._protection_information_capabilities = None
        self._volume_candidate_data = None
        self._drive_block_format = None
        self._allocate_reserved_space = None
        self._security_level = None

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

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

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

        :param raid_level: The raid_level of this VolumeCandidate.
        :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 tray_loss_protection(self):
        """
        Gets the tray_loss_protection of this VolumeCandidate.
        This field is set to true if the candidate has tray loss protection.

        :return: The tray_loss_protection of this VolumeCandidate.
        :rtype: bool
        :required/optional: required
        """
        return self._tray_loss_protection

    @tray_loss_protection.setter
    def tray_loss_protection(self, tray_loss_protection):
        """
        Sets the tray_loss_protection of this VolumeCandidate.
        This field is set to true if the candidate has tray loss protection.

        :param tray_loss_protection: The tray_loss_protection of this VolumeCandidate.
        :type: bool
        """
        self._tray_loss_protection = tray_loss_protection

    @property
    def raw_size(self):
        """
        Gets the raw_size of this VolumeCandidate.
        This value is the maximum allowed user data storage capacity for the volume if the smallest possible segment is used in creating the volume.

        :return: The raw_size of this VolumeCandidate.
        :rtype: int
        :required/optional: required
        """
        return self._raw_size

    @raw_size.setter
    def raw_size(self, raw_size):
        """
        Sets the raw_size of this VolumeCandidate.
        This value is the maximum allowed user data storage capacity for the volume if the smallest possible segment is used in creating the volume.

        :param raw_size: The raw_size of this VolumeCandidate.
        :type: int
        """
        self._raw_size = raw_size

    @property
    def usable_size(self):
        """
        Gets the usable_size of this VolumeCandidate.
        This value is the maximum allowed user data storage capacity for the volume if the largest possible segment is used in creating the volume.

        :return: The usable_size of this VolumeCandidate.
        :rtype: int
        :required/optional: required
        """
        return self._usable_size

    @usable_size.setter
    def usable_size(self, usable_size):
        """
        Sets the usable_size of this VolumeCandidate.
        This value is the maximum allowed user data storage capacity for the volume if the largest possible segment is used in creating the volume.

        :param usable_size: The usable_size of this VolumeCandidate.
        :type: int
        """
        self._usable_size = usable_size

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

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

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

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

    @property
    def free_extent_ref(self):
        """
        Gets the free_extent_ref of this VolumeCandidate.
        The reference value of the free extent on which the potential volume would be created. This field will be valid only if the volume candidate was obtained using a candidate selection type of CANDIDATE_SEL_FREE_EXTENT.

        :return: The free_extent_ref of this VolumeCandidate.
        :rtype: str
        :required/optional: required
        """
        return self._free_extent_ref

    @free_extent_ref.setter
    def free_extent_ref(self, free_extent_ref):
        """
        Sets the free_extent_ref of this VolumeCandidate.
        The reference value of the free extent on which the potential volume would be created. This field will be valid only if the volume candidate was obtained using a candidate selection type of CANDIDATE_SEL_FREE_EXTENT.

        :param free_extent_ref: The free_extent_ref of this VolumeCandidate.
        :type: str
        """
        self._free_extent_ref = free_extent_ref

    @property
    def drive_ref_list(self):
        """
        Gets the drive_ref_list of this VolumeCandidate.
        A list of the reference values of the drives on which the volume group for the potential volume would be created. This field will be valid only if the volume candidate was obtained using a candidate selection type of CANDIDATE_SEL_MANUAL.

        :return: The drive_ref_list of this VolumeCandidate.
        :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 VolumeCandidate.
        A list of the reference values of the drives on which the volume group for the potential volume would be created. This field will be valid only if the volume candidate was obtained using a candidate selection type of CANDIDATE_SEL_MANUAL.

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

    @property
    def candidate_selection_type(self):
        """
        Gets the candidate_selection_type of this VolumeCandidate.
        The type of candidate selection that was used to obtain this volume candidate.

        :return: The candidate_selection_type of this VolumeCandidate.
        :rtype: str
        :required/optional: required
        """
        return self._candidate_selection_type

    @candidate_selection_type.setter
    def candidate_selection_type(self, candidate_selection_type):
        """
        Sets the candidate_selection_type of this VolumeCandidate.
        The type of candidate selection that was used to obtain this volume candidate.

        :param candidate_selection_type: The candidate_selection_type of this VolumeCandidate.
        :type: str
        """
        allowed_values = ["freeExtent", "manual", "count", "__UNDEFINED"]
        if candidate_selection_type not in allowed_values:
            raise ValueError(
                "Invalid value for `candidate_selection_type`, must be one of {0}"
                .format(allowed_values)
            )
        self._candidate_selection_type = candidate_selection_type

    @property
    def spindle_speed_match(self):
        """
        Gets the spindle_speed_match of this VolumeCandidate.
        True, if all drives have matching spindle speed.

        :return: The spindle_speed_match of this VolumeCandidate.
        :rtype: bool
        :required/optional: required
        """
        return self._spindle_speed_match

    @spindle_speed_match.setter
    def spindle_speed_match(self, spindle_speed_match):
        """
        Sets the spindle_speed_match of this VolumeCandidate.
        True, if all drives have matching spindle speed.

        :param spindle_speed_match: The spindle_speed_match of this VolumeCandidate.
        :type: bool
        """
        self._spindle_speed_match = spindle_speed_match

    @property
    def spindle_speed(self):
        """
        Gets the spindle_speed of this VolumeCandidate.
        True, if all drives have matching spindle speed.

        :return: The spindle_speed of this VolumeCandidate.
        :rtype: int
        :required/optional: required
        """
        return self._spindle_speed

    @spindle_speed.setter
    def spindle_speed(self, spindle_speed):
        """
        Sets the spindle_speed of this VolumeCandidate.
        True, if all drives have matching spindle speed.

        :param spindle_speed: The spindle_speed of this VolumeCandidate.
        :type: int
        """
        self._spindle_speed = spindle_speed

    @property
    def phy_drive_type(self):
        """
        Gets the phy_drive_type of this VolumeCandidate.
        The physical drive type.

        :return: The phy_drive_type of this VolumeCandidate.
        :rtype: str
        :required/optional: required
        """
        return self._phy_drive_type

    @phy_drive_type.setter
    def phy_drive_type(self, phy_drive_type):
        """
        Sets the phy_drive_type of this VolumeCandidate.
        The physical drive type.

        :param phy_drive_type: The phy_drive_type of this VolumeCandidate.
        :type: str
        """
        allowed_values = ["all", "scsi", "fibre", "sata", "pata", "fibre520b", "sas", "unknown", "sas4k", "__UNDEFINED"]
        if phy_drive_type not in allowed_values:
            raise ValueError(
                "Invalid value for `phy_drive_type`, must be one of {0}"
                .format(allowed_values)
            )
        self._phy_drive_type = phy_drive_type

    @property
    def dss_prealloc_enabled(self):
        """
        Gets the dss_prealloc_enabled of this VolumeCandidate.
        True if dynamic segment sizing pre-allocation will be enabled for the volume created from this candidate, otherwise false.

        :return: The dss_prealloc_enabled of this VolumeCandidate.
        :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 VolumeCandidate.
        True if dynamic segment sizing pre-allocation will be enabled for the volume created from this candidate, otherwise false.

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

    @property
    def security_type(self):
        """
        Gets the security_type of this VolumeCandidate.
        The desired security level of the drive group.

        :return: The security_type of this VolumeCandidate.
        :rtype: str
        :required/optional: required
        """
        return self._security_type

    @security_type.setter
    def security_type(self, security_type):
        """
        Sets the security_type of this VolumeCandidate.
        The desired security level of the drive group.

        :param security_type: The security_type of this VolumeCandidate.
        :type: str
        """
        allowed_values = ["unknown", "none", "capable", "enabled", "__UNDEFINED"]
        if security_type not in allowed_values:
            raise ValueError(
                "Invalid value for `security_type`, must be one of {0}"
                .format(allowed_values)
            )
        self._security_type = security_type

    @property
    def drawer_loss_protection(self):
        """
        Gets the drawer_loss_protection of this VolumeCandidate.
        This field is set to true when the volume group has drawer loss protection; otherwise it is set to false

        :return: The drawer_loss_protection of this VolumeCandidate.
        :rtype: bool
        :required/optional: required
        """
        return self._drawer_loss_protection

    @drawer_loss_protection.setter
    def drawer_loss_protection(self, drawer_loss_protection):
        """
        Sets the drawer_loss_protection of this VolumeCandidate.
        This field is set to true when the volume group has drawer loss protection; otherwise it is set to false

        :param drawer_loss_protection: The drawer_loss_protection of this VolumeCandidate.
        :type: bool
        """
        self._drawer_loss_protection = drawer_loss_protection

    @property
    def drive_media_type(self):
        """
        Gets the drive_media_type of this VolumeCandidate.
        Drive media type (HDD or SSD) of the volume candidate.

        :return: The drive_media_type of this VolumeCandidate.
        :rtype: str
        :required/optional: required
        """
        return self._drive_media_type

    @drive_media_type.setter
    def drive_media_type(self, drive_media_type):
        """
        Sets the drive_media_type of this VolumeCandidate.
        Drive media type (HDD or SSD) of the volume candidate.

        :param drive_media_type: The drive_media_type of this VolumeCandidate.
        :type: str
        """
        allowed_values = ["all", "unknown", "hdd", "ssd", "__UNDEFINED"]
        if drive_media_type not in allowed_values:
            raise ValueError(
                "Invalid value for `drive_media_type`, must be one of {0}"
                .format(allowed_values)
            )
        self._drive_media_type = drive_media_type

    @property
    def protection_information_capable(self):
        """
        Gets the protection_information_capable of this VolumeCandidate.
        This field is no longer used.

        :return: The protection_information_capable of this VolumeCandidate.
        :rtype: bool
        :required/optional: required
        """
        return self._protection_information_capable

    @protection_information_capable.setter
    def protection_information_capable(self, protection_information_capable):
        """
        Sets the protection_information_capable of this VolumeCandidate.
        This field is no longer used.

        :param protection_information_capable: The protection_information_capable of this VolumeCandidate.
        :type: bool
        """
        self._protection_information_capable = protection_information_capable

    @property
    def protection_information_capabilities(self):
        """
        Gets the protection_information_capabilities of this VolumeCandidate.
        This structure contains a protectionInformationCapable field which is set to true if all drives in the volume group where the volume candidate resides are Protection Information (PI) capable. It also contains the protection type for the volume group.

        :return: The protection_information_capabilities of this VolumeCandidate.
        :rtype: ProtectionInformationCapabilities
        :required/optional: required
        """
        return self._protection_information_capabilities

    @protection_information_capabilities.setter
    def protection_information_capabilities(self, protection_information_capabilities):
        """
        Sets the protection_information_capabilities of this VolumeCandidate.
        This structure contains a protectionInformationCapable field which is set to true if all drives in the volume group where the volume candidate resides are Protection Information (PI) capable. It also contains the protection type for the volume group.

        :param protection_information_capabilities: The protection_information_capabilities of this VolumeCandidate.
        :type: ProtectionInformationCapabilities
        """
        self._protection_information_capabilities = protection_information_capabilities

    @property
    def volume_candidate_data(self):
        """
        Gets the volume_candidate_data of this VolumeCandidate.
        Information about the Volume Candidate.

        :return: The volume_candidate_data of this VolumeCandidate.
        :rtype: VolumeCandidateTypeData
        :required/optional: required
        """
        return self._volume_candidate_data

    @volume_candidate_data.setter
    def volume_candidate_data(self, volume_candidate_data):
        """
        Sets the volume_candidate_data of this VolumeCandidate.
        Information about the Volume Candidate.

        :param volume_candidate_data: The volume_candidate_data of this VolumeCandidate.
        :type: VolumeCandidateTypeData
        """
        self._volume_candidate_data = volume_candidate_data

    @property
    def drive_block_format(self):
        """
        Gets the drive_block_format of this VolumeCandidate.
        Identifies the drive block format of the volume candidate.

        :return: The drive_block_format of this VolumeCandidate.
        :rtype: str
        :required/optional: required
        """
        return self._drive_block_format

    @drive_block_format.setter
    def drive_block_format(self, drive_block_format):
        """
        Sets the drive_block_format of this VolumeCandidate.
        Identifies the drive block format of the volume candidate.

        :param drive_block_format: The drive_block_format of this VolumeCandidate.
        :type: str
        """
        allowed_values = ["unknown", "allNative", "allEmulated", "mixed", "__UNDEFINED"]
        if drive_block_format not in allowed_values:
            raise ValueError(
                "Invalid value for `drive_block_format`, must be one of {0}"
                .format(allowed_values)
            )
        self._drive_block_format = drive_block_format

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

        :return: The allocate_reserved_space of this VolumeCandidate.
        :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 VolumeCandidate.
        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 VolumeCandidate.
        :type: bool
        """
        self._allocate_reserved_space = allocate_reserved_space

    @property
    def security_level(self):
        """
        Gets the security_level of this VolumeCandidate.
        Describes the overall security level of the drive set. Values can include: FDE only, FIPS only, mixed, or no security. Used along with the SecurityType field.

        :return: The security_level of this VolumeCandidate.
        :rtype: str
        :required/optional: required
        """
        return self._security_level

    @security_level.setter
    def security_level(self, security_level):
        """
        Sets the security_level of this VolumeCandidate.
        Describes the overall security level of the drive set. Values can include: FDE only, FIPS only, mixed, or no security. Used along with the SecurityType field.

        :param security_level: The security_level of this VolumeCandidate.
        :type: str
        """
        allowed_values = ["unknown", "none", "mixed", "fde", "fips", "__UNDEFINED"]
        if security_level not in allowed_values:
            raise ValueError(
                "Invalid value for `security_level`, must be one of {0}"
                .format(allowed_values)
            )
        self._security_level = security_level

    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

