# coding: utf-8

"""
    Shutterstock API Reference

    The Shutterstock API provides access to Shutterstock's library of media, as well as information about customers' accounts and the contributors that provide the media.  # noqa: E501

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


class AudioApi(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_soundbox_items(self, id, body, **kwargs):  # noqa: E501
        """Add audio tracks to collections  # noqa: E501

        This endpoint adds one or more tracks to a collection by track IDs.  # 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_soundbox_items(id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Collection ID (required)
        :param CollectionItemRequest body: List of items to add to collection (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.add_soundbox_items_with_http_info(id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.add_soundbox_items_with_http_info(id, body, **kwargs)  # noqa: E501
            return data

    def add_soundbox_items_with_http_info(self, id, body, **kwargs):  # noqa: E501
        """Add audio tracks to collections  # noqa: E501

        This endpoint adds one or more tracks to a collection by track IDs.  # 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_soundbox_items_with_http_info(id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Collection ID (required)
        :param CollectionItemRequest body: List of items to add to collection (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        return self.api_client.call_api(
            '/v2/audio/collections/{id}/items', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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_soundbox(self, body, **kwargs):  # noqa: E501
        """Create audio collections  # noqa: E501

        This endpoint creates one or more collections (soundboxes). To add tracks, use `POST /v2/audio/collections/{id}/items`.  # 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_soundbox(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CollectionCreateRequest body: Collection metadata (required)
        :return: CollectionCreateResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_soundbox_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_soundbox_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def create_soundbox_with_http_info(self, body, **kwargs):  # noqa: E501
        """Create audio collections  # noqa: E501

        This endpoint creates one or more collections (soundboxes). To add tracks, use `POST /v2/audio/collections/{id}/items`.  # 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_soundbox_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CollectionCreateRequest body: Collection metadata (required)
        :return: CollectionCreateResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # 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_soundbox" % 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_soundbox`")  # 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 = ['customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio/collections', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CollectionCreateResponse',  # 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_soundbox(self, id, **kwargs):  # noqa: E501
        """Delete audio collections  # noqa: E501

        This endpoint deletes a collection.  # 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_soundbox(id, async_req=True)
        >>> result = thread.get()

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

    def delete_soundbox_with_http_info(self, id, **kwargs):  # noqa: E501
        """Delete audio collections  # noqa: E501

        This endpoint deletes a collection.  # 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_soundbox_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Collection ID (required)
        :return: None
                 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_soundbox" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `delete_soundbox`")  # 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
        # Authentication setting
        auth_settings = ['customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio/collections/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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_soundbox_items(self, id, **kwargs):  # noqa: E501
        """Remove audio tracks from collections  # noqa: E501

        This endpoint removes one or more tracks from a collection.  # 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_soundbox_items(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Collection ID (required)
        :param list[str] item_id: One or more item IDs to remove from the collection
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_soundbox_items_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_soundbox_items_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def delete_soundbox_items_with_http_info(self, id, **kwargs):  # noqa: E501
        """Remove audio tracks from collections  # noqa: E501

        This endpoint removes one or more tracks from a collection.  # 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_soundbox_items_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Collection ID (required)
        :param list[str] item_id: One or more item IDs to remove from the collection
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio/collections/{id}/items', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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 download_tracks(self, id, **kwargs):  # noqa: E501
        """Download audio tracks  # noqa: E501

        This endpoint redownloads tracks that you have already received a license for.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_tracks(id, async_req=True)
        >>> result = thread.get()

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

    def download_tracks_with_http_info(self, id, **kwargs):  # noqa: E501
        """Download audio tracks  # noqa: E501

        This endpoint redownloads tracks that you have already received a license for.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_tracks_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: License ID (required)
        :return: Url
                 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 download_tracks" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `download_tracks`")  # 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'])  # noqa: E501

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

        return self.api_client.call_api(
            '/v2/audio/licenses/{id}/downloads', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Url',  # 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_audio_license_list(self, **kwargs):  # noqa: E501
        """List audio licenses  # noqa: E501

        This endpoint lists existing licenses. You can filter the results according to the track ID to see if you have an existing license for a specific track.  # 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_audio_license_list(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str audio_id: Show licenses for the specified track ID
        :return: DownloadHistoryDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_audio_license_list_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_audio_license_list_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_audio_license_list_with_http_info(self, **kwargs):  # noqa: E501
        """List audio licenses  # noqa: E501

        This endpoint lists existing licenses. You can filter the results according to the track ID to see if you have an existing license for a specific track.  # 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_audio_license_list_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str audio_id: Show licenses for the specified track ID
        :return: DownloadHistoryDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['audio_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_audio_license_list" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

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

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

        return self.api_client.call_api(
            '/v2/audio/licenses', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DownloadHistoryDataList',  # 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_genres(self, **kwargs):  # noqa: E501
        """List audio genres  # noqa: E501

        This endpoint returns a list of all audio genres.  # 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_genres(async_req=True)
        >>> result = thread.get()

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

    def get_genres_with_http_info(self, **kwargs):  # noqa: E501
        """List audio genres  # noqa: E501

        This endpoint returns a list of all audio genres.  # 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_genres_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # 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_genres" % 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

        # Authentication setting
        auth_settings = ['basic', 'customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio/genres', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GenreList',  # 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_instruments(self, **kwargs):  # noqa: E501
        """List audio instruments  # noqa: E501

        This endpoint returns a list of all audio instruments.  # 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_instruments(async_req=True)
        >>> result = thread.get()

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

    def get_instruments_with_http_info(self, **kwargs):  # noqa: E501
        """List audio instruments  # noqa: E501

        This endpoint returns a list of all audio instruments.  # 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_instruments_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # 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_instruments" % 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

        # Authentication setting
        auth_settings = ['basic', 'customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio/instruments', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InstrumentList',  # 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_moods(self, **kwargs):  # noqa: E501
        """List audio moods  # noqa: E501

        This endpoint returns a list of all audio moods.  # 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_moods(async_req=True)
        >>> result = thread.get()

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

    def get_moods_with_http_info(self, **kwargs):  # noqa: E501
        """List audio moods  # noqa: E501

        This endpoint returns a list of all audio moods.  # 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_moods_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # 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_moods" % 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

        # Authentication setting
        auth_settings = ['basic', 'customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio/moods', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MoodList',  # 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_soundbox(self, id, **kwargs):  # noqa: E501
        """Get the details of audio collections  # noqa: E501

        This endpoint gets more detailed information about a collection, including the number of items in it and when it was last updated. To get the tracks in collections, use `GET /v2/audio/collections/{id}/items`.  # 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_soundbox(id, async_req=True)
        >>> result = thread.get()

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

    def get_soundbox_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get the details of audio collections  # noqa: E501

        This endpoint gets more detailed information about a collection, including the number of items in it and when it was last updated. To get the tracks in collections, use `GET /v2/audio/collections/{id}/items`.  # 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_soundbox_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Collection ID (required)
        :return: Collection
                 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_soundbox" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_soundbox`")  # 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'])  # noqa: E501

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

        return self.api_client.call_api(
            '/v2/audio/collections/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Collection',  # 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_soundbox_items(self, id, **kwargs):  # noqa: E501
        """Get the contents of audio collections  # noqa: E501

        This endpoint lists the IDs of tracks in a collection and the date that each was added.  # 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_soundbox_items(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Collection ID (required)
        :param int page: Page number
        :param int per_page: Number of results per page
        :param str sort: Sort order
        :return: CollectionItemDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_soundbox_items_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_soundbox_items_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_soundbox_items_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get the contents of audio collections  # noqa: E501

        This endpoint lists the IDs of tracks in a collection and the date that each was added.  # 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_soundbox_items_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Collection ID (required)
        :param int page: Page number
        :param int per_page: Number of results per page
        :param str sort: Sort order
        :return: CollectionItemDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'page', 'per_page', 'sort']  # 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_soundbox_items" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_soundbox_items`")  # noqa: E501

        if 'page' in params and params['page'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `get_soundbox_items`, must be a value greater than or equal to `1`")  # noqa: E501
        if 'per_page' in params and params['per_page'] > 150:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `get_soundbox_items`, must be a value less than or equal to `150`")  # noqa: E501
        if 'per_page' in params and params['per_page'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `get_soundbox_items`, 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 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'per_page' in params:
            query_params.append(('per_page', params['per_page']))  # 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

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

        return self.api_client.call_api(
            '/v2/audio/collections/{id}/items', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CollectionItemDataList',  # 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_soundbox_list(self, **kwargs):  # noqa: E501
        """List audio collections  # noqa: E501

        This endpoint lists your collections of audio tracks and their basic attributes.  # 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_soundbox_list(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int page: Page number
        :param int per_page: Number of results per page
        :return: CollectionDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_soundbox_list_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_soundbox_list_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_soundbox_list_with_http_info(self, **kwargs):  # noqa: E501
        """List audio collections  # noqa: E501

        This endpoint lists your collections of audio tracks and their basic attributes.  # 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_soundbox_list_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int page: Page number
        :param int per_page: Number of results per page
        :return: CollectionDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['page', 'per_page']  # 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_soundbox_list" % key
                )
            params[key] = val
        del params['kwargs']

        if 'page' in params and params['page'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `get_soundbox_list`, must be a value greater than or equal to `1`")  # noqa: E501
        if 'per_page' in params and params['per_page'] > 150:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `get_soundbox_list`, must be a value less than or equal to `150`")  # noqa: E501
        if 'per_page' in params and params['per_page'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `get_soundbox_list`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

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

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

        return self.api_client.call_api(
            '/v2/audio/collections', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CollectionDataList',  # 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_track(self, id, **kwargs):  # noqa: E501
        """Get details about audio tracks  # noqa: E501

        This endpoint shows information about a track, including its genres, instruments, and other attributes.  # 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_track(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Audio track ID (required)
        :param str view: Amount of detail to render in the response
        :return: Audio
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_track_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_track_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_track_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get details about audio tracks  # noqa: E501

        This endpoint shows information about a track, including its genres, instruments, and other attributes.  # 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_track_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Audio track ID (required)
        :param str view: Amount of detail to render in the response
        :return: Audio
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        # Authentication setting
        auth_settings = ['basic', 'customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Audio',  # 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_track_list(self, id, **kwargs):  # noqa: E501
        """List audio tracks  # noqa: E501

        This endpoint lists information about one or more audio tracks, including the description and publication date.  # 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_track_list(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] id: One or more audio IDs (required)
        :param str view: Amount of detail to render in the response
        :return: AudioDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_track_list_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_track_list_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_track_list_with_http_info(self, id, **kwargs):  # noqa: E501
        """List audio tracks  # noqa: E501

        This endpoint lists information about one or more audio tracks, including the description and publication date.  # 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_track_list_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] id: One or more audio IDs (required)
        :param str view: Amount of detail to render in the response
        :return: AudioDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        if ('id' in params and
                len(params['id']) < 1):
            raise ValueError("Invalid value for parameter `id` when calling `get_track_list`, number of items must be greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

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

        # Authentication setting
        auth_settings = ['basic', 'customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AudioDataList',  # 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 license_track(self, body, **kwargs):  # noqa: E501
        """License audio tracks  # noqa: E501

        This endpoint gets licenses for one or more tracks.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.license_track(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param LicenseAudioRequest body: Tracks to license (required)
        :param str license: License type
        :param str search_id: The ID of the search that led to licensing this track
        :return: LicenseAudioResultDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.license_track_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.license_track_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def license_track_with_http_info(self, body, **kwargs):  # noqa: E501
        """License audio tracks  # noqa: E501

        This endpoint gets licenses for one or more tracks.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.license_track_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param LicenseAudioRequest body: Tracks to license (required)
        :param str license: License type
        :param str search_id: The ID of the search that led to licensing this track
        :return: LicenseAudioResultDataList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'license', 'search_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 license_track" % 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 `license_track`")  # noqa: E501

        collection_formats = {}

        path_params = {}

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

        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 = ['customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio/licenses', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='LicenseAudioResultDataList',  # 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_soundbox(self, id, body, **kwargs):  # noqa: E501
        """Rename audio collections  # noqa: E501

        This endpoint sets a new name for a collection.  # 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_soundbox(id, body, async_req=True)
        >>> result = thread.get()

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

    def rename_soundbox_with_http_info(self, id, body, **kwargs):  # noqa: E501
        """Rename audio collections  # noqa: E501

        This endpoint sets a new name for a collection.  # 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_soundbox_with_http_info(id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: Collection ID (required)
        :param CollectionUpdateRequest body: Collection changes (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        return self.api_client.call_api(
            '/v2/audio/collections/{id}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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 search_audio(self, **kwargs):  # noqa: E501
        """Search for tracks  # noqa: E501

        This endpoint searches for tracks. If you specify more than one search parameter, the API uses an AND condition. Array parameters can be specified multiple times; in this case, the API uses an AND or an OR condition with those values, depending on the parameter.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_audio(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] artists: Show tracks with one of the specified artist names or IDs
        :param int bpm: (Deprecated; use bpm_from and bpm_to instead) Show tracks with the specified beats per minute
        :param int bpm_from: Show tracks with the specified beats per minute or faster
        :param int bpm_to: Show tracks with the specified beats per minute or slower
        :param int duration: Show tracks with the specified duration (seconds)
        :param int duration_from: Show tracks with the specified duration or longer (seconds)
        :param int duration_to: Show tracks with the specified duration or shorter (seconds)
        :param list[str] genre: Show tracks with each of the specified genres; to get the list of genres, use `GET /v2/audio/genres`
        :param bool is_instrumental: Show instrumental music only
        :param list[str] instruments: Show tracks with each of the specified instruments; to get the list of instruments, use `GET /v2/audio/instruments`
        :param list[str] moods: Show tracks with each of the specified moods; to get the list of moods, use `GET /v2/audio/moods`
        :param int page: Page number
        :param int per_page: Number of results per page
        :param str query: One or more search terms separated by spaces
        :param str sort: Sort by
        :param str sort_order: Sort order, asc or desc
        :param str vocal_description: Show tracks with the specified vocal description (male, female)
        :param str view: Amount of detail to render in the response
        :param str fields: Fields to display in the response; see the documentation for the fields parameter in the overview section
        :param str library: Which library to search
        :param str language: Which language to search in
        :return: AudioSearchResults
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_audio_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.search_audio_with_http_info(**kwargs)  # noqa: E501
            return data

    def search_audio_with_http_info(self, **kwargs):  # noqa: E501
        """Search for tracks  # noqa: E501

        This endpoint searches for tracks. If you specify more than one search parameter, the API uses an AND condition. Array parameters can be specified multiple times; in this case, the API uses an AND or an OR condition with those values, depending on the parameter.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_audio_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] artists: Show tracks with one of the specified artist names or IDs
        :param int bpm: (Deprecated; use bpm_from and bpm_to instead) Show tracks with the specified beats per minute
        :param int bpm_from: Show tracks with the specified beats per minute or faster
        :param int bpm_to: Show tracks with the specified beats per minute or slower
        :param int duration: Show tracks with the specified duration (seconds)
        :param int duration_from: Show tracks with the specified duration or longer (seconds)
        :param int duration_to: Show tracks with the specified duration or shorter (seconds)
        :param list[str] genre: Show tracks with each of the specified genres; to get the list of genres, use `GET /v2/audio/genres`
        :param bool is_instrumental: Show instrumental music only
        :param list[str] instruments: Show tracks with each of the specified instruments; to get the list of instruments, use `GET /v2/audio/instruments`
        :param list[str] moods: Show tracks with each of the specified moods; to get the list of moods, use `GET /v2/audio/moods`
        :param int page: Page number
        :param int per_page: Number of results per page
        :param str query: One or more search terms separated by spaces
        :param str sort: Sort by
        :param str sort_order: Sort order, asc or desc
        :param str vocal_description: Show tracks with the specified vocal description (male, female)
        :param str view: Amount of detail to render in the response
        :param str fields: Fields to display in the response; see the documentation for the fields parameter in the overview section
        :param str library: Which library to search
        :param str language: Which language to search in
        :return: AudioSearchResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['artists', 'bpm', 'bpm_from', 'bpm_to', 'duration', 'duration_from', 'duration_to', 'genre', 'is_instrumental', 'instruments', 'moods', 'page', 'per_page', 'query', 'sort', 'sort_order', 'vocal_description', 'view', 'fields', 'library', 'language']  # 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 search_audio" % key
                )
            params[key] = val
        del params['kwargs']

        if 'page' in params and params['page'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `search_audio`, must be a value greater than or equal to `1`")  # noqa: E501
        if 'per_page' in params and params['per_page'] > 500:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `search_audio`, must be a value less than or equal to `500`")  # noqa: E501
        if 'per_page' in params and params['per_page'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `search_audio`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'artists' in params:
            query_params.append(('artists', params['artists']))  # noqa: E501
            collection_formats['artists'] = 'multi'  # noqa: E501
        if 'bpm' in params:
            query_params.append(('bpm', params['bpm']))  # noqa: E501
        if 'bpm_from' in params:
            query_params.append(('bpm_from', params['bpm_from']))  # noqa: E501
        if 'bpm_to' in params:
            query_params.append(('bpm_to', params['bpm_to']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'duration_from' in params:
            query_params.append(('duration_from', params['duration_from']))  # noqa: E501
        if 'duration_to' in params:
            query_params.append(('duration_to', params['duration_to']))  # noqa: E501
        if 'genre' in params:
            query_params.append(('genre', params['genre']))  # noqa: E501
            collection_formats['genre'] = 'multi'  # noqa: E501
        if 'is_instrumental' in params:
            query_params.append(('is_instrumental', params['is_instrumental']))  # noqa: E501
        if 'instruments' in params:
            query_params.append(('instruments', params['instruments']))  # noqa: E501
            collection_formats['instruments'] = 'multi'  # noqa: E501
        if 'moods' in params:
            query_params.append(('moods', params['moods']))  # noqa: E501
            collection_formats['moods'] = 'multi'  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'per_page' in params:
            query_params.append(('per_page', params['per_page']))  # noqa: E501
        if 'query' in params:
            query_params.append(('query', params['query']))  # noqa: E501
        if 'sort' in params:
            query_params.append(('sort', params['sort']))  # noqa: E501
        if 'sort_order' in params:
            query_params.append(('sort_order', params['sort_order']))  # noqa: E501
        if 'vocal_description' in params:
            query_params.append(('vocal_description', params['vocal_description']))  # noqa: E501
        if 'view' in params:
            query_params.append(('view', params['view']))  # noqa: E501
        if 'fields' in params:
            query_params.append(('fields', params['fields']))  # noqa: E501
        if 'library' in params:
            query_params.append(('library', params['library']))  # noqa: E501
        if 'language' in params:
            query_params.append(('language', params['language']))  # 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

        # Authentication setting
        auth_settings = ['basic', 'customer_accessCode']  # noqa: E501

        return self.api_client.call_api(
            '/v2/audio/search', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AudioSearchResults',  # 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)
