/* 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 KubernetesServiceConnection
 */
export interface KubernetesServiceConnection {
    /**
     *
     * @type {string}
     * @memberof KubernetesServiceConnection
     */
    readonly pk: string;
    /**
     *
     * @type {string}
     * @memberof KubernetesServiceConnection
     */
    name: string;
    /**
     * If enabled, use the local connection. Required Docker socket/Kubernetes Integration
     * @type {boolean}
     * @memberof KubernetesServiceConnection
     */
    local?: boolean;
    /**
     *
     * @type {string}
     * @memberof KubernetesServiceConnection
     */
    readonly component: string;
    /**
     * Return object's verbose_name
     * @type {string}
     * @memberof KubernetesServiceConnection
     */
    readonly verboseName: string;
    /**
     * Return object's plural verbose_name
     * @type {string}
     * @memberof KubernetesServiceConnection
     */
    readonly verboseNamePlural: string;
    /**
     * Return internal model name
     * @type {string}
     * @memberof KubernetesServiceConnection
     */
    readonly metaModelName: string;
    /**
     * Paste your kubeconfig here. authentik will automatically use the currently selected context.
     * @type {{ [key: string]: any; }}
     * @memberof KubernetesServiceConnection
     */
    kubeconfig?: { [key: string]: any };
    /**
     * Verify SSL Certificates of the Kubernetes API endpoint
     * @type {boolean}
     * @memberof KubernetesServiceConnection
     */
    verifySsl?: boolean;
}

/**
 * Check if a given object implements the KubernetesServiceConnection interface.
 */
export function instanceOfKubernetesServiceConnection(
    value: object,
): value is KubernetesServiceConnection {
    if (!("pk" in value) || value["pk"] === undefined) return false;
    if (!("name" in value) || value["name"] === undefined) return false;
    if (!("component" in value) || value["component"] === undefined) return false;
    if (!("verboseName" in value) || value["verboseName"] === undefined) return false;
    if (!("verboseNamePlural" in value) || value["verboseNamePlural"] === undefined) return false;
    if (!("metaModelName" in value) || value["metaModelName"] === undefined) return false;
    return true;
}

export function KubernetesServiceConnectionFromJSON(json: any): KubernetesServiceConnection {
    return KubernetesServiceConnectionFromJSONTyped(json, false);
}

export function KubernetesServiceConnectionFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): KubernetesServiceConnection {
    if (json == null) {
        return json;
    }
    return {
        pk: json["pk"],
        name: json["name"],
        local: json["local"] == null ? undefined : json["local"],
        component: json["component"],
        verboseName: json["verbose_name"],
        verboseNamePlural: json["verbose_name_plural"],
        metaModelName: json["meta_model_name"],
        kubeconfig: json["kubeconfig"] == null ? undefined : json["kubeconfig"],
        verifySsl: json["verify_ssl"] == null ? undefined : json["verify_ssl"],
    };
}

export function KubernetesServiceConnectionToJSON(json: any): KubernetesServiceConnection {
    return KubernetesServiceConnectionToJSONTyped(json, false);
}

export function KubernetesServiceConnectionToJSONTyped(
    value?: Omit<
        KubernetesServiceConnection,
        "pk" | "component" | "verbose_name" | "verbose_name_plural" | "meta_model_name"
    > | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

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