/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.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.
 */

import type {
    DockerServiceConnection,
    DockerServiceConnectionRequest,
    KubernetesServiceConnection,
    KubernetesServiceConnectionRequest,
    LDAPCheckAccess,
    Outpost,
    OutpostDefaultConfig,
    OutpostHealth,
    OutpostRequest,
    PaginatedDockerServiceConnectionList,
    PaginatedKubernetesServiceConnectionList,
    PaginatedLDAPOutpostConfigList,
    PaginatedOutpostList,
    PaginatedProxyOutpostConfigList,
    PaginatedRadiusOutpostConfigList,
    PaginatedServiceConnectionList,
    PatchedDockerServiceConnectionRequest,
    PatchedKubernetesServiceConnectionRequest,
    PatchedOutpostRequest,
    RadiusCheckAccess,
    ServiceConnection,
    ServiceConnectionState,
    TypeCreate,
    UsedBy,
} from "../models/index";
import {
    DockerServiceConnectionFromJSON,
    DockerServiceConnectionRequestToJSON,
    KubernetesServiceConnectionFromJSON,
    KubernetesServiceConnectionRequestToJSON,
    LDAPCheckAccessFromJSON,
    OutpostDefaultConfigFromJSON,
    OutpostFromJSON,
    OutpostHealthFromJSON,
    OutpostRequestToJSON,
    PaginatedDockerServiceConnectionListFromJSON,
    PaginatedKubernetesServiceConnectionListFromJSON,
    PaginatedLDAPOutpostConfigListFromJSON,
    PaginatedOutpostListFromJSON,
    PaginatedProxyOutpostConfigListFromJSON,
    PaginatedRadiusOutpostConfigListFromJSON,
    PaginatedServiceConnectionListFromJSON,
    PatchedDockerServiceConnectionRequestToJSON,
    PatchedKubernetesServiceConnectionRequestToJSON,
    PatchedOutpostRequestToJSON,
    RadiusCheckAccessFromJSON,
    ServiceConnectionFromJSON,
    ServiceConnectionStateFromJSON,
    TypeCreateFromJSON,
    UsedByFromJSON,
} from "../models/index";
import * as runtime from "../runtime";

export interface OutpostsInstancesCreateRequest {
    outpostRequest: OutpostRequest;
}

export interface OutpostsInstancesDestroyRequest {
    uuid: string;
}

export interface OutpostsInstancesHealthListRequest {
    uuid: string;
    managedIcontains?: string;
    managedIexact?: string;
    nameIcontains?: string;
    nameIexact?: string;
    ordering?: string;
    providersIsnull?: boolean;
    providersByPk?: Array<number>;
    search?: string;
    serviceConnectionNameIcontains?: string;
    serviceConnectionNameIexact?: string;
}

export interface OutpostsInstancesListRequest {
    managedIcontains?: string;
    managedIexact?: string;
    nameIcontains?: string;
    nameIexact?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    providersIsnull?: boolean;
    providersByPk?: Array<number>;
    search?: string;
    serviceConnectionNameIcontains?: string;
    serviceConnectionNameIexact?: string;
}

export interface OutpostsInstancesPartialUpdateRequest {
    uuid: string;
    patchedOutpostRequest?: PatchedOutpostRequest;
}

export interface OutpostsInstancesRetrieveRequest {
    uuid: string;
}

export interface OutpostsInstancesUpdateRequest {
    uuid: string;
    outpostRequest: OutpostRequest;
}

export interface OutpostsInstancesUsedByListRequest {
    uuid: string;
}

export interface OutpostsLdapAccessCheckRequest {
    id: number;
    appSlug?: string;
}

export interface OutpostsLdapListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface OutpostsProxyListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface OutpostsRadiusAccessCheckRequest {
    id: number;
    appSlug?: string;
}

export interface OutpostsRadiusListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface OutpostsServiceConnectionsAllDestroyRequest {
    uuid: string;
}

export interface OutpostsServiceConnectionsAllListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface OutpostsServiceConnectionsAllRetrieveRequest {
    uuid: string;
}

export interface OutpostsServiceConnectionsAllStateRetrieveRequest {
    uuid: string;
}

export interface OutpostsServiceConnectionsAllUsedByListRequest {
    uuid: string;
}

export interface OutpostsServiceConnectionsDockerCreateRequest {
    dockerServiceConnectionRequest: DockerServiceConnectionRequest;
}

export interface OutpostsServiceConnectionsDockerDestroyRequest {
    uuid: string;
}

export interface OutpostsServiceConnectionsDockerListRequest {
    local?: boolean;
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
    tlsAuthentication?: string;
    tlsVerification?: string;
    url?: string;
}

export interface OutpostsServiceConnectionsDockerPartialUpdateRequest {
    uuid: string;
    patchedDockerServiceConnectionRequest?: PatchedDockerServiceConnectionRequest;
}

export interface OutpostsServiceConnectionsDockerRetrieveRequest {
    uuid: string;
}

export interface OutpostsServiceConnectionsDockerUpdateRequest {
    uuid: string;
    dockerServiceConnectionRequest: DockerServiceConnectionRequest;
}

export interface OutpostsServiceConnectionsDockerUsedByListRequest {
    uuid: string;
}

export interface OutpostsServiceConnectionsKubernetesCreateRequest {
    kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest;
}

export interface OutpostsServiceConnectionsKubernetesDestroyRequest {
    uuid: string;
}

export interface OutpostsServiceConnectionsKubernetesListRequest {
    local?: boolean;
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface OutpostsServiceConnectionsKubernetesPartialUpdateRequest {
    uuid: string;
    patchedKubernetesServiceConnectionRequest?: PatchedKubernetesServiceConnectionRequest;
}

export interface OutpostsServiceConnectionsKubernetesRetrieveRequest {
    uuid: string;
}

export interface OutpostsServiceConnectionsKubernetesUpdateRequest {
    uuid: string;
    kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest;
}

export interface OutpostsServiceConnectionsKubernetesUsedByListRequest {
    uuid: string;
}

/**
 *
 */
export class OutpostsApi extends runtime.BaseAPI {
    /**
     * Creates request options for outpostsInstancesCreate without sending the request
     */
    async outpostsInstancesCreateRequestOpts(
        requestParameters: OutpostsInstancesCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["outpostRequest"] == null) {
            throw new runtime.RequiredError(
                "outpostRequest",
                'Required parameter "outpostRequest" was null or undefined when calling outpostsInstancesCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostRequestToJSON(requestParameters["outpostRequest"]),
        };
    }

    /**
     * Outpost Viewset
     */
    async outpostsInstancesCreateRaw(
        requestParameters: OutpostsInstancesCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Outpost>> {
        const requestOptions = await this.outpostsInstancesCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => OutpostFromJSON(jsonValue));
    }

