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

/**
 * DockerServiceConnection Serializer
 * @export
 * @interface DockerServiceConnectionRequest
 */
export interface DockerServiceConnectionRequest {
    /**
     *
     * @type {string}
     * @memberof DockerServiceConnectionRequest
     */
    name: string;
    /**
     * If enabled, use the local connection. Required Docker socket/Kubernetes Integration
     * @type {boolean}
     * @memberof DockerServiceConnectionRequest
     */
    local?: boolean;
    /**
     * Can be in the format of 'unix://<path>' when connecting to a local docker daemon, or 'https://<hostname>:2376' when connecting to a remote system.
     * @type {string}
     * @memberof DockerServiceConnectionRequest
     */
    url: string;
    /**
     * CA which the endpoint's Certificate is verified against. Can be left empty for no validation.
     * @type {string}
     * @memberof DockerServiceConnectionRequest
     */
    tlsVerification?: string | null;
    /**
     * Certificate/Key used for authentication. Can be left empty for no authentication.
     * @type {string}
     * @memberof DockerServiceConnectionRequest
     */
    tlsAuthentication?: string | null;
}

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

export function DockerServiceConnectionRequestFromJSON(json: any): DockerServiceConnectionRequest {
    return DockerServiceConnectionRequestFromJSONTyped(json, false);
}

export function DockerServiceConnectionRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): DockerServiceConnectionRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        local: json["local"] == null ? undefined : json["local"],
        url: json["url"],
        tlsVerification: json["tls_verification"] == null ? undefined : json["tls_verification"],
        tlsAuthentication:
            json["tls_authentication"] == null ? undefined : json["tls_authentication"],
    };
}

export function DockerServiceConnectionRequestToJSON(json: any): DockerServiceConnectionRequest {
    return DockerServiceConnectionRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        local: value["local"],
        url: value["url"],
        tls_verification: value["tlsVerification"],
        tls_authentication: value["tlsAuthentication"],
    };
}
