# coding: utf-8

"""
    Agilicus API

    Agilicus is API-first. Modern software is controlled by other software, is open, is available for you to use the way you want, securely, simply.  A rendered, online viewable and usable version of this specification is available at [api](https://www.agilicus.com/api). You may try the API inline directly in the web page. To do so, first obtain an Authentication Token (the simplest way is to install the Python SDK, and then run `agilicus-cli --issuer https://MYISSUER get-token`). You will need an org-id for most calls (and can obtain from `agilicus-cli --issuer https://MYISSUER list-orgs`). The `MYISSUER` will typically be `auth.MYDOMAIN`, and you will see it as you sign-in to the administrative UI.  This API releases on Bearer-Token authentication. To obtain a valid bearer token you will need to Authenticate to an Issuer with OpenID Connect (a superset of OAUTH2).  Your \"issuer\" will look like https://auth.MYDOMAIN. For example, when you signed-up, if you said \"use my own domain name\" and assigned a CNAME of cloud.example.com, then your issuer would be https://auth.cloud.example.com.  If you selected \"use an Agilicus supplied domain name\", your issuer would look like https://auth.myorg.agilicus.cloud.  For test purposes you can use our [Python SDK](https://pypi.org/project/agilicus/) and run `agilicus-cli --issuer https://auth.MYDOMAIN get-token`.  This API may be used in any language runtime that supports OpenAPI 3.0, or, you may use our [Python SDK](https://pypi.org/project/agilicus/), our [Typescript SDK](https://www.npmjs.com/package/@agilicus/angular), or our [Golang SDK](https://git.agilicus.com/pub/sdk-go).  100% of the activities in our system our API-driven, from our web-admin, through our progressive web applications, to all internals: there is nothing that is not accessible.  For more information, see [developer resources](https://www.agilicus.com/developer).   # noqa: E501

    The version of the OpenAPI document: 2021.05.06
    Contact: dev@agilicus.com
    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 agilicus_api.api_client import ApiClient
from agilicus_api.exceptions import (
    ApiTypeError,
    ApiValueError
)


class IssuersApi(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 create_client(self, issuer_client, **kwargs):  # noqa: E501
        """Create a client  # noqa: E501

        Create a client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_client(issuer_client, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param IssuerClient issuer_client: IssuerClient (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: IssuerClient
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_client_with_http_info(issuer_client, **kwargs)  # noqa: E501

    def create_client_with_http_info(self, issuer_client, **kwargs):  # noqa: E501
        """Create a client  # noqa: E501

        Create a client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_client_with_http_info(issuer_client, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param IssuerClient issuer_client: IssuerClient (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(IssuerClient, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_client']  # 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 create_client" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_client' is set
        if self.api_client.client_side_validation and ('issuer_client' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_client` when calling `create_client`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'issuer_client' in local_var_params:
            body_params = local_var_params['issuer_client']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/clients', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='IssuerClient',  # 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 create_issuer(self, issuer, **kwargs):  # noqa: E501
        """Create an issuer  # noqa: E501

        Create an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_issuer(issuer, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param Issuer issuer: Issuer (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: Issuer
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_issuer_with_http_info(issuer, **kwargs)  # noqa: E501

    def create_issuer_with_http_info(self, issuer, **kwargs):  # noqa: E501
        """Create an issuer  # noqa: E501

        Create an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_issuer_with_http_info(issuer, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param Issuer issuer: Issuer (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(Issuer, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer']  # 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 create_issuer" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer' is set
        if self.api_client.client_side_validation and ('issuer' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer` when calling `create_issuer`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'issuer' in local_var_params:
            body_params = local_var_params['issuer']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_roots', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Issuer',  # 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 create_policy(self, policy, **kwargs):  # noqa: E501
        """Create a policy  # noqa: E501

        Create a policy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_policy(policy, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param Policy policy: Policy (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: Policy
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_policy_with_http_info(policy, **kwargs)  # noqa: E501

    def create_policy_with_http_info(self, policy, **kwargs):  # noqa: E501
        """Create a policy  # noqa: E501

        Create a policy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_policy_with_http_info(policy, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param Policy policy: Policy (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(Policy, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['policy']  # 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 create_policy" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'policy' is set
        if self.api_client.client_side_validation and ('policy' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy` when calling `create_policy`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'policy' in local_var_params:
            body_params = local_var_params['policy']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Policy',  # 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 create_policy_rule(self, policy_id, policy_rule, **kwargs):  # noqa: E501
        """Create a policy rule  # noqa: E501

        Create a policy rule  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_policy_rule(policy_id, policy_rule, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param PolicyRule policy_rule: Policy rule (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: PolicyRule
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_policy_rule_with_http_info(policy_id, policy_rule, **kwargs)  # noqa: E501

    def create_policy_rule_with_http_info(self, policy_id, policy_rule, **kwargs):  # noqa: E501
        """Create a policy rule  # noqa: E501

        Create a policy rule  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_policy_rule_with_http_info(policy_id, policy_rule, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param PolicyRule policy_rule: Policy rule (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(PolicyRule, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['policy_id', 'policy_rule']  # 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 create_policy_rule" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'policy_id' is set
        if self.api_client.client_side_validation and ('policy_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_id` when calling `create_policy_rule`")  # noqa: E501
        # verify the required parameter 'policy_rule' is set
        if self.api_client.client_side_validation and ('policy_rule' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_rule'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_rule` when calling `create_policy_rule`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'policy_rule' in local_var_params:
            body_params = local_var_params['policy_rule']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies/{policy_id}/policy_rules', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PolicyRule',  # 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 create_upstream_group_mapping(self, issuer_id, upstream_group_mapping, **kwargs):  # noqa: E501
        """Create an upstream group mapping  # noqa: E501

        Create an upstream group mapping  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_upstream_group_mapping(issuer_id, upstream_group_mapping, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param UpstreamGroupMapping upstream_group_mapping: Upstream Group Mapping (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: UpstreamGroupMapping
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_upstream_group_mapping_with_http_info(issuer_id, upstream_group_mapping, **kwargs)  # noqa: E501

    def create_upstream_group_mapping_with_http_info(self, issuer_id, upstream_group_mapping, **kwargs):  # noqa: E501
        """Create an upstream group mapping  # noqa: E501

        Create an upstream group mapping  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_upstream_group_mapping_with_http_info(issuer_id, upstream_group_mapping, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param UpstreamGroupMapping upstream_group_mapping: Upstream Group Mapping (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(UpstreamGroupMapping, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'upstream_group_mapping']  # 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 create_upstream_group_mapping" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `create_upstream_group_mapping`")  # noqa: E501
        # verify the required parameter 'upstream_group_mapping' is set
        if self.api_client.client_side_validation and ('upstream_group_mapping' not in local_var_params or  # noqa: E501
                                                        local_var_params['upstream_group_mapping'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `upstream_group_mapping` when calling `create_upstream_group_mapping`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'upstream_group_mapping' in local_var_params:
            body_params = local_var_params['upstream_group_mapping']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}/upstream_group_mapping', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UpstreamGroupMapping',  # 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 delete_client(self, client_id, **kwargs):  # noqa: E501
        """Delete a client  # noqa: E501

        Delete a client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_client(client_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client_id: client_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param str org_id: Organisation Unique identifier
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_client_with_http_info(client_id, **kwargs)  # noqa: E501

    def delete_client_with_http_info(self, client_id, **kwargs):  # noqa: E501
        """Delete a client  # noqa: E501

        Delete a client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_client_with_http_info(client_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client_id: client_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param str org_id: Organisation Unique identifier
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client_id', 'summarize_collection', 'org_id']  # 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 delete_client" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client_id' is set
        if self.api_client.client_side_validation and ('client_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['client_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client_id` when calling `delete_client`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/clients/{client_id}', 'DELETE',
            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=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 delete_policy(self, policy_id, **kwargs):  # noqa: E501
        """Delete a Policy  # noqa: E501

        Delete a Policy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_policy(policy_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str org_id: Organisation Unique identifier
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_policy_with_http_info(policy_id, **kwargs)  # noqa: E501

    def delete_policy_with_http_info(self, policy_id, **kwargs):  # noqa: E501
        """Delete a Policy  # noqa: E501

        Delete a Policy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_policy_with_http_info(policy_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str org_id: Organisation Unique identifier
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['policy_id', 'org_id']  # 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 delete_policy" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'policy_id' is set
        if self.api_client.client_side_validation and ('policy_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_id` when calling `delete_policy`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies/{policy_id}', 'DELETE',
            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=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 delete_policy_rule(self, policy_id, policy_rule_id, **kwargs):  # noqa: E501
        """Delete a Policy Rule  # noqa: E501

        Delete a Policy Rule  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_policy_rule(policy_id, policy_rule_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str policy_rule_id: Policy Rule Unique identifier (required)
        :param str org_id: Organisation Unique identifier
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_policy_rule_with_http_info(policy_id, policy_rule_id, **kwargs)  # noqa: E501

    def delete_policy_rule_with_http_info(self, policy_id, policy_rule_id, **kwargs):  # noqa: E501
        """Delete a Policy Rule  # noqa: E501

        Delete a Policy Rule  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_policy_rule_with_http_info(policy_id, policy_rule_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str policy_rule_id: Policy Rule Unique identifier (required)
        :param str org_id: Organisation Unique identifier
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['policy_id', 'policy_rule_id', 'org_id']  # 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 delete_policy_rule" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'policy_id' is set
        if self.api_client.client_side_validation and ('policy_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_id` when calling `delete_policy_rule`")  # noqa: E501
        # verify the required parameter 'policy_rule_id' is set
        if self.api_client.client_side_validation and ('policy_rule_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_rule_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_rule_id` when calling `delete_policy_rule`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies/{policy_id}/policy_rules/{policy_rule_id}', 'DELETE',
            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=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 delete_root(self, issuer_id, **kwargs):  # noqa: E501
        """Delete an Issuer  # noqa: E501

        Delete an Issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_root(issuer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_root_with_http_info(issuer_id, **kwargs)  # noqa: E501

    def delete_root_with_http_info(self, issuer_id, **kwargs):  # noqa: E501
        """Delete an Issuer  # noqa: E501

        Delete an Issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_root_with_http_info(issuer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'summarize_collection']  # 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 delete_root" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `delete_root`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_roots/{issuer_id}', 'DELETE',
            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=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 delete_upstream_group_mapping(self, issuer_id, upstream_group_mapping_id, **kwargs):  # noqa: E501
        """Delete an upstream group mapping  # noqa: E501

        Delete an upstream group mapping  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_upstream_group_mapping(issuer_id, upstream_group_mapping_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str upstream_group_mapping_id: upstream group_mapping id (required)
        :param str org_id: Organisation Unique identifier
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_upstream_group_mapping_with_http_info(issuer_id, upstream_group_mapping_id, **kwargs)  # noqa: E501

    def delete_upstream_group_mapping_with_http_info(self, issuer_id, upstream_group_mapping_id, **kwargs):  # noqa: E501
        """Delete an upstream group mapping  # noqa: E501

        Delete an upstream group mapping  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_upstream_group_mapping_with_http_info(issuer_id, upstream_group_mapping_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str upstream_group_mapping_id: upstream group_mapping id (required)
        :param str org_id: Organisation Unique identifier
        :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: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'upstream_group_mapping_id', 'org_id']  # 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 delete_upstream_group_mapping" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `delete_upstream_group_mapping`")  # noqa: E501
        # verify the required parameter 'upstream_group_mapping_id' is set
        if self.api_client.client_side_validation and ('upstream_group_mapping_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['upstream_group_mapping_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `upstream_group_mapping_id` when calling `delete_upstream_group_mapping`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}/upstream_group_mapping/{upstream_group_mapping_id}', 'DELETE',
            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=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 get_client(self, client_id, **kwargs):  # noqa: E501
        """Get a client  # noqa: E501

        Get a client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_client(client_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client_id: client_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param str org_id: Organisation Unique identifier
        :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: IssuerClient
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_client_with_http_info(client_id, **kwargs)  # noqa: E501

    def get_client_with_http_info(self, client_id, **kwargs):  # noqa: E501
        """Get a client  # noqa: E501

        Get a client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_client_with_http_info(client_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client_id: client_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param str org_id: Organisation Unique identifier
        :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(IssuerClient, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client_id', 'summarize_collection', 'org_id']  # 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 get_client" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client_id' is set
        if self.api_client.client_side_validation and ('client_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['client_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client_id` when calling `get_client`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/clients/{client_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='IssuerClient',  # 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 get_issuer(self, issuer_id, **kwargs):  # noqa: E501
        """Get an issuer  # noqa: E501

        Get an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_issuer(issuer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param str org_id: Organisation Unique identifier
        :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: Issuer
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_issuer_with_http_info(issuer_id, **kwargs)  # noqa: E501

    def get_issuer_with_http_info(self, issuer_id, **kwargs):  # noqa: E501
        """Get an issuer  # noqa: E501

        Get an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_issuer_with_http_info(issuer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param str org_id: Organisation Unique identifier
        :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(Issuer, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'summarize_collection', 'org_id']  # 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 get_issuer" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `get_issuer`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Issuer',  # 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 get_policy(self, policy_id, **kwargs):  # noqa: E501
        """Get a policy  # noqa: E501

        Get a policy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_policy(policy_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str org_id: Organisation Unique identifier
        :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: Policy
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_policy_with_http_info(policy_id, **kwargs)  # noqa: E501

    def get_policy_with_http_info(self, policy_id, **kwargs):  # noqa: E501
        """Get a policy  # noqa: E501

        Get a policy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_policy_with_http_info(policy_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str org_id: Organisation Unique identifier
        :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(Policy, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['policy_id', 'org_id']  # 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 get_policy" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'policy_id' is set
        if self.api_client.client_side_validation and ('policy_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_id` when calling `get_policy`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies/{policy_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Policy',  # 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 get_policy_rule(self, policy_id, policy_rule_id, **kwargs):  # noqa: E501
        """Get a policy rule  # noqa: E501

        Get a policy rule  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_policy_rule(policy_id, policy_rule_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str policy_rule_id: Policy Rule Unique identifier (required)
        :param str org_id: Organisation Unique identifier
        :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: PolicyRule
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_policy_rule_with_http_info(policy_id, policy_rule_id, **kwargs)  # noqa: E501

    def get_policy_rule_with_http_info(self, policy_id, policy_rule_id, **kwargs):  # noqa: E501
        """Get a policy rule  # noqa: E501

        Get a policy rule  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_policy_rule_with_http_info(policy_id, policy_rule_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str policy_rule_id: Policy Rule Unique identifier (required)
        :param str org_id: Organisation Unique identifier
        :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(PolicyRule, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['policy_id', 'policy_rule_id', 'org_id']  # 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 get_policy_rule" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'policy_id' is set
        if self.api_client.client_side_validation and ('policy_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_id` when calling `get_policy_rule`")  # noqa: E501
        # verify the required parameter 'policy_rule_id' is set
        if self.api_client.client_side_validation and ('policy_rule_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_rule_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_rule_id` when calling `get_policy_rule`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies/{policy_id}/policy_rules/{policy_rule_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PolicyRule',  # 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 get_root(self, issuer_id, **kwargs):  # noqa: E501
        """Get an issuer  # noqa: E501

        Get an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_root(issuer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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: Issuer
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_root_with_http_info(issuer_id, **kwargs)  # noqa: E501

    def get_root_with_http_info(self, issuer_id, **kwargs):  # noqa: E501
        """Get an issuer  # noqa: E501

        Get an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_root_with_http_info(issuer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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(Issuer, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'summarize_collection']  # 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 get_root" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `get_root`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_roots/{issuer_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Issuer',  # 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 get_upstream_group_mapping(self, issuer_id, upstream_group_mapping_id, **kwargs):  # noqa: E501
        """Get an upstream group mapping  # noqa: E501

        Get an upstream group mapping  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_upstream_group_mapping(issuer_id, upstream_group_mapping_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str upstream_group_mapping_id: upstream group_mapping id (required)
        :param str org_id: Organisation Unique identifier
        :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: UpstreamGroupMapping
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_upstream_group_mapping_with_http_info(issuer_id, upstream_group_mapping_id, **kwargs)  # noqa: E501

    def get_upstream_group_mapping_with_http_info(self, issuer_id, upstream_group_mapping_id, **kwargs):  # noqa: E501
        """Get an upstream group mapping  # noqa: E501

        Get an upstream group mapping  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_upstream_group_mapping_with_http_info(issuer_id, upstream_group_mapping_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str upstream_group_mapping_id: upstream group_mapping id (required)
        :param str org_id: Organisation Unique identifier
        :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(UpstreamGroupMapping, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'upstream_group_mapping_id', 'org_id']  # 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 get_upstream_group_mapping" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `get_upstream_group_mapping`")  # noqa: E501
        # verify the required parameter 'upstream_group_mapping_id' is set
        if self.api_client.client_side_validation and ('upstream_group_mapping_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['upstream_group_mapping_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `upstream_group_mapping_id` when calling `get_upstream_group_mapping`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}/upstream_group_mapping/{upstream_group_mapping_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UpstreamGroupMapping',  # 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 get_upstreams(self, issuer_id, org_id, **kwargs):  # noqa: E501
        """Get provisioned upstreams for the issuer  # noqa: E501

        Get provisioned upstreams for the issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_upstreams(issuer_id, org_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str org_id: Organisation Unique identifier (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: BaseUpstreams
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_upstreams_with_http_info(issuer_id, org_id, **kwargs)  # noqa: E501

    def get_upstreams_with_http_info(self, issuer_id, org_id, **kwargs):  # noqa: E501
        """Get provisioned upstreams for the issuer  # noqa: E501

        Get provisioned upstreams for the issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_upstreams_with_http_info(issuer_id, org_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str org_id: Organisation Unique identifier (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(BaseUpstreams, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'org_id']  # 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 get_upstreams" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `get_upstreams`")  # noqa: E501
        # verify the required parameter 'org_id' is set
        if self.api_client.client_side_validation and ('org_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['org_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `org_id` when calling `get_upstreams`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}/upstreams', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BaseUpstreams',  # 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 get_wellknown_issuer_info(self, issuer_id, org_id, **kwargs):  # noqa: E501
        """Get well-known issuer information  # noqa: E501

        Get well-known issuer information  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_wellknown_issuer_info(issuer_id, org_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str org_id: Organisation Unique identifier (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: WellKnownIssuerInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_wellknown_issuer_info_with_http_info(issuer_id, org_id, **kwargs)  # noqa: E501

    def get_wellknown_issuer_info_with_http_info(self, issuer_id, org_id, **kwargs):  # noqa: E501
        """Get well-known issuer information  # noqa: E501

        Get well-known issuer information  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_wellknown_issuer_info_with_http_info(issuer_id, org_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str org_id: Organisation Unique identifier (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(WellKnownIssuerInfo, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'org_id']  # 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 get_wellknown_issuer_info" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `get_wellknown_issuer_info`")  # noqa: E501
        # verify the required parameter 'org_id' is set
        if self.api_client.client_side_validation and ('org_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['org_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `org_id` when calling `get_wellknown_issuer_info`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}/well_known_info', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='WellKnownIssuerInfo',  # 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 list_clients(self, **kwargs):  # noqa: E501
        """Query Clients  # noqa: E501

        Query Clients  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_clients(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param int limit: limit the number of rows in the response
        :param str org_id: Organisation Unique identifier
        :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: ListIssuerClientsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_clients_with_http_info(**kwargs)  # noqa: E501

    def list_clients_with_http_info(self, **kwargs):  # noqa: E501
        """Query Clients  # noqa: E501

        Query Clients  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_clients_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param int limit: limit the number of rows in the response
        :param str org_id: Organisation Unique identifier
        :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(ListIssuerClientsResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['summarize_collection', 'limit', 'org_id']  # 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 list_clients" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_clients`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_clients`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501
        if 'limit' in local_var_params and local_var_params['limit'] is not None:  # noqa: E501
            query_params.append(('limit', local_var_params['limit']))  # noqa: E501
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/clients', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListIssuerClientsResponse',  # 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 list_issuer_roots(self, **kwargs):  # noqa: E501
        """Query Issuers  # noqa: E501

        Query Issuers  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_issuer_roots(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param int limit: limit the number of rows in the response
        :param str issuer: Organisation issuer
        :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: ListIssuerRootsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_issuer_roots_with_http_info(**kwargs)  # noqa: E501

    def list_issuer_roots_with_http_info(self, **kwargs):  # noqa: E501
        """Query Issuers  # noqa: E501

        Query Issuers  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_issuer_roots_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param int limit: limit the number of rows in the response
        :param str issuer: Organisation issuer
        :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(ListIssuerRootsResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['summarize_collection', 'limit', 'issuer']  # 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 list_issuer_roots" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_issuer_roots`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_issuer_roots`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501
        if 'limit' in local_var_params and local_var_params['limit'] is not None:  # noqa: E501
            query_params.append(('limit', local_var_params['limit']))  # noqa: E501
        if 'issuer' in local_var_params and local_var_params['issuer'] is not None:  # noqa: E501
            query_params.append(('issuer', local_var_params['issuer']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_roots', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListIssuerRootsResponse',  # 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 list_issuers(self, **kwargs):  # noqa: E501
        """Query Issuers  # noqa: E501

        Query Issuers  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_issuers(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param int limit: limit the number of rows in the response
        :param str issuer: Organisation issuer
        :param str org_id: Organisation Unique identifier
        :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: ListIssuerExtensionsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_issuers_with_http_info(**kwargs)  # noqa: E501

    def list_issuers_with_http_info(self, **kwargs):  # noqa: E501
        """Query Issuers  # noqa: E501

        Query Issuers  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_issuers_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :param int limit: limit the number of rows in the response
        :param str issuer: Organisation issuer
        :param str org_id: Organisation Unique identifier
        :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(ListIssuerExtensionsResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['summarize_collection', 'limit', 'issuer', 'org_id']  # 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 list_issuers" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_issuers`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_issuers`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501
        if 'limit' in local_var_params and local_var_params['limit'] is not None:  # noqa: E501
            query_params.append(('limit', local_var_params['limit']))  # noqa: E501
        if 'issuer' in local_var_params and local_var_params['issuer'] is not None:  # noqa: E501
            query_params.append(('issuer', local_var_params['issuer']))  # noqa: E501
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListIssuerExtensionsResponse',  # 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 list_policies(self, **kwargs):  # noqa: E501
        """Query Policies  # noqa: E501

        Query Policies  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_policies(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int limit: limit the number of rows in the response
        :param str org_id: Organisation Unique identifier
        :param str issuer_id: Organisation issuer id
        :param str policy_name: Query the policies by name
        :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: ListPoliciesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_policies_with_http_info(**kwargs)  # noqa: E501

    def list_policies_with_http_info(self, **kwargs):  # noqa: E501
        """Query Policies  # noqa: E501

        Query Policies  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_policies_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int limit: limit the number of rows in the response
        :param str org_id: Organisation Unique identifier
        :param str issuer_id: Organisation issuer id
        :param str policy_name: Query the policies by name
        :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(ListPoliciesResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['limit', 'org_id', 'issuer_id', 'policy_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 ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_policies" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_policies`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_policies`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'limit' in local_var_params and local_var_params['limit'] is not None:  # noqa: E501
            query_params.append(('limit', local_var_params['limit']))  # noqa: E501
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # noqa: E501
        if 'issuer_id' in local_var_params and local_var_params['issuer_id'] is not None:  # noqa: E501
            query_params.append(('issuer_id', local_var_params['issuer_id']))  # noqa: E501
        if 'policy_name' in local_var_params and local_var_params['policy_name'] is not None:  # noqa: E501
            query_params.append(('policy_name', local_var_params['policy_name']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListPoliciesResponse',  # 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 list_policy_rules(self, policy_id, **kwargs):  # noqa: E501
        """Query Policy rules  # noqa: E501

        Query Policy rules  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_policy_rules(policy_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param int limit: limit the number of rows in the response
        :param str org_id: Organisation Unique identifier
        :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: ListPolicyRulesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_policy_rules_with_http_info(policy_id, **kwargs)  # noqa: E501

    def list_policy_rules_with_http_info(self, policy_id, **kwargs):  # noqa: E501
        """Query Policy rules  # noqa: E501

        Query Policy rules  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_policy_rules_with_http_info(policy_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param int limit: limit the number of rows in the response
        :param str org_id: Organisation Unique identifier
        :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(ListPolicyRulesResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['policy_id', 'limit', 'org_id']  # 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 list_policy_rules" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'policy_id' is set
        if self.api_client.client_side_validation and ('policy_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_id` when calling `list_policy_rules`")  # noqa: E501

        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_policy_rules`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_policy_rules`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'limit' in local_var_params and local_var_params['limit'] is not None:  # noqa: E501
            query_params.append(('limit', local_var_params['limit']))  # noqa: E501
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies/{policy_id}/policy_rules', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListPolicyRulesResponse',  # 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 list_upstream_group_mappings(self, issuer_id, **kwargs):  # noqa: E501
        """Query upstream group mappings for an issuer  # noqa: E501

        Query upstream group mappings for an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_upstream_group_mappings(issuer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param int limit: limit the number of rows in the response
        :param str org_id: Organisation Unique identifier
        :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: ListUpstreamGroupMapping
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_upstream_group_mappings_with_http_info(issuer_id, **kwargs)  # noqa: E501

    def list_upstream_group_mappings_with_http_info(self, issuer_id, **kwargs):  # noqa: E501
        """Query upstream group mappings for an issuer  # noqa: E501

        Query upstream group mappings for an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_upstream_group_mappings_with_http_info(issuer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param int limit: limit the number of rows in the response
        :param str org_id: Organisation Unique identifier
        :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(ListUpstreamGroupMapping, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'limit', 'org_id']  # 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 list_upstream_group_mappings" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `list_upstream_group_mappings`")  # noqa: E501

        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_upstream_group_mappings`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_upstream_group_mappings`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'limit' in local_var_params and local_var_params['limit'] is not None:  # noqa: E501
            query_params.append(('limit', local_var_params['limit']))  # noqa: E501
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}/upstream_group_mapping', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListUpstreamGroupMapping',  # 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 list_wellknown_issuer_info(self, **kwargs):  # noqa: E501
        """list well-known issuer information  # noqa: E501

        list well-known issuer information  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_wellknown_issuer_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str org_id: Organisation Unique identifier
        :param int limit: limit the number of rows in the response
        :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: ListWellKnownIssuerInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_wellknown_issuer_info_with_http_info(**kwargs)  # noqa: E501

    def list_wellknown_issuer_info_with_http_info(self, **kwargs):  # noqa: E501
        """list well-known issuer information  # noqa: E501

        list well-known issuer information  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_wellknown_issuer_info_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str org_id: Organisation Unique identifier
        :param int limit: limit the number of rows in the response
        :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(ListWellKnownIssuerInfo, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['org_id', 'limit']  # 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 list_wellknown_issuer_info" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_wellknown_issuer_info`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `limit` when calling `list_wellknown_issuer_info`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'org_id' in local_var_params and local_var_params['org_id'] is not None:  # noqa: E501
            query_params.append(('org_id', local_var_params['org_id']))  # noqa: E501
        if 'limit' in local_var_params and local_var_params['limit'] is not None:  # noqa: E501
            query_params.append(('limit', local_var_params['limit']))  # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/well_known_info', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListWellKnownIssuerInfo',  # 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 replace_client(self, client_id, issuer_client, **kwargs):  # noqa: E501
        """Update a client  # noqa: E501

        Update a client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_client(client_id, issuer_client, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client_id: client_id path (required)
        :param IssuerClient issuer_client: Issuer client (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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: IssuerClient
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.replace_client_with_http_info(client_id, issuer_client, **kwargs)  # noqa: E501

    def replace_client_with_http_info(self, client_id, issuer_client, **kwargs):  # noqa: E501
        """Update a client  # noqa: E501

        Update a client  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_client_with_http_info(client_id, issuer_client, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client_id: client_id path (required)
        :param IssuerClient issuer_client: Issuer client (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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(IssuerClient, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client_id', 'issuer_client', 'summarize_collection']  # 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 replace_client" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client_id' is set
        if self.api_client.client_side_validation and ('client_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['client_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client_id` when calling `replace_client`")  # noqa: E501
        # verify the required parameter 'issuer_client' is set
        if self.api_client.client_side_validation and ('issuer_client' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_client` when calling `replace_client`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'issuer_client' in local_var_params:
            body_params = local_var_params['issuer_client']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/clients/{client_id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='IssuerClient',  # 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 replace_issuer(self, issuer_id, issuer, **kwargs):  # noqa: E501
        """Update an issuer  # noqa: E501

        Update an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_issuer(issuer_id, issuer, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param Issuer issuer: Issuer (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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: Issuer
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.replace_issuer_with_http_info(issuer_id, issuer, **kwargs)  # noqa: E501

    def replace_issuer_with_http_info(self, issuer_id, issuer, **kwargs):  # noqa: E501
        """Update an issuer  # noqa: E501

        Update an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_issuer_with_http_info(issuer_id, issuer, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param Issuer issuer: Issuer (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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(Issuer, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'issuer', 'summarize_collection']  # 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 replace_issuer" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `replace_issuer`")  # noqa: E501
        # verify the required parameter 'issuer' is set
        if self.api_client.client_side_validation and ('issuer' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer` when calling `replace_issuer`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'issuer' in local_var_params:
            body_params = local_var_params['issuer']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Issuer',  # 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 replace_policy(self, policy_id, policy, **kwargs):  # noqa: E501
        """Update a policy  # noqa: E501

        Update a policy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_policy(policy_id, policy, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param Policy policy: Policy (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: Policy
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.replace_policy_with_http_info(policy_id, policy, **kwargs)  # noqa: E501

    def replace_policy_with_http_info(self, policy_id, policy, **kwargs):  # noqa: E501
        """Update a policy  # noqa: E501

        Update a policy  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_policy_with_http_info(policy_id, policy, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param Policy policy: Policy (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(Policy, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['policy_id', 'policy']  # 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 replace_policy" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'policy_id' is set
        if self.api_client.client_side_validation and ('policy_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_id` when calling `replace_policy`")  # noqa: E501
        # verify the required parameter 'policy' is set
        if self.api_client.client_side_validation and ('policy' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy` when calling `replace_policy`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'policy' in local_var_params:
            body_params = local_var_params['policy']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies/{policy_id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Policy',  # 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 replace_policy_rule(self, policy_id, policy_rule_id, policy_rule, **kwargs):  # noqa: E501
        """Update a policy rule  # noqa: E501

        Update a policy rule  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_policy_rule(policy_id, policy_rule_id, policy_rule, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str policy_rule_id: Policy Rule Unique identifier (required)
        :param PolicyRule policy_rule: Policy Rule (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: PolicyRule
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.replace_policy_rule_with_http_info(policy_id, policy_rule_id, policy_rule, **kwargs)  # noqa: E501

    def replace_policy_rule_with_http_info(self, policy_id, policy_rule_id, policy_rule, **kwargs):  # noqa: E501
        """Update a policy rule  # noqa: E501

        Update a policy rule  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_policy_rule_with_http_info(policy_id, policy_rule_id, policy_rule, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str policy_id: Policy Unique identifier (required)
        :param str policy_rule_id: Policy Rule Unique identifier (required)
        :param PolicyRule policy_rule: Policy Rule (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(PolicyRule, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['policy_id', 'policy_rule_id', 'policy_rule']  # 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 replace_policy_rule" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'policy_id' is set
        if self.api_client.client_side_validation and ('policy_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_id` when calling `replace_policy_rule`")  # noqa: E501
        # verify the required parameter 'policy_rule_id' is set
        if self.api_client.client_side_validation and ('policy_rule_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_rule_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_rule_id` when calling `replace_policy_rule`")  # noqa: E501
        # verify the required parameter 'policy_rule' is set
        if self.api_client.client_side_validation and ('policy_rule' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_rule'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_rule` when calling `replace_policy_rule`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'policy_rule' in local_var_params:
            body_params = local_var_params['policy_rule']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/authentication_policies/{policy_id}/policy_rules/{policy_rule_id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PolicyRule',  # 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 replace_root(self, issuer_id, issuer, **kwargs):  # noqa: E501
        """Update an issuer  # noqa: E501

        Update an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_root(issuer_id, issuer, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param Issuer issuer: Issuer (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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: Issuer
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.replace_root_with_http_info(issuer_id, issuer, **kwargs)  # noqa: E501

    def replace_root_with_http_info(self, issuer_id, issuer, **kwargs):  # noqa: E501
        """Update an issuer  # noqa: E501

        Update an issuer  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_root_with_http_info(issuer_id, issuer, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param Issuer issuer: Issuer (required)
        :param bool summarize_collection: Restrict the results to the summary. Individual collections define what content to include in the summary
        :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(Issuer, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'issuer', 'summarize_collection']  # 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 replace_root" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `replace_root`")  # noqa: E501
        # verify the required parameter 'issuer' is set
        if self.api_client.client_side_validation and ('issuer' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer` when calling `replace_root`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'summarize_collection' in local_var_params and local_var_params['summarize_collection'] is not None:  # noqa: E501
            query_params.append(('summarize_collection', local_var_params['summarize_collection']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'issuer' in local_var_params:
            body_params = local_var_params['issuer']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_roots/{issuer_id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Issuer',  # 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 replace_upstream_group_mapping(self, issuer_id, upstream_group_mapping_id, upstream_group_mapping, **kwargs):  # noqa: E501
        """Update an upstream group mapping  # noqa: E501

        Update an upstream group mapping  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_upstream_group_mapping(issuer_id, upstream_group_mapping_id, upstream_group_mapping, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str upstream_group_mapping_id: upstream group_mapping id (required)
        :param UpstreamGroupMapping upstream_group_mapping: Issuer upstream group mapping (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: UpstreamGroupMapping
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.replace_upstream_group_mapping_with_http_info(issuer_id, upstream_group_mapping_id, upstream_group_mapping, **kwargs)  # noqa: E501

    def replace_upstream_group_mapping_with_http_info(self, issuer_id, upstream_group_mapping_id, upstream_group_mapping, **kwargs):  # noqa: E501
        """Update an upstream group mapping  # noqa: E501

        Update an upstream group mapping  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.replace_upstream_group_mapping_with_http_info(issuer_id, upstream_group_mapping_id, upstream_group_mapping, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param str upstream_group_mapping_id: upstream group_mapping id (required)
        :param UpstreamGroupMapping upstream_group_mapping: Issuer upstream group mapping (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(UpstreamGroupMapping, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'upstream_group_mapping_id', 'upstream_group_mapping']  # 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 replace_upstream_group_mapping" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `replace_upstream_group_mapping`")  # noqa: E501
        # verify the required parameter 'upstream_group_mapping_id' is set
        if self.api_client.client_side_validation and ('upstream_group_mapping_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['upstream_group_mapping_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `upstream_group_mapping_id` when calling `replace_upstream_group_mapping`")  # noqa: E501
        # verify the required parameter 'upstream_group_mapping' is set
        if self.api_client.client_side_validation and ('upstream_group_mapping' not in local_var_params or  # noqa: E501
                                                        local_var_params['upstream_group_mapping'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `upstream_group_mapping` when calling `replace_upstream_group_mapping`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'upstream_group_mapping' in local_var_params:
            body_params = local_var_params['upstream_group_mapping']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}/upstream_group_mapping/{upstream_group_mapping_id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UpstreamGroupMapping',  # 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 reset_to_default_policy(self, issuer_id, reset_policy_request, **kwargs):  # noqa: E501
        """Reset the current policy to the default policy  # noqa: E501

        Reset the current policy to the default policy. This will create a new policy as the active policy for your organisation. The old policy will still exist with the same policy_id but will be disassociated with this issuer.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reset_to_default_policy(issuer_id, reset_policy_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param ResetPolicyRequest reset_policy_request: Policy (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: Policy
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.reset_to_default_policy_with_http_info(issuer_id, reset_policy_request, **kwargs)  # noqa: E501

    def reset_to_default_policy_with_http_info(self, issuer_id, reset_policy_request, **kwargs):  # noqa: E501
        """Reset the current policy to the default policy  # noqa: E501

        Reset the current policy to the default policy. This will create a new policy as the active policy for your organisation. The old policy will still exist with the same policy_id but will be disassociated with this issuer.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reset_to_default_policy_with_http_info(issuer_id, reset_policy_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param ResetPolicyRequest reset_policy_request: Policy (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(Policy, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'reset_policy_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 reset_to_default_policy" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `reset_to_default_policy`")  # noqa: E501
        # verify the required parameter 'reset_policy_request' is set
        if self.api_client.client_side_validation and ('reset_policy_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['reset_policy_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `reset_policy_request` when calling `reset_to_default_policy`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'reset_policy_request' in local_var_params:
            body_params = local_var_params['reset_policy_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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}/set_auth_policy_to_default', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Policy',  # 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 set_policy(self, issuer_id, policy_spec, **kwargs):  # noqa: E501
        """Set the current policy to the policy sent  # noqa: E501

        Set the current policy to the given policy. This will replace the given issuer's policy with the content from the sent policy. Any ids will be used to link rules together, but be replaced, and any org_ids will be replaced with the org_id of the policy sent.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_policy(issuer_id, policy_spec, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param PolicySpec policy_spec: Policy (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: Policy
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.set_policy_with_http_info(issuer_id, policy_spec, **kwargs)  # noqa: E501

    def set_policy_with_http_info(self, issuer_id, policy_spec, **kwargs):  # noqa: E501
        """Set the current policy to the policy sent  # noqa: E501

        Set the current policy to the given policy. This will replace the given issuer's policy with the content from the sent policy. Any ids will be used to link rules together, but be replaced, and any org_ids will be replaced with the org_id of the policy sent.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_policy_with_http_info(issuer_id, policy_spec, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str issuer_id: issuer_id path (required)
        :param PolicySpec policy_spec: Policy (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(Policy, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['issuer_id', 'policy_spec']  # 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 set_policy" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'issuer_id' is set
        if self.api_client.client_side_validation and ('issuer_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['issuer_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `issuer_id` when calling `set_policy`")  # noqa: E501
        # verify the required parameter 'policy_spec' is set
        if self.api_client.client_side_validation and ('policy_spec' not in local_var_params or  # noqa: E501
                                                        local_var_params['policy_spec'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `policy_spec` when calling `set_policy`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'policy_spec' in local_var_params:
            body_params = local_var_params['policy_spec']
        # 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 = ['token-valid']  # noqa: E501

        return self.api_client.call_api(
            '/v1/issuers/issuer_extensions/{issuer_id}/set_auth_policy', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Policy',  # 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)
