"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.0-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 {
    /**
     * Outpost Viewset
     */
    async outpostsInstancesCreateRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.OutpostRequestToJSON)(requestParameters['outpostRequest']),
        }, 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();
    }
    /**
     * Global default outpost config
     */
    async outpostsInstancesDefaultSettingsRetrieveRaw(initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesDestroyRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesDestroy(requestParameters, initOverrides) {
        await this.outpostsInstancesDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * Get outposts current health
     */
    async outpostsInstancesHealthListRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesListRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesPartialUpdateRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedOutpostRequestToJSON)(requestParameters['patchedOutpostRequest']),
        }, 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();
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesRetrieveRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * Outpost Viewset
     */
    async outpostsInstancesUpdateRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.OutpostRequestToJSON)(requestParameters['outpostRequest']),
        }, 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();
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsInstancesUsedByListRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * Check access to a single application by slug
     */
    async outpostsLdapAccessCheckRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * LDAPProvider Viewset
     */
    async outpostsLdapListRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * ProxyProvider Viewset
     */
    async outpostsProxyListRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * Check access to a single application by slug
     */
    async outpostsRadiusAccessCheckRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * RadiusProvider Viewset
     */
    async outpostsRadiusListRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllDestroyRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllDestroy(requestParameters, initOverrides) {
        await this.outpostsServiceConnectionsAllDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllListRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllRetrieveRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * Get the service connection\'s state
     */
    async outpostsServiceConnectionsAllStateRetrieveRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * Get all creatable types
     */
    async outpostsServiceConnectionsAllTypesListRaw(initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsAllUsedByListRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerCreateRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.DockerServiceConnectionRequestToJSON)(requestParameters['dockerServiceConnectionRequest']),
        }, 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();
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerDestroyRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerDestroy(requestParameters, initOverrides) {
        await this.outpostsServiceConnectionsDockerDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerListRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerPartialUpdateRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedDockerServiceConnectionRequestToJSON)(requestParameters['patchedDockerServiceConnectionRequest']),
        }, 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();
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerRetrieveRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerUpdateRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.DockerServiceConnectionRequestToJSON)(requestParameters['dockerServiceConnectionRequest']),
        }, 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();
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsDockerUsedByListRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesCreateRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.KubernetesServiceConnectionRequestToJSON)(requestParameters['kubernetesServiceConnectionRequest']),
        }, 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();
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesDestroyRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesDestroy(requestParameters, initOverrides) {
        await this.outpostsServiceConnectionsKubernetesDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesListRaw(requestParameters, initOverrides) {
        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/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesPartialUpdateRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedKubernetesServiceConnectionRequestToJSON)(requestParameters['patchedKubernetesServiceConnectionRequest']),
        }, 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();
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesRetrieveRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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();
    }
    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesUpdateRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.KubernetesServiceConnectionRequestToJSON)(requestParameters['kubernetesServiceConnectionRequest']),
        }, 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();
    }
    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsKubernetesUsedByListRaw(requestParameters, initOverrides) {
        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'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, 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