/* 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 { SystemInfoRuntime } from './SystemInfoRuntime';
import {
    SystemInfoRuntimeFromJSON,
    SystemInfoRuntimeFromJSONTyped,
    SystemInfoRuntimeToJSON,
    SystemInfoRuntimeToJSONTyped,
} from './SystemInfoRuntime';

/**
 * Get system information.
 * @export
 * @interface SystemInfo
 */
export interface SystemInfo {
    /**
     * Get HTTP Request headers
     * @type {{ [key: string]: string; }}
     * @memberof SystemInfo
     */
    readonly httpHeaders: { [key: string]: string; };
    /**
     * Get HTTP host
     * @type {string}
     * @memberof SystemInfo
     */
    readonly httpHost: string;
    /**
     * Get HTTP Secure flag
     * @type {boolean}
     * @memberof SystemInfo
     */
    readonly httpIsSecure: boolean;
    /**
     * 
     * @type {SystemInfoRuntime}
     * @memberof SystemInfo
     */
    runtime: SystemInfoRuntime;
    /**
     * Currently active brand
     * @type {string}
     * @memberof SystemInfo
     */
    readonly brand: string;
    /**
     * Current server time
     * @type {Date}
     * @memberof SystemInfo
     */
    readonly serverTime: Date;
    /**
     * Whether the embedded outpost is disabled
     * @type {boolean}
     * @memberof SystemInfo
     */
    readonly embeddedOutpostDisabled: boolean;
    /**
     * Get the FQDN configured on the embedded outpost
     * @type {string}
     * @memberof SystemInfo
     */
    readonly embeddedOutpostHost: string;
}

/**
 * Check if a given object implements the SystemInfo interface.
 */
export function instanceOfSystemInfo(value: object): value is SystemInfo {
    if (!('httpHeaders' in value) || value['httpHeaders'] === undefined) return false;
    if (!('httpHost' in value) || value['httpHost'] === undefined) return false;
    if (!('httpIsSecure' in value) || value['httpIsSecure'] === undefined) return false;
    if (!('runtime' in value) || value['runtime'] === undefined) return false;
    if (!('brand' in value) || value['brand'] === undefined) return false;
    if (!('serverTime' in value) || value['serverTime'] === undefined) return false;
    if (!('embeddedOutpostDisabled' in value) || value['embeddedOutpostDisabled'] === undefined) return false;
    if (!('embeddedOutpostHost' in value) || value['embeddedOutpostHost'] === undefined) return false;
    return true;
}

export function SystemInfoFromJSON(json: any): SystemInfo {
    return SystemInfoFromJSONTyped(json, false);
}

export function SystemInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemInfo {
    if (json == null) {
        return json;
    }
    return {
        
        'httpHeaders': json['http_headers'],
        'httpHost': json['http_host'],
        'httpIsSecure': json['http_is_secure'],
        'runtime': SystemInfoRuntimeFromJSON(json['runtime']),
        'brand': json['brand'],
        'serverTime': (new Date(json['server_time'])),
        'embeddedOutpostDisabled': json['embedded_outpost_disabled'],
        'embeddedOutpostHost': json['embedded_outpost_host'],
    };
}

export function SystemInfoToJSON(json: any): SystemInfo {
    return SystemInfoToJSONTyped(json, false);
}

export function SystemInfoToJSONTyped(value?: Omit<SystemInfo, 'http_headers'|'http_host'|'http_is_secure'|'brand'|'server_time'|'embedded_outpost_disabled'|'embedded_outpost_host'> | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'runtime': SystemInfoRuntimeToJSON(value['runtime']),
    };
}

