/* 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.
 */

/**
 *
 * @export
 * @interface Hardware
 */
export interface Hardware {
    /**
     *
     * @type {string}
     * @memberof Hardware
     */
    model?: string;
    /**
     *
     * @type {string}
     * @memberof Hardware
     */
    manufacturer?: string;
    /**
     *
     * @type {string}
     * @memberof Hardware
     */
    serial: string;
    /**
     *
     * @type {string}
     * @memberof Hardware
     */
    cpuName?: string;
    /**
     *
     * @type {number}
     * @memberof Hardware
     */
    cpuCount?: number;
    /**
     *
     * @type {number}
     * @memberof Hardware
     */
    memoryBytes?: number;
}

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

export function HardwareFromJSON(json: any): Hardware {
    return HardwareFromJSONTyped(json, false);
}

export function HardwareFromJSONTyped(json: any, ignoreDiscriminator: boolean): Hardware {
    if (json == null) {
        return json;
    }
    return {
        model: json["model"] == null ? undefined : json["model"],
        manufacturer: json["manufacturer"] == null ? undefined : json["manufacturer"],
        serial: json["serial"],
        cpuName: json["cpu_name"] == null ? undefined : json["cpu_name"],
        cpuCount: json["cpu_count"] == null ? undefined : json["cpu_count"],
        memoryBytes: json["memory_bytes"] == null ? undefined : json["memory_bytes"],
    };
}

export function HardwareToJSON(json: any): Hardware {
    return HardwareToJSONTyped(json, false);
}

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

    return {
        model: value["model"],
        manufacturer: value["manufacturer"],
        serial: value["serial"],
        cpu_name: value["cpuName"],
        cpu_count: value["cpuCount"],
        memory_bytes: value["memoryBytes"],
    };
}
