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

import type { LogEvent } from "./LogEvent";
import { LogEventFromJSON } from "./LogEvent";

/**
 * Logs of an attempted blueprint import
 * @export
 * @interface BlueprintImportResult
 */
export interface BlueprintImportResult {
    /**
     *
     * @type {Array<LogEvent>}
     * @memberof BlueprintImportResult
     */
    readonly logs: Array<LogEvent>;
    /**
     *
     * @type {boolean}
     * @memberof BlueprintImportResult
     */
    readonly success: boolean;
}

/**
 * Check if a given object implements the BlueprintImportResult interface.
 */
export function instanceOfBlueprintImportResult(value: object): value is BlueprintImportResult {
    if (!("logs" in value) || value["logs"] === undefined) return false;
    if (!("success" in value) || value["success"] === undefined) return false;
    return true;
}

export function BlueprintImportResultFromJSON(json: any): BlueprintImportResult {
    return BlueprintImportResultFromJSONTyped(json, false);
}

export function BlueprintImportResultFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): BlueprintImportResult {
    if (json == null) {
        return json;
    }
    return {
        logs: (json["logs"] as Array<any>).map(LogEventFromJSON),
        success: json["success"],
    };
}

export function BlueprintImportResultToJSON(json: any): BlueprintImportResult {
    return BlueprintImportResultToJSONTyped(json, false);
}

export function BlueprintImportResultToJSONTyped(
    value?: Omit<BlueprintImportResult, "logs" | "success"> | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {};
}
