# coding: utf-8

"""
    Digitick REST API

    The Digitick REST API is a set of methods giving access to catalog, user and cart management.

    OpenAPI spec version: v1.0
    Contact: <EMAIL>
    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 VenueApi(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 venue_city_find_by_ids(self, city_ids, **kwargs):
        """
        Get list of city details from identifier
        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.venue_city_find_by_ids(city_ids, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str city_ids: A list of city identifier (required)
        :return: CityList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.venue_city_find_by_ids_with_http_info(city_ids, **kwargs)
        else:
            (data) = self.venue_city_find_by_ids_with_http_info(city_ids, **kwargs)
            return data

    def venue_city_find_by_ids_with_http_info(self, city_ids, **kwargs):
        """
        Get list of city details from identifier
        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.venue_city_find_by_ids_with_http_info(city_ids, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str city_ids: A list of city identifier (required)
        :return: CityList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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


        collection_formats = {}

        resource_path = '/venue/cities/{cityIds}'.replace('{format}', 'json')
        path_params = {}
        if 'city_ids' in params:
            path_params['cityIds'] = params['city_ids']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['json'])

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

        # Authentication setting
        auth_settings = ['Bearer']

        return self.api_client.call_api(resource_path, 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='CityList',
                                        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 venue_map_room_find_by_ids(self, map_room_ids, **kwargs):
        """
        Get list of map room details from identifier
        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.venue_map_room_find_by_ids(map_room_ids, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str map_room_ids: A list of map room identifier (required)
        :return: MapRoomList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.venue_map_room_find_by_ids_with_http_info(map_room_ids, **kwargs)
        else:
            (data) = self.venue_map_room_find_by_ids_with_http_info(map_room_ids, **kwargs)
            return data

    def venue_map_room_find_by_ids_with_http_info(self, map_room_ids, **kwargs):
        """
        Get list of map room details from identifier
        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.venue_map_room_find_by_ids_with_http_info(map_room_ids, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str map_room_ids: A list of map room identifier (required)
        :return: MapRoomList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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


        collection_formats = {}

        resource_path = '/venue/mapRooms/{mapRoomIds}'.replace('{format}', 'json')
        path_params = {}
        if 'map_room_ids' in params:
            path_params['mapRoomIds'] = params['map_room_ids']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['json'])

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

        # Authentication setting
        auth_settings = ['Bearer']

        return self.api_client.call_api(resource_path, 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='MapRoomList',
                                        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 venue_room_find_by_ids(self, room_ids, **kwargs):
        """
        Get list of map room details from identifier
        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.venue_room_find_by_ids(room_ids, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str room_ids: A list of room identifier (required)
        :return: RoomList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.venue_room_find_by_ids_with_http_info(room_ids, **kwargs)
        else:
            (data) = self.venue_room_find_by_ids_with_http_info(room_ids, **kwargs)
            return data

    def venue_room_find_by_ids_with_http_info(self, room_ids, **kwargs):
        """
        Get list of map room details from identifier
        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.venue_room_find_by_ids_with_http_info(room_ids, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str room_ids: A list of room identifier (required)
        :return: RoomList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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


        collection_formats = {}

        resource_path = '/venue/rooms/{roomIds}'.replace('{format}', 'json')
        path_params = {}
        if 'room_ids' in params:
            path_params['roomIds'] = params['room_ids']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['json'])

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

        # Authentication setting
        auth_settings = ['Bearer']

        return self.api_client.call_api(resource_path, 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='RoomList',
                                        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 venue_seat_find_by_ids(self, seat_ids, **kwargs):
        """
        Get list of seat details from identifier
        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.venue_seat_find_by_ids(seat_ids, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str seat_ids: A list of seat identifier (required)
        :return: SeatList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.venue_seat_find_by_ids_with_http_info(seat_ids, **kwargs)
        else:
            (data) = self.venue_seat_find_by_ids_with_http_info(seat_ids, **kwargs)
            return data

    def venue_seat_find_by_ids_with_http_info(self, seat_ids, **kwargs):
        """
        Get list of seat details from identifier
        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.venue_seat_find_by_ids_with_http_info(seat_ids, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str seat_ids: A list of seat identifier (required)
        :return: SeatList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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


        collection_formats = {}

        resource_path = '/venue/seats/{seatIds}'.replace('{format}', 'json')
        path_params = {}
        if 'seat_ids' in params:
            path_params['seatIds'] = params['seat_ids']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['json'])

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

        # Authentication setting
        auth_settings = ['Bearer']

        return self.api_client.call_api(resource_path, 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='SeatList',
                                        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)
