# coding: utf-8

"""
    herd

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    OpenAPI spec version: 0.178.0-SNAPSHOT
    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 herdsdk.api_client import ApiClient


class BusinessObjectFormatExternalInterfaceDescriptiveInformationApi(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 business_object_format_external_interface_descriptive_information_get_business_object_format_external_interface(self, namespace, business_object_definition_name, business_object_format_usage, business_object_format_file_type, external_interface_name, **kwargs):  # noqa: E501
        """getBusinessObjectFormatExternalInterface  # noqa: E501

        Retrieves the existing business object format external interface descriptive information based on the specified parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.business_object_format_external_interface_descriptive_information_get_business_object_format_external_interface(namespace, business_object_definition_name, business_object_format_usage, business_object_format_file_type, external_interface_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: the namespace (required)
        :param str business_object_definition_name: the business object definition name (required)
        :param str business_object_format_usage: the business object format usage (required)
        :param str business_object_format_file_type: the business object format file type (required)
        :param str external_interface_name: the external interface name (required)
        :return: BusinessObjectFormatExternalInterfaceDescriptiveInformation
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.business_object_format_external_interface_descriptive_information_get_business_object_format_external_interface_with_http_info(namespace, business_object_definition_name, business_object_format_usage, business_object_format_file_type, external_interface_name, **kwargs)  # noqa: E501
        else:
            (data) = self.business_object_format_external_interface_descriptive_information_get_business_object_format_external_interface_with_http_info(namespace, business_object_definition_name, business_object_format_usage, business_object_format_file_type, external_interface_name, **kwargs)  # noqa: E501
            return data

    def business_object_format_external_interface_descriptive_information_get_business_object_format_external_interface_with_http_info(self, namespace, business_object_definition_name, business_object_format_usage, business_object_format_file_type, external_interface_name, **kwargs):  # noqa: E501
        """getBusinessObjectFormatExternalInterface  # noqa: E501

        Retrieves the existing business object format external interface descriptive information based on the specified parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.business_object_format_external_interface_descriptive_information_get_business_object_format_external_interface_with_http_info(namespace, business_object_definition_name, business_object_format_usage, business_object_format_file_type, external_interface_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: the namespace (required)
        :param str business_object_definition_name: the business object definition name (required)
        :param str business_object_format_usage: the business object format usage (required)
        :param str business_object_format_file_type: the business object format file type (required)
        :param str external_interface_name: the external interface name (required)
        :return: BusinessObjectFormatExternalInterfaceDescriptiveInformation
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['namespace', 'business_object_definition_name', 'business_object_format_usage', 'business_object_format_file_type', 'external_interface_name']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'namespace' in local_var_params:
            path_params['namespace'] = local_var_params['namespace']  # noqa: E501
        if 'business_object_definition_name' in local_var_params:
            path_params['businessObjectDefinitionName'] = local_var_params['business_object_definition_name']  # noqa: E501
        if 'business_object_format_usage' in local_var_params:
            path_params['businessObjectFormatUsage'] = local_var_params['business_object_format_usage']  # noqa: E501
        if 'business_object_format_file_type' in local_var_params:
            path_params['businessObjectFormatFileType'] = local_var_params['business_object_format_file_type']  # noqa: E501
        if 'external_interface_name' in local_var_params:
            path_params['externalInterfaceName'] = local_var_params['external_interface_name']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['basicAuth', 'oauthAuth']  # noqa: E501

        return self.api_client.call_api(
            '/businessObjectFormatExternalInterfaceDescriptiveInformation/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}/externalInterfaceNames/{externalInterfaceName}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BusinessObjectFormatExternalInterfaceDescriptiveInformation',  # 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)
