/* 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 AppleIndependentSecureEnclave
 */
export interface AppleIndependentSecureEnclave {
    /**
     *
     * @type {string}
     * @memberof AppleIndependentSecureEnclave
     */
    uuid?: string;
    /**
     * The user that this device belongs to.
     * @type {number}
     * @memberof AppleIndependentSecureEnclave
     */
    user: number;
    /**
     *
     * @type {string}
     * @memberof AppleIndependentSecureEnclave
     */
    appleSecureEnclaveKey: string;
    /**
     *
     * @type {string}
     * @memberof AppleIndependentSecureEnclave
     */
    appleEnclaveKeyId: string;
    /**
     *
     * @type {string}
     * @memberof AppleIndependentSecureEnclave
     */
    deviceType: string;
}

/**
 * Check if a given object implements the AppleIndependentSecureEnclave interface.
 */
export function instanceOfAppleIndependentSecureEnclave(
    value: object,
): value is AppleIndependentSecureEnclave {
    if (!("user" in value) || value["user"] === undefined) return false;
    if (!("appleSecureEnclaveKey" in value) || value["appleSecureEnclaveKey"] === undefined)
        return false;
    if (!("appleEnclaveKeyId" in value) || value["appleEnclaveKeyId"] === undefined) return false;
    if (!("deviceType" in value) || value["deviceType"] === undefined) return false;
    return true;
}

export function AppleIndependentSecureEnclaveFromJSON(json: any): AppleIndependentSecureEnclave {
    return AppleIndependentSecureEnclaveFromJSONTyped(json, false);
}

export function AppleIndependentSecureEnclaveFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): AppleIndependentSecureEnclave {
    if (json == null) {
        return json;
    }
    return {
        uuid: json["uuid"] == null ? undefined : json["uuid"],
        user: json["user"],
        appleSecureEnclaveKey: json["apple_secure_enclave_key"],
        appleEnclaveKeyId: json["apple_enclave_key_id"],
        deviceType: json["device_type"],
    };
}

export function AppleIndependentSecureEnclaveToJSON(json: any): AppleIndependentSecureEnclave {
    return AppleIndependentSecureEnclaveToJSONTyped(json, false);
}

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

    return {
        uuid: value["uuid"],
        user: value["user"],
        apple_secure_enclave_key: value["appleSecureEnclaveKey"],
        apple_enclave_key_id: value["appleEnclaveKeyId"],
        device_type: value["deviceType"],
    };
}
