/* 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";

/**
 * Result of a single object sync
 * @export
 * @interface SyncObjectResult
 */
export interface SyncObjectResult {
    /**
     *
     * @type {Array<LogEvent>}
     * @memberof SyncObjectResult
     */
    readonly messages: Array<LogEvent>;
}

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

export function SyncObjectResultFromJSON(json: any): SyncObjectResult {
    return SyncObjectResultFromJSONTyped(json, false);
}

export function SyncObjectResultFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): SyncObjectResult {
    if (json == null) {
        return json;
    }
    return {
        messages: (json["messages"] as Array<any>).map(LogEventFromJSON),
    };
}

export function SyncObjectResultToJSON(json: any): SyncObjectResult {
    return SyncObjectResultToJSONTyped(json, false);
}

export function SyncObjectResultToJSONTyped(
    value?: Omit<SyncObjectResult, "messages"> | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {};
}