    /**
     * Outpost Viewset
     */
    async outpostsInstancesCreate(
        requestParameters: OutpostsInstancesCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Outpost> {
        const response = await this.outpostsInstancesCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsInstancesDefaultSettingsRetrieve without sending the request
     */
    async outpostsInstancesDefaultSettingsRetrieveRequestOpts(): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<OutpostDefaultConfig>> {
        const requestOptions = await this.outpostsInstancesDefaultSettingsRetrieveRequestOpts();
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            OutpostDefaultConfigFromJSON(jsonValue),
        );
    }

    /**
     * Global default outpost config
     */
    async outpostsInstancesDefaultSettingsRetrieve(
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<OutpostDefaultConfig> {
        const response = await this.outpostsInstancesDefaultSettingsRetrieveRaw(initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsInstancesDestroy without sending the request
     */
    async outpostsInstancesDestroyRequestOpts(
        requestParameters: OutpostsInstancesDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsInstancesDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsInstancesDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.outpostsInstancesDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Outpost Viewset
     */
    async outpostsInstancesDestroy(
        requestParameters: OutpostsInstancesDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.outpostsInstancesDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for outpostsInstancesHealthList without sending the request
     */
    async outpostsInstancesHealthListRequestOpts(
        requestParameters: OutpostsInstancesHealthListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsInstancesHealthList().',
            );
        }

        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        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: OutpostsInstancesHealthListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<OutpostHealth>>> {
        const requestOptions = await this.outpostsInstancesHealthListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            jsonValue.map(OutpostHealthFromJSON),
        );
    }

    /**
     * Get outposts current health
     */
    async outpostsInstancesHealthList(
        requestParameters: OutpostsInstancesHealthListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<OutpostHealth>> {
        const response = await this.outpostsInstancesHealthListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsInstancesList without sending the request
     */
    async outpostsInstancesListRequestOpts(
        requestParameters: OutpostsInstancesListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        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: OutpostsInstancesListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedOutpostList>> {
        const requestOptions = await this.outpostsInstancesListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedOutpostListFromJSON(jsonValue),
        );
    }

    /**
     * Outpost Viewset
     */
    async outpostsInstancesList(
        requestParameters: OutpostsInstancesListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedOutpostList> {
        const response = await this.outpostsInstancesListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsInstancesPartialUpdate without sending the request
     */
    async outpostsInstancesPartialUpdateRequestOpts(
        requestParameters: OutpostsInstancesPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsInstancesPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: PatchedOutpostRequestToJSON(requestParameters["patchedOutpostRequest"]),
        };
    }

    /**
     * Outpost Viewset
     */
    async outpostsInstancesPartialUpdateRaw(
        requestParameters: OutpostsInstancesPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Outpost>> {
        const requestOptions =
            await this.outpostsInstancesPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => OutpostFromJSON(jsonValue));
    }

    /**
     * Outpost Viewset
     */
    async outpostsInstancesPartialUpdate(
        requestParameters: OutpostsInstancesPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Outpost> {
        const response = await this.outpostsInstancesPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsInstancesRetrieve without sending the request
     */
    async outpostsInstancesRetrieveRequestOpts(
        requestParameters: OutpostsInstancesRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsInstancesRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsInstancesRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Outpost>> {
        const requestOptions = await this.outpostsInstancesRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => OutpostFromJSON(jsonValue));
    }

    /**
     * Outpost Viewset
     */
    async outpostsInstancesRetrieve(
        requestParameters: OutpostsInstancesRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Outpost> {
        const response = await this.outpostsInstancesRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsInstancesUpdate without sending the request
     */
    async outpostsInstancesUpdateRequestOpts(
        requestParameters: OutpostsInstancesUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        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: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostRequestToJSON(requestParameters["outpostRequest"]),
        };
    }

    /**
     * Outpost Viewset
     */
    async outpostsInstancesUpdateRaw(
        requestParameters: OutpostsInstancesUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Outpost>> {
        const requestOptions = await this.outpostsInstancesUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => OutpostFromJSON(jsonValue));
    }

    /**
     * Outpost Viewset
     */
    async outpostsInstancesUpdate(
        requestParameters: OutpostsInstancesUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Outpost> {
        const response = await this.outpostsInstancesUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsInstancesUsedByList without sending the request
     */
    async outpostsInstancesUsedByListRequestOpts(
        requestParameters: OutpostsInstancesUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsInstancesUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsInstancesUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.outpostsInstancesUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async outpostsInstancesUsedByList(
        requestParameters: OutpostsInstancesUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.outpostsInstancesUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsLdapAccessCheck without sending the request
     */
    async outpostsLdapAccessCheckRequestOpts(
        requestParameters: OutpostsLdapAccessCheckRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling outpostsLdapAccessCheck().',
            );
        }

        const queryParameters: any = {};

        if (requestParameters["appSlug"] != null) {
            queryParameters["app_slug"] = requestParameters["appSlug"];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsLdapAccessCheckRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<LDAPCheckAccess>> {
        const requestOptions = await this.outpostsLdapAccessCheckRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            LDAPCheckAccessFromJSON(jsonValue),
        );
    }

    /**
     * Check access to a single application by slug
     */
    async outpostsLdapAccessCheck(
        requestParameters: OutpostsLdapAccessCheckRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<LDAPCheckAccess> {
        const response = await this.outpostsLdapAccessCheckRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsLdapList without sending the request
     */
    async outpostsLdapListRequestOpts(
        requestParameters: OutpostsLdapListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        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: OutpostsLdapListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedLDAPOutpostConfigList>> {
        const requestOptions = await this.outpostsLdapListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedLDAPOutpostConfigListFromJSON(jsonValue),
        );
    }

    /**
     * LDAPProvider Viewset
     */
    async outpostsLdapList(
        requestParameters: OutpostsLdapListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedLDAPOutpostConfigList> {
        const response = await this.outpostsLdapListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsProxyList without sending the request
     */
    async outpostsProxyListRequestOpts(
        requestParameters: OutpostsProxyListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        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: OutpostsProxyListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedProxyOutpostConfigList>> {
        const requestOptions = await this.outpostsProxyListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedProxyOutpostConfigListFromJSON(jsonValue),
        );
    }

    /**
     * ProxyProvider Viewset
     */
    async outpostsProxyList(
        requestParameters: OutpostsProxyListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedProxyOutpostConfigList> {
        const response = await this.outpostsProxyListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsRadiusAccessCheck without sending the request
     */
    async outpostsRadiusAccessCheckRequestOpts(
        requestParameters: OutpostsRadiusAccessCheckRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling outpostsRadiusAccessCheck().',
            );
        }

        const queryParameters: any = {};

        if (requestParameters["appSlug"] != null) {
            queryParameters["app_slug"] = requestParameters["appSlug"];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsRadiusAccessCheckRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<RadiusCheckAccess>> {
        const requestOptions = await this.outpostsRadiusAccessCheckRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            RadiusCheckAccessFromJSON(jsonValue),
        );
    }

    /**
     * Check access to a single application by slug
     */
    async outpostsRadiusAccessCheck(
        requestParameters: OutpostsRadiusAccessCheckRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<RadiusCheckAccess> {
        const response = await this.outpostsRadiusAccessCheckRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsRadiusList without sending the request
     */
    async outpostsRadiusListRequestOpts(
        requestParameters: OutpostsRadiusListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        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: OutpostsRadiusListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedRadiusOutpostConfigList>> {
        const requestOptions = await this.outpostsRadiusListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedRadiusOutpostConfigListFromJSON(jsonValue),
        );
    }

    /**
     * RadiusProvider Viewset
     */
    async outpostsRadiusList(
        requestParameters: OutpostsRadiusListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedRadiusOutpostConfigList> {
        const response = await this.outpostsRadiusListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsAllDestroy without sending the request
     */
    async outpostsServiceConnectionsAllDestroyRequestOpts(
        requestParameters: OutpostsServiceConnectionsAllDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsAllDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.outpostsServiceConnectionsAllDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllDestroy(
        requestParameters: OutpostsServiceConnectionsAllDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.outpostsServiceConnectionsAllDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for outpostsServiceConnectionsAllList without sending the request
     */
    async outpostsServiceConnectionsAllListRequestOpts(
        requestParameters: OutpostsServiceConnectionsAllListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsAllListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedServiceConnectionList>> {
        const requestOptions =
            await this.outpostsServiceConnectionsAllListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedServiceConnectionListFromJSON(jsonValue),
        );
    }

    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllList(
        requestParameters: OutpostsServiceConnectionsAllListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedServiceConnectionList> {
        const response = await this.outpostsServiceConnectionsAllListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsAllRetrieve without sending the request
     */
    async outpostsServiceConnectionsAllRetrieveRequestOpts(
        requestParameters: OutpostsServiceConnectionsAllRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsAllRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<ServiceConnection>> {
        const requestOptions =
            await this.outpostsServiceConnectionsAllRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            ServiceConnectionFromJSON(jsonValue),
        );
    }

    /**
     * ServiceConnection Viewset
     */
    async outpostsServiceConnectionsAllRetrieve(
        requestParameters: OutpostsServiceConnectionsAllRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<ServiceConnection> {
        const response = await this.outpostsServiceConnectionsAllRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsAllStateRetrieve without sending the request
     */
    async outpostsServiceConnectionsAllStateRetrieveRequestOpts(
        requestParameters: OutpostsServiceConnectionsAllStateRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllStateRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsAllStateRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<ServiceConnectionState>> {
        const requestOptions =
            await this.outpostsServiceConnectionsAllStateRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            ServiceConnectionStateFromJSON(jsonValue),
        );
    }

    /**
     * Get the service connection\'s state
     */
    async outpostsServiceConnectionsAllStateRetrieve(
        requestParameters: OutpostsServiceConnectionsAllStateRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<ServiceConnectionState> {
        const response = await this.outpostsServiceConnectionsAllStateRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsAllTypesList without sending the request
     */
    async outpostsServiceConnectionsAllTypesListRequestOpts(): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<TypeCreate>>> {
        const requestOptions = await this.outpostsServiceConnectionsAllTypesListRequestOpts();
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            jsonValue.map(TypeCreateFromJSON),
        );
    }

    /**
     * Get all creatable types
     */
    async outpostsServiceConnectionsAllTypesList(
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<TypeCreate>> {
        const response = await this.outpostsServiceConnectionsAllTypesListRaw(initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsAllUsedByList without sending the request
     */
    async outpostsServiceConnectionsAllUsedByListRequestOpts(
        requestParameters: OutpostsServiceConnectionsAllUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsAllUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.outpostsServiceConnectionsAllUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsAllUsedByList(
        requestParameters: OutpostsServiceConnectionsAllUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.outpostsServiceConnectionsAllUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsDockerCreate without sending the request
     */
    async outpostsServiceConnectionsDockerCreateRequestOpts(
        requestParameters: OutpostsServiceConnectionsDockerCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["dockerServiceConnectionRequest"] == null) {
            throw new runtime.RequiredError(
                "dockerServiceConnectionRequest",
                'Required parameter "dockerServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsDockerCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: DockerServiceConnectionRequestToJSON(
                requestParameters["dockerServiceConnectionRequest"],
            ),
        };
    }

    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerCreateRaw(
        requestParameters: OutpostsServiceConnectionsDockerCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DockerServiceConnection>> {
        const requestOptions =
            await this.outpostsServiceConnectionsDockerCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            DockerServiceConnectionFromJSON(jsonValue),
        );
    }

    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerCreate(
        requestParameters: OutpostsServiceConnectionsDockerCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DockerServiceConnection> {
        const response = await this.outpostsServiceConnectionsDockerCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsDockerDestroy without sending the request
     */
    async outpostsServiceConnectionsDockerDestroyRequestOpts(
        requestParameters: OutpostsServiceConnectionsDockerDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsDockerDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.outpostsServiceConnectionsDockerDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerDestroy(
        requestParameters: OutpostsServiceConnectionsDockerDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.outpostsServiceConnectionsDockerDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for outpostsServiceConnectionsDockerList without sending the request
     */
    async outpostsServiceConnectionsDockerListRequestOpts(
        requestParameters: OutpostsServiceConnectionsDockerListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsDockerListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedDockerServiceConnectionList>> {
        const requestOptions =
            await this.outpostsServiceConnectionsDockerListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedDockerServiceConnectionListFromJSON(jsonValue),
        );
    }

    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerList(
        requestParameters: OutpostsServiceConnectionsDockerListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedDockerServiceConnectionList> {
        const response = await this.outpostsServiceConnectionsDockerListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsDockerPartialUpdate without sending the request
     */
    async outpostsServiceConnectionsDockerPartialUpdateRequestOpts(
        requestParameters: OutpostsServiceConnectionsDockerPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: PatchedDockerServiceConnectionRequestToJSON(
                requestParameters["patchedDockerServiceConnectionRequest"],
            ),
        };
    }

    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerPartialUpdateRaw(
        requestParameters: OutpostsServiceConnectionsDockerPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DockerServiceConnection>> {
        const requestOptions =
            await this.outpostsServiceConnectionsDockerPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            DockerServiceConnectionFromJSON(jsonValue),
        );
    }

    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerPartialUpdate(
        requestParameters: OutpostsServiceConnectionsDockerPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DockerServiceConnection> {
        const response = await this.outpostsServiceConnectionsDockerPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsDockerRetrieve without sending the request
     */
    async outpostsServiceConnectionsDockerRetrieveRequestOpts(
        requestParameters: OutpostsServiceConnectionsDockerRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsDockerRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DockerServiceConnection>> {
        const requestOptions =
            await this.outpostsServiceConnectionsDockerRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            DockerServiceConnectionFromJSON(jsonValue),
        );
    }

    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerRetrieve(
        requestParameters: OutpostsServiceConnectionsDockerRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DockerServiceConnection> {
        const response = await this.outpostsServiceConnectionsDockerRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsDockerUpdate without sending the request
     */
    async outpostsServiceConnectionsDockerUpdateRequestOpts(
        requestParameters: OutpostsServiceConnectionsDockerUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        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: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: DockerServiceConnectionRequestToJSON(
                requestParameters["dockerServiceConnectionRequest"],
            ),
        };
    }

    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerUpdateRaw(
        requestParameters: OutpostsServiceConnectionsDockerUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DockerServiceConnection>> {
        const requestOptions =
            await this.outpostsServiceConnectionsDockerUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            DockerServiceConnectionFromJSON(jsonValue),
        );
    }

    /**
     * DockerServiceConnection Viewset
     */
    async outpostsServiceConnectionsDockerUpdate(
        requestParameters: OutpostsServiceConnectionsDockerUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DockerServiceConnection> {
        const response = await this.outpostsServiceConnectionsDockerUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsDockerUsedByList without sending the request
     */
    async outpostsServiceConnectionsDockerUsedByListRequestOpts(
        requestParameters: OutpostsServiceConnectionsDockerUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsDockerUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.outpostsServiceConnectionsDockerUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsDockerUsedByList(
        requestParameters: OutpostsServiceConnectionsDockerUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.outpostsServiceConnectionsDockerUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsKubernetesCreate without sending the request
     */
    async outpostsServiceConnectionsKubernetesCreateRequestOpts(
        requestParameters: OutpostsServiceConnectionsKubernetesCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["kubernetesServiceConnectionRequest"] == null) {
            throw new runtime.RequiredError(
                "kubernetesServiceConnectionRequest",
                'Required parameter "kubernetesServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsKubernetesCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: KubernetesServiceConnectionRequestToJSON(
                requestParameters["kubernetesServiceConnectionRequest"],
            ),
        };
    }

    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesCreateRaw(
        requestParameters: OutpostsServiceConnectionsKubernetesCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<KubernetesServiceConnection>> {
        const requestOptions =
            await this.outpostsServiceConnectionsKubernetesCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            KubernetesServiceConnectionFromJSON(jsonValue),
        );
    }

    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesCreate(
        requestParameters: OutpostsServiceConnectionsKubernetesCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<KubernetesServiceConnection> {
        const response = await this.outpostsServiceConnectionsKubernetesCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsKubernetesDestroy without sending the request
     */
    async outpostsServiceConnectionsKubernetesDestroyRequestOpts(
        requestParameters: OutpostsServiceConnectionsKubernetesDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsKubernetesDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.outpostsServiceConnectionsKubernetesDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesDestroy(
        requestParameters: OutpostsServiceConnectionsKubernetesDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.outpostsServiceConnectionsKubernetesDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for outpostsServiceConnectionsKubernetesList without sending the request
     */
    async outpostsServiceConnectionsKubernetesListRequestOpts(
        requestParameters: OutpostsServiceConnectionsKubernetesListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsKubernetesListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedKubernetesServiceConnectionList>> {
        const requestOptions =
            await this.outpostsServiceConnectionsKubernetesListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedKubernetesServiceConnectionListFromJSON(jsonValue),
        );
    }

    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesList(
        requestParameters: OutpostsServiceConnectionsKubernetesListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedKubernetesServiceConnectionList> {
        const response = await this.outpostsServiceConnectionsKubernetesListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsKubernetesPartialUpdate without sending the request
     */
    async outpostsServiceConnectionsKubernetesPartialUpdateRequestOpts(
        requestParameters: OutpostsServiceConnectionsKubernetesPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: PatchedKubernetesServiceConnectionRequestToJSON(
                requestParameters["patchedKubernetesServiceConnectionRequest"],
            ),
        };
    }

    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesPartialUpdateRaw(
        requestParameters: OutpostsServiceConnectionsKubernetesPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<KubernetesServiceConnection>> {
        const requestOptions =
            await this.outpostsServiceConnectionsKubernetesPartialUpdateRequestOpts(
                requestParameters,
            );
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            KubernetesServiceConnectionFromJSON(jsonValue),
        );
    }

    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesPartialUpdate(
        requestParameters: OutpostsServiceConnectionsKubernetesPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<KubernetesServiceConnection> {
        const response = await this.outpostsServiceConnectionsKubernetesPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsKubernetesRetrieve without sending the request
     */
    async outpostsServiceConnectionsKubernetesRetrieveRequestOpts(
        requestParameters: OutpostsServiceConnectionsKubernetesRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsKubernetesRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<KubernetesServiceConnection>> {
        const requestOptions =
            await this.outpostsServiceConnectionsKubernetesRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            KubernetesServiceConnectionFromJSON(jsonValue),
        );
    }

    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesRetrieve(
        requestParameters: OutpostsServiceConnectionsKubernetesRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<KubernetesServiceConnection> {
        const response = await this.outpostsServiceConnectionsKubernetesRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsKubernetesUpdate without sending the request
     */
    async outpostsServiceConnectionsKubernetesUpdateRequestOpts(
        requestParameters: OutpostsServiceConnectionsKubernetesUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        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: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: KubernetesServiceConnectionRequestToJSON(
                requestParameters["kubernetesServiceConnectionRequest"],
            ),
        };
    }

    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesUpdateRaw(
        requestParameters: OutpostsServiceConnectionsKubernetesUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<KubernetesServiceConnection>> {
        const requestOptions =
            await this.outpostsServiceConnectionsKubernetesUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            KubernetesServiceConnectionFromJSON(jsonValue),
        );
    }

    /**
     * KubernetesServiceConnection Viewset
     */
    async outpostsServiceConnectionsKubernetesUpdate(
        requestParameters: OutpostsServiceConnectionsKubernetesUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<KubernetesServiceConnection> {
        const response = await this.outpostsServiceConnectionsKubernetesUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for outpostsServiceConnectionsKubernetesUsedByList without sending the request
     */
    async outpostsServiceConnectionsKubernetesUsedByListRequestOpts(
        requestParameters: OutpostsServiceConnectionsKubernetesUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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: OutpostsServiceConnectionsKubernetesUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.outpostsServiceConnectionsKubernetesUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async outpostsServiceConnectionsKubernetesUsedByList(
        requestParameters: OutpostsServiceConnectionsKubernetesUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.outpostsServiceConnectionsKubernetesUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }
}
