# coding: utf-8

"""
    FeersumNLU API

    This is the HTTP API for Feersum NLU. See https://github.com/praekelt/feersum-nlu-api-wrappers for examples of how to use the API.  # noqa: E501

    OpenAPI spec version: 2.0.54.dev2
    Contact: <EMAIL>
    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 feersum_nlu.api_client import ApiClient


class ImageDatasetsApi(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 image_dataset_add_samples(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Add samples. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501

        Add samples to named image dataset. Returns the samples added to the instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_add_samples(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_add_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_add_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
            return data

    def image_dataset_add_samples_with_http_info(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Add samples. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501

        Add samples to named image dataset. Returns the samples added to the instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_add_samples_with_http_info(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_create(self, create_details, **kwargs):  # noqa: E501
        """Create an image dataset.  # noqa: E501

        Create a new image dataset or reload one from the trash. Returns the details of the instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_create(create_details, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ImageDatasetCreateDetails create_details: The details of the instance to create. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_create_with_http_info(create_details, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_create_with_http_info(create_details, **kwargs)  # noqa: E501
            return data

    def image_dataset_create_with_http_info(self, create_details, **kwargs):  # noqa: E501
        """Create an image dataset.  # noqa: E501

        Create a new image dataset or reload one from the trash. Returns the details of the instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_create_with_http_info(create_details, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ImageDatasetCreateDetails create_details: The details of the instance to create. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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 image_dataset_del(self, instance_name, **kwargs):  # noqa: E501
        """Delete named instance.  # noqa: E501

        Delete and return the details of the named image dataset instance. Deleted instances can be reloaded from the trash with the create operation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_del_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_del_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_del_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Delete named instance.  # noqa: E501

        Delete and return the details of the named image dataset instance. Deleted instances can be reloaded from the trash with the create operation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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 image_dataset_del_samples(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Delete samples.  # noqa: E501

        Delete the listed samples of the named image dataset. Returns the deleted samples.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_samples(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of image samples to delete. A sample can be deleted using either its content & label or its uuid. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_del_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_del_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
            return data

    def image_dataset_del_samples_with_http_info(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Delete samples.  # noqa: E501

        Delete the listed samples of the named image dataset. Returns the deleted samples.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_samples_with_http_info(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of image samples to delete. A sample can be deleted using either its content & label or its uuid. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_del_samples_all(self, instance_name, **kwargs):  # noqa: E501
        """Delete all samples.  # noqa: E501

        Delete all samples of the named image dataset. Returns the deleted samples.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_samples_all(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_del_samples_all_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_del_samples_all_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_del_samples_all_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Delete all samples.  # noqa: E501

        Delete all samples of the named image dataset. Returns the deleted samples.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_samples_all_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples_all', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_get_details(self, instance_name, **kwargs):  # noqa: E501
        """Get details of named instance.  # noqa: E501

        Get the details of the named image dataset instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_details(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_get_details_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_get_details_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_get_details_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Get details of named instance.  # noqa: E501

        Get the details of the named image dataset instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_details_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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 image_dataset_get_details_all(self, **kwargs):  # noqa: E501
        """Get list of image datasets.  # noqa: E501

        Get the list of image datasets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_details_all(async_req=True)
        >>> result = thread.get()

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

    def image_dataset_get_details_all_with_http_info(self, **kwargs):  # noqa: E501
        """Get list of image datasets.  # noqa: E501

        Get the list of image datasets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_details_all_with_http_info(async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ImageDatasetInstanceDetail]',  # 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 image_dataset_get_labels(self, instance_name, **kwargs):  # noqa: E501
        """Get list of possible labels.  # noqa: E501

        Returns the dataset's list of possible class labels.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_labels(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: list[ClassLabel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_get_labels_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_get_labels_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_get_labels_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Get list of possible labels.  # noqa: E501

        Returns the dataset's list of possible class labels.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_labels_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: list[ClassLabel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/labels', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ClassLabel]',  # 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 image_dataset_get_params(self, instance_name, **kwargs):  # noqa: E501
        """Get the editable model parameters of named image dataset.  # noqa: E501

        Get the editable model parameters of named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_params(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ModelParams
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_get_params_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_get_params_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_get_params_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Get the editable model parameters of named image dataset.  # noqa: E501

        Get the editable model parameters of named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_params_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ModelParams
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/params', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ModelParams',  # 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 image_dataset_get_samples(self, instance_name, **kwargs):  # noqa: E501
        """Get samples. Image format is 256x256 RGB.  # noqa: E501

        Get the samples of the named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_samples(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :param int index: The sample index to start from.
        :param int len: The number of samples to return.
        :param int sub_sample: If provided, the size of the shuffled sub-sample to return.
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_get_samples_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_get_samples_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_get_samples_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Get samples. Image format is 256x256 RGB.  # noqa: E501

        Get the samples of the named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_samples_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :param int index: The sample index to start from.
        :param int len: The number of samples to return.
        :param int sub_sample: If provided, the size of the shuffled sub-sample to return.
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_set_params(self, instance_name, model_params, **kwargs):  # noqa: E501
        """Set the model parameters of named image dataset.  # noqa: E501

        Set the model parameters of named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_set_params(instance_name, model_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param ModelParams model_params: The model parameters. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_set_params_with_http_info(instance_name, model_params, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_set_params_with_http_info(instance_name, model_params, **kwargs)  # noqa: E501
            return data

    def image_dataset_set_params_with_http_info(self, instance_name, model_params, **kwargs):  # noqa: E501
        """Set the model parameters of named image dataset.  # noqa: E501

        Set the model parameters of named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_set_params_with_http_info(instance_name, model_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param ModelParams model_params: The model parameters. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/params', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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 image_dataset_update_samples(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Update samples by UUID. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501

        Update samples of the named text dataset. A sample's UUIDs is used to uniquely identify it. Returns the samples that were updated.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_update_samples(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. A sample's UUIDs is used to uniquely identify it. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_update_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_update_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
            return data

    def image_dataset_update_samples_with_http_info(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Update samples by UUID. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501

        Update samples of the named text dataset. A sample's UUIDs is used to uniquely identify it. Returns the samples that were updated.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_update_samples_with_http_info(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. A sample's UUIDs is used to uniquely identify it. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_vaporise(self, instance_name, **kwargs):  # noqa: E501
        """Vaporise the named model.  # noqa: E501

        Permanently vaporises a model even if not trashed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_vaporise(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_vaporise_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_vaporise_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_vaporise_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Vaporise the named model.  # noqa: E501

        Permanently vaporises a model even if not trashed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_vaporise_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/vaporise', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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)

# coding: utf-8

"""
    FeersumNLU API

    This is the HTTP API for Feersum NLU. See https://github.com/praekelt/feersum-nlu-api-wrappers for examples of how to use the API.  # noqa: E501

    OpenAPI spec version: 2.0.54.dev2
    Contact: <EMAIL>
    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 feersum_nlu.api_client import ApiClient


class ImageDatasetsApi(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 image_dataset_add_samples(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Add samples. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501

        Add samples to named image dataset. Returns the samples added to the instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_add_samples(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_add_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_add_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
            return data

    def image_dataset_add_samples_with_http_info(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Add samples. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501

        Add samples to named image dataset. Returns the samples added to the instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_add_samples_with_http_info(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_create(self, create_details, **kwargs):  # noqa: E501
        """Create an image dataset.  # noqa: E501

        Create a new image dataset or reload one from the trash. Returns the details of the instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_create(create_details, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ImageDatasetCreateDetails create_details: The details of the instance to create. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_create_with_http_info(create_details, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_create_with_http_info(create_details, **kwargs)  # noqa: E501
            return data

    def image_dataset_create_with_http_info(self, create_details, **kwargs):  # noqa: E501
        """Create an image dataset.  # noqa: E501

        Create a new image dataset or reload one from the trash. Returns the details of the instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_create_with_http_info(create_details, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ImageDatasetCreateDetails create_details: The details of the instance to create. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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 image_dataset_del(self, instance_name, **kwargs):  # noqa: E501
        """Delete named instance.  # noqa: E501

        Delete and return the details of the named image dataset instance. Deleted instances can be reloaded from the trash with the create operation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_del_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_del_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_del_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Delete named instance.  # noqa: E501

        Delete and return the details of the named image dataset instance. Deleted instances can be reloaded from the trash with the create operation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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 image_dataset_del_samples(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Delete samples.  # noqa: E501

        Delete the listed samples of the named image dataset. Returns the deleted samples.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_samples(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of image samples to delete. A sample can be deleted using either its content & label or its uuid. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_del_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_del_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
            return data

    def image_dataset_del_samples_with_http_info(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Delete samples.  # noqa: E501

        Delete the listed samples of the named image dataset. Returns the deleted samples.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_samples_with_http_info(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of image samples to delete. A sample can be deleted using either its content & label or its uuid. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_del_samples_all(self, instance_name, **kwargs):  # noqa: E501
        """Delete all samples.  # noqa: E501

        Delete all samples of the named image dataset. Returns the deleted samples.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_samples_all(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_del_samples_all_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_del_samples_all_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_del_samples_all_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Delete all samples.  # noqa: E501

        Delete all samples of the named image dataset. Returns the deleted samples.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_del_samples_all_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples_all', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_get_details(self, instance_name, **kwargs):  # noqa: E501
        """Get details of named instance.  # noqa: E501

        Get the details of the named image dataset instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_details(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_get_details_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_get_details_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_get_details_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Get details of named instance.  # noqa: E501

        Get the details of the named image dataset instance.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_details_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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 image_dataset_get_details_all(self, **kwargs):  # noqa: E501
        """Get list of image datasets.  # noqa: E501

        Get the list of image datasets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_details_all(async_req=True)
        >>> result = thread.get()

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

    def image_dataset_get_details_all_with_http_info(self, **kwargs):  # noqa: E501
        """Get list of image datasets.  # noqa: E501

        Get the list of image datasets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_details_all_with_http_info(async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ImageDatasetInstanceDetail]',  # 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 image_dataset_get_labels(self, instance_name, **kwargs):  # noqa: E501
        """Get list of possible labels.  # noqa: E501

        Returns the dataset's list of possible class labels.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_labels(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: list[ClassLabel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_get_labels_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_get_labels_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_get_labels_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Get list of possible labels.  # noqa: E501

        Returns the dataset's list of possible class labels.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_labels_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: list[ClassLabel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/labels', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ClassLabel]',  # 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 image_dataset_get_params(self, instance_name, **kwargs):  # noqa: E501
        """Get the editable model parameters of named image dataset.  # noqa: E501

        Get the editable model parameters of named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_params(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ModelParams
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_get_params_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_get_params_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_get_params_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Get the editable model parameters of named image dataset.  # noqa: E501

        Get the editable model parameters of named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_params_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ModelParams
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/params', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ModelParams',  # 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 image_dataset_get_samples(self, instance_name, **kwargs):  # noqa: E501
        """Get samples. Image format is 256x256 RGB.  # noqa: E501

        Get the samples of the named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_samples(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :param int index: The sample index to start from.
        :param int len: The number of samples to return.
        :param int sub_sample: If provided, the size of the shuffled sub-sample to return.
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_get_samples_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_get_samples_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_get_samples_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Get samples. Image format is 256x256 RGB.  # noqa: E501

        Get the samples of the named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_get_samples_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :param int index: The sample index to start from.
        :param int len: The number of samples to return.
        :param int sub_sample: If provided, the size of the shuffled sub-sample to return.
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_set_params(self, instance_name, model_params, **kwargs):  # noqa: E501
        """Set the model parameters of named image dataset.  # noqa: E501

        Set the model parameters of named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_set_params(instance_name, model_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param ModelParams model_params: The model parameters. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_set_params_with_http_info(instance_name, model_params, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_set_params_with_http_info(instance_name, model_params, **kwargs)  # noqa: E501
            return data

    def image_dataset_set_params_with_http_info(self, instance_name, model_params, **kwargs):  # noqa: E501
        """Set the model parameters of named image dataset.  # noqa: E501

        Set the model parameters of named image dataset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_set_params_with_http_info(instance_name, model_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param ModelParams model_params: The model parameters. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/params', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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 image_dataset_update_samples(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Update samples by UUID. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501

        Update samples of the named text dataset. A sample's UUIDs is used to uniquely identify it. Returns the samples that were updated.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_update_samples(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. A sample's UUIDs is used to uniquely identify it. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_update_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_update_samples_with_http_info(instance_name, labelled_image_sample_list, **kwargs)  # noqa: E501
            return data

    def image_dataset_update_samples_with_http_info(self, instance_name, labelled_image_sample_list, **kwargs):  # noqa: E501
        """Update samples by UUID. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501

        Update samples of the named text dataset. A sample's UUIDs is used to uniquely identify it. Returns the samples that were updated.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_update_samples_with_http_info(instance_name, labelled_image_sample_list, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. A sample's UUIDs is used to uniquely identify it. (required)
        :param str x_caller:
        :return: list[LabelledImageSample]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/samples', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[LabelledImageSample]',  # 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 image_dataset_vaporise(self, instance_name, **kwargs):  # noqa: E501
        """Vaporise the named model.  # noqa: E501

        Permanently vaporises a model even if not trashed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_vaporise(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.image_dataset_vaporise_with_http_info(instance_name, **kwargs)  # noqa: E501
        else:
            (data) = self.image_dataset_vaporise_with_http_info(instance_name, **kwargs)  # noqa: E501
            return data

    def image_dataset_vaporise_with_http_info(self, instance_name, **kwargs):  # noqa: E501
        """Vaporise the named model.  # noqa: E501

        Permanently vaporises a model even if not trashed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.image_dataset_vaporise_with_http_info(instance_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str instance_name: The name of the instance. (required)
        :param str x_caller:
        :return: ImageDatasetInstanceDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_caller' in params:
            header_params['X-CALLER'] = params['x_caller']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['APIKeyHeader', 'APIKeyHeader_old']  # noqa: E501

        return self.api_client.call_api(
            '/vision/v2/image_datasets/{instance_name}/vaporise', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImageDatasetInstanceDetail',  # 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)

# coding: utf-8 FeersumNLU API      This is the HTTP API for Feersum NLU. See https://github.com/praekelt/feersum-nlu-api-wrappers for examples of how to use the API.  # noqa: E501      OpenAPI spec version: 2.0.54.dev2     Contact: <EMAIL>     Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: F401 # python 2 and python 3 compatibility library 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 # noqa: E501 Add samples. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501          Add samples to named image dataset. Returns the samples added to the instance.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_add_samples(instance_name, labelled_image_sample_list, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. (required)         :param str x_caller:         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Add samples. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501          Add samples to named image dataset. Returns the samples added to the instance.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_add_samples_with_http_info(instance_name, labelled_image_sample_list, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. (required)         :param str x_caller:         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # verify the required parameter 'labelled_image_sample_list' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Create an image dataset.  # noqa: E501          Create a new image dataset or reload one from the trash. Returns the details of the instance.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_create(create_details, async_req=True)         >>> result = thread.get()          :param async_req bool         :param ImageDatasetCreateDetails create_details: The details of the instance to create. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Create an image dataset.  # noqa: E501          Create a new image dataset or reload one from the trash. Returns the details of the instance.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_create_with_http_info(create_details, async_req=True)         >>> result = thread.get()          :param async_req bool         :param ImageDatasetCreateDetails create_details: The details of the instance to create. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'create_details' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Delete named instance.  # noqa: E501          Delete and return the details of the named image dataset instance. Deleted instances can be reloaded from the trash with the create operation.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_del(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Delete named instance.  # noqa: E501          Delete and return the details of the named image dataset instance. Deleted instances can be reloaded from the trash with the create operation.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_del_with_http_info(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Delete samples.  # noqa: E501          Delete the listed samples of the named image dataset. Returns the deleted samples.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_del_samples(instance_name, labelled_image_sample_list, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param list[LabelledImageSample] labelled_image_sample_list: List of image samples to delete. A sample can be deleted using either its content & label or its uuid. (required)         :param str x_caller:         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Delete samples.  # noqa: E501          Delete the listed samples of the named image dataset. Returns the deleted samples.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_del_samples_with_http_info(instance_name, labelled_image_sample_list, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param list[LabelledImageSample] labelled_image_sample_list: List of image samples to delete. A sample can be deleted using either its content & label or its uuid. (required)         :param str x_caller:         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # verify the required parameter 'labelled_image_sample_list' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Delete all samples.  # noqa: E501          Delete all samples of the named image dataset. Returns the deleted samples.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_del_samples_all(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Delete all samples.  # noqa: E501          Delete all samples of the named image dataset. Returns the deleted samples.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_del_samples_all_with_http_info(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get details of named instance.  # noqa: E501          Get the details of the named image dataset instance.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_details(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get details of named instance.  # noqa: E501          Get the details of the named image dataset instance.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_details_with_http_info(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get list of image datasets.  # noqa: E501          Get the list of image datasets.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_details_all(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str x_caller:         :return: list[ImageDatasetInstanceDetail]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get list of image datasets.  # noqa: E501          Get the list of image datasets.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_details_all_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str x_caller:         :return: list[ImageDatasetInstanceDetail]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get list of possible labels.  # noqa: E501          Returns the dataset's list of possible class labels.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_labels(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: list[ClassLabel]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get list of possible labels.  # noqa: E501          Returns the dataset's list of possible class labels.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_labels_with_http_info(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: list[ClassLabel]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get the editable model parameters of named image dataset.  # noqa: E501          Get the editable model parameters of named image dataset.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_params(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: ModelParams                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get the editable model parameters of named image dataset.  # noqa: E501          Get the editable model parameters of named image dataset.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_params_with_http_info(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: ModelParams                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get samples. Image format is 256x256 RGB.  # noqa: E501          Get the samples of the named image dataset.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_samples(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :param int index: The sample index to start from.         :param int len: The number of samples to return.         :param int sub_sample: If provided, the size of the shuffled sub-sample to return.         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get samples. Image format is 256x256 RGB.  # noqa: E501          Get the samples of the named image dataset.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_get_samples_with_http_info(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :param int index: The sample index to start from.         :param int len: The number of samples to return.         :param int sub_sample: If provided, the size of the shuffled sub-sample to return.         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Set the model parameters of named image dataset.  # noqa: E501          Set the model parameters of named image dataset.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_set_params(instance_name, model_params, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param ModelParams model_params: The model parameters. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Set the model parameters of named image dataset.  # noqa: E501          Set the model parameters of named image dataset.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_set_params_with_http_info(instance_name, model_params, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param ModelParams model_params: The model parameters. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # verify the required parameter 'model_params' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Update samples by UUID. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501          Update samples of the named text dataset. A sample's UUIDs is used to uniquely identify it. Returns the samples that were updated.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_update_samples(instance_name, labelled_image_sample_list, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. A sample's UUIDs is used to uniquely identify it. (required)         :param str x_caller:         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Update samples by UUID. Image format is 256x256 RGB; jpeg encoding at quality 50 is suggested.  # noqa: E501          Update samples of the named text dataset. A sample's UUIDs is used to uniquely identify it. Returns the samples that were updated.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_update_samples_with_http_info(instance_name, labelled_image_sample_list, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param list[LabelledImageSample] labelled_image_sample_list: List of labelled image samples. A sample's UUIDs is used to uniquely identify it. (required)         :param str x_caller:         :return: list[LabelledImageSample]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # verify the required parameter 'labelled_image_sample_list' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Vaporise the named model.  # noqa: E501          Permanently vaporises a model even if not trashed.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_vaporise(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Vaporise the named model.  # noqa: E501          Permanently vaporises a model even if not trashed.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.image_dataset_vaporise_with_http_info(instance_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str instance_name: The name of the instance. (required)         :param str x_caller:         :return: ImageDatasetInstanceDetail                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'instance_name' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501