# coding: utf-8

"""
    CulebraTester

    ## Snaky Android Test --- If you want to be able to try out the API using the **Execute** or **TRY** button from this page - an android device should be connected using `adb` - the server should have been started using `./culebratester2 start-server`  then you will be able to invoke the API and see the responses.   # noqa: E501

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


class DefaultApi(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 culebra_help_api_get(self, api, **kwargs):  # noqa: E501
        """Gets help  # noqa: E501

        Gets help info about the *API* specified as parameter. For example you can obtain information about * /uiDevice/click * /device/displayRealSize * /uiDevice/screenshot * etc.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.culebra_help_api_get(api, async_req=True)
        >>> result = thread.get()

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

    def culebra_help_api_get_with_http_info(self, api, **kwargs):  # noqa: E501
        """Gets help  # noqa: E501

        Gets help info about the *API* specified as parameter. For example you can obtain information about * /uiDevice/click * /device/displayRealSize * /uiDevice/screenshot * etc.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.culebra_help_api_get_with_http_info(api, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api: Specify the API help is about (required)
        :return: Help
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/culebra/help/{api}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Help',  # 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 culebra_info_get(self, **kwargs):  # noqa: E501
        """Gets information about this app  # noqa: E501

        Gets information about this app  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.culebra_info_get(async_req=True)
        >>> result = thread.get()

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

    def culebra_info_get_with_http_info(self, **kwargs):  # noqa: E501
        """Gets information about this app  # noqa: E501

        Gets information about this app  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.culebra_info_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/culebra/info', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CulebraInfo',  # 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 device_display_real_size_get(self, **kwargs):  # noqa: E501
        """Gets display real size  # noqa: E501

        Gets the display real size  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.device_display_real_size_get(async_req=True)
        >>> result = thread.get()

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

    def device_display_real_size_get_with_http_info(self, **kwargs):  # noqa: E501
        """Gets display real size  # noqa: E501

        Gets the display real size  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.device_display_real_size_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/device/displayRealSize', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DisplayRealSize',  # 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 object_store_list_get(self, **kwargs):  # noqa: E501
        """Lists the objects in store  # noqa: E501

        Lists the objects in store  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.object_store_list_get(async_req=True)
        >>> result = thread.get()

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

    def object_store_list_get_with_http_info(self, **kwargs):  # noqa: E501
        """Lists the objects in store  # noqa: E501

        Lists the objects in store  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.object_store_list_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/objectStore/list', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[InlineResponse200]',  # 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 target_context_start_activity_get(self, pkg, cls, **kwargs):  # noqa: E501
        """Starts an Activity  # noqa: E501

        Starts an Activity  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.target_context_start_activity_get(pkg, cls, async_req=True)
        >>> result = thread.get()

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

    def target_context_start_activity_get_with_http_info(self, pkg, cls, **kwargs):  # noqa: E501
        """Starts an Activity  # noqa: E501

        Starts an Activity  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.target_context_start_activity_get_with_http_info(pkg, cls, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str pkg: the package name (required)
        :param str cls: the class name (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/targetContext/startActivity', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_click_get(self, x, y, **kwargs):  # noqa: E501
        """Clicks at the specified location  # noqa: E501

        Clicks at the specified location  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_click_get(x, y, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int x: x coordinate (required)
        :param int y: y coordinate (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.ui_device_click_get_with_http_info(x, y, **kwargs)  # noqa: E501
        else:
            (data) = self.ui_device_click_get_with_http_info(x, y, **kwargs)  # noqa: E501
            return data

    def ui_device_click_get_with_http_info(self, x, y, **kwargs):  # noqa: E501
        """Clicks at the specified location  # noqa: E501

        Clicks at the specified location  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_click_get_with_http_info(x, y, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int x: x coordinate (required)
        :param int y: y coordinate (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/click', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_current_package_name_get(self, **kwargs):  # noqa: E501
        """Gets the current package name  # noqa: E501

        Gets the current package name  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_current_package_name_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_current_package_name_get_with_http_info(self, **kwargs):  # noqa: E501
        """Gets the current package name  # noqa: E501

        Gets the current package name  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_current_package_name_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/currentPackageName', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CurrentPackageName',  # 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 ui_device_display_height_get(self, **kwargs):  # noqa: E501
        """Gets the display height  # noqa: E501

        Gets the display height  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_display_height_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_display_height_get_with_http_info(self, **kwargs):  # noqa: E501
        """Gets the display height  # noqa: E501

        Gets the display height  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_display_height_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/displayHeight', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DisplayHeight',  # 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 ui_device_display_rotation_get(self, **kwargs):  # noqa: E501
        """Gets the display rotation  # noqa: E501

        Gets the display rotation  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_display_rotation_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_display_rotation_get_with_http_info(self, **kwargs):  # noqa: E501
        """Gets the display rotation  # noqa: E501

        Gets the display rotation  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_display_rotation_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/displayRotation', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DisplayRotation',  # 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 ui_device_display_size_dp_get(self, **kwargs):  # noqa: E501
        """Gets the display size in DP  # noqa: E501

        Gets the display size in DP  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_display_size_dp_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_display_size_dp_get_with_http_info(self, **kwargs):  # noqa: E501
        """Gets the display size in DP  # noqa: E501

        Gets the display size in DP  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_display_size_dp_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/displaySizeDp', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DisplaySizeDp',  # 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 ui_device_display_width_get(self, **kwargs):  # noqa: E501
        """Gets the display width  # noqa: E501

        Gets the display width  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_display_width_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_display_width_get_with_http_info(self, **kwargs):  # noqa: E501
        """Gets the display width  # noqa: E501

        Gets the display width  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_display_width_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/displayWidth', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DisplayWidth',  # 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 ui_device_dump_window_hierarchy_get(self, **kwargs):  # noqa: E501
        """Dumps the window hierarchy  # noqa: E501

        Dumps the window hierarchy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_dump_window_hierarchy_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_dump_window_hierarchy_get_with_http_info(self, **kwargs):  # noqa: E501
        """Dumps the window hierarchy  # noqa: E501

        Dumps the window hierarchy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_dump_window_hierarchy_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: the output format
        :return: WindowHierarchy
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/dumpWindowHierarchy', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='WindowHierarchy',  # 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 ui_device_find_object_get(self, **kwargs):  # noqa: E501
        """Finds an object  # noqa: E501

        Finds an object. The object found, if any, can be later used in other call like API.click.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_find_object_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str resource_id: the resource id
        :param str ui_selector: the selector sets the resource name criteria for matching. A UI element will be considered a match if its resource name exactly matches the selector parameter and all other criteria for this selector are met. The format of the selector string is `sel@[$]value,...` Where `sel` can be one of - clazz or className - clickable - depth - desc - index - instance - package - parentIndex - res - scrollable - text `@` replaces the `=` sign that is used to separate parameters and values in the URL. If the first character of value is `$` then a `Pattern` is created.
        :param str by_selector: the selector sets the resource name criteria for matching. A UI element will be considered a match if its resource name exactly matches the selector parameter and all other criteria for this selector are met. The format of the selector string is `sel@[$]value,...` Where `sel` can be one of - checkable - clazz - clickable - depth - desc - package - res - scrollable - text `@` replaces the `=` sign that is used to separate parameters and values in the URL. If the first character of value is `$` then a `Pattern` is created.
        :return: ObjectRef
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.ui_device_find_object_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.ui_device_find_object_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def ui_device_find_object_get_with_http_info(self, **kwargs):  # noqa: E501
        """Finds an object  # noqa: E501

        Finds an object. The object found, if any, can be later used in other call like API.click.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_find_object_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str resource_id: the resource id
        :param str ui_selector: the selector sets the resource name criteria for matching. A UI element will be considered a match if its resource name exactly matches the selector parameter and all other criteria for this selector are met. The format of the selector string is `sel@[$]value,...` Where `sel` can be one of - clazz or className - clickable - depth - desc - index - instance - package - parentIndex - res - scrollable - text `@` replaces the `=` sign that is used to separate parameters and values in the URL. If the first character of value is `$` then a `Pattern` is created.
        :param str by_selector: the selector sets the resource name criteria for matching. A UI element will be considered a match if its resource name exactly matches the selector parameter and all other criteria for this selector are met. The format of the selector string is `sel@[$]value,...` Where `sel` can be one of - checkable - clazz - clickable - depth - desc - package - res - scrollable - text `@` replaces the `=` sign that is used to separate parameters and values in the URL. If the first character of value is `$` then a `Pattern` is created.
        :return: ObjectRef
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['resource_id', 'ui_selector', 'by_selector']  # 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 ui_device_find_object_get" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'resource_id' in params:
            query_params.append(('resourceId', params['resource_id']))  # noqa: E501
        if 'ui_selector' in params:
            query_params.append(('uiSelector', params['ui_selector']))  # noqa: E501
        if 'by_selector' in params:
            query_params.append(('bySelector', params['by_selector']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/findObject', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectRef',  # 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 ui_device_find_object_post(self, body, **kwargs):  # noqa: E501
        """Finds an object  # noqa: E501

        Finds an object. The object found, if any, can be later used in other call like API.click.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_find_object_post(body, async_req=True)
        >>> result = thread.get()

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

    def ui_device_find_object_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Finds an object  # noqa: E501

        Finds an object. The object found, if any, can be later used in other call like API.click.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_find_object_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Selector body: Selector (required)
        :return: ObjectRef
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/findObject', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectRef',  # 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 ui_device_find_objects_get(self, **kwargs):  # noqa: E501
        """Finds *all* objects that match the selector criteria.  # noqa: E501

        Finds an object. The object found, if any, can be later used in other call like API.click.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_find_objects_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str by_selector: the selector sets the resource name criteria for matching. A UI element will be considered a match if its resource name exactly matches the selector parameter and all other criteria for this selector are met. The format of the selector string is `sel@[$]value,...` Where `sel` can be one of - checkable - clazz - clickable - depth - desc - package - res - scrollable - text `@` replaces the `=` sign that is used to separate parameters and values in the URL. If the first character of value is `$` then a `Pattern` is created.
        :return: list[ObjectRef]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.ui_device_find_objects_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.ui_device_find_objects_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def ui_device_find_objects_get_with_http_info(self, **kwargs):  # noqa: E501
        """Finds *all* objects that match the selector criteria.  # noqa: E501

        Finds an object. The object found, if any, can be later used in other call like API.click.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_find_objects_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str by_selector: the selector sets the resource name criteria for matching. A UI element will be considered a match if its resource name exactly matches the selector parameter and all other criteria for this selector are met. The format of the selector string is `sel@[$]value,...` Where `sel` can be one of - checkable - clazz - clickable - depth - desc - package - res - scrollable - text `@` replaces the `=` sign that is used to separate parameters and values in the URL. If the first character of value is `$` then a `Pattern` is created.
        :return: list[ObjectRef]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/findObjects', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ObjectRef]',  # 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 ui_device_last_traversed_text_get(self, **kwargs):  # noqa: E501
        """Retrieves the text from the last UI traversal event received.  # noqa: E501

        Retrieves the text from the last UI traversal event received.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_last_traversed_text_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_last_traversed_text_get_with_http_info(self, **kwargs):  # noqa: E501
        """Retrieves the text from the last UI traversal event received.  # noqa: E501

        Retrieves the text from the last UI traversal event received.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_last_traversed_text_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/lastTraversedText', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='LastTraversedText',  # 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 ui_device_press_back_get(self, **kwargs):  # noqa: E501
        """Simulates a short press on the BACK button.  # noqa: E501

        Simulates a short press on the BACK button.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_back_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_press_back_get_with_http_info(self, **kwargs):  # noqa: E501
        """Simulates a short press on the BACK button.  # noqa: E501

        Simulates a short press on the BACK button.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_back_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/pressBack', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_press_delete_get(self, **kwargs):  # noqa: E501
        """Simulates a short press on the DELETE key.  # noqa: E501

        Simulates a short press on the DELETE key.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_delete_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_press_delete_get_with_http_info(self, **kwargs):  # noqa: E501
        """Simulates a short press on the DELETE key.  # noqa: E501

        Simulates a short press on the DELETE key.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_delete_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/pressDelete', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_press_enter_get(self, **kwargs):  # noqa: E501
        """Simulates a short press on the ENTER key.  # noqa: E501

        Simulates a short press on the ENTER key.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_enter_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_press_enter_get_with_http_info(self, **kwargs):  # noqa: E501
        """Simulates a short press on the ENTER key.  # noqa: E501

        Simulates a short press on the ENTER key.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_enter_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/pressEnter', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_press_home_get(self, **kwargs):  # noqa: E501
        """Simulates a short press on the HOME button.  # noqa: E501

        Simulates a short press on the HOME button.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_home_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_press_home_get_with_http_info(self, **kwargs):  # noqa: E501
        """Simulates a short press on the HOME button.  # noqa: E501

        Simulates a short press on the HOME button.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_home_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/pressHome', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_press_key_code_get(self, key_code, **kwargs):  # noqa: E501
        """Simulates a short press using a key code.  # noqa: E501

        Simulates a short press using a key code.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_key_code_get(key_code, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int key_code: the key code of the event. (required)
        :param int meta_state: an integer in which each bit set to 1 represents a pressed meta key
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.ui_device_press_key_code_get_with_http_info(key_code, **kwargs)  # noqa: E501
        else:
            (data) = self.ui_device_press_key_code_get_with_http_info(key_code, **kwargs)  # noqa: E501
            return data

    def ui_device_press_key_code_get_with_http_info(self, key_code, **kwargs):  # noqa: E501
        """Simulates a short press using a key code.  # noqa: E501

        Simulates a short press using a key code.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_key_code_get_with_http_info(key_code, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int key_code: the key code of the event. (required)
        :param int meta_state: an integer in which each bit set to 1 represents a pressed meta key
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'key_code' in params:
            query_params.append(('keyCode', params['key_code']))  # noqa: E501
        if 'meta_state' in params:
            query_params.append(('metaState', params['meta_state']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/pressKeyCode', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_press_recent_apps_get(self, **kwargs):  # noqa: E501
        """Simulates a short press on the Recent Apps button.  # noqa: E501

        Simulates a short press on the Recent Apps button.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_recent_apps_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_press_recent_apps_get_with_http_info(self, **kwargs):  # noqa: E501
        """Simulates a short press on the Recent Apps button.  # noqa: E501

        Simulates a short press on the Recent Apps button.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_press_recent_apps_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/pressRecentApps', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_product_name_get(self, **kwargs):  # noqa: E501
        """Retrieves the product name of the device.  # noqa: E501

        Retrieves the product name of the device.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_product_name_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_product_name_get_with_http_info(self, **kwargs):  # noqa: E501
        """Retrieves the product name of the device.  # noqa: E501

        Retrieves the product name of the device.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_product_name_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/productName', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ProductName',  # 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 ui_device_screenshot_get(self, **kwargs):  # noqa: E501
        """Gets the device screenshot  # noqa: E501

        Gets the device screenshot and can be influenced by the parameters. For example the `scale` of the screenshot or its `quality` can be specified. **NOTE**: [`UiDevice.takeScreenshot()`](https://developer.android.com/reference/android/support/test/uiautomator/UiDevice.html#takeScreenshot(java.io.File,%20float,%20int)) usually ignores these parameters so expect no change.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_screenshot_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param float scale: The scale of the screenshot (i.e. 0.5)
        :param int quality: The quality of the screenshot (i.e. 100)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.ui_device_screenshot_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.ui_device_screenshot_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def ui_device_screenshot_get_with_http_info(self, **kwargs):  # noqa: E501
        """Gets the device screenshot  # noqa: E501

        Gets the device screenshot and can be influenced by the parameters. For example the `scale` of the screenshot or its `quality` can be specified. **NOTE**: [`UiDevice.takeScreenshot()`](https://developer.android.com/reference/android/support/test/uiautomator/UiDevice.html#takeScreenshot(java.io.File,%20float,%20int)) usually ignores these parameters so expect no change.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_screenshot_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param float scale: The scale of the screenshot (i.e. 0.5)
        :param int quality: The quality of the screenshot (i.e. 100)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['scale', 'quality']  # 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 ui_device_screenshot_get" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/screenshot', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def ui_device_swipe_get(self, start_x, start_y, end_x, end_y, steps, **kwargs):  # noqa: E501
        """Performs a swipe.  # noqa: E501

        Performs a swipe from one coordinate to another using the number of steps to determine smoothness and speed. Each step execution is throttled to 5ms per step. So for a 100 steps, the swipe will take about 1/2 second to complete.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_swipe_get(start_x, start_y, end_x, end_y, steps, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_x: from x (required)
        :param int start_y: from y (required)
        :param int end_x: to x (required)
        :param int end_y: end y (required)
        :param int steps: is the number of move steps sent to the system (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.ui_device_swipe_get_with_http_info(start_x, start_y, end_x, end_y, steps, **kwargs)  # noqa: E501
        else:
            (data) = self.ui_device_swipe_get_with_http_info(start_x, start_y, end_x, end_y, steps, **kwargs)  # noqa: E501
            return data

    def ui_device_swipe_get_with_http_info(self, start_x, start_y, end_x, end_y, steps, **kwargs):  # noqa: E501
        """Performs a swipe.  # noqa: E501

        Performs a swipe from one coordinate to another using the number of steps to determine smoothness and speed. Each step execution is throttled to 5ms per step. So for a 100 steps, the swipe will take about 1/2 second to complete.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_swipe_get_with_http_info(start_x, start_y, end_x, end_y, steps, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_x: from x (required)
        :param int start_y: from y (required)
        :param int end_x: to x (required)
        :param int end_y: end y (required)
        :param int steps: is the number of move steps sent to the system (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_x' in params:
            query_params.append(('startX', params['start_x']))  # noqa: E501
        if 'start_y' in params:
            query_params.append(('startY', params['start_y']))  # noqa: E501
        if 'end_x' in params:
            query_params.append(('endX', params['end_x']))  # noqa: E501
        if 'end_y' in params:
            query_params.append(('endY', params['end_y']))  # noqa: E501
        if 'steps' in params:
            query_params.append(('steps', params['steps']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/swipe', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_swipe_post(self, body, **kwargs):  # noqa: E501
        """Performs a swipe between points in the Point array.  # noqa: E501

        Each step execution is throttled to 5ms per step. So for a 100 steps, the swipe will take about 1/2 second to complete  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_swipe_post(body, async_req=True)
        >>> result = thread.get()

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

    def ui_device_swipe_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Performs a swipe between points in the Point array.  # noqa: E501

        Each step execution is throttled to 5ms per step. So for a 100 steps, the swipe will take about 1/2 second to complete  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_swipe_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param SwipeBody body: (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/swipe', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_wait_for_idle_get(self, **kwargs):  # noqa: E501
        """Waits for the current application to idle.  # noqa: E501

        Waits for the current application to idle.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_wait_for_idle_get(async_req=True)
        >>> result = thread.get()

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

    def ui_device_wait_for_idle_get_with_http_info(self, **kwargs):  # noqa: E501
        """Waits for the current application to idle.  # noqa: E501

        Waits for the current application to idle.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_wait_for_idle_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int timeout: in milliseconds
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/waitForIdle', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_device_wait_for_window_update_get(self, timeout, **kwargs):  # noqa: E501
        """Waits for a window content update event to occur.  # noqa: E501

        If a package name for the window is specified, but the current window does not have the same package name, the function returns immediately.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_wait_for_window_update_get(timeout, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int timeout: in milliseconds (required)
        :param str package_name: the specified window package name (can be null or not present). If null, a window update from any front-end window will end the wait
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.ui_device_wait_for_window_update_get_with_http_info(timeout, **kwargs)  # noqa: E501
        else:
            (data) = self.ui_device_wait_for_window_update_get_with_http_info(timeout, **kwargs)  # noqa: E501
            return data

    def ui_device_wait_for_window_update_get_with_http_info(self, timeout, **kwargs):  # noqa: E501
        """Waits for a window content update event to occur.  # noqa: E501

        If a package name for the window is specified, but the current window does not have the same package name, the function returns immediately.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_device_wait_for_window_update_get_with_http_info(timeout, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int timeout: in milliseconds (required)
        :param str package_name: the specified window package name (can be null or not present). If null, a window update from any front-end window will end the wait
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiDevice/waitForWindowUpdate', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_object2_oid_click_get(self, oid, **kwargs):  # noqa: E501
        """Clicks on the specified object.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_click_get(oid, async_req=True)
        >>> result = thread.get()

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

    def ui_object2_oid_click_get_with_http_info(self, oid, **kwargs):  # noqa: E501
        """Clicks on the specified object.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_click_get_with_http_info(oid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int oid: The object ID (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiObject2/{oid}/click', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_object2_oid_dump_get(self, oid, **kwargs):  # noqa: E501
        """Dumps the specified object.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_dump_get(oid, async_req=True)
        >>> result = thread.get()

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

    def ui_object2_oid_dump_get_with_http_info(self, oid, **kwargs):  # noqa: E501
        """Dumps the specified object.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_dump_get_with_http_info(oid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int oid: The object ID (required)
        :return: Selector
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiObject2/{oid}/dump', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Selector',  # 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 ui_object2_oid_get_text_get(self, oid, **kwargs):  # noqa: E501
        """Gets the text content.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_get_text_get(oid, async_req=True)
        >>> result = thread.get()

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

    def ui_object2_oid_get_text_get_with_http_info(self, oid, **kwargs):  # noqa: E501
        """Gets the text content.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_get_text_get_with_http_info(oid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int oid: The object ID (required)
        :return: Text
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiObject2/{oid}/getText', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Text',  # 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 ui_object2_oid_long_click_get(self, oid, **kwargs):  # noqa: E501
        """Long-clicks on the specified object.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_long_click_get(oid, async_req=True)
        >>> result = thread.get()

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

    def ui_object2_oid_long_click_get_with_http_info(self, oid, **kwargs):  # noqa: E501
        """Long-clicks on the specified object.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_long_click_get_with_http_info(oid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int oid: The object ID (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiObject2/{oid}/longClick', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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 ui_object2_oid_set_text_post(self, body, oid, **kwargs):  # noqa: E501
        """Sets the text content if this object is an editable field.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_set_text_post(body, oid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param OidSetTextBody body: Text to enter in the field (required)
        :param int oid: The object ID (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.ui_object2_oid_set_text_post_with_http_info(body, oid, **kwargs)  # noqa: E501
        else:
            (data) = self.ui_object2_oid_set_text_post_with_http_info(body, oid, **kwargs)  # noqa: E501
            return data

    def ui_object2_oid_set_text_post_with_http_info(self, body, oid, **kwargs):  # noqa: E501
        """Sets the text content if this object is an editable field.  # noqa: E501

        The target object should have been found using `findObject` with a `selector`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ui_object2_oid_set_text_post_with_http_info(body, oid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param OidSetTextBody body: Text to enter in the field (required)
        :param int oid: The object ID (required)
        :return: StatusResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/uiObject2/{oid}/setText', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusResponse',  # 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)
