"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.2-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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfDeviceChallenge = instanceOfDeviceChallenge;
exports.DeviceChallengeFromJSON = DeviceChallengeFromJSON;
exports.DeviceChallengeFromJSONTyped = DeviceChallengeFromJSONTyped;
exports.DeviceChallengeToJSON = DeviceChallengeToJSON;
exports.DeviceChallengeToJSONTyped = DeviceChallengeToJSONTyped;
const DeviceClassesEnum_1 = require("./DeviceClassesEnum");
/**
 * Check if a given object implements the DeviceChallenge interface.
 */
function instanceOfDeviceChallenge(value) {
    if (!('deviceClass' in value) || value['deviceClass'] === undefined)
        return false;
    if (!('deviceUid' in value) || value['deviceUid'] === undefined)
        return false;
    if (!('challenge' in value) || value['challenge'] === undefined)
        return false;
    if (!('lastUsed' in value) || value['lastUsed'] === undefined)
        return false;
    return true;
}
function DeviceChallengeFromJSON(json) {
    return DeviceChallengeFromJSONTyped(json, false);
}
function DeviceChallengeFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'deviceClass': (0, DeviceClassesEnum_1.DeviceClassesEnumFromJSON)(json['device_class']),
        'deviceUid': json['device_uid'],
        'challenge': json['challenge'],
        'lastUsed': (json['last_used'] == null ? null : new Date(json['last_used'])),
    };
}
function DeviceChallengeToJSON(json) {
    return DeviceChallengeToJSONTyped(json, false);
}
function DeviceChallengeToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'device_class': (0, DeviceClassesEnum_1.DeviceClassesEnumToJSON)(value['deviceClass']),
        'device_uid': value['deviceUid'],
        'challenge': value['challenge'],
        'last_used': value['lastUsed'] == null ? value['lastUsed'] : value['lastUsed'].toISOString(),
    };
}
//# sourceMappingURL=DeviceChallenge.js.map