# 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
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from Vpsa.api_client import ApiClient


class RAIDGroupsApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def add_hot_spare_to_raid_group(self, id, add_hot_spare_to_raid_group, **kwargs):  # noqa: E501
        """add_hot_spare_to_raid_group  # noqa: E501

        Add a hot spare to a RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_hot_spare_to_raid_group(id, add_hot_spare_to_raid_group, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param AddHotSpareToRaidGroup add_hot_spare_to_raid_group: (required)
        :return: InlineResponse20094
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.add_hot_spare_to_raid_group_with_http_info(id, add_hot_spare_to_raid_group, **kwargs)  # noqa: E501
        else:
            (data) = self.add_hot_spare_to_raid_group_with_http_info(id, add_hot_spare_to_raid_group, **kwargs)  # noqa: E501
            return data

    def add_hot_spare_to_raid_group_with_http_info(self, id, add_hot_spare_to_raid_group, **kwargs):  # noqa: E501
        """add_hot_spare_to_raid_group  # noqa: E501

        Add a hot spare to a RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_hot_spare_to_raid_group_with_http_info(id, add_hot_spare_to_raid_group, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param AddHotSpareToRaidGroup add_hot_spare_to_raid_group: (required)
        :return: InlineResponse20094
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'add_hot_spare_to_raid_group']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method add_hot_spare_to_raid_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `add_hot_spare_to_raid_group`")  # noqa: E501
        # verify the required parameter 'add_hot_spare_to_raid_group' is set
        if self.api_client.client_side_validation and ('add_hot_spare_to_raid_group' not in params or
                                                       params['add_hot_spare_to_raid_group'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `add_hot_spare_to_raid_group` when calling `add_hot_spare_to_raid_group`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `add_hot_spare_to_raid_group`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'add_hot_spare_to_raid_group' in params:
            body_params = params['add_hot_spare_to_raid_group']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}/hot_spares.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20094',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_raid_group(self, create_raid_group, **kwargs):  # noqa: E501
        """create_raid_group  # noqa: E501

        Create a RAID Group.Operation will fail if drives are not from the same capacity (override with force option)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_raid_group(create_raid_group, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CreateRaidGroup create_raid_group: (required)
        :return: InlineResponse20085
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_raid_group_with_http_info(create_raid_group, **kwargs)  # noqa: E501
        else:
            (data) = self.create_raid_group_with_http_info(create_raid_group, **kwargs)  # noqa: E501
            return data

    def create_raid_group_with_http_info(self, create_raid_group, **kwargs):  # noqa: E501
        """create_raid_group  # noqa: E501

        Create a RAID Group.Operation will fail if drives are not from the same capacity (override with force option)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_raid_group_with_http_info(create_raid_group, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CreateRaidGroup create_raid_group: (required)
        :return: InlineResponse20085
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['create_raid_group']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_raid_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'create_raid_group' is set
        if self.api_client.client_side_validation and ('create_raid_group' not in params or
                                                       params['create_raid_group'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `create_raid_group` when calling `create_raid_group`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_raid_group' in params:
            body_params = params['create_raid_group']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20085',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_raid_group(self, id, **kwargs):  # noqa: E501
        """delete_raid_group  # noqa: E501

        Delete a RAID Group. The RAID Group must be part of any Pool.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_raid_group(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20087
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_raid_group_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_raid_group_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def delete_raid_group_with_http_info(self, id, **kwargs):  # noqa: E501
        """delete_raid_group  # noqa: E501

        Delete a RAID Group. The RAID Group must be part of any Pool.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_raid_group_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20087
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_raid_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `delete_raid_group`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20087',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_drives_in_raid_group(self, id, **kwargs):  # noqa: E501
        """get_drives_in_raid_group  # noqa: E501

        Return the list of drives in a RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_drives_in_raid_group(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param int start: The item number to start from. 0 starts from the beginning.
        :param int limit: The total number of records to return.
        :return: InlineResponse20089
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_drives_in_raid_group_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_drives_in_raid_group_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_drives_in_raid_group_with_http_info(self, id, **kwargs):  # noqa: E501
        """get_drives_in_raid_group  # noqa: E501

        Return the list of drives in a RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_drives_in_raid_group_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param int start: The item number to start from. 0 starts from the beginning.
        :param int limit: The total number of records to return.
        :return: InlineResponse20089
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'start', 'limit']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_drives_in_raid_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `get_drives_in_raid_group`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_drives_in_raid_group`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        if self.api_client.client_side_validation and ('start' in params and params['start'] < 0):  # noqa: E501
            raise ValueError("Invalid value for parameter `start` when calling `get_drives_in_raid_group`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'start' in params:
            query_params.append(('start', params['start']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}/disks.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20089',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_free_raid_groups(self, **kwargs):  # noqa: E501
        """get_free_raid_groups  # noqa: E501

        Return a list of free RAID Groups which are not part of any Pool.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_free_raid_groups(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start: The item number to start from. 0 starts from the beginning.
        :param int limit: The total number of records to return.
        :return: InlineResponse20088
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_free_raid_groups_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_free_raid_groups_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_free_raid_groups_with_http_info(self, **kwargs):  # noqa: E501
        """get_free_raid_groups  # noqa: E501

        Return a list of free RAID Groups which are not part of any Pool.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_free_raid_groups_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start: The item number to start from. 0 starts from the beginning.
        :param int limit: The total number of records to return.
        :return: InlineResponse20088
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start', 'limit']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_free_raid_groups" % key
                )
            params[key] = val
        del params['kwargs']

        if self.api_client.client_side_validation and ('start' in params and params['start'] < 0):  # noqa: E501
            raise ValueError("Invalid value for parameter `start` when calling `get_free_raid_groups`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start' in params:
            query_params.append(('start', params['start']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/free.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20088',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_raid_group(self, id, **kwargs):  # noqa: E501
        """get_raid_group  # noqa: E501

        Return information for one RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_raid_group(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20086
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_raid_group_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_raid_group_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_raid_group_with_http_info(self, id, **kwargs):  # noqa: E501
        """get_raid_group  # noqa: E501

        Return information for one RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_raid_group_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20086
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_raid_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `get_raid_group`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_raid_group`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20086',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_raid_group_performance(self, id, **kwargs):  # noqa: E501
        """get_raid_group_performance  # noqa: E501

        Returns the last 60 data points of performance data for the specified interval.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_raid_group_performance(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param int interval: The interval between data points, in seconds
        :return: InlineResponse20097
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_raid_group_performance_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_raid_group_performance_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_raid_group_performance_with_http_info(self, id, **kwargs):  # noqa: E501
        """get_raid_group_performance  # noqa: E501

        Returns the last 60 data points of performance data for the specified interval.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_raid_group_performance_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param int interval: The interval between data points, in seconds
        :return: InlineResponse20097
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'interval']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_raid_group_performance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `get_raid_group_performance`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_raid_group_performance`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        if self.api_client.client_side_validation and ('interval' in params and params['interval'] < 1):  # noqa: E501
            raise ValueError("Invalid value for parameter `interval` when calling `get_raid_group_performance`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'interval' in params:
            query_params.append(('interval', params['interval']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}/performance.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20097',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def pause_raid_group_media_scan(self, id, **kwargs):  # noqa: E501
        """pause_raid_group_media_scan  # noqa: E501

        Pause the Media Scan of a RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.pause_raid_group_media_scan(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20093
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.pause_raid_group_media_scan_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.pause_raid_group_media_scan_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def pause_raid_group_media_scan_with_http_info(self, id, **kwargs):  # noqa: E501
        """pause_raid_group_media_scan  # noqa: E501

        Pause the Media Scan of a RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.pause_raid_group_media_scan_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20093
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method pause_raid_group_media_scan" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `pause_raid_group_media_scan`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `pause_raid_group_media_scan`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}/pause_scrub.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20093',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def remove_hot_spare_from_raid_group(self, id, **kwargs):  # noqa: E501
        """remove_hot_spare_from_raid_group  # noqa: E501

        Remove the hot spare from a RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remove_hot_spare_from_raid_group(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20095
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.remove_hot_spare_from_raid_group_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.remove_hot_spare_from_raid_group_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def remove_hot_spare_from_raid_group_with_http_info(self, id, **kwargs):  # noqa: E501
        """remove_hot_spare_from_raid_group  # noqa: E501

        Remove the hot spare from a RAID Group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remove_hot_spare_from_raid_group_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20095
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method remove_hot_spare_from_raid_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `remove_hot_spare_from_raid_group`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `remove_hot_spare_from_raid_group`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}/hot_spares/remove.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20095',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rename_raid_group(self, id, rename_raid_group, **kwargs):  # noqa: E501
        """rename_raid_group  # noqa: E501

        Update a RAID Group's name.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rename_raid_group(id, rename_raid_group, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param RenameRaidGroup rename_raid_group: (required)
        :return: InlineResponse20090
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rename_raid_group_with_http_info(id, rename_raid_group, **kwargs)  # noqa: E501
        else:
            (data) = self.rename_raid_group_with_http_info(id, rename_raid_group, **kwargs)  # noqa: E501
            return data

    def rename_raid_group_with_http_info(self, id, rename_raid_group, **kwargs):  # noqa: E501
        """rename_raid_group  # noqa: E501

        Update a RAID Group's name.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rename_raid_group_with_http_info(id, rename_raid_group, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param RenameRaidGroup rename_raid_group: (required)
        :return: InlineResponse20090
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'rename_raid_group']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rename_raid_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `rename_raid_group`")  # noqa: E501
        # verify the required parameter 'rename_raid_group' is set
        if self.api_client.client_side_validation and ('rename_raid_group' not in params or
                                                       params['rename_raid_group'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `rename_raid_group` when calling `rename_raid_group`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `rename_raid_group`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'rename_raid_group' in params:
            body_params = params['rename_raid_group']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}/rename.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20090',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def repair_raid_group(self, id, **kwargs):  # noqa: E501
        """repair_raid_group  # noqa: E501

        Repairs a degraded RAID group with an available drive. This function will first attempt to detect if there are any available drives, and will only proceed if one is found.  This function should be used with caution.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.repair_raid_group(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20096
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.repair_raid_group_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.repair_raid_group_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def repair_raid_group_with_http_info(self, id, **kwargs):  # noqa: E501
        """repair_raid_group  # noqa: E501

        Repairs a degraded RAID group with an available drive. This function will first attempt to detect if there are any available drives, and will only proceed if one is found.  This function should be used with caution.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.repair_raid_group_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20096
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method repair_raid_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `repair_raid_group`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `repair_raid_group`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}/repair.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20096',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def show_raid_groups(self, **kwargs):  # noqa: E501
        """show_raid_groups  # noqa: E501

        Return a list of RAID Groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.show_raid_groups(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start: The item number to start from. 0 starts from the beginning.
        :param int limit: The total number of records to return.
        :return: InlineResponse20084
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.show_raid_groups_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.show_raid_groups_with_http_info(**kwargs)  # noqa: E501
            return data

    def show_raid_groups_with_http_info(self, **kwargs):  # noqa: E501
        """show_raid_groups  # noqa: E501

        Return a list of RAID Groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.show_raid_groups_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start: The item number to start from. 0 starts from the beginning.
        :param int limit: The total number of records to return.
        :return: InlineResponse20084
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start', 'limit']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method show_raid_groups" % key
                )
            params[key] = val
        del params['kwargs']

        if self.api_client.client_side_validation and ('start' in params and params['start'] < 0):  # noqa: E501
            raise ValueError("Invalid value for parameter `start` when calling `show_raid_groups`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start' in params:
            query_params.append(('start', params['start']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20084',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def start_raid_group_media_scan(self, id, **kwargs):  # noqa: E501
        """start_raid_group_media_scan  # noqa: E501

        Trigger a Media Scan of the RAID Group. Parity inconsistency will be fixed. The result of the process will be logged in the VPSA Event-Log.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.start_raid_group_media_scan(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20092
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.start_raid_group_media_scan_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.start_raid_group_media_scan_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def start_raid_group_media_scan_with_http_info(self, id, **kwargs):  # noqa: E501
        """start_raid_group_media_scan  # noqa: E501

        Trigger a Media Scan of the RAID Group. Parity inconsistency will be fixed. The result of the process will be logged in the VPSA Event-Log.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.start_raid_group_media_scan_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse20092
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method start_raid_group_media_scan" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `start_raid_group_media_scan`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `start_raid_group_media_scan`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}/scrub.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20092',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_raid_group_resync_speed(self, id, update_raid_group_resync_speed, **kwargs):  # noqa: E501
        """update_raid_group_resync_speed  # noqa: E501

        Update a RAID Group's resync speed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_raid_group_resync_speed(id, update_raid_group_resync_speed, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param UpdateRaidGroupResyncSpeed update_raid_group_resync_speed: (required)
        :return: InlineResponse20091
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_raid_group_resync_speed_with_http_info(id, update_raid_group_resync_speed, **kwargs)  # noqa: E501
        else:
            (data) = self.update_raid_group_resync_speed_with_http_info(id, update_raid_group_resync_speed, **kwargs)  # noqa: E501
            return data

    def update_raid_group_resync_speed_with_http_info(self, id, update_raid_group_resync_speed, **kwargs):  # noqa: E501
        """update_raid_group_resync_speed  # noqa: E501

        Update a RAID Group's resync speed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_raid_group_resync_speed_with_http_info(id, update_raid_group_resync_speed, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param UpdateRaidGroupResyncSpeed update_raid_group_resync_speed: (required)
        :return: InlineResponse20091
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'update_raid_group_resync_speed']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_raid_group_resync_speed" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `update_raid_group_resync_speed`")  # noqa: E501
        # verify the required parameter 'update_raid_group_resync_speed' is set
        if self.api_client.client_side_validation and ('update_raid_group_resync_speed' not in params or
                                                       params['update_raid_group_resync_speed'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `update_raid_group_resync_speed` when calling `update_raid_group_resync_speed`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^RaidGroup-[0-9]+$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `update_raid_group_resync_speed`, must conform to the pattern `/^RaidGroup-[0-9]+$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'update_raid_group_resync_speed' in params:
            body_params = params['update_raid_group_resync_speed']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_key']  # noqa: E501

        return self.api_client.call_api(
            '/raid_groups/{id}/resync_speed.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse20091',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
