# coding: utf-8

"""
    Seeq REST API

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

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


from __future__ import absolute_import

import sys
import os
import re

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

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


class WorkbooksApi(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def add_recently_accessed(self, **kwargs):
        """
        Put the specified item at the top of the recently accessed list for the workbook
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.add_recently_accessed(workbook_id=workbook_id_value, item_id=item_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook (required)
        :param str item_id: Item to be added (required)
        :return: ItemSearchPreviewListV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.add_recently_accessed_with_http_info(**kwargs)
        else:
            (data) = self.add_recently_accessed_with_http_info(**kwargs)
            return data

    def add_recently_accessed_with_http_info(self, **kwargs):
        """
        Put the specified item at the top of the recently accessed list for the workbook
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.add_recently_accessed_with_http_info(workbook_id=workbook_id_value, item_id=item_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook (required)
        :param str item_id: Item to be added (required)
        :return: ItemSearchPreviewListV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['workbook_id', 'item_id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']
        if 'item_id' in params:
            path_params['itemId'] = params['item_id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/recently-accessed/{itemId}', 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='ItemSearchPreviewListV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def create_workbook(self, **kwargs):
        """
        Create a workbook
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_workbook(body=body_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param WorkbookInputV1 body: Workbook information (required)
        :return: WorkbookOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.create_workbook_with_http_info(**kwargs)
        else:
            (data) = self.create_workbook_with_http_info(**kwargs)
            return data

    def create_workbook_with_http_info(self, **kwargs):
        """
        Create a workbook
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_workbook_with_http_info(body=body_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param WorkbookInputV1 body: Workbook information (required)
        :return: WorkbookOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_workbook" % 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 `create_workbook`")


        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks', 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorkbookOutputV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def create_worksheet(self, **kwargs):
        """
        Create a worksheet
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_worksheet(workbook_id=workbook_id_value, body=body_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which to create the worksheet (required)
        :param WorksheetInputV1 body: Worksheet information (required)
        :return: WorksheetOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.create_worksheet_with_http_info(**kwargs)
        else:
            (data) = self.create_worksheet_with_http_info(**kwargs)
            return data

    def create_worksheet_with_http_info(self, **kwargs):
        """
        Create a worksheet
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_worksheet_with_http_info(workbook_id=workbook_id_value, body=body_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which to create the worksheet (required)
        :param WorksheetInputV1 body: Worksheet information (required)
        :return: WorksheetOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['workbook_id', 'body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_worksheet" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'workbook_id' is set
        if ('workbook_id' not in params) or (params['workbook_id'] is None):
            raise ValueError("Missing the required parameter `workbook_id` when calling `create_worksheet`")
        # 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 `create_worksheet`")


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/worksheets', 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorksheetOutputV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def create_workstep(self, **kwargs):
        """
        Append a new workstep to the worksheet
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_workstep(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, body=body_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which the worksheet exists (required)
        :param str worksheet_id: ID of the worksheet on which to append the new workstep (required)
        :param WorkstepInputV1 body: Workstep information (required)
        :return: WorkstepOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.create_workstep_with_http_info(**kwargs)
        else:
            (data) = self.create_workstep_with_http_info(**kwargs)
            return data

    def create_workstep_with_http_info(self, **kwargs):
        """
        Append a new workstep to the worksheet
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_workstep_with_http_info(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, body=body_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which the worksheet exists (required)
        :param str worksheet_id: ID of the worksheet on which to append the new workstep (required)
        :param WorkstepInputV1 body: Workstep information (required)
        :return: WorkstepOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['workbook_id', 'worksheet_id', 'body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_workstep" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'workbook_id' is set
        if ('workbook_id' not in params) or (params['workbook_id'] is None):
            raise ValueError("Missing the required parameter `workbook_id` when calling `create_workstep`")
        # verify the required parameter 'worksheet_id' is set
        if ('worksheet_id' not in params) or (params['worksheet_id'] is None):
            raise ValueError("Missing the required parameter `worksheet_id` when calling `create_workstep`")
        # 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 `create_workstep`")


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']
        if 'worksheet_id' in params:
            path_params['worksheetId'] = params['worksheet_id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/worksheets/{worksheetId}/worksteps', 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorkstepOutputV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def delete_workbook(self, **kwargs):
        """
        Permanently delete a workbook and all of its worksheets
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_workbook(id=id_value, callback=callback_function)

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

    def delete_workbook_with_http_info(self, **kwargs):
        """
        Permanently delete a workbook and all of its worksheets
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_workbook_with_http_info(id=id_value, callback=callback_function)

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

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

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


        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{id}', 'DELETE',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='StatusMessageBase',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def delete_worksheet(self, **kwargs):
        """
        Permanently delete a worksheet
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_worksheet(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which the worksheet exists (required)
        :param str worksheet_id: ID of the worksheet to delete (required)
        :return: StatusMessageBase
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.delete_worksheet_with_http_info(**kwargs)
        else:
            (data) = self.delete_worksheet_with_http_info(**kwargs)
            return data

    def delete_worksheet_with_http_info(self, **kwargs):
        """
        Permanently delete a worksheet
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_worksheet_with_http_info(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which the worksheet exists (required)
        :param str worksheet_id: ID of the worksheet to delete (required)
        :return: StatusMessageBase
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['workbook_id', 'worksheet_id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']
        if 'worksheet_id' in params:
            path_params['worksheetId'] = params['worksheet_id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/worksheets/{worksheetId}', 'DELETE',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='StatusMessageBase',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def get_recently_accessed(self, **kwargs):
        """
        Get the recently accessed list for the workbook
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_recently_accessed(workbook_id=workbook_id_value, callback=callback_function)

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

    def get_recently_accessed_with_http_info(self, **kwargs):
        """
        Get the recently accessed list for the workbook
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_recently_accessed_with_http_info(workbook_id=workbook_id_value, callback=callback_function)

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

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

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


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/recently-accessed', 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='ItemSearchPreviewListV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

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

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

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

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

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

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


        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{id}', 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorkbookOutputV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def get_workbooks(self, **kwargs):
        """
        Get a collection of workbooks
        Pagination is enabled for this query. Note that this endpoint only returns workbooks that a user has access to and is not optimized for performance. To get folders and workbooks with better performance and more filtering options, please see the Folders API.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_workbooks(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str user_id: The user ID to return workbooks for, defaults to the current user if not specified. Only an admin user is allowed to specify a user ID.
        :param bool is_archived: True to filter results to only workbooks that have been archived, false to filter results to workbooks that are not archived.
        :param str sort_order: A field by which to order the workbooks followed by a space and 'asc' or 'desc'. Field name can be one of: createdAt, updatedAt, name
        :param int offset: The pagination offset, the index of the first collection item that will be returned in this page of results
        :param int limit: The pagination limit, the total number of collection items that will be returned in this page of results
        :return: WorkbookOutputListV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_workbooks_with_http_info(**kwargs)
        else:
            (data) = self.get_workbooks_with_http_info(**kwargs)
            return data

    def get_workbooks_with_http_info(self, **kwargs):
        """
        Get a collection of workbooks
        Pagination is enabled for this query. Note that this endpoint only returns workbooks that a user has access to and is not optimized for performance. To get folders and workbooks with better performance and more filtering options, please see the Folders API.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_workbooks_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str user_id: The user ID to return workbooks for, defaults to the current user if not specified. Only an admin user is allowed to specify a user ID.
        :param bool is_archived: True to filter results to only workbooks that have been archived, false to filter results to workbooks that are not archived.
        :param str sort_order: A field by which to order the workbooks followed by a space and 'asc' or 'desc'. Field name can be one of: createdAt, updatedAt, name
        :param int offset: The pagination offset, the index of the first collection item that will be returned in this page of results
        :param int limit: The pagination limit, the total number of collection items that will be returned in this page of results
        :return: WorkbookOutputListV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['user_id', 'is_archived', 'sort_order', 'offset', 'limit']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        path_params = {}

        query_params = []
        if 'user_id' in params:
            query_params.append(('userId', params['user_id']))
        if 'is_archived' in params:
            query_params.append(('isArchived', params['is_archived']))
        if 'sort_order' in params:
            query_params.append(('sortOrder', params['sort_order']))
        if 'offset' in params:
            query_params.append(('offset', params['offset']))
        if 'limit' in params:
            query_params.append(('limit', params['limit']))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks', 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorkbookOutputListV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def get_worksheet(self, **kwargs):
        """
        Get a worksheet
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_worksheet(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook for which to retrieve the worksheets (required)
        :param str worksheet_id: ID of the worksheet to retrieve (required)
        :return: WorksheetOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_worksheet_with_http_info(**kwargs)
        else:
            (data) = self.get_worksheet_with_http_info(**kwargs)
            return data

    def get_worksheet_with_http_info(self, **kwargs):
        """
        Get a worksheet
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_worksheet_with_http_info(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook for which to retrieve the worksheets (required)
        :param str worksheet_id: ID of the worksheet to retrieve (required)
        :return: WorksheetOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['workbook_id', 'worksheet_id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']
        if 'worksheet_id' in params:
            path_params['worksheetId'] = params['worksheet_id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/worksheets/{worksheetId}', 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorksheetOutputV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def get_worksheets(self, **kwargs):
        """
        Get a collection of worksheets
        Pagination is enabled for this query
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_worksheets(workbook_id=workbook_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: The ID of the workbook for which to retrieve the worksheets (required)
        :param int offset: The pagination offset, the index of the first collection item that will be returned in this page of results
        :param int limit: The pagination limit, the total number of collection items that will be returned in this page of results
        :param bool is_archived: Whether to return archived worksheets
        :return: WorksheetOutputListV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_worksheets_with_http_info(**kwargs)
        else:
            (data) = self.get_worksheets_with_http_info(**kwargs)
            return data

    def get_worksheets_with_http_info(self, **kwargs):
        """
        Get a collection of worksheets
        Pagination is enabled for this query
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_worksheets_with_http_info(workbook_id=workbook_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: The ID of the workbook for which to retrieve the worksheets (required)
        :param int offset: The pagination offset, the index of the first collection item that will be returned in this page of results
        :param int limit: The pagination limit, the total number of collection items that will be returned in this page of results
        :param bool is_archived: Whether to return archived worksheets
        :return: WorksheetOutputListV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['workbook_id', 'offset', 'limit', 'is_archived']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']

        query_params = []
        if 'offset' in params:
            query_params.append(('offset', params['offset']))
        if 'limit' in params:
            query_params.append(('limit', params['limit']))
        if 'is_archived' in params:
            query_params.append(('isArchived', params['is_archived']))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/worksheets', 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorksheetOutputListV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def get_workstep(self, **kwargs):
        """
        Get a workstep
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_workstep(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, workstep_id=workstep_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook for which to retrieve the worksteps (required)
        :param str worksheet_id: ID of the worksheet for which to retrieve the worksteps (required)
        :param str workstep_id: ID of the workstep to retrieve (required)
        :return: WorkstepOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_workstep_with_http_info(**kwargs)
        else:
            (data) = self.get_workstep_with_http_info(**kwargs)
            return data

    def get_workstep_with_http_info(self, **kwargs):
        """
        Get a workstep
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_workstep_with_http_info(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, workstep_id=workstep_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook for which to retrieve the worksteps (required)
        :param str worksheet_id: ID of the worksheet for which to retrieve the worksteps (required)
        :param str workstep_id: ID of the workstep to retrieve (required)
        :return: WorkstepOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['workbook_id', 'worksheet_id', 'workstep_id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']
        if 'worksheet_id' in params:
            path_params['worksheetId'] = params['worksheet_id']
        if 'workstep_id' in params:
            path_params['workstepId'] = params['workstep_id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/worksheets/{worksheetId}/worksteps/{workstepId}', 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorkstepOutputV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def move_worksheet(self, **kwargs):
        """
        Move a Worksheet to a new location in the same Workbook
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.move_worksheet(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which the worksheet exists (required)
        :param str worksheet_id: ID of the worksheet on which the workstep exists (required)
        :param str next_worksheet_id: ID of the worksheet that the specified worksheet should precede. If not supplied then the worksheet will be moved to be the last worksheet in the workbook.
        :return: WorksheetOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.move_worksheet_with_http_info(**kwargs)
        else:
            (data) = self.move_worksheet_with_http_info(**kwargs)
            return data

    def move_worksheet_with_http_info(self, **kwargs):
        """
        Move a Worksheet to a new location in the same Workbook
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.move_worksheet_with_http_info(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which the worksheet exists (required)
        :param str worksheet_id: ID of the worksheet on which the workstep exists (required)
        :param str next_worksheet_id: ID of the worksheet that the specified worksheet should precede. If not supplied then the worksheet will be moved to be the last worksheet in the workbook.
        :return: WorksheetOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['workbook_id', 'worksheet_id', 'next_worksheet_id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']
        if 'worksheet_id' in params:
            path_params['worksheetId'] = params['worksheet_id']

        query_params = []
        if 'next_worksheet_id' in params:
            query_params.append(('nextWorksheetId', params['next_worksheet_id']))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/worksheets/{worksheetId}/next', 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorksheetOutputV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def set_current_workstep(self, **kwargs):
        """
        Set the current workstep
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.set_current_workstep(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, workstep_id=workstep_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which the worksheet exists (required)
        :param str worksheet_id: ID of the worksheet on which the workstep exists (required)
        :param str workstep_id: ID of the workstep to set as the current one (required)
        :return: WorkstepOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.set_current_workstep_with_http_info(**kwargs)
        else:
            (data) = self.set_current_workstep_with_http_info(**kwargs)
            return data

    def set_current_workstep_with_http_info(self, **kwargs):
        """
        Set the current workstep
        
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.set_current_workstep_with_http_info(workbook_id=workbook_id_value, worksheet_id=worksheet_id_value, workstep_id=workstep_id_value, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str workbook_id: ID of the workbook on which the worksheet exists (required)
        :param str worksheet_id: ID of the worksheet on which the workstep exists (required)
        :param str workstep_id: ID of the workstep to set as the current one (required)
        :return: WorkstepOutputV1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['workbook_id', 'worksheet_id', 'workstep_id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        path_params = {}
        if 'workbook_id' in params:
            path_params['workbookId'] = params['workbook_id']
        if 'worksheet_id' in params:
            path_params['worksheetId'] = params['worksheet_id']
        if 'workstep_id' in params:
            path_params['workstepId'] = params['workstep_id']

        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/vnd.seeq.v1+json'])

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/workbooks/{workbookId}/worksheets/{worksheetId}/worksteps/{workstepId}/current', 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='WorkstepOutputV1',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)
