# coding: utf-8

"""
    EPM REST API

    REST API description of the ElasTest Platform Manager Module.

    OpenAPI spec version: 0.1.2
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


class RuntimeApi(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):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def download_file_from_instance(self, id, file_download_body, **kwargs):
        """
        Downloads a file from a VDU.
        Download a file with the given filepath from the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.download_file_from_instance(id, file_download_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param FileDownloadBody file_download_body: Contains details of the file to be downloaded from the given Instance (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.download_file_from_instance_with_http_info(id, file_download_body, **kwargs)
        else:
            (data) = self.download_file_from_instance_with_http_info(id, file_download_body, **kwargs)
            return data

    def download_file_from_instance_with_http_info(self, id, file_download_body, **kwargs):
        """
        Downloads a file from a VDU.
        Download a file with the given filepath from the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.download_file_from_instance_with_http_info(id, file_download_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param FileDownloadBody file_download_body: Contains details of the file to be downloaded from the given Instance (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'file_download_body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method download_file_from_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `download_file_from_instance`")
        # verify the required parameter 'file_download_body' is set
        if ('file_download_body' not in params) or (params['file_download_body'] is None):
            raise ValueError("Missing the required parameter `file_download_body` when calling `download_file_from_instance`")


        collection_formats = {}

        resource_path = '/runtime/{id}/file'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'file_download_body' in params:
            body_params = params['file_download_body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['multipart/form-data'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='file',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 execute_on_instance(self, id, command_execution_body, **kwargs):
        """
        Executes given command on the given VDU.
        Executes the given command on the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.execute_on_instance(id, command_execution_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param CommandExecutionBody command_execution_body: Contains command to be executed and a flag if for the completion of the execution should be awaited (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.execute_on_instance_with_http_info(id, command_execution_body, **kwargs)
        else:
            (data) = self.execute_on_instance_with_http_info(id, command_execution_body, **kwargs)
            return data

    def execute_on_instance_with_http_info(self, id, command_execution_body, **kwargs):
        """
        Executes given command on the given VDU.
        Executes the given command on the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.execute_on_instance_with_http_info(id, command_execution_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param CommandExecutionBody command_execution_body: Contains command to be executed and a flag if for the completion of the execution should be awaited (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'command_execution_body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method execute_on_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `execute_on_instance`")
        # verify the required parameter 'command_execution_body' is set
        if ('command_execution_body' not in params) or (params['command_execution_body'] is None):
            raise ValueError("Missing the required parameter `command_execution_body` when calling `execute_on_instance`")


        collection_formats = {}

        resource_path = '/runtime/{id}/action/execute'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'PUT',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='str',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 start_instance(self, id, **kwargs):
        """
        Starts the given VDU.
        Starts the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.start_instance(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.start_instance_with_http_info(id, **kwargs)
        else:
            (data) = self.start_instance_with_http_info(id, **kwargs)
            return data

    def start_instance_with_http_info(self, id, **kwargs):
        """
        Starts the given VDU.
        Starts the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.start_instance_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method start_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `start_instance`")


        collection_formats = {}

        resource_path = '/runtime/{id}/action/start'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'PUT',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type=None,
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 stop_instance(self, id, **kwargs):
        """
        Stops the given VDU.
        Stops the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.stop_instance(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.stop_instance_with_http_info(id, **kwargs)
        else:
            (data) = self.stop_instance_with_http_info(id, **kwargs)
            return data

    def stop_instance_with_http_info(self, id, **kwargs):
        """
        Stops the given VDU.
        Stops the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.stop_instance_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method stop_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `stop_instance`")


        collection_formats = {}

        resource_path = '/runtime/{id}/action/stop'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'PUT',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type=None,
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 upload_file_to_instance_by_file(self, id, remote_path, file, **kwargs):
        """
        Uploads a file to a VDU.
        Uploads a given file to the given filepath to the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.upload_file_to_instance_by_file(id, remote_path, file, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param str remote_path: Absolute path where the file should go on the Instance (required)
        :param file file: File which has to be uploaded to the Instance. Either this or the hostPath but not both can be provided. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.upload_file_to_instance_by_file_with_http_info(id, remote_path, file, **kwargs)
        else:
            (data) = self.upload_file_to_instance_by_file_with_http_info(id, remote_path, file, **kwargs)
            return data

    def upload_file_to_instance_by_file_with_http_info(self, id, remote_path, file, **kwargs):
        """
        Uploads a file to a VDU.
        Uploads a given file to the given filepath to the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.upload_file_to_instance_by_file_with_http_info(id, remote_path, file, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param str remote_path: Absolute path where the file should go on the Instance (required)
        :param file file: File which has to be uploaded to the Instance. Either this or the hostPath but not both can be provided. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'remote_path', 'file']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method upload_file_to_instance_by_file" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `upload_file_to_instance_by_file`")
        # verify the required parameter 'remote_path' is set
        if ('remote_path' not in params) or (params['remote_path'] is None):
            raise ValueError("Missing the required parameter `remote_path` when calling `upload_file_to_instance_by_file`")
        # verify the required parameter 'file' is set
        if ('file' not in params) or (params['file'] is None):
            raise ValueError("Missing the required parameter `file` when calling `upload_file_to_instance_by_file`")


        collection_formats = {}

        resource_path = '/runtime/{id}/file'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'remote_path' in params:
            form_params.append(('remotePath', params['remote_path']))
        if 'file' in params:
            local_var_files['file'] = params['file']

        body_params = None
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['multipart/form-data'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type=None,
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 upload_file_to_instance_by_path(self, id, file_upload_body, **kwargs):
        """
        Uploads a file to a VDU.
        Uploads a given file from the host path to the given file path to the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.upload_file_to_instance_by_path(id, file_upload_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param FileUploadBody file_upload_body: Contains details of the file with the given path to upload to the Instance (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.upload_file_to_instance_by_path_with_http_info(id, file_upload_body, **kwargs)
        else:
            (data) = self.upload_file_to_instance_by_path_with_http_info(id, file_upload_body, **kwargs)
            return data

    def upload_file_to_instance_by_path_with_http_info(self, id, file_upload_body, **kwargs):
        """
        Uploads a file to a VDU.
        Uploads a given file from the host path to the given file path to the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.upload_file_to_instance_by_path_with_http_info(id, file_upload_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param FileUploadBody file_upload_body: Contains details of the file with the given path to upload to the Instance (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'file_upload_body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method upload_file_to_instance_by_path" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `upload_file_to_instance_by_path`")
        # verify the required parameter 'file_upload_body' is set
        if ('file_upload_body' not in params) or (params['file_upload_body'] is None):
            raise ValueError("Missing the required parameter `file_upload_body` when calling `upload_file_to_instance_by_path`")


        collection_formats = {}

        resource_path = '/runtime/{id}/path'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'file_upload_body' in params:
            body_params = params['file_upload_body']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type=None,
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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

"""
    EPM REST API

    REST API description of the ElasTest Platform Manager Module.

    OpenAPI spec version: 0.1.2
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


class RuntimeApi(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):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def download_file_from_instance(self, id, file_download_body, **kwargs):
        """
        Downloads a file from a VDU.
        Download a file with the given filepath from the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.download_file_from_instance(id, file_download_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param FileDownloadBody file_download_body: Contains details of the file to be downloaded from the given Instance (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.download_file_from_instance_with_http_info(id, file_download_body, **kwargs)
        else:
            (data) = self.download_file_from_instance_with_http_info(id, file_download_body, **kwargs)
            return data

    def download_file_from_instance_with_http_info(self, id, file_download_body, **kwargs):
        """
        Downloads a file from a VDU.
        Download a file with the given filepath from the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.download_file_from_instance_with_http_info(id, file_download_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param FileDownloadBody file_download_body: Contains details of the file to be downloaded from the given Instance (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'file_download_body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method download_file_from_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `download_file_from_instance`")
        # verify the required parameter 'file_download_body' is set
        if ('file_download_body' not in params) or (params['file_download_body'] is None):
            raise ValueError("Missing the required parameter `file_download_body` when calling `download_file_from_instance`")


        collection_formats = {}

        resource_path = '/runtime/{id}/file'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'file_download_body' in params:
            body_params = params['file_download_body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['multipart/form-data'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='file',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 execute_on_instance(self, id, command_execution_body, **kwargs):
        """
        Executes given command on the given VDU.
        Executes the given command on the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.execute_on_instance(id, command_execution_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param CommandExecutionBody command_execution_body: Contains command to be executed and a flag if for the completion of the execution should be awaited (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.execute_on_instance_with_http_info(id, command_execution_body, **kwargs)
        else:
            (data) = self.execute_on_instance_with_http_info(id, command_execution_body, **kwargs)
            return data

    def execute_on_instance_with_http_info(self, id, command_execution_body, **kwargs):
        """
        Executes given command on the given VDU.
        Executes the given command on the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.execute_on_instance_with_http_info(id, command_execution_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param CommandExecutionBody command_execution_body: Contains command to be executed and a flag if for the completion of the execution should be awaited (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'command_execution_body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method execute_on_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `execute_on_instance`")
        # verify the required parameter 'command_execution_body' is set
        if ('command_execution_body' not in params) or (params['command_execution_body'] is None):
            raise ValueError("Missing the required parameter `command_execution_body` when calling `execute_on_instance`")


        collection_formats = {}

        resource_path = '/runtime/{id}/action/execute'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'PUT',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='str',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 start_instance(self, id, **kwargs):
        """
        Starts the given VDU.
        Starts the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.start_instance(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.start_instance_with_http_info(id, **kwargs)
        else:
            (data) = self.start_instance_with_http_info(id, **kwargs)
            return data

    def start_instance_with_http_info(self, id, **kwargs):
        """
        Starts the given VDU.
        Starts the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.start_instance_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method start_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `start_instance`")


        collection_formats = {}

        resource_path = '/runtime/{id}/action/start'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'PUT',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type=None,
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 stop_instance(self, id, **kwargs):
        """
        Stops the given VDU.
        Stops the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.stop_instance(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.stop_instance_with_http_info(id, **kwargs)
        else:
            (data) = self.stop_instance_with_http_info(id, **kwargs)
            return data

    def stop_instance_with_http_info(self, id, **kwargs):
        """
        Stops the given VDU.
        Stops the VDU with the given ID.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.stop_instance_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method stop_instance" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `stop_instance`")


        collection_formats = {}

        resource_path = '/runtime/{id}/action/stop'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'PUT',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type=None,
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 upload_file_to_instance_by_file(self, id, remote_path, file, **kwargs):
        """
        Uploads a file to a VDU.
        Uploads a given file to the given filepath to the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.upload_file_to_instance_by_file(id, remote_path, file, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param str remote_path: Absolute path where the file should go on the Instance (required)
        :param file file: File which has to be uploaded to the Instance. Either this or the hostPath but not both can be provided. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.upload_file_to_instance_by_file_with_http_info(id, remote_path, file, **kwargs)
        else:
            (data) = self.upload_file_to_instance_by_file_with_http_info(id, remote_path, file, **kwargs)
            return data

    def upload_file_to_instance_by_file_with_http_info(self, id, remote_path, file, **kwargs):
        """
        Uploads a file to a VDU.
        Uploads a given file to the given filepath to the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.upload_file_to_instance_by_file_with_http_info(id, remote_path, file, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param str remote_path: Absolute path where the file should go on the Instance (required)
        :param file file: File which has to be uploaded to the Instance. Either this or the hostPath but not both can be provided. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'remote_path', 'file']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method upload_file_to_instance_by_file" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `upload_file_to_instance_by_file`")
        # verify the required parameter 'remote_path' is set
        if ('remote_path' not in params) or (params['remote_path'] is None):
            raise ValueError("Missing the required parameter `remote_path` when calling `upload_file_to_instance_by_file`")
        # verify the required parameter 'file' is set
        if ('file' not in params) or (params['file'] is None):
            raise ValueError("Missing the required parameter `file` when calling `upload_file_to_instance_by_file`")


        collection_formats = {}

        resource_path = '/runtime/{id}/file'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'remote_path' in params:
            form_params.append(('remotePath', params['remote_path']))
        if 'file' in params:
            local_var_files['file'] = params['file']

        body_params = None
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['multipart/form-data'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type=None,
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 upload_file_to_instance_by_path(self, id, file_upload_body, **kwargs):
        """
        Uploads a file to a VDU.
        Uploads a given file from the host path to the given file path to the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.upload_file_to_instance_by_path(id, file_upload_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param FileUploadBody file_upload_body: Contains details of the file with the given path to upload to the Instance (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.upload_file_to_instance_by_path_with_http_info(id, file_upload_body, **kwargs)
        else:
            (data) = self.upload_file_to_instance_by_path_with_http_info(id, file_upload_body, **kwargs)
            return data

    def upload_file_to_instance_by_path_with_http_info(self, id, file_upload_body, **kwargs):
        """
        Uploads a file to a VDU.
        Uploads a given file from the host path to the given file path to the given VDU.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.upload_file_to_instance_by_path_with_http_info(id, file_upload_body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: ID of VDU (required)
        :param FileUploadBody file_upload_body: Contains details of the file with the given path to upload to the Instance (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'file_upload_body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method upload_file_to_instance_by_path" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `upload_file_to_instance_by_path`")
        # verify the required parameter 'file_upload_body' is set
        if ('file_upload_body' not in params) or (params['file_upload_body'] is None):
            raise ValueError("Missing the required parameter `file_upload_body` when calling `upload_file_to_instance_by_path`")


        collection_formats = {}

        resource_path = '/runtime/{id}/path'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'file_upload_body' in params:
            body_params = params['file_upload_body']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type=None,
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _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 EPM REST API      REST API description of the ElasTest Platform Manager Module.      OpenAPI spec version: 0.1.2          Generated by: https://github.com/swagger-api/swagger-codegen.git # 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 Downloads a file from a VDU.         Download a file with the given filepath from the given VDU.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.download_file_from_instance(id, file_download_body, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :param FileDownloadBody file_download_body: Contains details of the file to be downloaded from the given Instance (required)         :return: file                  If the method is called asynchronously,                  returns the request thread. Downloads a file from a VDU.         Download a file with the given filepath from the given VDU.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.download_file_from_instance_with_http_info(id, file_download_body, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :param FileDownloadBody file_download_body: Contains details of the file to be downloaded from the given Instance (required)         :return: file                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # verify the required parameter 'file_download_body' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Executes given command on the given VDU.         Executes the given command on the VDU with the given ID.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.execute_on_instance(id, command_execution_body, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :param CommandExecutionBody command_execution_body: Contains command to be executed and a flag if for the completion of the execution should be awaited (required)         :return: str                  If the method is called asynchronously,                  returns the request thread. Executes given command on the given VDU.         Executes the given command on the VDU with the given ID.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.execute_on_instance_with_http_info(id, command_execution_body, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :param CommandExecutionBody command_execution_body: Contains command to be executed and a flag if for the completion of the execution should be awaited (required)         :return: str                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # verify the required parameter 'command_execution_body' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Starts the given VDU.         Starts the VDU with the given ID.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.start_instance(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. Starts the given VDU.         Starts the VDU with the given ID.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.start_instance_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # Authentication setting Stops the given VDU.         Stops the VDU with the given ID.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.stop_instance(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. Stops the given VDU.         Stops the VDU with the given ID.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.stop_instance_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # Authentication setting Uploads a file to a VDU.         Uploads a given file to the given filepath to the given VDU.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.upload_file_to_instance_by_file(id, remote_path, file, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :param str remote_path: Absolute path where the file should go on the Instance (required)         :param file file: File which has to be uploaded to the Instance. Either this or the hostPath but not both can be provided. (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. Uploads a file to a VDU.         Uploads a given file to the given filepath to the given VDU.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.upload_file_to_instance_by_file_with_http_info(id, remote_path, file, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :param str remote_path: Absolute path where the file should go on the Instance (required)         :param file file: File which has to be uploaded to the Instance. Either this or the hostPath but not both can be provided. (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # verify the required parameter 'remote_path' is set # verify the required parameter 'file' is set # HTTP header `Content-Type` # Authentication setting Uploads a file to a VDU.         Uploads a given file from the host path to the given file path to the given VDU.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.upload_file_to_instance_by_path(id, file_upload_body, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :param FileUploadBody file_upload_body: Contains details of the file with the given path to upload to the Instance (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. Uploads a file to a VDU.         Uploads a given file from the host path to the given file path to the given VDU.         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.upload_file_to_instance_by_path_with_http_info(id, file_upload_body, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: ID of VDU (required)         :param FileUploadBody file_upload_body: Contains details of the file with the given path to upload to the Instance (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # verify the required parameter 'file_upload_body' is set # HTTP header `Content-Type` # Authentication setting