# coding: utf-8

"""
VolumeCandidateRequest.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 VolumeCandidateRequest(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        VolumeCandidateRequest - 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 = {
            'candidate_selection_type': 'CandidateSelectionTypeData',  # (required parameter)
            'raid_level': 'str',  # (required parameter)
            'phy_drive_type': 'str',  # (required parameter)
            'dss_prealloc_enabled': 'bool',  # (required parameter)
            'security_type': 'str',  # (required parameter)
            'drive_media_type': 'str',  # (required parameter)
            'only_protection_information_capable': 'bool',  # (required parameter)
            'volume_candidate_request_data': 'VolumeCandidateRequestTypeData',  # (required parameter)
            'allocate_reserved_space': 'bool',  # (required parameter)
            'security_level': 'str'
        }

        self.attribute_map = {
            'candidate_selection_type': 'candidateSelectionType',  # (required parameter)
            'raid_level': 'raidLevel',  # (required parameter)
            'phy_drive_type': 'phyDriveType',  # (required parameter)
            'dss_prealloc_enabled': 'dssPreallocEnabled',  # (required parameter)
            'security_type': 'securityType',  # (required parameter)
            'drive_media_type': 'driveMediaType',  # (required parameter)
            'only_protection_information_capable': 'onlyProtectionInformationCapable',  # (required parameter)
            'volume_candidate_request_data': 'volumeCandidateRequestData',  # (required parameter)
            'allocate_reserved_space': 'allocateReservedSpace',  # (required parameter)
            'security_level': 'securityLevel'
        }

        self._candidate_selection_type = None
        self._raid_level = None
        self._phy_drive_type = None
        self._dss_prealloc_enabled = None
        self._security_type = None
        self._drive_media_type = None
        self._only_protection_information_capable = None
        self._volume_candidate_request_data = None
        self._allocate_reserved_space = None
        self._security_level = None

    @property
    def candidate_selection_type(self):
        """
        Gets the candidate_selection_type of this VolumeCandidateRequest.
        This field contains the specification of the type of volume candidates that are desired, along with ancillary information that depends on the type of candidates.

        :return: The candidate_selection_type of this VolumeCandidateRequest.
        :rtype: CandidateSelectionTypeData
        :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 VolumeCandidateRequest.
        This field contains the specification of the type of volume candidates that are desired, along with ancillary information that depends on the type of candidates.

        :param candidate_selection_type: The candidate_selection_type of this VolumeCandidateRequest.
        :type: CandidateSelectionTypeData
        """
        self._candidate_selection_type = candidate_selection_type

    @property
    def raid_level(self):
        """
        Gets the raid_level of this VolumeCandidateRequest.
        This field indicates that RAID level in which the caller is interested. It may be set to RAID_ALL if the client wishes to obtain volume candidate information about all possible RAID levels.

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

    @raid_level.setter
    def raid_level(self, raid_level):
        """
        Sets the raid_level of this VolumeCandidateRequest.
        This field indicates that RAID level in which the caller is interested. It may be set to RAID_ALL if the client wishes to obtain volume candidate information about all possible RAID levels.

        :param raid_level: The raid_level of this VolumeCandidateRequest.
        :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 phy_drive_type(self):
        """
        Gets the phy_drive_type of this VolumeCandidateRequest.
        The desired physical drive type.

        :return: The phy_drive_type of this VolumeCandidateRequest.
        :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 VolumeCandidateRequest.
        The desired physical drive type.

        :param phy_drive_type: The phy_drive_type of this VolumeCandidateRequest.
        :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 VolumeCandidateRequest.
        This field indicates whether or not the firmware should base the search for candidates on the DSS preallocation calculation.

        :return: The dss_prealloc_enabled of this VolumeCandidateRequest.
        :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 VolumeCandidateRequest.
        This field indicates whether or not the firmware should base the search for candidates on the DSS preallocation calculation.

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

    @property
    def security_type(self):
        """
        Gets the security_type of this VolumeCandidateRequest.
        Desired security type of the drive group (i.e. secure vs. not secure).

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

    @security_type.setter
    def security_type(self, security_type):
        """
        Sets the security_type of this VolumeCandidateRequest.
        Desired security type of the drive group (i.e. secure vs. not secure).

        :param security_type: The security_type of this VolumeCandidateRequest.
        :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 drive_media_type(self):
        """
        Gets the drive_media_type of this VolumeCandidateRequest.
        Drive media type (HDD or SSD) of the volume candidate.

        :return: The drive_media_type of this VolumeCandidateRequest.
        :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 VolumeCandidateRequest.
        Drive media type (HDD or SSD) of the volume candidate.

        :param drive_media_type: The drive_media_type of this VolumeCandidateRequest.
        :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 only_protection_information_capable(self):
        """
        Gets the only_protection_information_capable of this VolumeCandidateRequest.
        If true, only PI-capable drives considered for volume candidates.

        :return: The only_protection_information_capable of this VolumeCandidateRequest.
        :rtype: bool
        :required/optional: required
        """
        return self._only_protection_information_capable

    @only_protection_information_capable.setter
    def only_protection_information_capable(self, only_protection_information_capable):
        """
        Sets the only_protection_information_capable of this VolumeCandidateRequest.
        If true, only PI-capable drives considered for volume candidates.

        :param only_protection_information_capable: The only_protection_information_capable of this VolumeCandidateRequest.
        :type: bool
        """
        self._only_protection_information_capable = only_protection_information_capable

    @property
    def volume_candidate_request_data(self):
        """
        Gets the volume_candidate_request_data of this VolumeCandidateRequest.
        Information about the Volume Candidate Request.

        :return: The volume_candidate_request_data of this VolumeCandidateRequest.
        :rtype: VolumeCandidateRequestTypeData
        :required/optional: required
        """
        return self._volume_candidate_request_data

    @volume_candidate_request_data.setter
    def volume_candidate_request_data(self, volume_candidate_request_data):
        """
        Sets the volume_candidate_request_data of this VolumeCandidateRequest.
        Information about the Volume Candidate Request.

        :param volume_candidate_request_data: The volume_candidate_request_data of this VolumeCandidateRequest.
        :type: VolumeCandidateRequestTypeData
        """
        self._volume_candidate_request_data = volume_candidate_request_data

    @property
    def allocate_reserved_space(self):
        """
        Gets the allocate_reserved_space of this VolumeCandidateRequest.
        If true, allocate reserved space when creating a new volume group. Ignore when creating a volume in an existing volume group

        :return: The allocate_reserved_space of this VolumeCandidateRequest.
        :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 VolumeCandidateRequest.
        If true, allocate reserved space when creating a new volume group. Ignore when creating a volume in an existing volume group

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

    @property
    def security_level(self):
        """
        Gets the security_level of this VolumeCandidateRequest.
        The security level describes whether a set of drives should be comprised of FDE only, FIPS only, Mixed, or no security. This field is used along with the SecurityType filed to fully define the drive set.

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

    @security_level.setter
    def security_level(self, security_level):
        """
        Sets the security_level of this VolumeCandidateRequest.
        The security level describes whether a set of drives should be comprised of FDE only, FIPS only, Mixed, or no security. This field is used along with the SecurityType filed to fully define the drive set.

        :param security_level: The security_level of this VolumeCandidateRequest.
        :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

