# coding: utf-8

"""
    XMS API

    XMS is the controller of distributed storage system  # noqa: E501

    OpenAPI spec version: 3.2.14
    
    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 xms_client.api_client import ApiClient


class OsBucketsApi(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 batch_get_object_storage_samples(self, **kwargs):  # noqa: E501
        """batch_get_object_storage_samples  # noqa: E501

        Get samples of multiple object storage buckets  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.batch_get_object_storage_samples(async=True)
        >>> result = thread.get()

        :param async bool
        :return: MultiObjectStorageBucketsSamplesResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.batch_get_object_storage_samples_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.batch_get_object_storage_samples_with_http_info(**kwargs)  # noqa: E501
            return data

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

        Get samples of multiple object storage buckets  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.batch_get_object_storage_samples_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :return: MultiObjectStorageBucketsSamplesResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # noqa: E501
        all_params.append('async')
        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 batch_get_object_storage_samples" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        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'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/samples', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MultiObjectStorageBucketsSamplesResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_bucket(self, body, **kwargs):  # noqa: E501
        """create_bucket  # noqa: E501

        Create os bucket  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_bucket(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param ObjectStorageBucketCreateReq body: bucket info (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.create_bucket_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_bucket_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def create_bucket_with_http_info(self, body, **kwargs):  # noqa: E501
        """create_bucket  # noqa: E501

        Create os bucket  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_bucket_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param ObjectStorageBucketCreateReq body: bucket info (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_object_storage_bucket_nfs_clients(self, bucket_id, body, **kwargs):  # noqa: E501
        """create_object_storage_bucket_nfs_clients  # noqa: E501

        create nfs client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_object_storage_bucket_nfs_clients(bucket_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param ObjectStorageBucketNFSClientsCreateReq body: nfs client info (required)
        :return: RawObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.create_object_storage_bucket_nfs_clients_with_http_info(bucket_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_object_storage_bucket_nfs_clients_with_http_info(bucket_id, body, **kwargs)  # noqa: E501
            return data

    def create_object_storage_bucket_nfs_clients_with_http_info(self, bucket_id, body, **kwargs):  # noqa: E501
        """create_object_storage_bucket_nfs_clients  # noqa: E501

        create nfs client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_object_storage_bucket_nfs_clients_with_http_info(bucket_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param ObjectStorageBucketNFSClientsCreateReq body: nfs client info (required)
        :return: RawObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['bucket_id', 'body']  # noqa: E501
        all_params.append('async')
        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_object_storage_bucket_nfs_clients" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'bucket_id' is set
        if ('bucket_id' not in params or
                params['bucket_id'] is None):
            raise ValueError("Missing the required parameter `bucket_id` when calling `create_object_storage_bucket_nfs_clients`")  # noqa: E501
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_object_storage_bucket_nfs_clients`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}/nfs-clients', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RawObjectStorageBucketResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_bucket(self, bucket_id, **kwargs):  # noqa: E501
        """delete_bucket  # noqa: E501

        delete object storage bucket  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_bucket(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param bool force: force delete or not
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.delete_bucket_with_http_info(bucket_id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_bucket_with_http_info(bucket_id, **kwargs)  # noqa: E501
            return data

    def delete_bucket_with_http_info(self, bucket_id, **kwargs):  # noqa: E501
        """delete_bucket  # noqa: E501

        delete object storage bucket  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_bucket_with_http_info(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param bool force: force delete or not
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['bucket_id', 'force']  # noqa: E501
        all_params.append('async')
        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_bucket" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'bucket_id' is set
        if ('bucket_id' not in params or
                params['bucket_id'] is None):
            raise ValueError("Missing the required parameter `bucket_id` when calling `delete_bucket`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'force' in params:
            query_params.append(('force', params['force']))  # 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'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_object_storage_bucket_nfs_clients(self, bucket_id, body, **kwargs):  # noqa: E501
        """delete_object_storage_bucket_nfs_clients  # noqa: E501

        delete nfs clients  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_object_storage_bucket_nfs_clients(bucket_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param ObjectStorageBucketNFSClientsDeleteReq body: nfs client info (required)
        :return: RawObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.delete_object_storage_bucket_nfs_clients_with_http_info(bucket_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_object_storage_bucket_nfs_clients_with_http_info(bucket_id, body, **kwargs)  # noqa: E501
            return data

    def delete_object_storage_bucket_nfs_clients_with_http_info(self, bucket_id, body, **kwargs):  # noqa: E501
        """delete_object_storage_bucket_nfs_clients  # noqa: E501

        delete nfs clients  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_object_storage_bucket_nfs_clients_with_http_info(bucket_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param ObjectStorageBucketNFSClientsDeleteReq body: nfs client info (required)
        :return: RawObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['bucket_id', 'body']  # noqa: E501
        all_params.append('async')
        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_object_storage_bucket_nfs_clients" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'bucket_id' is set
        if ('bucket_id' not in params or
                params['bucket_id'] is None):
            raise ValueError("Missing the required parameter `bucket_id` when calling `delete_object_storage_bucket_nfs_clients`")  # noqa: E501
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `delete_object_storage_bucket_nfs_clients`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}/nfs-clients', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RawObjectStorageBucketResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_object_storage_lifecycle(self, bucket_id, **kwargs):  # noqa: E501
        """delete_object_storage_lifecycle  # noqa: E501

        delete object storage lifecycle  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_object_storage_lifecycle(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.delete_object_storage_lifecycle_with_http_info(bucket_id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_object_storage_lifecycle_with_http_info(bucket_id, **kwargs)  # noqa: E501
            return data

    def delete_object_storage_lifecycle_with_http_info(self, bucket_id, **kwargs):  # noqa: E501
        """delete_object_storage_lifecycle  # noqa: E501

        delete object storage lifecycle  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_object_storage_lifecycle_with_http_info(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'bucket_id' in params:
            path_params['bucket_id'] = params['bucket_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'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}/lifecycle', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_bucket(self, bucket_id, **kwargs):  # noqa: E501
        """get_bucket  # noqa: E501

        Get object storage bucket  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_bucket(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_bucket_with_http_info(bucket_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_bucket_with_http_info(bucket_id, **kwargs)  # noqa: E501
            return data

    def get_bucket_with_http_info(self, bucket_id, **kwargs):  # noqa: E501
        """get_bucket  # noqa: E501

        Get object storage bucket  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_bucket_with_http_info(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'bucket_id' in params:
            path_params['bucket_id'] = params['bucket_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'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_object_storage_bucket_nfs_client(self, bucket_id, client_id, **kwargs):  # noqa: E501
        """get_object_storage_bucket_nfs_client  # noqa: E501

        show nfs client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_object_storage_bucket_nfs_client(bucket_id, client_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param int client_id: nfs client id (required)
        :return: ObjectStorageBucketNFSClientResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_object_storage_bucket_nfs_client_with_http_info(bucket_id, client_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_object_storage_bucket_nfs_client_with_http_info(bucket_id, client_id, **kwargs)  # noqa: E501
            return data

    def get_object_storage_bucket_nfs_client_with_http_info(self, bucket_id, client_id, **kwargs):  # noqa: E501
        """get_object_storage_bucket_nfs_client  # noqa: E501

        show nfs client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_object_storage_bucket_nfs_client_with_http_info(bucket_id, client_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param int client_id: nfs client id (required)
        :return: ObjectStorageBucketNFSClientResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['bucket_id', 'client_id']  # noqa: E501
        all_params.append('async')
        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_object_storage_bucket_nfs_client" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'bucket_id' is set
        if ('bucket_id' not in params or
                params['bucket_id'] is None):
            raise ValueError("Missing the required parameter `bucket_id` when calling `get_object_storage_bucket_nfs_client`")  # noqa: E501
        # verify the required parameter 'client_id' is set
        if ('client_id' not in params or
                params['client_id'] is None):
            raise ValueError("Missing the required parameter `client_id` when calling `get_object_storage_bucket_nfs_client`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'bucket_id' in params:
            path_params['bucket_id'] = params['bucket_id']  # noqa: E501
        if 'client_id' in params:
            path_params['client_id'] = params['client_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'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}/nfs-clients/{client_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketNFSClientResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_object_storage_bucket_samples(self, bucket_id, **kwargs):  # noqa: E501
        """get_object_storage_bucket_samples  # noqa: E501

        get an object storage bucket's Samples  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_object_storage_bucket_samples(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param str duration_begin: duration begin timestamp
        :param str duration_end: duration end timestamp
        :param str period: samples period
        :return: ObjectStorageBucketSamplesResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_object_storage_bucket_samples_with_http_info(bucket_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_object_storage_bucket_samples_with_http_info(bucket_id, **kwargs)  # noqa: E501
            return data

    def get_object_storage_bucket_samples_with_http_info(self, bucket_id, **kwargs):  # noqa: E501
        """get_object_storage_bucket_samples  # noqa: E501

        get an object storage bucket's Samples  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_object_storage_bucket_samples_with_http_info(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param str duration_begin: duration begin timestamp
        :param str duration_end: duration end timestamp
        :param str period: samples period
        :return: ObjectStorageBucketSamplesResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['bucket_id', 'duration_begin', 'duration_end', 'period']  # noqa: E501
        all_params.append('async')
        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_object_storage_bucket_samples" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'bucket_id' is set
        if ('bucket_id' not in params or
                params['bucket_id'] is None):
            raise ValueError("Missing the required parameter `bucket_id` when calling `get_object_storage_bucket_samples`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'duration_begin' in params:
            query_params.append(('duration_begin', params['duration_begin']))  # noqa: E501
        if 'duration_end' in params:
            query_params.append(('duration_end', params['duration_end']))  # noqa: E501
        if 'period' in params:
            query_params.append(('period', params['period']))  # 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'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}/samples', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketSamplesResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 list_buckets(self, **kwargs):  # noqa: E501
        """list_buckets  # noqa: E501

        List object storage buckets  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.list_buckets(async=True)
        >>> result = thread.get()

        :param async bool
        :param int limit: paging param
        :param int offset: paging param
        :param str name: name of object storage buckets
        :param int os_policy_id: The id of policy object storage buckets belong to
        :param int os_user_id: The id of user object storage buckets belong to
        :param int os_zone_id: The id of zone object storage buckets belong to
        :param int os_replication_policy_id: The id of replication policy applied on buckets
        :param bool virtual: Virtual bucket or not
        :param str q: query param of search
        :param str sort: sort param of search
        :return: ObjectStorageBucketsResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.list_buckets_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.list_buckets_with_http_info(**kwargs)  # noqa: E501
            return data

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

        List object storage buckets  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.list_buckets_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param int limit: paging param
        :param int offset: paging param
        :param str name: name of object storage buckets
        :param int os_policy_id: The id of policy object storage buckets belong to
        :param int os_user_id: The id of user object storage buckets belong to
        :param int os_zone_id: The id of zone object storage buckets belong to
        :param int os_replication_policy_id: The id of replication policy applied on buckets
        :param bool virtual: Virtual bucket or not
        :param str q: query param of search
        :param str sort: sort param of search
        :return: ObjectStorageBucketsResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['limit', 'offset', 'name', 'os_policy_id', 'os_user_id', 'os_zone_id', 'os_replication_policy_id', 'virtual', 'q', 'sort']  # noqa: E501
        all_params.append('async')
        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 list_buckets" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'os_policy_id' in params:
            query_params.append(('os_policy_id', params['os_policy_id']))  # noqa: E501
        if 'os_user_id' in params:
            query_params.append(('os_user_id', params['os_user_id']))  # noqa: E501
        if 'os_zone_id' in params:
            query_params.append(('os_zone_id', params['os_zone_id']))  # noqa: E501
        if 'os_replication_policy_id' in params:
            query_params.append(('os_replication_policy_id', params['os_replication_policy_id']))  # noqa: E501
        if 'virtual' in params:
            query_params.append(('virtual', params['virtual']))  # noqa: E501
        if 'q' in params:
            query_params.append(('q', params['q']))  # noqa: E501
        if 'sort' in params:
            query_params.append(('sort', params['sort']))  # 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'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketsResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 list_object_storage_bucket_nfs_clients(self, bucket_id, **kwargs):  # noqa: E501
        """list_object_storage_bucket_nfs_clients  # noqa: E501

        List nfs clients  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.list_object_storage_bucket_nfs_clients(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param int limit: paging param
        :param int offset: paging param
        :return: ObjectStorageBucketNFSClientsResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.list_object_storage_bucket_nfs_clients_with_http_info(bucket_id, **kwargs)  # noqa: E501
        else:
            (data) = self.list_object_storage_bucket_nfs_clients_with_http_info(bucket_id, **kwargs)  # noqa: E501
            return data

    def list_object_storage_bucket_nfs_clients_with_http_info(self, bucket_id, **kwargs):  # noqa: E501
        """list_object_storage_bucket_nfs_clients  # noqa: E501

        List nfs clients  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.list_object_storage_bucket_nfs_clients_with_http_info(bucket_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param int limit: paging param
        :param int offset: paging param
        :return: ObjectStorageBucketNFSClientsResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['bucket_id', 'limit', 'offset']  # noqa: E501
        all_params.append('async')
        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 list_object_storage_bucket_nfs_clients" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'bucket_id' is set
        if ('bucket_id' not in params or
                params['bucket_id'] is None):
            raise ValueError("Missing the required parameter `bucket_id` when calling `list_object_storage_bucket_nfs_clients`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # 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'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}/nfs-clients', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketNFSClientsResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_object_storage_lifecycle_rules(self, bucket_id, body, **kwargs):  # noqa: E501
        """set_object_storage_lifecycle_rules  # noqa: E501

        Set object storage lifecycle rules  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.set_object_storage_lifecycle_rules(bucket_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param ObjectStorageLifecycleSetReq body: lifecyce rules info (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.set_object_storage_lifecycle_rules_with_http_info(bucket_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.set_object_storage_lifecycle_rules_with_http_info(bucket_id, body, **kwargs)  # noqa: E501
            return data

    def set_object_storage_lifecycle_rules_with_http_info(self, bucket_id, body, **kwargs):  # noqa: E501
        """set_object_storage_lifecycle_rules  # noqa: E501

        Set object storage lifecycle rules  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.set_object_storage_lifecycle_rules_with_http_info(bucket_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param ObjectStorageLifecycleSetReq body: lifecyce rules info (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['bucket_id', 'body']  # noqa: E501
        all_params.append('async')
        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_object_storage_lifecycle_rules" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'bucket_id' is set
        if ('bucket_id' not in params or
                params['bucket_id'] is None):
            raise ValueError("Missing the required parameter `bucket_id` when calling `set_object_storage_lifecycle_rules`")  # noqa: E501
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `set_object_storage_lifecycle_rules`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}/lifecycle', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_bucket(self, bucket_id, body, **kwargs):  # noqa: E501
        """update_bucket  # noqa: E501

        Update object storage bucket  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_bucket(bucket_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param ObjectStorageBucketUpdateReq body: bucket info (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.update_bucket_with_http_info(bucket_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.update_bucket_with_http_info(bucket_id, body, **kwargs)  # noqa: E501
            return data

    def update_bucket_with_http_info(self, bucket_id, body, **kwargs):  # noqa: E501
        """update_bucket  # noqa: E501

        Update object storage bucket  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_bucket_with_http_info(bucket_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param ObjectStorageBucketUpdateReq body: bucket info (required)
        :return: ObjectStorageBucketResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['bucket_id', 'body']  # noqa: E501
        all_params.append('async')
        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_bucket" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'bucket_id' is set
        if ('bucket_id' not in params or
                params['bucket_id'] is None):
            raise ValueError("Missing the required parameter `bucket_id` when calling `update_bucket`")  # noqa: E501
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_bucket`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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_object_storage_bucket_nfs_client(self, bucket_id, client_id, body, **kwargs):  # noqa: E501
        """update_object_storage_bucket_nfs_client  # noqa: E501

        update nfs client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_object_storage_bucket_nfs_client(bucket_id, client_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param int client_id: nfs client id (required)
        :param ObjectStorageBucketNFSClientUpdateReq body: nfs client info (required)
        :return: ObjectStorageBucketNFSClientResp
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.update_object_storage_bucket_nfs_client_with_http_info(bucket_id, client_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.update_object_storage_bucket_nfs_client_with_http_info(bucket_id, client_id, body, **kwargs)  # noqa: E501
            return data

    def update_object_storage_bucket_nfs_client_with_http_info(self, bucket_id, client_id, body, **kwargs):  # noqa: E501
        """update_object_storage_bucket_nfs_client  # noqa: E501

        update nfs client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_object_storage_bucket_nfs_client_with_http_info(bucket_id, client_id, body, async=True)
        >>> result = thread.get()

        :param async bool
        :param int bucket_id: bucket id (required)
        :param int client_id: nfs client id (required)
        :param ObjectStorageBucketNFSClientUpdateReq body: nfs client info (required)
        :return: ObjectStorageBucketNFSClientResp
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['bucket_id', 'client_id', 'body']  # noqa: E501
        all_params.append('async')
        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_object_storage_bucket_nfs_client" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'bucket_id' is set
        if ('bucket_id' not in params or
                params['bucket_id'] is None):
            raise ValueError("Missing the required parameter `bucket_id` when calling `update_object_storage_bucket_nfs_client`")  # noqa: E501
        # verify the required parameter 'client_id' is set
        if ('client_id' not in params or
                params['client_id'] is None):
            raise ValueError("Missing the required parameter `client_id` when calling `update_object_storage_bucket_nfs_client`")  # noqa: E501
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_object_storage_bucket_nfs_client`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['tokenInCookie', 'tokenInHeader', 'tokenInQuery']  # noqa: E501

        return self.api_client.call_api(
            '/os-buckets/{bucket_id}/nfs-clients/{client_id}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectStorageBucketNFSClientResp',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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)
