/* 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 DiskRequest
 */
export interface DiskRequest {
    /**
     *
     * @type {string}
     * @memberof DiskRequest
     */
    name: string;
    /**
     *
     * @type {string}
     * @memberof DiskRequest
     */
    mountpoint: string;
    /**
     *
     * @type {string}
     * @memberof DiskRequest
     */
    label?: string;
    /**
     *
     * @type {number}
     * @memberof DiskRequest
     */
    capacityTotalBytes?: number;
    /**
     *
     * @type {number}
     * @memberof DiskRequest
     */
    capacityUsedBytes?: number;
    /**
     *
     * @type {boolean}
     * @memberof DiskRequest
     */
    encryptionEnabled?: boolean;
}

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

export function DiskRequestFromJSON(json: any): DiskRequest {
    return DiskRequestFromJSONTyped(json, false);
}

export function DiskRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DiskRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        mountpoint: json["mountpoint"],
        label: json["label"] == null ? undefined : json["label"],
        capacityTotalBytes:
            json["capacity_total_bytes"] == null ? undefined : json["capacity_total_bytes"],
        capacityUsedBytes:
            json["capacity_used_bytes"] == null ? undefined : json["capacity_used_bytes"],
        encryptionEnabled:
            json["encryption_enabled"] == null ? undefined : json["encryption_enabled"],
    };
}

export function DiskRequestToJSON(json: any): DiskRequest {
    return DiskRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        mountpoint: value["mountpoint"],
        label: value["label"],
        capacity_total_bytes: value["capacityTotalBytes"],
        capacity_used_bytes: value["capacityUsedBytes"],
        encryption_enabled: value["encryptionEnabled"],
    };
}
