# coding: utf-8

"""
    Zadara VPSA Storage Array REST API

     # Overview  This document outlines the methods available for administrating your Zadara Storage VPSA&#8482;. The Zadara Storage Array REST API   supports form-encoded, JSON, and XML requests, and can return either JSON or XML responses.  ## Usage  The majority of the APIs available require authentication which requires an API token to use. You can retrieve this token through the   Users section of your VPSA, or through the API using the \"Return a user's access key\" API in the Users Section below.  ## Authentication Methods  The authentication token can be passed either through the access_key parameter inside of the body of the REST API request, or   through the X-Access-Key header.  ## Timeouts  By default, all operations that don't complete within five seconds will return a message informing you that the action may take some  time to complete. When using the API, this can cause some actions, such as large volume creation, to be undesirably asynchronous.  You can specify your own timeout with the timeout parameter, in seconds, and a timeout value of -1 specifies an infinite timeout.  ## Specific Fields For Product  Some of the fields/actions used in the API should be used only for a specific product. The following tags are used to mark which   product responds to the fields/actions  VPSA Flash Array  VPSA Storage Array - Hybrid VPSA  ## Questions  If you have any questions or need support involving the REST API, please contact for assistance.   # noqa: E501

    OpenAPI spec version: 23.03-sp1
    Contact: support@zadarastorage.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from Vpsa.configuration import Configuration


class CreateRaidGroup(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 = {
        'display_name': 'str',
        'protection': 'str',
        'disk': 'str',
        'protection_width': 'int',
        'stripe_size': 'int',
        'hot_spare': 'str',
        'force': 'str'
    }

    attribute_map = {
        'display_name': 'display_name',
        'protection': 'protection',
        'disk': 'disk',
        'protection_width': 'protection_width',
        'stripe_size': 'stripe_size',
        'hot_spare': 'hot_spare',
        'force': 'force'
    }

    def __init__(self, display_name=None, protection=None, disk=None, protection_width=None, stripe_size=None, hot_spare=None, force=None, _configuration=None):  # noqa: E501
        """CreateRaidGroup - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._display_name = None
        self._protection = None
        self._disk = None
        self._protection_width = None
        self._stripe_size = None
        self._hot_spare = None
        self._force = None
        self.discriminator = None

        self.display_name = display_name
        self.protection = protection
        self.disk = disk
        if protection_width is not None:
            self.protection_width = protection_width
        if stripe_size is not None:
            self.stripe_size = stripe_size
        if hot_spare is not None:
            self.hot_spare = hot_spare
        if force is not None:
            self.force = force

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

        The RAID group display name  # noqa: E501

        :return: The display_name of this CreateRaidGroup.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this CreateRaidGroup.

        The RAID group display name  # noqa: E501

        :param display_name: The display_name of this CreateRaidGroup.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and display_name is None:
            raise ValueError("Invalid value for `display_name`, must not be `None`")  # noqa: E501

        self._display_name = display_name

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

        protection type  # noqa: E501

        :return: The protection of this CreateRaidGroup.  # noqa: E501
        :rtype: str
        """
        return self._protection

    @protection.setter
    def protection(self, protection):
        """Sets the protection of this CreateRaidGroup.

        protection type  # noqa: E501

        :param protection: The protection of this CreateRaidGroup.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and protection is None:
            raise ValueError("Invalid value for `protection`, must not be `None`")  # noqa: E501
        allowed_values = ["RAID1", "RAID5", "RAID6"]  # noqa: E501
        if (self._configuration.client_side_validation and
                protection not in allowed_values):
            raise ValueError(
                "Invalid value for `protection` ({0}), must be one of {1}"  # noqa: E501
                .format(protection, allowed_values)
            )

        self._protection = protection

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

        A comma-separated list of Drive IDs.  # noqa: E501

        :return: The disk of this CreateRaidGroup.  # noqa: E501
        :rtype: str
        """
        return self._disk

    @disk.setter
    def disk(self, disk):
        """Sets the disk of this CreateRaidGroup.

        A comma-separated list of Drive IDs.  # noqa: E501

        :param disk: The disk of this CreateRaidGroup.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and disk is None:
            raise ValueError("Invalid value for `disk`, must not be `None`")  # noqa: E501

        self._disk = disk

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

        Number of drives in the RAID protection, not including hot spare.  # noqa: E501

        :return: The protection_width of this CreateRaidGroup.  # noqa: E501
        :rtype: int
        """
        return self._protection_width

    @protection_width.setter
    def protection_width(self, protection_width):
        """Sets the protection_width of this CreateRaidGroup.

        Number of drives in the RAID protection, not including hot spare.  # noqa: E501

        :param protection_width: The protection_width of this CreateRaidGroup.  # noqa: E501
        :type: int
        """

        self._protection_width = protection_width

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

        Size of the stripe per Disk. Required for RAID6.  # noqa: E501

        :return: The stripe_size of this CreateRaidGroup.  # noqa: E501
        :rtype: int
        """
        return self._stripe_size

    @stripe_size.setter
    def stripe_size(self, stripe_size):
        """Sets the stripe_size of this CreateRaidGroup.

        Size of the stripe per Disk. Required for RAID6.  # noqa: E501

        :param stripe_size: The stripe_size of this CreateRaidGroup.  # noqa: E501
        :type: int
        """

        self._stripe_size = stripe_size

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


        :return: The hot_spare of this CreateRaidGroup.  # noqa: E501
        :rtype: str
        """
        return self._hot_spare

    @hot_spare.setter
    def hot_spare(self, hot_spare):
        """Sets the hot_spare of this CreateRaidGroup.


        :param hot_spare: The hot_spare of this CreateRaidGroup.  # noqa: E501
        :type: str
        """
        allowed_values = ["YES", "NO"]  # noqa: E501
        if (self._configuration.client_side_validation and
                hot_spare not in allowed_values):
            raise ValueError(
                "Invalid value for `hot_spare` ({0}), must be one of {1}"  # noqa: E501
                .format(hot_spare, allowed_values)
            )

        self._hot_spare = hot_spare

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


        :return: The force of this CreateRaidGroup.  # noqa: E501
        :rtype: str
        """
        return self._force

    @force.setter
    def force(self, force):
        """Sets the force of this CreateRaidGroup.


        :param force: The force of this CreateRaidGroup.  # noqa: E501
        :type: str
        """
        allowed_values = ["YES", "NO"]  # noqa: E501
        if (self._configuration.client_side_validation and
                force not in allowed_values):
            raise ValueError(
                "Invalid value for `force` ({0}), must be one of {1}"  # noqa: E501
                .format(force, allowed_values)
            )

        self._force = force

    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
        if issubclass(CreateRaidGroup, dict):
            for key, value in self.items():
                result[key] = 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, CreateRaidGroup):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
