"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.2-rc1
 * Contact: hello@goauthentik.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.OutpostsApi = void 0;
const runtime = __importStar(require("../runtime"));
const index_1 = require("../models/index");
/**
 *
 */
class OutpostsApi extends runtime.BaseAPI {
    /**
     * Creates request options for outpostsInstancesCreate without sending the request
     */
    async outpostsInstancesCreateRequestOpts(requestParameters) {
        if (requestParameters['outpostRequest'] == null) {
            throw new runtime.RequiredError('outpostRequest', 'Required parameter "outpostRequest" was null or undefined when calling outpostsInstancesCreate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/instances/`;
        return {
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.OutpostRequestToJSON)(requestParameters['outpostRequest']),
        };
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesCreateRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsInstancesCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OutpostFromJSON)(jsonValue));
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesCreate(requestParameters, initOverrides) {
        const response = await this.outpostsInstancesCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsInstancesDefaultSettingsRetrieve without sending the request
     */
    async outpostsInstancesDefaultSettingsRetrieveRequestOpts() {
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/instances/default_settings/`;
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Global default outpost config
     */
    async outpostsInstancesDefaultSettingsRetrieveRaw(initOverrides) {
        const requestOptions = await this.outpostsInstancesDefaultSettingsRetrieveRequestOpts();
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OutpostDefaultConfigFromJSON)(jsonValue));
    }
    /**
     * Global default outpost config
     */
    async outpostsInstancesDefaultSettingsRetrieve(initOverrides) {
        const response = await this.outpostsInstancesDefaultSettingsRetrieveRaw(initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsInstancesDestroy without sending the request
     */
    async outpostsInstancesDestroyRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsInstancesDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/instances/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesDestroyRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsInstancesDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesDestroy(requestParameters, initOverrides) {
        await this.outpostsInstancesDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * Creates request options for outpostsInstancesHealthList without sending the request
     */
    async outpostsInstancesHealthListRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsInstancesHealthList().');
        }
        const queryParameters = {};
        if (requestParameters['managedIcontains'] != null) {
            queryParameters['managed__icontains'] = requestParameters['managedIcontains'];
        }
        if (requestParameters['managedIexact'] != null) {
            queryParameters['managed__iexact'] = requestParameters['managedIexact'];
        }
        if (requestParameters['nameIcontains'] != null) {
            queryParameters['name__icontains'] = requestParameters['nameIcontains'];
        }
        if (requestParameters['nameIexact'] != null) {
            queryParameters['name__iexact'] = requestParameters['nameIexact'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['providersIsnull'] != null) {
            queryParameters['providers__isnull'] = requestParameters['providersIsnull'];
        }
        if (requestParameters['providersByPk'] != null) {
            queryParameters['providers_by_pk'] = requestParameters['providersByPk'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        if (requestParameters['serviceConnectionNameIcontains'] != null) {
            queryParameters['service_connection__name__icontains'] = requestParameters['serviceConnectionNameIcontains'];
        }
        if (requestParameters['serviceConnectionNameIexact'] != null) {
            queryParameters['service_connection__name__iexact'] = requestParameters['serviceConnectionNameIexact'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/instances/{uuid}/health/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Get outposts current health
     */
    async outpostsInstancesHealthListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsInstancesHealthListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.OutpostHealthFromJSON));
    }
    /**
     * Get outposts current health
     */
    async outpostsInstancesHealthList(requestParameters, initOverrides) {
        const response = await this.outpostsInstancesHealthListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsInstancesList without sending the request
     */
    async outpostsInstancesListRequestOpts(requestParameters) {
        const queryParameters = {};
        if (requestParameters['managedIcontains'] != null) {
            queryParameters['managed__icontains'] = requestParameters['managedIcontains'];
        }
        if (requestParameters['managedIexact'] != null) {
            queryParameters['managed__iexact'] = requestParameters['managedIexact'];
        }
        if (requestParameters['nameIcontains'] != null) {
            queryParameters['name__icontains'] = requestParameters['nameIcontains'];
        }
        if (requestParameters['nameIexact'] != null) {
            queryParameters['name__iexact'] = requestParameters['nameIexact'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['providersIsnull'] != null) {
            queryParameters['providers__isnull'] = requestParameters['providersIsnull'];
        }
        if (requestParameters['providersByPk'] != null) {
            queryParameters['providers_by_pk'] = requestParameters['providersByPk'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        if (requestParameters['serviceConnectionNameIcontains'] != null) {
            queryParameters['service_connection__name__icontains'] = requestParameters['serviceConnectionNameIcontains'];
        }
        if (requestParameters['serviceConnectionNameIexact'] != null) {
            queryParameters['service_connection__name__iexact'] = requestParameters['serviceConnectionNameIexact'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/instances/`;
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsInstancesListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedOutpostListFromJSON)(jsonValue));
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesList(requestParameters = {}, initOverrides) {
        const response = await this.outpostsInstancesListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsInstancesPartialUpdate without sending the request
     */
    async outpostsInstancesPartialUpdateRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsInstancesPartialUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/instances/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedOutpostRequestToJSON)(requestParameters['patchedOutpostRequest']),
        };
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesPartialUpdateRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsInstancesPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OutpostFromJSON)(jsonValue));
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesPartialUpdate(requestParameters, initOverrides) {
        const response = await this.outpostsInstancesPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsInstancesRetrieve without sending the request
     */
    async outpostsInstancesRetrieveRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsInstancesRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/instances/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesRetrieveRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsInstancesRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OutpostFromJSON)(jsonValue));
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesRetrieve(requestParameters, initOverrides) {
        const response = await this.outpostsInstancesRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsInstancesUpdate without sending the request
     */
    async outpostsInstancesUpdateRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsInstancesUpdate().');
        }
        if (requestParameters['outpostRequest'] == null) {
            throw new runtime.RequiredError('outpostRequest', 'Required parameter "outpostRequest" was null or undefined when calling outpostsInstancesUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/instances/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.OutpostRequestToJSON)(requestParameters['outpostRequest']),
        };
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesUpdateRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsInstancesUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OutpostFromJSON)(jsonValue));
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesUpdate(requestParameters, initOverrides) {
        const response = await this.outpostsInstancesUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsInstancesUsedByList without sending the request
     */
    async outpostsInstancesUsedByListRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsInstancesUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/instances/{uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsInstancesUsedByListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsInstancesUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsInstancesUsedByList(requestParameters, initOverrides) {
        const response = await this.outpostsInstancesUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsLdapAccessCheck without sending the request
     */
    async outpostsLdapAccessCheckRequestOpts(requestParameters) {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling outpostsLdapAccessCheck().');
        }
        const queryParameters = {};
        if (requestParameters['appSlug'] != null) {
            queryParameters['app_slug'] = requestParameters['appSlug'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/ldap/{id}/check_access/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Check access to a single application by slug
     */
    async outpostsLdapAccessCheckRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsLdapAccessCheckRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LDAPCheckAccessFromJSON)(jsonValue));
    }
    /**
     * Check access to a single application by slug
     */
    async outpostsLdapAccessCheck(requestParameters, initOverrides) {
        const response = await this.outpostsLdapAccessCheckRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsLdapList without sending the request
     */
    async outpostsLdapListRequestOpts(requestParameters) {
        const queryParameters = {};
        if (requestParameters['name'] != null) {
            queryParameters['name'] = requestParameters['name'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/ldap/`;
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * LDAPProvider Viewset
     */
    async outpostsLdapListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsLdapListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedLDAPOutpostConfigListFromJSON)(jsonValue));
    }
    /**
     * LDAPProvider Viewset
     */
    async outpostsLdapList(requestParameters = {}, initOverrides) {
        const response = await this.outpostsLdapListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsProxyList without sending the request
     */
    async outpostsProxyListRequestOpts(requestParameters) {
        const queryParameters = {};
        if (requestParameters['name'] != null) {
            queryParameters['name'] = requestParameters['name'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/proxy/`;
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * ProxyProvider Viewset
     */
    async outpostsProxyListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsProxyListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedProxyOutpostConfigListFromJSON)(jsonValue));
    }
    /**
     * ProxyProvider Viewset
     */
    async outpostsProxyList(requestParameters = {}, initOverrides) {
        const response = await this.outpostsProxyListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsRadiusAccessCheck without sending the request
     */
    async outpostsRadiusAccessCheckRequestOpts(requestParameters) {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling outpostsRadiusAccessCheck().');
        }
        const queryParameters = {};
        if (requestParameters['appSlug'] != null) {
            queryParameters['app_slug'] = requestParameters['appSlug'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/radius/{id}/check_access/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Check access to a single application by slug
     */
    async outpostsRadiusAccessCheckRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsRadiusAccessCheckRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RadiusCheckAccessFromJSON)(jsonValue));
    }
    /**
     * Check access to a single application by slug
     */
    async outpostsRadiusAccessCheck(requestParameters, initOverrides) {
        const response = await this.outpostsRadiusAccessCheckRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsRadiusList without sending the request
     */
    async outpostsRadiusListRequestOpts(requestParameters) {
        const queryParameters = {};
        if (requestParameters['name'] != null) {
            queryParameters['name'] = requestParameters['name'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/radius/`;
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * RadiusProvider Viewset
     */
    async outpostsRadiusListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsRadiusListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedRadiusOutpostConfigListFromJSON)(jsonValue));
    }
    /**
     * RadiusProvider Viewset
     */
    async outpostsRadiusList(requestParameters = {}, initOverrides) {
        const response = await this.outpostsRadiusListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsAllDestroy without sending the request
     */
    async outpostsServiceConnectionsAllDestroyRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/all/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllDestroyRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsAllDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllDestroy(requestParameters, initOverrides) {
        await this.outpostsServiceConnectionsAllDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * Creates request options for outpostsServiceConnectionsAllList without sending the request
     */
    async outpostsServiceConnectionsAllListRequestOpts(requestParameters) {
        const queryParameters = {};
        if (requestParameters['name'] != null) {
            queryParameters['name'] = requestParameters['name'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/all/`;
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsAllListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedServiceConnectionListFromJSON)(jsonValue));
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllList(requestParameters = {}, initOverrides) {
        const response = await this.outpostsServiceConnectionsAllListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsAllRetrieve without sending the request
     */
    async outpostsServiceConnectionsAllRetrieveRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/all/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllRetrieveRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsAllRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ServiceConnectionFromJSON)(jsonValue));
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllRetrieve(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsAllRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsAllStateRetrieve without sending the request
     */
    async outpostsServiceConnectionsAllStateRetrieveRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllStateRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/all/{uuid}/state/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Get the service connection\'s state
     */
    async outpostsServiceConnectionsAllStateRetrieveRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsAllStateRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ServiceConnectionStateFromJSON)(jsonValue));
    }
    /**
     * Get the service connection\'s state
     */
    async outpostsServiceConnectionsAllStateRetrieve(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsAllStateRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsAllTypesList without sending the request
     */
    async outpostsServiceConnectionsAllTypesListRequestOpts() {
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/all/types/`;
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Get all creatable types
     */
    async outpostsServiceConnectionsAllTypesListRaw(initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsAllTypesListRequestOpts();
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.TypeCreateFromJSON));
    }
    /**
     * Get all creatable types
     */
    async outpostsServiceConnectionsAllTypesList(initOverrides) {
        const response = await this.outpostsServiceConnectionsAllTypesListRaw(initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsAllUsedByList without sending the request
     */
    async outpostsServiceConnectionsAllUsedByListRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/all/{uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsAllUsedByListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsAllUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsAllUsedByList(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsAllUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsDockerCreate without sending the request
     */
    async outpostsServiceConnectionsDockerCreateRequestOpts(requestParameters) {
        if (requestParameters['dockerServiceConnectionRequest'] == null) {
            throw new runtime.RequiredError('dockerServiceConnectionRequest', 'Required parameter "dockerServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsDockerCreate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/docker/`;
        return {
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.DockerServiceConnectionRequestToJSON)(requestParameters['dockerServiceConnectionRequest']),
        };
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerCreateRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsDockerCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DockerServiceConnectionFromJSON)(jsonValue));
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerCreate(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsDockerCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsDockerDestroy without sending the request
     */
    async outpostsServiceConnectionsDockerDestroyRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/docker/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerDestroyRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsDockerDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerDestroy(requestParameters, initOverrides) {
        await this.outpostsServiceConnectionsDockerDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * Creates request options for outpostsServiceConnectionsDockerList without sending the request
     */
    async outpostsServiceConnectionsDockerListRequestOpts(requestParameters) {
        const queryParameters = {};
        if (requestParameters['local'] != null) {
            queryParameters['local'] = requestParameters['local'];
        }
        if (requestParameters['name'] != null) {
            queryParameters['name'] = requestParameters['name'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        if (requestParameters['tlsAuthentication'] != null) {
            queryParameters['tls_authentication'] = requestParameters['tlsAuthentication'];
        }
        if (requestParameters['tlsVerification'] != null) {
            queryParameters['tls_verification'] = requestParameters['tlsVerification'];
        }
        if (requestParameters['url'] != null) {
            queryParameters['url'] = requestParameters['url'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/docker/`;
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsDockerListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedDockerServiceConnectionListFromJSON)(jsonValue));
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerList(requestParameters = {}, initOverrides) {
        const response = await this.outpostsServiceConnectionsDockerListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsDockerPartialUpdate without sending the request
     */
    async outpostsServiceConnectionsDockerPartialUpdateRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerPartialUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/docker/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedDockerServiceConnectionRequestToJSON)(requestParameters['patchedDockerServiceConnectionRequest']),
        };
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerPartialUpdateRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsDockerPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DockerServiceConnectionFromJSON)(jsonValue));
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerPartialUpdate(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsDockerPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsDockerRetrieve without sending the request
     */
    async outpostsServiceConnectionsDockerRetrieveRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/docker/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerRetrieveRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsDockerRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DockerServiceConnectionFromJSON)(jsonValue));
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerRetrieve(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsDockerRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsDockerUpdate without sending the request
     */
    async outpostsServiceConnectionsDockerUpdateRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerUpdate().');
        }
        if (requestParameters['dockerServiceConnectionRequest'] == null) {
            throw new runtime.RequiredError('dockerServiceConnectionRequest', 'Required parameter "dockerServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsDockerUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/docker/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.DockerServiceConnectionRequestToJSON)(requestParameters['dockerServiceConnectionRequest']),
        };
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerUpdateRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsDockerUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DockerServiceConnectionFromJSON)(jsonValue));
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerUpdate(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsDockerUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsDockerUsedByList without sending the request
     */
    async outpostsServiceConnectionsDockerUsedByListRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/docker/{uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsDockerUsedByListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsDockerUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsDockerUsedByList(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsDockerUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsKubernetesCreate without sending the request
     */
    async outpostsServiceConnectionsKubernetesCreateRequestOpts(requestParameters) {
        if (requestParameters['kubernetesServiceConnectionRequest'] == null) {
            throw new runtime.RequiredError('kubernetesServiceConnectionRequest', 'Required parameter "kubernetesServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsKubernetesCreate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/kubernetes/`;
        return {
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.KubernetesServiceConnectionRequestToJSON)(requestParameters['kubernetesServiceConnectionRequest']),
        };
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesCreateRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsKubernetesCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KubernetesServiceConnectionFromJSON)(jsonValue));
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesCreate(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsKubernetesCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsKubernetesDestroy without sending the request
     */
    async outpostsServiceConnectionsKubernetesDestroyRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/kubernetes/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesDestroyRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsKubernetesDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesDestroy(requestParameters, initOverrides) {
        await this.outpostsServiceConnectionsKubernetesDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * Creates request options for outpostsServiceConnectionsKubernetesList without sending the request
     */
    async outpostsServiceConnectionsKubernetesListRequestOpts(requestParameters) {
        const queryParameters = {};
        if (requestParameters['local'] != null) {
            queryParameters['local'] = requestParameters['local'];
        }
        if (requestParameters['name'] != null) {
            queryParameters['name'] = requestParameters['name'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/kubernetes/`;
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsKubernetesListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedKubernetesServiceConnectionListFromJSON)(jsonValue));
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesList(requestParameters = {}, initOverrides) {
        const response = await this.outpostsServiceConnectionsKubernetesListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsKubernetesPartialUpdate without sending the request
     */
    async outpostsServiceConnectionsKubernetesPartialUpdateRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesPartialUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/kubernetes/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedKubernetesServiceConnectionRequestToJSON)(requestParameters['patchedKubernetesServiceConnectionRequest']),
        };
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesPartialUpdateRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsKubernetesPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KubernetesServiceConnectionFromJSON)(jsonValue));
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesPartialUpdate(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsKubernetesPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsKubernetesRetrieve without sending the request
     */
    async outpostsServiceConnectionsKubernetesRetrieveRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/kubernetes/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesRetrieveRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsKubernetesRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KubernetesServiceConnectionFromJSON)(jsonValue));
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesRetrieve(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsKubernetesRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsKubernetesUpdate without sending the request
     */
    async outpostsServiceConnectionsKubernetesUpdateRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesUpdate().');
        }
        if (requestParameters['kubernetesServiceConnectionRequest'] == null) {
            throw new runtime.RequiredError('kubernetesServiceConnectionRequest', 'Required parameter "kubernetesServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsKubernetesUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/kubernetes/{uuid}/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.KubernetesServiceConnectionRequestToJSON)(requestParameters['kubernetesServiceConnectionRequest']),
        };
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesUpdateRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsKubernetesUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KubernetesServiceConnectionFromJSON)(jsonValue));
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesUpdate(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsKubernetesUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Creates request options for outpostsServiceConnectionsKubernetesUsedByList without sending the request
     */
    async outpostsServiceConnectionsKubernetesUsedByListRequestOpts(requestParameters) {
        if (requestParameters['uuid'] == null) {
            throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/outposts/service_connections/kubernetes/{uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid'])));
        return {
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        };
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsKubernetesUsedByListRaw(requestParameters, initOverrides) {
        const requestOptions = await this.outpostsServiceConnectionsKubernetesUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsKubernetesUsedByList(requestParameters, initOverrides) {
        const response = await this.outpostsServiceConnectionsKubernetesUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
exports.OutpostsApi = OutpostsApi;
//# sourceMappingURL=OutpostsApi.js.map