/* 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 HardwareRequest
 */
export interface HardwareRequest {
    /**
     *
     * @type {string}
     * @memberof HardwareRequest
     */
    model?: string;
    /**
     *
     * @type {string}
     * @memberof HardwareRequest
     */
    manufacturer?: string;
    /**
     *
     * @type {string}
     * @memberof HardwareRequest
     */
    serial: string;
    /**
     *
     * @type {string}
     * @memberof HardwareRequest
     */
    cpuName?: string;
    /**
     *
     * @type {number}
     * @memberof HardwareRequest
     */
    cpuCount?: number;
    /**
     *
     * @type {number}
     * @memberof HardwareRequest
     */
    memoryBytes?: number;
}

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

export function HardwareRequestFromJSON(json: any): HardwareRequest {
    return HardwareRequestFromJSONTyped(json, false);
}

export function HardwareRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): HardwareRequest {
    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 HardwareRequestToJSON(json: any): HardwareRequest {
    return HardwareRequestToJSONTyped(json, false);
}

export function HardwareRequestToJSONTyped(
    value?: HardwareRequest | 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"],
    };
}
