/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.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 { mapValues } from '../runtime';
import type { Metadata } from './Metadata';
import {
    MetadataFromJSON,
    MetadataFromJSONTyped,
    MetadataToJSON,
    MetadataToJSONTyped,
} from './Metadata';

/**
 * 
 * @export
 * @interface BlueprintFile
 */
export interface BlueprintFile {
    /**
     * 
     * @type {string}
     * @memberof BlueprintFile
     */
    path: string;
    /**
     * 
     * @type {Date}
     * @memberof BlueprintFile
     */
    lastM: Date;
    /**
     * 
     * @type {string}
     * @memberof BlueprintFile
     */
    hash: string;
    /**
     * 
     * @type {Metadata}
     * @memberof BlueprintFile
     */
    readonly meta: Metadata;
}

/**
 * Check if a given object implements the BlueprintFile interface.
 */
export function instanceOfBlueprintFile(value: object): value is BlueprintFile {
    if (!('path' in value) || value['path'] === undefined) return false;
    if (!('lastM' in value) || value['lastM'] === undefined) return false;
    if (!('hash' in value) || value['hash'] === undefined) return false;
    if (!('meta' in value) || value['meta'] === undefined) return false;
    return true;
}

export function BlueprintFileFromJSON(json: any): BlueprintFile {
    return BlueprintFileFromJSONTyped(json, false);
}

export function BlueprintFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlueprintFile {
    if (json == null) {
        return json;
    }
    return {
        
        'path': json['path'],
        'lastM': (new Date(json['last_m'])),
        'hash': json['hash'],
        'meta': MetadataFromJSON(json['meta']),
    };
}

export function BlueprintFileToJSON(json: any): BlueprintFile {
    return BlueprintFileToJSONTyped(json, false);
}

export function BlueprintFileToJSONTyped(value?: Omit<BlueprintFile, 'meta'> | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'path': value['path'],
        'last_m': ((value['lastM']).toISOString()),
        'hash': value['hash'],
    };
}

