/* 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 GlobalTaskStatus
 */
export interface GlobalTaskStatus {
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly queued: number;
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly consumed: number;
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly preprocess: number;
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly running: number;
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly postprocess: number;
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly rejected: number;
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly done: number;
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly info: number;
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly warning: number;
    /**
     *
     * @type {number}
     * @memberof GlobalTaskStatus
     */
    readonly error: number;
}

/**
 * Check if a given object implements the GlobalTaskStatus interface.
 */
export function instanceOfGlobalTaskStatus(value: object): value is GlobalTaskStatus {
    if (!("queued" in value) || value["queued"] === undefined) return false;
    if (!("consumed" in value) || value["consumed"] === undefined) return false;
    if (!("preprocess" in value) || value["preprocess"] === undefined) return false;
    if (!("running" in value) || value["running"] === undefined) return false;
    if (!("postprocess" in value) || value["postprocess"] === undefined) return false;
    if (!("rejected" in value) || value["rejected"] === undefined) return false;
    if (!("done" in value) || value["done"] === undefined) return false;
    if (!("info" in value) || value["info"] === undefined) return false;
    if (!("warning" in value) || value["warning"] === undefined) return false;
    if (!("error" in value) || value["error"] === undefined) return false;
    return true;
}

export function GlobalTaskStatusFromJSON(json: any): GlobalTaskStatus {
    return GlobalTaskStatusFromJSONTyped(json, false);
}

export function GlobalTaskStatusFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): GlobalTaskStatus {
    if (json == null) {
        return json;
    }
    return {
        queued: json["queued"],
        consumed: json["consumed"],
        preprocess: json["preprocess"],
        running: json["running"],
        postprocess: json["postprocess"],
        rejected: json["rejected"],
        done: json["done"],
        info: json["info"],
        warning: json["warning"],
        error: json["error"],
    };
}

export function GlobalTaskStatusToJSON(json: any): GlobalTaskStatus {
    return GlobalTaskStatusToJSONTyped(json, false);
}

export function GlobalTaskStatusToJSONTyped(
    value?: Omit<
        GlobalTaskStatus,
        | "queued"
        | "consumed"
        | "preprocess"
        | "running"
        | "postprocess"
        | "rejected"
        | "done"
        | "info"
        | "warning"
        | "error"
    > | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {};
}
