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

/**
 *
 * @export
 * @interface Worker
 */
export interface Worker {
    /**
     *
     * @type {string}
     * @memberof Worker
     */
    workerId: string;
    /**
     *
     * @type {string}
     * @memberof Worker
     */
    version: string;
    /**
     *
     * @type {boolean}
     * @memberof Worker
     */
    versionMatching: boolean;
}

/**
 * Check if a given object implements the Worker interface.
 */
export function instanceOfWorker(value: object): value is Worker {
    if (!("workerId" in value) || value["workerId"] === undefined) return false;
    if (!("version" in value) || value["version"] === undefined) return false;
    if (!("versionMatching" in value) || value["versionMatching"] === undefined) return false;
    return true;
}

export function WorkerFromJSON(json: any): Worker {
    return WorkerFromJSONTyped(json, false);
}

export function WorkerFromJSONTyped(json: any, ignoreDiscriminator: boolean): Worker {
    if (json == null) {
        return json;
    }
    return {
        workerId: json["worker_id"],
        version: json["version"],
        versionMatching: json["version_matching"],
    };
}

export function WorkerToJSON(json: any): Worker {
    return WorkerToJSONTyped(json, false);
}

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

    return {
        worker_id: value["workerId"],
        version: value["version"],
        version_matching: value["versionMatching"],
    };
}
