/* 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';
/**
 * VersionHistory Serializer
 * @export
 * @interface VersionHistory
 */
export interface VersionHistory {
    /**
     * 
     * @type {number}
     * @memberof VersionHistory
     */
    readonly id: number;
    /**
     * 
     * @type {Date}
     * @memberof VersionHistory
     */
    timestamp: Date;
    /**
     * 
     * @type {string}
     * @memberof VersionHistory
     */
    version: string;
    /**
     * 
     * @type {string}
     * @memberof VersionHistory
     */
    build: string;
}

/**
 * Check if a given object implements the VersionHistory interface.
 */
export function instanceOfVersionHistory(value: object): value is VersionHistory {
    if (!('id' in value) || value['id'] === undefined) return false;
    if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
    if (!('version' in value) || value['version'] === undefined) return false;
    if (!('build' in value) || value['build'] === undefined) return false;
    return true;
}

export function VersionHistoryFromJSON(json: any): VersionHistory {
    return VersionHistoryFromJSONTyped(json, false);
}

export function VersionHistoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): VersionHistory {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'],
        'timestamp': (new Date(json['timestamp'])),
        'version': json['version'],
        'build': json['build'],
    };
}

export function VersionHistoryToJSON(json: any): VersionHistory {
    return VersionHistoryToJSONTyped(json, false);
}

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

    return {
        
        'timestamp': ((value['timestamp']).toISOString()),
        'version': value['version'],
        'build': value['build'],
    };
}

