# coding: utf-8

"""
AutoConfigTemplate.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 AutoConfigTemplate(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        AutoConfigTemplate - 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 = {
            'phy_drive_type': 'str',  # (required parameter)
            'raid_level': 'str',  # (required parameter)
            'volume_group_width': 'int',  # (required parameter)
            'volumes_per_group': 'int',  # (required parameter)
            'number_hot_spares': 'int',  # (required parameter)
            'number_unassigned_drives': 'int',  # (required parameter)
            'segment_size': 'int',  # (required parameter)
            'read_ahead': 'int',  # (required parameter)
            'volume_group_security_type': 'str',  # (required parameter)
            'drive_media_type': 'str',  # (required parameter)
            'only_protection_information_capable': 'bool',  # (required parameter)
            'volume_group_security_level': 'str'
        }

        self.attribute_map = {
            'phy_drive_type': 'phyDriveType',  # (required parameter)
            'raid_level': 'raidLevel',  # (required parameter)
            'volume_group_width': 'volumeGroupWidth',  # (required parameter)
            'volumes_per_group': 'volumesPerGroup',  # (required parameter)
            'number_hot_spares': 'numberHotSpares',  # (required parameter)
            'number_unassigned_drives': 'numberUnassignedDrives',  # (required parameter)
            'segment_size': 'segmentSize',  # (required parameter)
            'read_ahead': 'readAhead',  # (required parameter)
            'volume_group_security_type': 'volumeGroupSecurityType',  # (required parameter)
            'drive_media_type': 'driveMediaType',  # (required parameter)
            'only_protection_information_capable': 'onlyProtectionInformationCapable',  # (required parameter)
            'volume_group_security_level': 'volumeGroupSecurityLevel'
        }

        self._phy_drive_type = None
        self._raid_level = None
        self._volume_group_width = None
        self._volumes_per_group = None
        self._number_hot_spares = None
        self._number_unassigned_drives = None
        self._segment_size = None
        self._read_ahead = None
        self._volume_group_security_type = None
        self._drive_media_type = None
        self._only_protection_information_capable = None
        self._volume_group_security_level = None

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

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

        :param phy_drive_type: The phy_drive_type of this AutoConfigTemplate.
        :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 raid_level(self):
        """
        Gets the raid_level of this AutoConfigTemplate.
        The RAID level of all the potential volumes.

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

    @raid_level.setter
    def raid_level(self, raid_level):
        """
        Sets the raid_level of this AutoConfigTemplate.
        The RAID level of all the potential volumes.

        :param raid_level: The raid_level of this AutoConfigTemplate.
        :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 volume_group_width(self):
        """
        Gets the volume_group_width of this AutoConfigTemplate.
        The width of the volume group in drives.

        :return: The volume_group_width of this AutoConfigTemplate.
        :rtype: int
        :required/optional: required
        """
        return self._volume_group_width

    @volume_group_width.setter
    def volume_group_width(self, volume_group_width):
        """
        Sets the volume_group_width of this AutoConfigTemplate.
        The width of the volume group in drives.

        :param volume_group_width: The volume_group_width of this AutoConfigTemplate.
        :type: int
        """
        self._volume_group_width = volume_group_width

    @property
    def volumes_per_group(self):
        """
        Gets the volumes_per_group of this AutoConfigTemplate.
        The number of volumes per volume group.

        :return: The volumes_per_group of this AutoConfigTemplate.
        :rtype: int
        :required/optional: required
        """
        return self._volumes_per_group

    @volumes_per_group.setter
    def volumes_per_group(self, volumes_per_group):
        """
        Sets the volumes_per_group of this AutoConfigTemplate.
        The number of volumes per volume group.

        :param volumes_per_group: The volumes_per_group of this AutoConfigTemplate.
        :type: int
        """
        self._volumes_per_group = volumes_per_group

    @property
    def number_hot_spares(self):
        """
        Gets the number_hot_spares of this AutoConfigTemplate.
        The number of hot spares to assign.

        :return: The number_hot_spares of this AutoConfigTemplate.
        :rtype: int
        :required/optional: required
        """
        return self._number_hot_spares

    @number_hot_spares.setter
    def number_hot_spares(self, number_hot_spares):
        """
        Sets the number_hot_spares of this AutoConfigTemplate.
        The number of hot spares to assign.

        :param number_hot_spares: The number_hot_spares of this AutoConfigTemplate.
        :type: int
        """
        self._number_hot_spares = number_hot_spares

    @property
    def number_unassigned_drives(self):
        """
        Gets the number_unassigned_drives of this AutoConfigTemplate.
        The number of drives to leave unassigned.

        :return: The number_unassigned_drives of this AutoConfigTemplate.
        :rtype: int
        :required/optional: required
        """
        return self._number_unassigned_drives

    @number_unassigned_drives.setter
    def number_unassigned_drives(self, number_unassigned_drives):
        """
        Sets the number_unassigned_drives of this AutoConfigTemplate.
        The number of drives to leave unassigned.

        :param number_unassigned_drives: The number_unassigned_drives of this AutoConfigTemplate.
        :type: int
        """
        self._number_unassigned_drives = number_unassigned_drives

    @property
    def segment_size(self):
        """
        Gets the segment_size of this AutoConfigTemplate.
        The segment size for all volumes.

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

    @segment_size.setter
    def segment_size(self, segment_size):
        """
        Sets the segment_size of this AutoConfigTemplate.
        The segment size for all volumes.

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

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

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

    @read_ahead.setter
    def read_ahead(self, read_ahead):
        """
        Sets the read_ahead of this AutoConfigTemplate.
        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 AutoConfigTemplate.
        :type: int
        """
        self._read_ahead = read_ahead

    @property
    def volume_group_security_type(self):
        """
        Gets the volume_group_security_type of this AutoConfigTemplate.
        This field is used to specify the volume group security type.

        :return: The volume_group_security_type of this AutoConfigTemplate.
        :rtype: str
        :required/optional: required
        """
        return self._volume_group_security_type

    @volume_group_security_type.setter
    def volume_group_security_type(self, volume_group_security_type):
        """
        Sets the volume_group_security_type of this AutoConfigTemplate.
        This field is used to specify the volume group security type.

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

    @property
    def drive_media_type(self):
        """
        Gets the drive_media_type of this AutoConfigTemplate.
        This field is set to the desired drive media type of the drive.

        :return: The drive_media_type of this AutoConfigTemplate.
        :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 AutoConfigTemplate.
        This field is set to the desired drive media type of the drive.

        :param drive_media_type: The drive_media_type of this AutoConfigTemplate.
        :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 AutoConfigTemplate.
        If this field is set to true, only PI capable drives will be considered for volume candidates, otherwise both PI capable and non-PI capable drives will be considered.

        :return: The only_protection_information_capable of this AutoConfigTemplate.
        :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 AutoConfigTemplate.
        If this field is set to true, only PI capable drives will be considered for volume candidates, otherwise both PI capable and non-PI capable drives will be considered.

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

    @property
    def volume_group_security_level(self):
        """
        Gets the volume_group_security_level of this AutoConfigTemplate.
        Refines the information in the securityType field to describe the set of drives.

        :return: The volume_group_security_level of this AutoConfigTemplate.
        :rtype: str
        :required/optional: required
        """
        return self._volume_group_security_level

    @volume_group_security_level.setter
    def volume_group_security_level(self, volume_group_security_level):
        """
        Sets the volume_group_security_level of this AutoConfigTemplate.
        Refines the information in the securityType field to describe the set of drives.

        :param volume_group_security_level: The volume_group_security_level of this AutoConfigTemplate.
        :type: str
        """
        allowed_values = ["unknown", "none", "mixed", "fde", "fips", "__UNDEFINED"]
        if volume_group_security_level not in allowed_values:
            raise ValueError(
                "Invalid value for `volume_group_security_level`, must be one of {0}"
                .format(allowed_values)
            )
        self._volume_group_security_level = volume_group_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

