/* 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.
 */

/**
 * KubernetesServiceConnection Serializer
 * @export
 * @interface KubernetesServiceConnectionRequest
 */
export interface KubernetesServiceConnectionRequest {
    /**
     *
     * @type {string}
     * @memberof KubernetesServiceConnectionRequest
     */
    name: string;
    /**
     * If enabled, use the local connection. Required Docker socket/Kubernetes Integration
     * @type {boolean}
     * @memberof KubernetesServiceConnectionRequest
     */
    local?: boolean;
    /**
     * Paste your kubeconfig here. authentik will automatically use the currently selected context.
     * @type {{ [key: string]: any; }}
     * @memberof KubernetesServiceConnectionRequest
     */
    kubeconfig?: { [key: string]: any };
    /**
     * Verify SSL Certificates of the Kubernetes API endpoint
     * @type {boolean}
     * @memberof KubernetesServiceConnectionRequest
     */
    verifySsl?: boolean;
}

/**
 * Check if a given object implements the KubernetesServiceConnectionRequest interface.
 */
export function instanceOfKubernetesServiceConnectionRequest(
    value: object,
): value is KubernetesServiceConnectionRequest {
    if (!("name" in value) || value["name"] === undefined) return false;
    return true;
}

export function KubernetesServiceConnectionRequestFromJSON(
    json: any,
): KubernetesServiceConnectionRequest {
    return KubernetesServiceConnectionRequestFromJSONTyped(json, false);
}

export function KubernetesServiceConnectionRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): KubernetesServiceConnectionRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        local: json["local"] == null ? undefined : json["local"],
        kubeconfig: json["kubeconfig"] == null ? undefined : json["kubeconfig"],
        verifySsl: json["verify_ssl"] == null ? undefined : json["verify_ssl"],
    };
}

export function KubernetesServiceConnectionRequestToJSON(
    json: any,
): KubernetesServiceConnectionRequest {
    return KubernetesServiceConnectionRequestToJSONTyped(json, false);
}

export function KubernetesServiceConnectionRequestToJSONTyped(
    value?: KubernetesServiceConnectionRequest | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {
        name: value["name"],
        local: value["local"],
        kubeconfig: value["kubeconfig"],
        verify_ssl: value["verifySsl"],
    };
}
