# coding: utf-8

"""
    Cherwell REST API

    Unofficial Python Cherwell REST API library.  # noqa: E501

    The version of the OpenAPI document: 9.3.2
    Contact: See AUTHORS.
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from pycherwell.api_client import ApiClient
from pycherwell.exceptions import (
    ApiTypeError,
    ApiValueError
)


class QueuesApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def queues_add_item_to_queue_v1(self, add_item_to_queue_request, **kwargs):  # noqa: E501
        """Add a Business Object to a queue  # noqa: E501

        Operation to add a Business Object to a queue  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_add_item_to_queue_v1(add_item_to_queue_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param AddItemToQueueRequest add_item_to_queue_request: Request object containing all properties necessary to add an item to a queue. All properties are required. The standin key defines the queue to which we want to add the Business Object. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: AddItemToQueueResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.queues_add_item_to_queue_v1_with_http_info(add_item_to_queue_request, **kwargs)  # noqa: E501

    def queues_add_item_to_queue_v1_with_http_info(self, add_item_to_queue_request, **kwargs):  # noqa: E501
        """Add a Business Object to a queue  # noqa: E501

        Operation to add a Business Object to a queue  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_add_item_to_queue_v1_with_http_info(add_item_to_queue_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param AddItemToQueueRequest add_item_to_queue_request: Request object containing all properties necessary to add an item to a queue. All properties are required. The standin key defines the queue to which we want to add the Business Object. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(AddItemToQueueResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method queues_add_item_to_queue_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'add_item_to_queue_request' is set
        if self.api_client.client_side_validation and ('add_item_to_queue_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['add_item_to_queue_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `add_item_to_queue_request` when calling `queues_add_item_to_queue_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'add_item_to_queue_request' in local_var_params:
            body_params = local_var_params['add_item_to_queue_request']
        # 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(
            '/api/V1/additemtoqueue', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AddItemToQueueResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def queues_check_in_queue_item_v1(self, check_in_queue_item_request, **kwargs):  # noqa: E501
        """Check a Business Object in to a queue  # noqa: E501

        Operation to check in a queue item  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_check_in_queue_item_v1(check_in_queue_item_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CheckInQueueItemRequest check_in_queue_item_request: The request object for checking in an item to a queue. All properties are required except for historyNotes (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: CheckInQueueItemResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.queues_check_in_queue_item_v1_with_http_info(check_in_queue_item_request, **kwargs)  # noqa: E501

    def queues_check_in_queue_item_v1_with_http_info(self, check_in_queue_item_request, **kwargs):  # noqa: E501
        """Check a Business Object in to a queue  # noqa: E501

        Operation to check in a queue item  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_check_in_queue_item_v1_with_http_info(check_in_queue_item_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CheckInQueueItemRequest check_in_queue_item_request: The request object for checking in an item to a queue. All properties are required except for historyNotes (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(CheckInQueueItemResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method queues_check_in_queue_item_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'check_in_queue_item_request' is set
        if self.api_client.client_side_validation and ('check_in_queue_item_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['check_in_queue_item_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `check_in_queue_item_request` when calling `queues_check_in_queue_item_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'check_in_queue_item_request' in local_var_params:
            body_params = local_var_params['check_in_queue_item_request']
        # 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(
            '/api/V1/checkinqueueitem', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CheckInQueueItemResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def queues_check_out_queue_item_v1(self, check_out_queue_item_request, **kwargs):  # noqa: E501
        """Check a Business Object out of a queue  # noqa: E501

        Operation to check out a queue item  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_check_out_queue_item_v1(check_out_queue_item_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CheckOutQueueItemRequest check_out_queue_item_request: The request object for checking out an item from a queue. All properties are required except for historyNotes (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: CheckOutQueueItemResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.queues_check_out_queue_item_v1_with_http_info(check_out_queue_item_request, **kwargs)  # noqa: E501

    def queues_check_out_queue_item_v1_with_http_info(self, check_out_queue_item_request, **kwargs):  # noqa: E501
        """Check a Business Object out of a queue  # noqa: E501

        Operation to check out a queue item  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_check_out_queue_item_v1_with_http_info(check_out_queue_item_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CheckOutQueueItemRequest check_out_queue_item_request: The request object for checking out an item from a queue. All properties are required except for historyNotes (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(CheckOutQueueItemResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method queues_check_out_queue_item_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'check_out_queue_item_request' is set
        if self.api_client.client_side_validation and ('check_out_queue_item_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['check_out_queue_item_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `check_out_queue_item_request` when calling `queues_check_out_queue_item_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'check_out_queue_item_request' in local_var_params:
            body_params = local_var_params['check_out_queue_item_request']
        # 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(
            '/api/V1/checkoutqueueitem', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CheckOutQueueItemResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def queues_get_queues_folder_v1(self, scope, scopeowner, folder, **kwargs):  # noqa: E501
        """Get available queues.  # noqa: E501

        Get available queues for a specific Business Object type based on scope, scope owner, and folder.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_get_queues_folder_v1(scope, scopeowner, folder, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scope: The scope to get available queues for. (required)
        :param str scopeowner: The scope owner to get available queues for. (required)
        :param str folder: The folder to get available queues for. (required)
        :param bool links: Whether or not to include links.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ManagerData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.queues_get_queues_folder_v1_with_http_info(scope, scopeowner, folder, **kwargs)  # noqa: E501

    def queues_get_queues_folder_v1_with_http_info(self, scope, scopeowner, folder, **kwargs):  # noqa: E501
        """Get available queues.  # noqa: E501

        Get available queues for a specific Business Object type based on scope, scope owner, and folder.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_get_queues_folder_v1_with_http_info(scope, scopeowner, folder, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scope: The scope to get available queues for. (required)
        :param str scopeowner: The scope owner to get available queues for. (required)
        :param str folder: The folder to get available queues for. (required)
        :param bool links: Whether or not to include links.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ManagerData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['scope', 'scopeowner', 'folder', 'links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method queues_get_queues_folder_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `queues_get_queues_folder_v1`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `queues_get_queues_folder_v1`")  # noqa: E501
        # verify the required parameter 'folder' is set
        if self.api_client.client_side_validation and ('folder' not in local_var_params or  # noqa: E501
                                                        local_var_params['folder'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `folder` when calling `queues_get_queues_folder_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501
        if 'folder' in local_var_params:
            path_params['folder'] = local_var_params['folder']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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(
            '/api/V1/getqueues/scope/{scope}/scopeowner/{scopeowner}/folder/{folder}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ManagerData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def queues_get_queues_scope_owner_v1(self, scope, scopeowner, **kwargs):  # noqa: E501
        """Get available queues.  # noqa: E501

        Get available queues for a specific Business Object type based on scope, and scope owner.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_get_queues_scope_owner_v1(scope, scopeowner, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scope: The scope to get available queues for. (required)
        :param str scopeowner: The scope owner to get available queues for. (required)
        :param bool links: Whether or not to include links.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ManagerData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.queues_get_queues_scope_owner_v1_with_http_info(scope, scopeowner, **kwargs)  # noqa: E501

    def queues_get_queues_scope_owner_v1_with_http_info(self, scope, scopeowner, **kwargs):  # noqa: E501
        """Get available queues.  # noqa: E501

        Get available queues for a specific Business Object type based on scope, and scope owner.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_get_queues_scope_owner_v1_with_http_info(scope, scopeowner, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scope: The scope to get available queues for. (required)
        :param str scopeowner: The scope owner to get available queues for. (required)
        :param bool links: Whether or not to include links.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ManagerData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method queues_get_queues_scope_owner_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `queues_get_queues_scope_owner_v1`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `queues_get_queues_scope_owner_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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(
            '/api/V1/getqueues/scope/{scope}/scopeowner/{scopeowner}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ManagerData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def queues_get_queues_scope_v1(self, scope, **kwargs):  # noqa: E501
        """Get available queues.  # noqa: E501

        Get available queues for a specific Business Object type based on scope.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_get_queues_scope_v1(scope, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scope: The scope to get available queues for. (required)
        :param bool links: Whether or not to include links.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ManagerData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.queues_get_queues_scope_v1_with_http_info(scope, **kwargs)  # noqa: E501

    def queues_get_queues_scope_v1_with_http_info(self, scope, **kwargs):  # noqa: E501
        """Get available queues.  # noqa: E501

        Get available queues for a specific Business Object type based on scope.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_get_queues_scope_v1_with_http_info(scope, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scope: The scope to get available queues for. (required)
        :param bool links: Whether or not to include links.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ManagerData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method queues_get_queues_scope_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `queues_get_queues_scope_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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(
            '/api/V1/getqueues/scope/{scope}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ManagerData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def queues_get_queues_v1(self, **kwargs):  # noqa: E501
        """Get available queues.  # noqa: E501

        Get available queues for a specific Business Object.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_get_queues_v1(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool links: Whether or not to include links.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ManagerData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.queues_get_queues_v1_with_http_info(**kwargs)  # noqa: E501

    def queues_get_queues_v1_with_http_info(self, **kwargs):  # noqa: E501
        """Get available queues.  # noqa: E501

        Get available queues for a specific Business Object.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_get_queues_v1_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool links: Whether or not to include links.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ManagerData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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(
            '/api/V1/getqueues', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ManagerData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def queues_remove_item_from_queue_v1(self, remove_item_from_queue_request, **kwargs):  # noqa: E501
        """Remove an item from a queue  # noqa: E501

        Operation to remove an item from a queue  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_remove_item_from_queue_v1(remove_item_from_queue_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param RemoveItemFromQueueRequest remove_item_from_queue_request: The request object to remove an item from a queue. All properties are required except for historyNotes (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: RemoveItemFromQueueResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.queues_remove_item_from_queue_v1_with_http_info(remove_item_from_queue_request, **kwargs)  # noqa: E501

    def queues_remove_item_from_queue_v1_with_http_info(self, remove_item_from_queue_request, **kwargs):  # noqa: E501
        """Remove an item from a queue  # noqa: E501

        Operation to remove an item from a queue  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.queues_remove_item_from_queue_v1_with_http_info(remove_item_from_queue_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param RemoveItemFromQueueRequest remove_item_from_queue_request: The request object to remove an item from a queue. All properties are required except for historyNotes (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(RemoveItemFromQueueResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method queues_remove_item_from_queue_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'remove_item_from_queue_request' is set
        if self.api_client.client_side_validation and ('remove_item_from_queue_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['remove_item_from_queue_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `remove_item_from_queue_request` when calling `queues_remove_item_from_queue_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'remove_item_from_queue_request' in local_var_params:
            body_params = local_var_params['remove_item_from_queue_request']
        # 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(
            '/api/V1/removeitemfromqueue', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RemoveItemFromQueueResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
