# 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 VolumesApi(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_directories_to_quota_project(self, id, add_directories_to_quota_project, **kwargs):  # noqa: E501
        """add_directories_to_quota_project  # noqa: E501

        Add directories to Quota Project  # 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_directories_to_quota_project(id, add_directories_to_quota_project, async_req=True)
        >>> result = thread.get()

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

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

        Add directories to Quota Project  # 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_directories_to_quota_project_with_http_info(id, add_directories_to_quota_project, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'add_directories_to_quota_project']  # 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_directories_to_quota_project" % 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_directories_to_quota_project`")  # noqa: E501
        # verify the required parameter 'add_directories_to_quota_project' is set
        if self.api_client.client_side_validation and ('add_directories_to_quota_project' not in params or
                                                       params['add_directories_to_quota_project'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `add_directories_to_quota_project` when calling `add_directories_to_quota_project`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `add_directories_to_quota_project`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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_directories_to_quota_project' in params:
            body_params = params['add_directories_to_quota_project']
        # 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(
            '/volumes/{id}/quota_project_directories.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200163',  # 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 add_quota_limit(self, id, update_quota_limit, **kwargs):  # noqa: E501
        """add_quota_limit  # noqa: E501

        Add volume quotas  # 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_quota_limit(id, update_quota_limit, async_req=True)
        >>> result = thread.get()

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

    def add_quota_limit_with_http_info(self, id, update_quota_limit, **kwargs):  # noqa: E501
        """add_quota_limit  # noqa: E501

        Add volume quotas  # 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_quota_limit_with_http_info(id, update_quota_limit, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'update_quota_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 add_quota_limit" % 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_quota_limit`")  # noqa: E501
        # verify the required parameter 'update_quota_limit' is set
        if self.api_client.client_side_validation and ('update_quota_limit' not in params or
                                                       params['update_quota_limit'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `update_quota_limit` when calling `add_quota_limit`")  # 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_quota_limit' in params:
            body_params = params['update_quota_limit']
        # 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(
            '/volumes/{id}/quotas.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200253',  # 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 add_secondary_export_name(self, id, add_secondary_export_name, **kwargs):  # noqa: E501
        """add_secondary_export_name  # noqa: E501

        Add a secondary export name to Share.  # 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_secondary_export_name(id, add_secondary_export_name, async_req=True)
        >>> result = thread.get()

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

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

        Add a secondary export name to Share.  # 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_secondary_export_name_with_http_info(id, add_secondary_export_name, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'add_secondary_export_name']  # 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_secondary_export_name" % 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_secondary_export_name`")  # noqa: E501
        # verify the required parameter 'add_secondary_export_name' is set
        if self.api_client.client_side_validation and ('add_secondary_export_name' not in params or
                                                       params['add_secondary_export_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `add_secondary_export_name` when calling `add_secondary_export_name`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `add_secondary_export_name`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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_secondary_export_name' in params:
            body_params = params['add_secondary_export_name']
        # 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(
            '/volumes/{id}/add_export_name.json', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200232',  # 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 attach_snapshot_policy(self, id, attach_snapshot_policy, **kwargs):  # noqa: E501
        """attach_snapshot_policy  # noqa: E501

        Attach a Snapshot Policy to a Volume.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.attach_snapshot_policy(id, attach_snapshot_policy, async_req=True)
        >>> result = thread.get()

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

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

        Attach a Snapshot Policy to a Volume.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.attach_snapshot_policy_with_http_info(id, attach_snapshot_policy, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A volume ID. (required)
        :param AttachSnapshotPolicy attach_snapshot_policy: (required)
        :return: InlineResponse200237
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'attach_snapshot_policy']  # 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 attach_snapshot_policy" % 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 `attach_snapshot_policy`")  # noqa: E501
        # verify the required parameter 'attach_snapshot_policy' is set
        if self.api_client.client_side_validation and ('attach_snapshot_policy' not in params or
                                                       params['attach_snapshot_policy'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `attach_snapshot_policy` when calling `attach_snapshot_policy`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `attach_snapshot_policy`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'attach_snapshot_policy' in params:
            body_params = params['attach_snapshot_policy']
        # 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(
            '/volumes/{id}/attach_snapshot_policy.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200237',  # 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 cancel_volume_migration(self, migration_cg_id, **kwargs):  # noqa: E501
        """cancel_volume_migration  # noqa: E501

        Abort a migration job  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cancel_volume_migration(migration_cg_id, async_req=True)
        >>> result = thread.get()

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

    def cancel_volume_migration_with_http_info(self, migration_cg_id, **kwargs):  # noqa: E501
        """cancel_volume_migration  # noqa: E501

        Abort a migration job  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cancel_volume_migration_with_http_info(migration_cg_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['migration_cg_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 cancel_volume_migration" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'migration_cg_id' is set
        if self.api_client.client_side_validation and ('migration_cg_id' not in params or
                                                       params['migration_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `migration_cg_id` when calling `cancel_volume_migration`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'migration_cg_id' in params:
            path_params['migration_cg_id'] = params['migration_cg_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(
            '/migration_jobs/{migration_cg_id}/abort.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200249',  # 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_clone(self, volume_cg_id, create_clone, **kwargs):  # noqa: E501
        """create_clone  # noqa: E501

        Clones a Volume. If a snapshot ID is provided the new cloned Volume will have the data set of that Snapshot. Otherwise, the dataset of the Volume at the moment the Clone is created  # 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_clone(volume_cg_id, create_clone, async_req=True)
        >>> result = thread.get()

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

    def create_clone_with_http_info(self, volume_cg_id, create_clone, **kwargs):  # noqa: E501
        """create_clone  # noqa: E501

        Clones a Volume. If a snapshot ID is provided the new cloned Volume will have the data set of that Snapshot. Otherwise, the dataset of the Volume at the moment the Clone is created  # 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_clone_with_http_info(volume_cg_id, create_clone, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str volume_cg_id: (required)
        :param CreateClone create_clone: (required)
        :return: InlineResponse200250
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['volume_cg_id', 'create_clone']  # 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_clone" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'volume_cg_id' is set
        if self.api_client.client_side_validation and ('volume_cg_id' not in params or
                                                       params['volume_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `volume_cg_id` when calling `create_clone`")  # noqa: E501
        # verify the required parameter 'create_clone' is set
        if self.api_client.client_side_validation and ('create_clone' not in params or
                                                       params['create_clone'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `create_clone` when calling `create_clone`")  # noqa: E501

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

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_clone' in params:
            body_params = params['create_clone']
        # 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(
            '/consistency_groups/{volume_cg_id}/clone.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200250',  # 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_quota_project(self, id, create_quota_project, **kwargs):  # noqa: E501
        """create_quota_project  # noqa: E501

        Create a quota project  # 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_quota_project(id, create_quota_project, async_req=True)
        >>> result = thread.get()

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

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

        Create a quota project  # 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_quota_project_with_http_info(id, create_quota_project, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'create_quota_project']  # 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_quota_project" % 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 `create_quota_project`")  # noqa: E501
        # verify the required parameter 'create_quota_project' is set
        if self.api_client.client_side_validation and ('create_quota_project' not in params or
                                                       params['create_quota_project'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `create_quota_project` when calling `create_quota_project`")  # 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 'create_quota_project' in params:
            body_params = params['create_quota_project']
        # 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(
            '/volumes/{id}/quota_projects.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200259',  # 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_volume(self, create_volume, **kwargs):  # noqa: E501
        """create_volume  # noqa: E501

        Create a Volume.  # 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_volume(create_volume, async_req=True)
        >>> result = thread.get()

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

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

        Create a Volume.  # 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_volume_with_http_info(create_volume, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CreateVolume create_volume: (required)
        :return: InlineResponse200121
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['create_volume']  # 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_volume" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'create_volume' is set
        if self.api_client.client_side_validation and ('create_volume' not in params or
                                                       params['create_volume'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `create_volume` when calling `create_volume`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_volume' in params:
            body_params = params['create_volume']
        # 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(
            '/volumes.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200121',  # 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_volume_mirror(self, volume_cg_id, create_volume_mirror, **kwargs):  # noqa: E501
        """create_volume_mirror  # noqa: E501

        Create a new Asynchronous snapshot_based Remote Mirror relationship with a remote VPSA for this Volume  # 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_volume_mirror(volume_cg_id, create_volume_mirror, async_req=True)
        >>> result = thread.get()

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

    def create_volume_mirror_with_http_info(self, volume_cg_id, create_volume_mirror, **kwargs):  # noqa: E501
        """create_volume_mirror  # noqa: E501

        Create a new Asynchronous snapshot_based Remote Mirror relationship with a remote VPSA for this Volume  # 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_volume_mirror_with_http_info(volume_cg_id, create_volume_mirror, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str volume_cg_id: (required)
        :param CreateVolumeMirror create_volume_mirror: (required)
        :return: InlineResponse200251
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['volume_cg_id', 'create_volume_mirror']  # 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_volume_mirror" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'volume_cg_id' is set
        if self.api_client.client_side_validation and ('volume_cg_id' not in params or
                                                       params['volume_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `volume_cg_id` when calling `create_volume_mirror`")  # noqa: E501
        # verify the required parameter 'create_volume_mirror' is set
        if self.api_client.client_side_validation and ('create_volume_mirror' not in params or
                                                       params['create_volume_mirror'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `create_volume_mirror` when calling `create_volume_mirror`")  # noqa: E501

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

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_volume_mirror' in params:
            body_params = params['create_volume_mirror']
        # 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(
            '/consistency_groups/{volume_cg_id}/mirror.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200251',  # 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_volume_snapshot(self, volume_cg_id, create_volume_snapshot, **kwargs):  # noqa: E501
        """create_volume_snapshot  # noqa: E501

        Create a Snapshot of a Volume.  # 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_volume_snapshot(volume_cg_id, create_volume_snapshot, async_req=True)
        >>> result = thread.get()

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

    def create_volume_snapshot_with_http_info(self, volume_cg_id, create_volume_snapshot, **kwargs):  # noqa: E501
        """create_volume_snapshot  # noqa: E501

        Create a Snapshot of a Volume.  # 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_volume_snapshot_with_http_info(volume_cg_id, create_volume_snapshot, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str volume_cg_id: (required)
        :param CreateVolumeSnapshot create_volume_snapshot: (required)
        :return: InlineResponse200241
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['volume_cg_id', 'create_volume_snapshot']  # 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_volume_snapshot" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'volume_cg_id' is set
        if self.api_client.client_side_validation and ('volume_cg_id' not in params or
                                                       params['volume_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `volume_cg_id` when calling `create_volume_snapshot`")  # noqa: E501
        # verify the required parameter 'create_volume_snapshot' is set
        if self.api_client.client_side_validation and ('create_volume_snapshot' not in params or
                                                       params['create_volume_snapshot'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `create_volume_snapshot` when calling `create_volume_snapshot`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_volume_snapshot' in params:
            body_params = params['create_volume_snapshot']
        # 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(
            '/consistency_groups/{volume_cg_id}/snapshots.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200241',  # 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_volume_tag(self, id, create_tag, **kwargs):  # noqa: E501
        """create_volume_tag  # noqa: E501

        Create a tag for volume.  # 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_volume_tag(id, create_tag, async_req=True)
        >>> result = thread.get()

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

    def create_volume_tag_with_http_info(self, id, create_tag, **kwargs):  # noqa: E501
        """create_volume_tag  # noqa: E501

        Create a tag for volume.  # 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_volume_tag_with_http_info(id, create_tag, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'create_tag']  # 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_volume_tag" % 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 `create_volume_tag`")  # noqa: E501
        # verify the required parameter 'create_tag' is set
        if self.api_client.client_side_validation and ('create_tag' not in params or
                                                       params['create_tag'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `create_tag` when calling `create_volume_tag`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `create_volume_tag`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'create_tag' in params:
            body_params = params['create_tag']
        # 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(
            '/volumes/{id}/tags.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200266',  # 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_quota_project(self, id, delete_quota_project, **kwargs):  # noqa: E501
        """delete_quota_project  # noqa: E501

        Delete a quota project  # 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_quota_project(id, delete_quota_project, async_req=True)
        >>> result = thread.get()

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

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

        Delete a quota project  # 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_quota_project_with_http_info(id, delete_quota_project, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'delete_quota_project']  # 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_quota_project" % 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_quota_project`")  # noqa: E501
        # verify the required parameter 'delete_quota_project' is set
        if self.api_client.client_side_validation and ('delete_quota_project' not in params or
                                                       params['delete_quota_project'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `delete_quota_project` when calling `delete_quota_project`")  # 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 'delete_quota_project' in params:
            body_params = params['delete_quota_project']
        # 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(
            '/volumes/{id}/quota_projects.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200163',  # 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_secondary_export_name(self, id, delete_secondary_export_name, **kwargs):  # noqa: E501
        """delete_secondary_export_name  # noqa: E501

        Delete a secondary export name from Share.  # 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_secondary_export_name(id, delete_secondary_export_name, async_req=True)
        >>> result = thread.get()

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

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

        Delete a secondary export name from Share.  # 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_secondary_export_name_with_http_info(id, delete_secondary_export_name, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'delete_secondary_export_name']  # 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_secondary_export_name" % 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_secondary_export_name`")  # noqa: E501
        # verify the required parameter 'delete_secondary_export_name' is set
        if self.api_client.client_side_validation and ('delete_secondary_export_name' not in params or
                                                       params['delete_secondary_export_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `delete_secondary_export_name` when calling `delete_secondary_export_name`")  # 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 'delete_secondary_export_name' in params:
            body_params = params['delete_secondary_export_name']
        # 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(
            '/volumes/{id}/export_name.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200233',  # 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_volume(self, id, delete_volume, **kwargs):  # noqa: E501
        """delete_volume  # noqa: E501

        Delete a Volume.  # 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_volume(id, delete_volume, async_req=True)
        >>> result = thread.get()

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

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

        Delete a Volume.  # 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_volume_with_http_info(id, delete_volume, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'delete_volume']  # 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_volume" % 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_volume`")  # noqa: E501
        # verify the required parameter 'delete_volume' is set
        if self.api_client.client_side_validation and ('delete_volume' not in params or
                                                       params['delete_volume'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `delete_volume` when calling `delete_volume`")  # 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 'delete_volume' in params:
            body_params = params['delete_volume']
        # 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(
            '/volumes/{id}.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200226',  # 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_volume_file_history(self, volume_id, **kwargs):  # noqa: E501
        """delete_volume_file_history  # noqa: E501

        Delete the file history of a Volume.  # 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_volume_file_history(volume_id, async_req=True)
        >>> result = thread.get()

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

    def delete_volume_file_history_with_http_info(self, volume_id, **kwargs):  # noqa: E501
        """delete_volume_file_history  # noqa: E501

        Delete the file history of a Volume.  # 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_volume_file_history_with_http_info(volume_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['volume_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_volume_file_history" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'volume_id' is set
        if self.api_client.client_side_validation and ('volume_id' not in params or
                                                       params['volume_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `volume_id` when calling `delete_volume_file_history`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'volume_id' in params:
            path_params['volume_id'] = params['volume_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(
            '/file_histories/{volume_id}.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200244',  # 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_volume_from_recycle_bin(self, id, **kwargs):  # noqa: E501
        """delete_volume_from_recycle_bin  # noqa: E501

        Deletes a volume(s) from recycle bin  # 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_volume_from_recycle_bin(id, async_req=True)
        >>> result = thread.get()

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

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

        Deletes a volume(s) from recycle bin  # 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_volume_from_recycle_bin_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse200234
                 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_volume_from_recycle_bin" % 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_volume_from_recycle_bin`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `delete_volume_from_recycle_bin`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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(
            '/volumes/{id}/delete_volume_from_recycle_bin.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200234',  # 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_volume_snapshot(self, snapshot_id, **kwargs):  # noqa: E501
        """delete_volume_snapshot  # noqa: E501

        Delete a Snapshot of a Volume.  # 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_volume_snapshot(snapshot_id, async_req=True)
        >>> result = thread.get()

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

    def delete_volume_snapshot_with_http_info(self, snapshot_id, **kwargs):  # noqa: E501
        """delete_volume_snapshot  # noqa: E501

        Delete a Snapshot of a Volume.  # 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_volume_snapshot_with_http_info(snapshot_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['snapshot_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_volume_snapshot" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'snapshot_id' is set
        if self.api_client.client_side_validation and ('snapshot_id' not in params or
                                                       params['snapshot_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `snapshot_id` when calling `delete_volume_snapshot`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'snapshot_id' in params:
            path_params['snapshot_id'] = params['snapshot_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(
            '/snapshots/{snapshot_id}.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200243',  # 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_volume_tag(self, id, tag_key, **kwargs):  # noqa: E501
        """delete_volume_tag  # noqa: E501

        Deletes a tag from volume.  # 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_volume_tag(id, tag_key, async_req=True)
        >>> result = thread.get()

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

    def delete_volume_tag_with_http_info(self, id, tag_key, **kwargs):  # noqa: E501
        """delete_volume_tag  # noqa: E501

        Deletes a tag from volume.  # 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_volume_tag_with_http_info(id, tag_key, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'tag_key']  # 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_volume_tag" % 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_volume_tag`")  # noqa: E501
        # verify the required parameter 'tag_key' is set
        if self.api_client.client_side_validation and ('tag_key' not in params or
                                                       params['tag_key'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `tag_key` when calling `delete_volume_tag`")  # noqa: E501

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

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501
        if 'tag_key' in params:
            path_params['tag_key'] = params['tag_key']  # 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(
            '/volumes/{id}/tags/{tag_key}.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200268',  # 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 detach_servers_from_volume(self, id, detach_servers_from_volume, **kwargs):  # noqa: E501
        """detach_servers_from_volume  # noqa: E501

        Detach a Volume from one or more servers  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.detach_servers_from_volume(id, detach_servers_from_volume, async_req=True)
        >>> result = thread.get()

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

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

        Detach a Volume from one or more servers  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.detach_servers_from_volume_with_http_info(id, detach_servers_from_volume, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'detach_servers_from_volume']  # 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 detach_servers_from_volume" % 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 `detach_servers_from_volume`")  # noqa: E501
        # verify the required parameter 'detach_servers_from_volume' is set
        if self.api_client.client_side_validation and ('detach_servers_from_volume' not in params or
                                                       params['detach_servers_from_volume'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `detach_servers_from_volume` when calling `detach_servers_from_volume`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `detach_servers_from_volume`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'detach_servers_from_volume' in params:
            body_params = params['detach_servers_from_volume']
        # 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(
            '/volumes/{id}/detach.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200231',  # 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 detach_snapshot_policy(self, id, detach_snapshot_policy, **kwargs):  # noqa: E501
        """detach_snapshot_policy  # noqa: E501

        Detach a Snapshot Policy from a Volume.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.detach_snapshot_policy(id, detach_snapshot_policy, async_req=True)
        >>> result = thread.get()

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

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

        Detach a Snapshot Policy from a Volume.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.detach_snapshot_policy_with_http_info(id, detach_snapshot_policy, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A volume ID. (required)
        :param DetachSnapshotPolicy detach_snapshot_policy: (required)
        :return: InlineResponse200238
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'detach_snapshot_policy']  # 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 detach_snapshot_policy" % 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 `detach_snapshot_policy`")  # noqa: E501
        # verify the required parameter 'detach_snapshot_policy' is set
        if self.api_client.client_side_validation and ('detach_snapshot_policy' not in params or
                                                       params['detach_snapshot_policy'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `detach_snapshot_policy` when calling `detach_snapshot_policy`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `detach_snapshot_policy`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'detach_snapshot_policy' in params:
            body_params = params['detach_snapshot_policy']
        # 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(
            '/volumes/{id}/detach_snapshot_policy.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200238',  # 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 dump_quotas_file(self, id, dump_quotas_file, **kwargs):  # noqa: E501
        """dump_quotas_file  # noqa: E501

        emove directories from quota project of a Volume  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.dump_quotas_file(id, dump_quotas_file, async_req=True)
        >>> result = thread.get()

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

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

        emove directories from quota project of a Volume  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.dump_quotas_file_with_http_info(id, dump_quotas_file, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'dump_quotas_file']  # 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 dump_quotas_file" % 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 `dump_quotas_file`")  # noqa: E501
        # verify the required parameter 'dump_quotas_file' is set
        if self.api_client.client_side_validation and ('dump_quotas_file' not in params or
                                                       params['dump_quotas_file'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `dump_quotas_file` when calling `dump_quotas_file`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `dump_quotas_file`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'dump_quotas_file' in params:
            body_params = params['dump_quotas_file']
        # 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(
            '/volumes/{id}/dump_quota_to_file.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200254',  # 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 dump_quotas_state(self, id, dump_quotas_state, **kwargs):  # noqa: E501
        """dump_quotas_state  # noqa: E501

        Remove directories from quota project of a Volume  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.dump_quotas_state(id, dump_quotas_state, async_req=True)
        >>> result = thread.get()

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

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

        Remove directories from quota project of a Volume  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.dump_quotas_state_with_http_info(id, dump_quotas_state, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'dump_quotas_state']  # 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 dump_quotas_state" % 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 `dump_quotas_state`")  # noqa: E501
        # verify the required parameter 'dump_quotas_state' is set
        if self.api_client.client_side_validation and ('dump_quotas_state' not in params or
                                                       params['dump_quotas_state'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `dump_quotas_state` when calling `dump_quotas_state`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `dump_quotas_state`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'dump_quotas_state' in params:
            body_params = params['dump_quotas_state']
        # 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(
            '/volumes/{id}/dump_quota_to_state.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200255',  # 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 expand_volume(self, id, expand_volume, **kwargs):  # noqa: E501
        """expand_volume  # noqa: E501

        Expand a Volume.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.expand_volume(id, expand_volume, async_req=True)
        >>> result = thread.get()

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

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

        Expand a Volume.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.expand_volume_with_http_info(id, expand_volume, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'expand_volume']  # 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 expand_volume" % 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 `expand_volume`")  # noqa: E501
        # verify the required parameter 'expand_volume' is set
        if self.api_client.client_side_validation and ('expand_volume' not in params or
                                                       params['expand_volume'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `expand_volume` when calling `expand_volume`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `expand_volume`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'expand_volume' in params:
            body_params = params['expand_volume']
        # 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(
            '/volumes/{id}/expand.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200229',  # 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 fetch_volume_quotas(self, id, fetch_volume_quotas, **kwargs):  # noqa: E501
        """fetch_volume_quotas  # noqa: E501

        fetch volume quotas.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fetch_volume_quotas(id, fetch_volume_quotas, async_req=True)
        >>> result = thread.get()

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

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

        fetch volume quotas.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fetch_volume_quotas_with_http_info(id, fetch_volume_quotas, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'fetch_volume_quotas']  # 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 fetch_volume_quotas" % 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 `fetch_volume_quotas`")  # noqa: E501
        # verify the required parameter 'fetch_volume_quotas' is set
        if self.api_client.client_side_validation and ('fetch_volume_quotas' not in params or
                                                       params['fetch_volume_quotas'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `fetch_volume_quotas` when calling `fetch_volume_quotas`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `fetch_volume_quotas`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'fetch_volume_quotas' in params:
            body_params = params['fetch_volume_quotas']
        # 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(
            '/volumes/{id}/quotas.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200252',  # 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_all_snapshots(self, volume_cg_id, get_all_snapshots, **kwargs):  # noqa: E501
        """get_all_snapshots  # noqa: E501

        Get the list of Snapshots for this Volume.  # 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_all_snapshots(volume_cg_id, get_all_snapshots, async_req=True)
        >>> result = thread.get()

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

    def get_all_snapshots_with_http_info(self, volume_cg_id, get_all_snapshots, **kwargs):  # noqa: E501
        """get_all_snapshots  # noqa: E501

        Get the list of Snapshots for this Volume.  # 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_all_snapshots_with_http_info(volume_cg_id, get_all_snapshots, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str volume_cg_id: (required)
        :param GetAllSnapshots get_all_snapshots: (required)
        :return: InlineResponse200240
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['volume_cg_id', 'get_all_snapshots']  # 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_all_snapshots" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'volume_cg_id' is set
        if self.api_client.client_side_validation and ('volume_cg_id' not in params or
                                                       params['volume_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `volume_cg_id` when calling `get_all_snapshots`")  # noqa: E501
        # verify the required parameter 'get_all_snapshots' is set
        if self.api_client.client_side_validation and ('get_all_snapshots' not in params or
                                                       params['get_all_snapshots'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `get_all_snapshots` when calling `get_all_snapshots`")  # noqa: E501

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

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'get_all_snapshots' in params:
            body_params = params['get_all_snapshots']
        # 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(
            '/consistency_groups/{volume_cg_id}/snapshots.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200240',  # 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_volumes(self, **kwargs):  # noqa: E501
        """get_free_volumes  # noqa: E501

        Show all Volumes which are not attached to any Server.  # 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_volumes(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: InlineResponse200227
                 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_volumes_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_free_volumes_with_http_info(**kwargs)  # noqa: E501
            return data

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

        Show all Volumes which are not attached to any Server.  # 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_volumes_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: InlineResponse200227
                 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_volumes" % 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_volumes`, 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(
            '/volumes/free.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200227',  # 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_quota_projects(self, id, **kwargs):  # noqa: E501
        """get_quota_projects  # noqa: E501

        Get quota projects  # 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_quota_projects(id, async_req=True)
        >>> result = thread.get()

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

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

        Get quota projects  # 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_quota_projects_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse200258
                 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_quota_projects" % 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_quota_projects`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_quota_projects`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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(
            '/volumes/{id}/quota_projects.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200258',  # 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_servers_attached_to_volume(self, id, **kwargs):  # noqa: E501
        """get_servers_attached_to_volume  # noqa: E501

        Show the Servers to which the Volume is attached  # 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_servers_attached_to_volume(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: InlineResponse200230
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_servers_attached_to_volume_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_servers_attached_to_volume_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        Show the Servers to which the Volume is attached  # 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_servers_attached_to_volume_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: InlineResponse200230
                 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_servers_attached_to_volume" % 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_servers_attached_to_volume`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_servers_attached_to_volume`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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_servers_attached_to_volume`, 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(
            '/volumes/{id}/servers.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200230',  # 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_snapshot(self, snapshot_id, **kwargs):  # noqa: E501
        """get_snapshot  # noqa: E501

        Get a Snapshot of a Volume.  # 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_snapshot(snapshot_id, async_req=True)
        >>> result = thread.get()

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

    def get_snapshot_with_http_info(self, snapshot_id, **kwargs):  # noqa: E501
        """get_snapshot  # noqa: E501

        Get a Snapshot of a Volume.  # 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_snapshot_with_http_info(snapshot_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['snapshot_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_snapshot" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'snapshot_id' is set
        if self.api_client.client_side_validation and ('snapshot_id' not in params or
                                                       params['snapshot_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `snapshot_id` when calling `get_snapshot`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'snapshot_id' in params:
            path_params['snapshot_id'] = params['snapshot_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(
            '/snapshots/{snapshot_id}.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200242',  # 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_vol_tags(self, id, **kwargs):  # noqa: E501
        """get_vol_tags  # noqa: E501

        Get volume tags.  # 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_vol_tags(id, async_req=True)
        >>> result = thread.get()

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

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

        Get volume tags.  # 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_vol_tags_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse200265
                 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_vol_tags" % 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_vol_tags`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_vol_tags`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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(
            '/volumes/{id}/tags.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200265',  # 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_vols_file_access_auditing_log_time(self, get_vols_file_access_auditing_log_time, **kwargs):  # noqa: E501
        """get_vols_file_access_auditing_log_time  # noqa: E501

        Get the volumes file access auditing log times range in UTC timezone.  # 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_vols_file_access_auditing_log_time(get_vols_file_access_auditing_log_time, async_req=True)
        >>> result = thread.get()

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

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

        Get the volumes file access auditing log times range in UTC timezone.  # 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_vols_file_access_auditing_log_time_with_http_info(get_vols_file_access_auditing_log_time, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetVolsFileAccessAuditingLogTime get_vols_file_access_auditing_log_time: (required)
        :return: InlineResponse200264
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['get_vols_file_access_auditing_log_time']  # 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_vols_file_access_auditing_log_time" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'get_vols_file_access_auditing_log_time' is set
        if self.api_client.client_side_validation and ('get_vols_file_access_auditing_log_time' not in params or
                                                       params['get_vols_file_access_auditing_log_time'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `get_vols_file_access_auditing_log_time` when calling `get_vols_file_access_auditing_log_time`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'get_vols_file_access_auditing_log_time' in params:
            body_params = params['get_vols_file_access_auditing_log_time']
        # 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(
            '/audited_volumes/logs_timerange.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200264',  # 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_vols_file_access_auditing_log_time_zip(self, get_vols_file_access_auditing_log_time_zip, **kwargs):  # noqa: E501
        """get_vols_file_access_auditing_log_time_zip  # noqa: E501

        Get the volumes file access auditing log files, in a single zip file.  # 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_vols_file_access_auditing_log_time_zip(get_vols_file_access_auditing_log_time_zip, async_req=True)
        >>> result = thread.get()

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

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

        Get the volumes file access auditing log files, in a single zip file.  # 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_vols_file_access_auditing_log_time_zip_with_http_info(get_vols_file_access_auditing_log_time_zip, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetVolsFileAccessAuditingLogTimeZip get_vols_file_access_auditing_log_time_zip: (required)
        :return: Default
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['get_vols_file_access_auditing_log_time_zip']  # 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_vols_file_access_auditing_log_time_zip" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'get_vols_file_access_auditing_log_time_zip' is set
        if self.api_client.client_side_validation and ('get_vols_file_access_auditing_log_time_zip' not in params or
                                                       params['get_vols_file_access_auditing_log_time_zip'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `get_vols_file_access_auditing_log_time_zip` when calling `get_vols_file_access_auditing_log_time_zip`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'get_vols_file_access_auditing_log_time_zip' in params:
            body_params = params['get_vols_file_access_auditing_log_time_zip']
        # 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(
            '/audited_volumes/download.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Default',  # 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_volume(self, id, **kwargs):  # noqa: E501
        """get_volume  # noqa: E501

        Show a single Volume details.  # 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_volume(id, async_req=True)
        >>> result = thread.get()

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

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

        Show a single Volume details.  # 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_volume_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :return: InlineResponse200224
                 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_volume" % 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_volume`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_volume`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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(
            '/volumes/{id}.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200224',  # 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_volume_attached_snapshot_policies(self, volume_cg_id, **kwargs):  # noqa: E501
        """get_volume_attached_snapshot_policies  # noqa: E501

        Get the Snapshot Policies attached to a Volume.  # 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_volume_attached_snapshot_policies(volume_cg_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str volume_cg_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: InlineResponse200235
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_volume_attached_snapshot_policies_with_http_info(volume_cg_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_volume_attached_snapshot_policies_with_http_info(volume_cg_id, **kwargs)  # noqa: E501
            return data

    def get_volume_attached_snapshot_policies_with_http_info(self, volume_cg_id, **kwargs):  # noqa: E501
        """get_volume_attached_snapshot_policies  # noqa: E501

        Get the Snapshot Policies attached to a Volume.  # 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_volume_attached_snapshot_policies_with_http_info(volume_cg_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str volume_cg_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: InlineResponse200235
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['volume_cg_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_volume_attached_snapshot_policies" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'volume_cg_id' is set
        if self.api_client.client_side_validation and ('volume_cg_id' not in params or
                                                       params['volume_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `volume_cg_id` when calling `get_volume_attached_snapshot_policies`")  # noqa: E501

        if self.api_client.client_side_validation and ('volume_cg_id' in params and not re.search(r'^cg-[0-9a-f]{8}$', params['volume_cg_id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `volume_cg_id` when calling `get_volume_attached_snapshot_policies`, must conform to the pattern `/^cg-[0-9a-f]{8}$/`")  # 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_volume_attached_snapshot_policies`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'volume_cg_id' in params:
            path_params['volume_cg_id'] = params['volume_cg_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(
            '/consistency_groups/{volume_cg_id}/snapshot_policies.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200235',  # 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_volume_file_history(self, id, **kwargs):  # noqa: E501
        """get_volume_file_history  # noqa: E501

        Get the volume file history.  # 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_volume_file_history(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: InlineResponse200236
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_volume_file_history_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_volume_file_history_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        Get the volume file history.  # 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_volume_file_history_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: InlineResponse200236
                 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_volume_file_history" % 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_volume_file_history`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_volume_file_history`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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_volume_file_history`, 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(
            '/volumes/{id}/file_history.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200236',  # 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_volume_migration(self, migration_cg_id, **kwargs):  # noqa: E501
        """get_volume_migration  # noqa: E501

        Shows a migration job  # 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_volume_migration(migration_cg_id, async_req=True)
        >>> result = thread.get()

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

    def get_volume_migration_with_http_info(self, migration_cg_id, **kwargs):  # noqa: E501
        """get_volume_migration  # noqa: E501

        Shows a migration job  # 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_volume_migration_with_http_info(migration_cg_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['migration_cg_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_volume_migration" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'migration_cg_id' is set
        if self.api_client.client_side_validation and ('migration_cg_id' not in params or
                                                       params['migration_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `migration_cg_id` when calling `get_volume_migration`")  # noqa: E501

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

        path_params = {}
        if 'migration_cg_id' in params:
            path_params['migration_cg_id'] = params['migration_cg_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(
            '/consistency_groups/{migration_cg_id}/show_migration.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200245',  # 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_volume_performance(self, id, **kwargs):  # noqa: E501
        """get_volume_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_volume_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: InlineResponse200261
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_volume_performance_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_volume_performance_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_volume_performance_with_http_info(self, id, **kwargs):  # noqa: E501
        """get_volume_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_volume_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: InlineResponse200261
                 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_volume_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_volume_performance`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_volume_performance`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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_volume_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(
            '/volumes/{id}/performance.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200261',  # 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_volume_quota(self, id, get_volume_quota, **kwargs):  # noqa: E501
        """get_volume_quota  # noqa: E501

        Get one volume quota  # 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_volume_quota(id, get_volume_quota, async_req=True)
        >>> result = thread.get()

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

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

        Get one volume quota  # 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_volume_quota_with_http_info(id, get_volume_quota, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'get_volume_quota']  # 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_volume_quota" % 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_volume_quota`")  # noqa: E501
        # verify the required parameter 'get_volume_quota' is set
        if self.api_client.client_side_validation and ('get_volume_quota' not in params or
                                                       params['get_volume_quota'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `get_volume_quota` when calling `get_volume_quota`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_volume_quota`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'get_volume_quota' in params:
            body_params = params['get_volume_quota']
        # 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(
            '/volumes/{id}/quota.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200257',  # 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 import_volume_quotas(self, id, scope, **kwargs):  # noqa: E501
        """import_volume_quotas  # noqa: E501

        Import volume quotas  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.import_volume_quotas(id, scope, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str scope: quotas type (required)
        :param str file_format: Input file format
        :param file file: Input file
        :return: InlineResponse200163
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.import_volume_quotas_with_http_info(id, scope, **kwargs)  # noqa: E501
        else:
            (data) = self.import_volume_quotas_with_http_info(id, scope, **kwargs)  # noqa: E501
            return data

    def import_volume_quotas_with_http_info(self, id, scope, **kwargs):  # noqa: E501
        """import_volume_quotas  # noqa: E501

        Import volume quotas  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.import_volume_quotas_with_http_info(id, scope, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str scope: quotas type (required)
        :param str file_format: Input file format
        :param file file: Input file
        :return: InlineResponse200163
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'scope', 'file_format', 'file']  # 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 import_volume_quotas" % 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 `import_volume_quotas`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in params or
                                                       params['scope'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `scope` when calling `import_volume_quotas`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `import_volume_quotas`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 = {}
        if 'scope' in params:
            form_params.append(('scope', params['scope']))  # noqa: E501
        if 'file_format' in params:
            form_params.append(('file_format', params['file_format']))  # noqa: E501
        if 'file' in params:
            local_var_files['file'] = params['file']  # noqa: E501

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/volumes/{id}/import_quotas.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200163',  # 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 migrate_volume(self, volume_cg_id, migrate_volume, **kwargs):  # noqa: E501
        """migrate_volume  # noqa: E501

        Migrate a volume to a different 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.migrate_volume(volume_cg_id, migrate_volume, async_req=True)
        >>> result = thread.get()

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

    def migrate_volume_with_http_info(self, volume_cg_id, migrate_volume, **kwargs):  # noqa: E501
        """migrate_volume  # noqa: E501

        Migrate a volume to a different 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.migrate_volume_with_http_info(volume_cg_id, migrate_volume, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str volume_cg_id: (required)
        :param MigrateVolume migrate_volume: (required)
        :return: InlineResponse200246
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['volume_cg_id', 'migrate_volume']  # 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 migrate_volume" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'volume_cg_id' is set
        if self.api_client.client_side_validation and ('volume_cg_id' not in params or
                                                       params['volume_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `volume_cg_id` when calling `migrate_volume`")  # noqa: E501
        # verify the required parameter 'migrate_volume' is set
        if self.api_client.client_side_validation and ('migrate_volume' not in params or
                                                       params['migrate_volume'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `migrate_volume` when calling `migrate_volume`")  # noqa: E501

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

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'migrate_volume' in params:
            body_params = params['migrate_volume']
        # 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(
            '/consistency_groups/{volume_cg_id}/migrate.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200246',  # 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_volume_migration(self, migration_cg_id, **kwargs):  # noqa: E501
        """pause_volume_migration  # noqa: E501

        Pause a migration job  # 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_volume_migration(migration_cg_id, async_req=True)
        >>> result = thread.get()

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

    def pause_volume_migration_with_http_info(self, migration_cg_id, **kwargs):  # noqa: E501
        """pause_volume_migration  # noqa: E501

        Pause a migration job  # 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_volume_migration_with_http_info(migration_cg_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['migration_cg_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_volume_migration" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'migration_cg_id' is set
        if self.api_client.client_side_validation and ('migration_cg_id' not in params or
                                                       params['migration_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `migration_cg_id` when calling `pause_volume_migration`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'migration_cg_id' in params:
            path_params['migration_cg_id'] = params['migration_cg_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(
            '/migration_jobs/{migration_cg_id}/pause.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200247',  # 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_volume_snapshot_policy(self, snaprule, pause_volume_snapshot_policy, **kwargs):  # noqa: E501
        """pause_volume_snapshot_policy  # noqa: E501

        Pause a volume's snapshot policy.  # 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_volume_snapshot_policy(snaprule, pause_volume_snapshot_policy, async_req=True)
        >>> result = thread.get()

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

    def pause_volume_snapshot_policy_with_http_info(self, snaprule, pause_volume_snapshot_policy, **kwargs):  # noqa: E501
        """pause_volume_snapshot_policy  # noqa: E501

        Pause a volume's snapshot policy.  # 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_volume_snapshot_policy_with_http_info(snaprule, pause_volume_snapshot_policy, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str snaprule: (required)
        :param PauseVolumeSnapshotPolicy pause_volume_snapshot_policy: (required)
        :return: InlineResponse200239
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['snaprule', 'pause_volume_snapshot_policy']  # 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_volume_snapshot_policy" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'snaprule' is set
        if self.api_client.client_side_validation and ('snaprule' not in params or
                                                       params['snaprule'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `snaprule` when calling `pause_volume_snapshot_policy`")  # noqa: E501
        # verify the required parameter 'pause_volume_snapshot_policy' is set
        if self.api_client.client_side_validation and ('pause_volume_snapshot_policy' not in params or
                                                       params['pause_volume_snapshot_policy'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `pause_volume_snapshot_policy` when calling `pause_volume_snapshot_policy`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'pause_volume_snapshot_policy' in params:
            body_params = params['pause_volume_snapshot_policy']
        # 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(
            '/snapshot_policies/{snaprule}/pause.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200239',  # 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_directories_from_quota_project(self, id, remove_directories_from_quota_project, **kwargs):  # noqa: E501
        """remove_directories_from_quota_project  # noqa: E501

        Remove directory from Quota Project  # 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_directories_from_quota_project(id, remove_directories_from_quota_project, async_req=True)
        >>> result = thread.get()

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

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

        Remove directory from Quota Project  # 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_directories_from_quota_project_with_http_info(id, remove_directories_from_quota_project, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'remove_directories_from_quota_project']  # 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_directories_from_quota_project" % 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_directories_from_quota_project`")  # noqa: E501
        # verify the required parameter 'remove_directories_from_quota_project' is set
        if self.api_client.client_side_validation and ('remove_directories_from_quota_project' not in params or
                                                       params['remove_directories_from_quota_project'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `remove_directories_from_quota_project` when calling `remove_directories_from_quota_project`")  # 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 'remove_directories_from_quota_project' in params:
            body_params = params['remove_directories_from_quota_project']
        # 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(
            '/volumes/{id}/quota_project_directories.json', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200163',  # 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_volume(self, id, rename_volume, **kwargs):  # noqa: E501
        """rename_volume  # noqa: E501

        Rename a Volume.  # 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_volume(id, rename_volume, async_req=True)
        >>> result = thread.get()

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

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

        Rename a Volume.  # 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_volume_with_http_info(id, rename_volume, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'rename_volume']  # 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_volume" % 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_volume`")  # noqa: E501
        # verify the required parameter 'rename_volume' is set
        if self.api_client.client_side_validation and ('rename_volume' not in params or
                                                       params['rename_volume'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `rename_volume` when calling `rename_volume`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `rename_volume`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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_volume' in params:
            body_params = params['rename_volume']
        # 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(
            '/volumes/{id}/rename.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200228',  # 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 resume_volume_migration(self, migration_cg_id, **kwargs):  # noqa: E501
        """resume_volume_migration  # noqa: E501

        Continue a migration job  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.resume_volume_migration(migration_cg_id, async_req=True)
        >>> result = thread.get()

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

    def resume_volume_migration_with_http_info(self, migration_cg_id, **kwargs):  # noqa: E501
        """resume_volume_migration  # noqa: E501

        Continue a migration job  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.resume_volume_migration_with_http_info(migration_cg_id, async_req=True)
        >>> result = thread.get()

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

        all_params = ['migration_cg_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 resume_volume_migration" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'migration_cg_id' is set
        if self.api_client.client_side_validation and ('migration_cg_id' not in params or
                                                       params['migration_cg_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `migration_cg_id` when calling `resume_volume_migration`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'migration_cg_id' in params:
            path_params['migration_cg_id'] = params['migration_cg_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(
            '/migration_jobs/{migration_cg_id}/continue.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200248',  # 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 set_volume_attach_permissions(self, id, set_volume_attach_permissions, **kwargs):  # noqa: E501
        """set_volume_attach_permissions  # noqa: E501

        Set volume attach permissions to a server.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_volume_attach_permissions(id, set_volume_attach_permissions, async_req=True)
        >>> result = thread.get()

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

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

        Set volume attach permissions to a server.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_volume_attach_permissions_with_http_info(id, set_volume_attach_permissions, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'set_volume_attach_permissions']  # 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 set_volume_attach_permissions" % 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 `set_volume_attach_permissions`")  # noqa: E501
        # verify the required parameter 'set_volume_attach_permissions' is set
        if self.api_client.client_side_validation and ('set_volume_attach_permissions' not in params or
                                                       params['set_volume_attach_permissions'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `set_volume_attach_permissions` when calling `set_volume_attach_permissions`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `set_volume_attach_permissions`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'set_volume_attach_permissions' in params:
            body_params = params['set_volume_attach_permissions']
        # 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(
            '/volumes/{id}/attach_permissions.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200260',  # 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 set_volume_export_name(self, id, set_volume_export_name, **kwargs):  # noqa: E501
        """set_volume_export_name  # noqa: E501

        Change a Share's export 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.set_volume_export_name(id, set_volume_export_name, async_req=True)
        >>> result = thread.get()

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

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

        Change a Share's export 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.set_volume_export_name_with_http_info(id, set_volume_export_name, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'set_volume_export_name']  # 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 set_volume_export_name" % 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 `set_volume_export_name`")  # noqa: E501
        # verify the required parameter 'set_volume_export_name' is set
        if self.api_client.client_side_validation and ('set_volume_export_name' not in params or
                                                       params['set_volume_export_name'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `set_volume_export_name` when calling `set_volume_export_name`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `set_volume_export_name`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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 'set_volume_export_name' in params:
            body_params = params['set_volume_export_name']
        # 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(
            '/volumes/{id}/export_name.json', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200232',  # 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_all_volumes(self, **kwargs):  # noqa: E501
        """show_all_volumes  # noqa: E501

        Show all Volumes.  # 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_all_volumes(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str showonlyblock: show only block volumes
        :param str showonlyfile: Show only NAS shares.
        :param str display_name: Filter volumes by name.
        :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: InlineResponse200223
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.show_all_volumes_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.show_all_volumes_with_http_info(**kwargs)  # noqa: E501
            return data

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

        Show all Volumes.  # 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_all_volumes_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str showonlyblock: show only block volumes
        :param str showonlyfile: Show only NAS shares.
        :param str display_name: Filter volumes by name.
        :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: InlineResponse200223
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['showonlyblock', 'showonlyfile', 'display_name', '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_all_volumes" % 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_all_volumes`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'showonlyblock' in params:
            query_params.append(('showonlyblock', params['showonlyblock']))  # noqa: E501
        if 'showonlyfile' in params:
            query_params.append(('showonlyfile', params['showonlyfile']))  # noqa: E501
        if 'display_name' in params:
            query_params.append(('display_name', params['display_name']))  # noqa: E501
        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(
            '/volumes.json', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200223',  # 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_protection(self, id, update_protection, **kwargs):  # noqa: E501
        """update_protection  # noqa: E501

        Sets capacity thresholds. A support ticket will be created when your Volume reaches specified capacity thresholds.  # 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_protection(id, update_protection, async_req=True)
        >>> result = thread.get()

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

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

        Sets capacity thresholds. A support ticket will be created when your Volume reaches specified capacity thresholds.  # 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_protection_with_http_info(id, update_protection, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'update_protection']  # 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_protection" % 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_protection`")  # noqa: E501
        # verify the required parameter 'update_protection' is set
        if self.api_client.client_side_validation and ('update_protection' not in params or
                                                       params['update_protection'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `update_protection` when calling `update_protection`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `update_protection`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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_protection' in params:
            body_params = params['update_protection']
        # 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(
            '/volumes/{id}/update_protection.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200262',  # 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_vol_perf_threshold(self, id, update_vol_perf_threshold, **kwargs):  # noqa: E501
        """update_vol_perf_threshold  # noqa: E501

        Sets performance thresholds. A support ticket will be created when your volume reaches specified performance thresholds.  # 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_vol_perf_threshold(id, update_vol_perf_threshold, async_req=True)
        >>> result = thread.get()

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

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

        Sets performance thresholds. A support ticket will be created when your volume reaches specified performance thresholds.  # 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_vol_perf_threshold_with_http_info(id, update_vol_perf_threshold, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'update_vol_perf_threshold']  # 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_vol_perf_threshold" % 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_vol_perf_threshold`")  # noqa: E501
        # verify the required parameter 'update_vol_perf_threshold' is set
        if self.api_client.client_side_validation and ('update_vol_perf_threshold' not in params or
                                                       params['update_vol_perf_threshold'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `update_vol_perf_threshold` when calling `update_vol_perf_threshold`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `update_vol_perf_threshold`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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_vol_perf_threshold' in params:
            body_params = params['update_vol_perf_threshold']
        # 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(
            '/volumes/{id}/update_performance_thresholds.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200263',  # 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_volume_nas_options(self, id, update_volume_nas_options, **kwargs):  # noqa: E501
        """update_volume_nas_options  # noqa: E501

        Update Volume's options.  # 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_volume_nas_options(id, update_volume_nas_options, async_req=True)
        >>> result = thread.get()

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

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

        Update Volume's options.  # 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_volume_nas_options_with_http_info(id, update_volume_nas_options, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'update_volume_nas_options']  # 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_volume_nas_options" % 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_volume_nas_options`")  # noqa: E501
        # verify the required parameter 'update_volume_nas_options' is set
        if self.api_client.client_side_validation and ('update_volume_nas_options' not in params or
                                                       params['update_volume_nas_options'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `update_volume_nas_options` when calling `update_volume_nas_options`")  # 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_volume_nas_options' in params:
            body_params = params['update_volume_nas_options']
        # 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(
            '/volumes/{id}.json', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200225',  # 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_volume_quotas_state(self, id, update_volume_quotas_state, **kwargs):  # noqa: E501
        """update_volume_quotas_state  # noqa: E501

        Update quotas state (at least one of uquota/gquota/pquota required)  # 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_volume_quotas_state(id, update_volume_quotas_state, async_req=True)
        >>> result = thread.get()

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

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

        Update quotas state (at least one of uquota/gquota/pquota required)  # 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_volume_quotas_state_with_http_info(id, update_volume_quotas_state, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'update_volume_quotas_state']  # 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_volume_quotas_state" % 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_volume_quotas_state`")  # noqa: E501
        # verify the required parameter 'update_volume_quotas_state' is set
        if self.api_client.client_side_validation and ('update_volume_quotas_state' not in params or
                                                       params['update_volume_quotas_state'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `update_volume_quotas_state` when calling `update_volume_quotas_state`")  # noqa: E501

        if self.api_client.client_side_validation and ('id' in params and not re.search(r'^volume-[0-9a-f]{8}$', params['id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `update_volume_quotas_state`, must conform to the pattern `/^volume-[0-9a-f]{8}$/`")  # 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_volume_quotas_state' in params:
            body_params = params['update_volume_quotas_state']
        # 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(
            '/volumes/{id}/quotas_state.json', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200256',  # 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_volume_tag(self, id, tag_key, create_tag, **kwargs):  # noqa: E501
        """update_volume_tag  # noqa: E501

        Update a tag for volume.  # 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_volume_tag(id, tag_key, create_tag, async_req=True)
        >>> result = thread.get()

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

    def update_volume_tag_with_http_info(self, id, tag_key, create_tag, **kwargs):  # noqa: E501
        """update_volume_tag  # noqa: E501

        Update a tag for volume.  # 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_volume_tag_with_http_info(id, tag_key, create_tag, async_req=True)
        >>> result = thread.get()

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

        all_params = ['id', 'tag_key', 'create_tag']  # 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_volume_tag" % 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_volume_tag`")  # noqa: E501
        # verify the required parameter 'tag_key' is set
        if self.api_client.client_side_validation and ('tag_key' not in params or
                                                       params['tag_key'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `tag_key` when calling `update_volume_tag`")  # noqa: E501
        # verify the required parameter 'create_tag' is set
        if self.api_client.client_side_validation and ('create_tag' not in params or
                                                       params['create_tag'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `create_tag` when calling `update_volume_tag`")  # noqa: E501

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

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_tag' in params:
            body_params = params['create_tag']
        # 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(
            '/volumes/{id}/tags/{tag_key}.json', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200267',  # 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)
