# coding: utf-8

"""
    GraphDB Workbench API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.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 graphdb.graphdb_workbench.api_client import ApiClient


class RepositoryManagementControllerApi(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 create_repository_using_post(self, **kwargs):  # noqa: E501
        """Create a repository in an attached Sesame location (ttl file)  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_repository_using_post(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param file config: A ttl configuration file for the repository
        :param str location: Sesame location
        :param file constraint_file: constraintFile
        :param file obda_file: obdaFile
        :param file owl_file: owlFile
        :param file properties_file: propertiesFile
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_repository_using_post_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.create_repository_using_post_with_http_info(**kwargs)  # noqa: E501
            return data

    def create_repository_using_post_with_http_info(self, **kwargs):  # noqa: E501
        """Create a repository in an attached Sesame location (ttl file)  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_repository_using_post_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param file config: A ttl configuration file for the repository
        :param str location: Sesame location
        :param file constraint_file: constraintFile
        :param file obda_file: obdaFile
        :param file owl_file: owlFile
        :param file properties_file: propertiesFile
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['config', 'location', 'constraint_file', 'obda_file', 'owl_file', 'properties_file']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'config' in params:
            local_var_files['config'] = params['config']  # noqa: E501
        if 'location' in params:
            form_params.append(('location', params['location']))  # noqa: E501
        if 'constraint_file' in params:
            local_var_files['constraintFile'] = params['constraint_file']  # noqa: E501
        if 'obda_file' in params:
            local_var_files['obdaFile'] = params['obda_file']  # noqa: E501
        if 'owl_file' in params:
            local_var_files['owlFile'] = params['owl_file']  # noqa: E501
        if 'properties_file' in params:
            local_var_files['propertiesFile'] = params['properties_file']  # noqa: E501

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/rest/repositories', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # 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_repository_using_delete(self, repository_id, **kwargs):  # noqa: E501
        """Delete a repository in an attached Sesame location  # 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_repository_using_delete(repository_id, async_req=True)
        >>> result = thread.get()

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

    def delete_repository_using_delete_with_http_info(self, repository_id, **kwargs):  # noqa: E501
        """Delete a repository in an attached Sesame location  # 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_repository_using_delete_with_http_info(repository_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str repository_id: repositoryID (required)
        :param str location: location
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/rest/repositories/{repositoryID}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # 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_repository_config_turtle_using_get(self, repository_id, **kwargs):  # noqa: E501
        """Download repository configuration as a Turtle file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_repository_config_turtle_using_get(repository_id, async_req=True)
        >>> result = thread.get()

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

    def download_repository_config_turtle_using_get_with_http_info(self, repository_id, **kwargs):  # noqa: E501
        """Download repository configuration as a Turtle file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_repository_config_turtle_using_get_with_http_info(repository_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str repository_id: repositoryID (required)
        :param str location: location
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['text/turtle'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/rest/repositories/{repositoryID}/download', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # 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_repository_config_zip_using_get(self, repository_id, **kwargs):  # noqa: E501
        """Download repository configuration as a zip file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_repository_config_zip_using_get(repository_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str repository_id: repositoryID (required)
        :param str location: location
        :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.download_repository_config_zip_using_get_with_http_info(repository_id, **kwargs)  # noqa: E501
        else:
            (data) = self.download_repository_config_zip_using_get_with_http_info(repository_id, **kwargs)  # noqa: E501
            return data

    def download_repository_config_zip_using_get_with_http_info(self, repository_id, **kwargs):  # noqa: E501
        """Download repository configuration as a zip file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_repository_config_zip_using_get_with_http_info(repository_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str repository_id: repositoryID (required)
        :param str location: location
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/rest/repositories/{repositoryID}/downloadZip', 'GET',
            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 edit_repository_using_put(self, bean, repository_id, **kwargs):  # noqa: E501
        """Edit repository configuration  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.edit_repository_using_put(bean, repository_id, async_req=True)
        >>> result = thread.get()

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

    def edit_repository_using_put_with_http_info(self, bean, repository_id, **kwargs):  # noqa: E501
        """Edit repository configuration  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.edit_repository_using_put_with_http_info(bean, repository_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RepositoryConfigBean bean: bean (required)
        :param str repository_id: repositoryID (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'bean' in params:
            body_params = params['bean']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/rest/repositories/{repositoryID}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # 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_default_config_using_get(self, repository_type, **kwargs):  # noqa: E501
        """Get the default repository configuration for the repository type  # 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_default_config_using_get(repository_type, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str repository_type: repository type: 'se', 'master', 'worker', 'free' or 'ontop' (required)
        :param str repository_id: repositoryID
        :param str repository_title: repositoryTitle
        :return: RepositoryConfigBean
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_default_config_using_get_with_http_info(repository_type, **kwargs)  # noqa: E501
        else:
            (data) = self.get_default_config_using_get_with_http_info(repository_type, **kwargs)  # noqa: E501
            return data

    def get_default_config_using_get_with_http_info(self, repository_type, **kwargs):  # noqa: E501
        """Get the default repository configuration for the repository type  # 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_default_config_using_get_with_http_info(repository_type, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str repository_type: repository type: 'se', 'master', 'worker', 'free' or 'ontop' (required)
        :param str repository_id: repositoryID
        :param str repository_title: repositoryTitle
        :return: RepositoryConfigBean
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []
        if 'repository_id' in params:
            query_params.append(('repositoryID', params['repository_id']))  # noqa: E501
        if 'repository_title' in params:
            query_params.append(('repositoryTitle', params['repository_title']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/rest/repositories/defaultConfig/{repositoryType}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RepositoryConfigBean',  # 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_repositories_using_get(self, **kwargs):  # noqa: E501
        """Get all repositories in the active location or another location  # 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_repositories_using_get(async_req=True)
        >>> result = thread.get()

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

    def get_repositories_using_get_with_http_info(self, **kwargs):  # noqa: E501
        """Get all repositories in the active location or another location  # 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_repositories_using_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str location: location
        :return: list[GraphDBRepository]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/rest/repositories', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GraphDBRepository]',  # 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_repository_config_json_using_get(self, repository_id, **kwargs):  # noqa: E501
        """Get repository configuration as JSON  # 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_repository_config_json_using_get(repository_id, async_req=True)
        >>> result = thread.get()

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

    def get_repository_config_json_using_get_with_http_info(self, repository_id, **kwargs):  # noqa: E501
        """Get repository configuration as JSON  # 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_repository_config_json_using_get_with_http_info(repository_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str repository_id: repositoryID (required)
        :param str location: location
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        return self.api_client.call_api(
            '/rest/repositories/{repositoryID}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # 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 repository_size_using_get(self, repository_id, **kwargs):  # noqa: E501
        """Get repository size  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.repository_size_using_get(repository_id, async_req=True)
        >>> result = thread.get()

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

    def repository_size_using_get_with_http_info(self, repository_id, **kwargs):  # noqa: E501
        """Get repository size  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.repository_size_using_get_with_http_info(repository_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str repository_id: repositoryID (required)
        :param str location: location
        :return: RepositorySizeInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/rest/repositories/{repositoryID}/size', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RepositorySizeInfo',  # 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 restart_repository_using_post(self, repository_id, **kwargs):  # noqa: E501
        """Restart a repository  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.restart_repository_using_post(repository_id, async_req=True)
        >>> result = thread.get()

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

    def restart_repository_using_post_with_http_info(self, repository_id, **kwargs):  # noqa: E501
        """Restart a repository  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.restart_repository_using_post_with_http_info(repository_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str repository_id: repositoryID (required)
        :param bool sync: sync
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/rest/repositories/{repositoryID}/restart', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # 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)
