# coding: utf-8

"""
    Estuary API

    This is the API for the Estuary application.  # noqa: E501

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


class ContentApi(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 admin_invites_get(self, **kwargs):  # noqa: E501
        """Get Estuary invites  # noqa: E501

        This endpoint is used to list all estuary invites.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.admin_invites_get(async_req=True)
        >>> result = thread.get()

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

    def admin_invites_get_with_http_info(self, **kwargs):  # noqa: E501
        """Get Estuary invites  # noqa: E501

        This endpoint is used to list all estuary invites.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.admin_invites_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: str
                 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 admin_invites_get" % 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 = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/admin/invites', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 admin_invites_post(self, code, **kwargs):  # noqa: E501
        """Create an Estuary invite  # noqa: E501

        This endpoint is used to create an estuary invite.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.admin_invites_post(code, async_req=True)
        >>> result = thread.get()

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

    def admin_invites_post_with_http_info(self, code, **kwargs):  # noqa: E501
        """Create an Estuary invite  # noqa: E501

        This endpoint is used to create an estuary invite.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.admin_invites_post_with_http_info(code, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str code: Invite code to be created (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        return self.api_client.call_api(
            '/admin/invites', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_add_car_post(self, body, **kwargs):  # noqa: E501
        """Add Car object  # noqa: E501

        This endpoint is used to add a car object to the network. The object can be a file or a directory.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_add_car_post(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str body: Car (required)
        :param str ignore_dupes: Ignore Dupes
        :param str filename: Filename
        :return: UtilContentAddResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.content_add_car_post_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.content_add_car_post_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def content_add_car_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Add Car object  # noqa: E501

        This endpoint is used to add a car object to the network. The object can be a file or a directory.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_add_car_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str body: Car (required)
        :param str ignore_dupes: Ignore Dupes
        :param str filename: Filename
        :return: UtilContentAddResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'ignore_dupes', 'filename']  # 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 content_add_car_post" % 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 `content_add_car_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'ignore_dupes' in params:
            query_params.append(('ignore-dupes', params['ignore_dupes']))  # noqa: E501
        if 'filename' in params:
            query_params.append(('filename', params['filename']))  # 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
            ['*/*'])  # noqa: E501

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

        return self.api_client.call_api(
            '/content/add-car', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UtilContentAddResponse',  # 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 content_add_ipfs_post(self, body, **kwargs):  # noqa: E501
        """Add IPFS object  # noqa: E501

        This endpoint is used to add an IPFS object to the network. The object can be a file or a directory.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_add_ipfs_post(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UtilContentAddIpfsBody body: IPFS Body (required)
        :param str ignore_dupes: Ignore Dupes
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.content_add_ipfs_post_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.content_add_ipfs_post_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def content_add_ipfs_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Add IPFS object  # noqa: E501

        This endpoint is used to add an IPFS object to the network. The object can be a file or a directory.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_add_ipfs_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UtilContentAddIpfsBody body: IPFS Body (required)
        :param str ignore_dupes: Ignore Dupes
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

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

        return self.api_client.call_api(
            '/content/add-ipfs', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_add_post(self, data, filename, **kwargs):  # noqa: E501
        """Add new content  # noqa: E501

        This endpoint is used to upload new content.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_add_post(data, filename, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str data: (required)
        :param str filename: (required)
        :param str coluuid: Collection UUID
        :param int replication: Replication value
        :param str ignore_dupes: Ignore Dupes true/false
        :param str lazy_provide: Lazy Provide true/false
        :param str dir: Directory
        :return: UtilContentAddResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.content_add_post_with_http_info(data, filename, **kwargs)  # noqa: E501
        else:
            (data) = self.content_add_post_with_http_info(data, filename, **kwargs)  # noqa: E501
            return data

    def content_add_post_with_http_info(self, data, filename, **kwargs):  # noqa: E501
        """Add new content  # noqa: E501

        This endpoint is used to upload new content.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_add_post_with_http_info(data, filename, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str data: (required)
        :param str filename: (required)
        :param str coluuid: Collection UUID
        :param int replication: Replication value
        :param str ignore_dupes: Ignore Dupes true/false
        :param str lazy_provide: Lazy Provide true/false
        :param str dir: Directory
        :return: UtilContentAddResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['data', 'filename', 'coluuid', 'replication', 'ignore_dupes', 'lazy_provide', 'dir']  # 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 content_add_post" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'data' is set
        if ('data' not in params or
                params['data'] is None):
            raise ValueError("Missing the required parameter `data` when calling `content_add_post`")  # noqa: E501
        # verify the required parameter 'filename' is set
        if ('filename' not in params or
                params['filename'] is None):
            raise ValueError("Missing the required parameter `filename` when calling `content_add_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'coluuid' in params:
            query_params.append(('coluuid', params['coluuid']))  # noqa: E501
        if 'replication' in params:
            query_params.append(('replication', params['replication']))  # noqa: E501
        if 'ignore_dupes' in params:
            query_params.append(('ignore-dupes', params['ignore_dupes']))  # noqa: E501
        if 'lazy_provide' in params:
            query_params.append(('lazy-provide', params['lazy_provide']))  # noqa: E501
        if 'dir' in params:
            query_params.append(('dir', params['dir']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'data' in params:
            local_var_files['data'] = params['data']  # noqa: E501
        if 'filename' in params:
            form_params.append(('filename', params['filename']))  # noqa: E501

        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
            ['multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/content/add', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UtilContentAddResponse',  # 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 content_aggregated_content_get(self, content, **kwargs):  # noqa: E501
        """Get aggregated content stats  # noqa: E501

        This endpoint returns aggregated content stats  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_aggregated_content_get(content, async_req=True)
        >>> result = thread.get()

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

    def content_aggregated_content_get_with_http_info(self, content, **kwargs):  # noqa: E501
        """Get aggregated content stats  # noqa: E501

        This endpoint returns aggregated content stats  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_aggregated_content_get_with_http_info(content, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

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

        return self.api_client.call_api(
            '/content/aggregated/{content}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_all_deals_get(self, begin, duration, all, **kwargs):  # noqa: E501
        """Get all deals for a user  # noqa: E501

        This endpoint is used to get all deals for a user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_all_deals_get(begin, duration, all, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str begin: Begin (required)
        :param str duration: Duration (required)
        :param str all: All (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.content_all_deals_get_with_http_info(begin, duration, all, **kwargs)  # noqa: E501
        else:
            (data) = self.content_all_deals_get_with_http_info(begin, duration, all, **kwargs)  # noqa: E501
            return data

    def content_all_deals_get_with_http_info(self, begin, duration, all, **kwargs):  # noqa: E501
        """Get all deals for a user  # noqa: E501

        This endpoint is used to get all deals for a user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_all_deals_get_with_http_info(begin, duration, all, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str begin: Begin (required)
        :param str duration: Duration (required)
        :param str all: All (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        return self.api_client.call_api(
            '/content/all-deals', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_bw_usage_content_get(self, content, **kwargs):  # noqa: E501
        """Get content bandwidth  # noqa: E501

        This endpoint returns content bandwidth  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_bw_usage_content_get(content, async_req=True)
        >>> result = thread.get()

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

    def content_bw_usage_content_get_with_http_info(self, content, **kwargs):  # noqa: E501
        """Get content bandwidth  # noqa: E501

        This endpoint returns content bandwidth  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_bw_usage_content_get_with_http_info(content, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

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

        return self.api_client.call_api(
            '/content/bw-usage/{content}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_create_post(self, body, **kwargs):  # noqa: E501
        """Add a new content  # noqa: E501

        This endpoint adds a new content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_create_post(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UtilContentCreateBody body: Content (required)
        :param str ignore_dupes: Ignore Dupes
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.content_create_post_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.content_create_post_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def content_create_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Add a new content  # noqa: E501

        This endpoint adds a new content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_create_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UtilContentCreateBody body: Content (required)
        :param str ignore_dupes: Ignore Dupes
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

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

        return self.api_client.call_api(
            '/content/create', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_deals_get(self, **kwargs):  # noqa: E501
        """Content with deals  # noqa: E501

        This endpoint lists all content with deals  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_deals_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int limit: Limit
        :param int offset: Offset
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.content_deals_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.content_deals_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def content_deals_get_with_http_info(self, **kwargs):  # noqa: E501
        """Content with deals  # noqa: E501

        This endpoint lists all content with deals  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_deals_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int limit: Limit
        :param int offset: Offset
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['limit', 'offset']  # 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 content_deals_get" % 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

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

        return self.api_client.call_api(
            '/content/deals', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_ensure_replication_datacid_get(self, datacid, **kwargs):  # noqa: E501
        """Ensure Replication  # noqa: E501

        This endpoint ensures that the content is replicated to the specified number of providers  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_ensure_replication_datacid_get(datacid, async_req=True)
        >>> result = thread.get()

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

    def content_ensure_replication_datacid_get_with_http_info(self, datacid, **kwargs):  # noqa: E501
        """Ensure Replication  # noqa: E501

        This endpoint ensures that the content is replicated to the specified number of providers  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_ensure_replication_datacid_get_with_http_info(datacid, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

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

        return self.api_client.call_api(
            '/content/ensure-replication/{datacid}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_failures_content_get(self, content, **kwargs):  # noqa: E501
        """List all failures for a content  # noqa: E501

        This endpoint returns all failures for a content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_failures_content_get(content, async_req=True)
        >>> result = thread.get()

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

    def content_failures_content_get_with_http_info(self, content, **kwargs):  # noqa: E501
        """List all failures for a content  # noqa: E501

        This endpoint returns all failures for a content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_failures_content_get_with_http_info(content, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

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

        return self.api_client.call_api(
            '/content/failures/{content}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_id_get(self, id, **kwargs):  # noqa: E501
        """Content  # noqa: E501

        This endpoint returns a content by its ID  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_id_get(id, async_req=True)
        >>> result = thread.get()

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

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

        This endpoint returns a content by its ID  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_id_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: Content ID (required)
        :return: str
                 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 content_id_get" % 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 `content_id_get`")  # 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 = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/content/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_importdeal_post(self, body, **kwargs):  # noqa: E501
        """Import a deal  # noqa: E501

        This endpoint imports a deal into the shuttle.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_importdeal_post(body, async_req=True)
        >>> result = thread.get()

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

    def content_importdeal_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Import a deal  # noqa: E501

        This endpoint imports a deal into the shuttle.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_importdeal_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param MainImportDealBody body: Import a deal (required)
        :return: str
                 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 content_importdeal_post" % 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 `content_importdeal_post`")  # 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
            ['*/*'])  # noqa: E501

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

        return self.api_client.call_api(
            '/content/importdeal', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_list_get(self, **kwargs):  # noqa: E501
        """List all pinned content  # noqa: E501

        This endpoint lists all content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_list_get(async_req=True)
        >>> result = thread.get()

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

    def content_list_get_with_http_info(self, **kwargs):  # noqa: E501
        """List all pinned content  # noqa: E501

        This endpoint lists all content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_list_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: str
                 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 content_list_get" % 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 = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/content/list', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_read_cont_get(self, cont, **kwargs):  # noqa: E501
        """Read content  # noqa: E501

        This endpoint reads content from the blockstore  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_read_cont_get(cont, async_req=True)
        >>> result = thread.get()

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

    def content_read_cont_get_with_http_info(self, cont, **kwargs):  # noqa: E501
        """Read content  # noqa: E501

        This endpoint reads content from the blockstore  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_read_cont_get_with_http_info(cont, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

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

        return self.api_client.call_api(
            '/content/read/{cont}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_staging_zones_get(self, **kwargs):  # noqa: E501
        """Get staging zone for user  # noqa: E501

        This endpoint is used to get staging zone for user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_staging_zones_get(async_req=True)
        >>> result = thread.get()

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

    def content_staging_zones_get_with_http_info(self, **kwargs):  # noqa: E501
        """Get staging zone for user  # noqa: E501

        This endpoint is used to get staging zone for user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_staging_zones_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: str
                 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 content_staging_zones_get" % 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 = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/content/staging-zones', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_stats_get(self, limit, offset, **kwargs):  # noqa: E501
        """Get content statistics  # noqa: E501

        This endpoint is used to get content statistics. Every content stored in the network (estuary) is tracked by a unique ID which can be used to get information about the content. This endpoint will allow the consumer to get the collected stats of a conten  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_stats_get(limit, offset, async_req=True)
        >>> result = thread.get()

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

    def content_stats_get_with_http_info(self, limit, offset, **kwargs):  # noqa: E501
        """Get content statistics  # noqa: E501

        This endpoint is used to get content statistics. Every content stored in the network (estuary) is tracked by a unique ID which can be used to get information about the content. This endpoint will allow the consumer to get the collected stats of a conten  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_stats_get_with_http_info(limit, offset, async_req=True)
        >>> result = thread.get()

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

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

        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

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

        return self.api_client.call_api(
            '/content/stats', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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 content_status_id_get(self, id, **kwargs):  # noqa: E501
        """Content Status  # noqa: E501

        This endpoint returns the status of a content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_status_id_get(id, async_req=True)
        >>> result = thread.get()

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

    def content_status_id_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Content Status  # noqa: E501

        This endpoint returns the status of a content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.content_status_id_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: Content ID (required)
        :return: str
                 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 content_status_id_get" % 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 `content_status_id_get`")  # 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 = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/content/status/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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)
