# coding: utf-8

"""
    AristaFlowREST/LicenceManager

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

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

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from af_licence_manager.api_client import ApiClient


class DefaultApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

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

    def header_data(self, **kwargs):  # noqa: E501
        """header_data  # noqa: E501

        This operation is just for documenting the various header parameters accepted/required at most operations additionally besides the explicit parameters. See the operation descriptions for details.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.header_data(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str x_af_accept_version:
        :param str x_af_security_token: May also stem from the corresponding cookie. It is set by OrgmodelManager/GlobalSecurityManager. This is Base64-URL-encoded (RFC 4648, table 2)!
        :param str x_af_caller_uri: May also stem from the corresponding cookie. It is set by OrgmodelManager/GlobalSecurityManager.
        :param str x_af_session_id: An optional session ID (UUID). This allows to combine several requests in one session, similar to transactions. If this is not provided, a random UUID will be used thus leading to an individual for the request.
        :param str x_af_add_url_enc_attr: Key-value pairs, separated by '='. Keys and values should be URL-encoded. There may be several fields in the header.
        :param bool x_af_exception_stack: Whether to keep the stacks in exceptional responses. This will override the server configuration to suppress them. The value is irrelevant only the existence of the header will be checked.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.header_data_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.header_data_with_http_info(**kwargs)  # noqa: E501
            return data

    def header_data_with_http_info(self, **kwargs):  # noqa: E501
        """header_data  # noqa: E501

        This operation is just for documenting the various header parameters accepted/required at most operations additionally besides the explicit parameters. See the operation descriptions for details.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.header_data_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str x_af_accept_version:
        :param str x_af_security_token: May also stem from the corresponding cookie. It is set by OrgmodelManager/GlobalSecurityManager. This is Base64-URL-encoded (RFC 4648, table 2)!
        :param str x_af_caller_uri: May also stem from the corresponding cookie. It is set by OrgmodelManager/GlobalSecurityManager.
        :param str x_af_session_id: An optional session ID (UUID). This allows to combine several requests in one session, similar to transactions. If this is not provided, a random UUID will be used thus leading to an individual for the request.
        :param str x_af_add_url_enc_attr: Key-value pairs, separated by '='. Keys and values should be URL-encoded. There may be several fields in the header.
        :param bool x_af_exception_stack: Whether to keep the stacks in exceptional responses. This will override the server configuration to suppress them. The value is irrelevant only the existence of the header will be checked.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['x_af_accept_version', 'x_af_security_token', 'x_af_caller_uri', 'x_af_session_id', 'x_af_add_url_enc_attr', 'x_af_exception_stack']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_af_accept_version' in params:
            header_params['x-AF-Accept-Version'] = params['x_af_accept_version']  # noqa: E501
        if 'x_af_security_token' in params:
            header_params['x-AF-Security-Token'] = params['x_af_security_token']  # noqa: E501
        if 'x_af_caller_uri' in params:
            header_params['x-AF-Caller-URI'] = params['x_af_caller_uri']  # noqa: E501
        if 'x_af_session_id' in params:
            header_params['x-AF-Session-ID'] = params['x_af_session_id']  # noqa: E501
        if 'x_af_add_url_enc_attr' in params:
            header_params['x-AF-Add-UrlEnc-Attr'] = params['x_af_add_url_enc_attr']  # noqa: E501
        if 'x_af_exception_stack' in params:
            header_params['x-AF-Exception-Stack'] = params['x_af_exception_stack']  # noqa: E501

        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(
            '/header-data', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
