/* 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 { ThemedUrls } from "./ThemedUrls";
import { ThemedUrlsFromJSON, ThemedUrlsToJSON } from "./ThemedUrls";

/**
 * Base serializer class which doesn't implement create/update methods
 * @export
 * @interface FileList
 */
export interface FileList {
    /**
     *
     * @type {string}
     * @memberof FileList
     */
    name: string;
    /**
     *
     * @type {string}
     * @memberof FileList
     */
    mimeType: string;
    /**
     *
     * @type {string}
     * @memberof FileList
     */
    url: string;
    /**
     *
     * @type {ThemedUrls}
     * @memberof FileList
     */
    themedUrls?: ThemedUrls | null;
}

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

export function FileListFromJSON(json: any): FileList {
    return FileListFromJSONTyped(json, false);
}

export function FileListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileList {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        mimeType: json["mime_type"],
        url: json["url"],
        themedUrls:
            json["themed_urls"] == null ? undefined : ThemedUrlsFromJSON(json["themed_urls"]),
    };
}

export function FileListToJSON(json: any): FileList {
    return FileListToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        mime_type: value["mimeType"],
        url: value["url"],
        themed_urls: ThemedUrlsToJSON(value["themedUrls"]),
    };
}
