/* 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 PatchedDockerServiceConnectionRequest
 */
export interface PatchedDockerServiceConnectionRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedDockerServiceConnectionRequest
     */
    name?: string;
    /**
     * If enabled, use the local connection. Required Docker socket/Kubernetes Integration
     * @type {boolean}
     * @memberof PatchedDockerServiceConnectionRequest
     */
    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 PatchedDockerServiceConnectionRequest
     */
    url?: string;
    /**
     * CA which the endpoint's Certificate is verified against. Can be left empty for no validation.
     * @type {string}
     * @memberof PatchedDockerServiceConnectionRequest
     */
    tlsVerification?: string | null;
    /**
     * Certificate/Key used for authentication. Can be left empty for no authentication.
     * @type {string}
     * @memberof PatchedDockerServiceConnectionRequest
     */
    tlsAuthentication?: string | null;
}

/**
 * Check if a given object implements the PatchedDockerServiceConnectionRequest interface.
 */
export function instanceOfPatchedDockerServiceConnectionRequest(
    value: object,
): value is PatchedDockerServiceConnectionRequest {
    return true;
}

export function PatchedDockerServiceConnectionRequestFromJSON(
    json: any,
): PatchedDockerServiceConnectionRequest {
    return PatchedDockerServiceConnectionRequestFromJSONTyped(json, false);
}

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

export function PatchedDockerServiceConnectionRequestToJSON(
    json: any,
): PatchedDockerServiceConnectionRequest {
    return PatchedDockerServiceConnectionRequestToJSONTyped(json, false);
}

export function PatchedDockerServiceConnectionRequestToJSONTyped(
    value?: PatchedDockerServiceConnectionRequest | 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"],
    };
}
