"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.instanceOfWebAuthnDevice = instanceOfWebAuthnDevice;
exports.WebAuthnDeviceFromJSON = WebAuthnDeviceFromJSON;
exports.WebAuthnDeviceFromJSONTyped = WebAuthnDeviceFromJSONTyped;
exports.WebAuthnDeviceToJSON = WebAuthnDeviceToJSON;
exports.WebAuthnDeviceToJSONTyped = WebAuthnDeviceToJSONTyped;
const PartialUser_1 = require("./PartialUser");
const WebAuthnDeviceType_1 = require("./WebAuthnDeviceType");
/**
 * Check if a given object implements the WebAuthnDevice interface.
 */
function instanceOfWebAuthnDevice(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('createdOn' in value) || value['createdOn'] === undefined)
        return false;
    if (!('deviceType' in value) || value['deviceType'] === undefined)
        return false;
    if (!('aaguid' in value) || value['aaguid'] === undefined)
        return false;
    if (!('user' in value) || value['user'] === undefined)
        return false;
    return true;
}
function WebAuthnDeviceFromJSON(json) {
    return WebAuthnDeviceFromJSONTyped(json, false);
}
function WebAuthnDeviceFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'name': json['name'],
        'createdOn': (new Date(json['created_on'])),
        'deviceType': (0, WebAuthnDeviceType_1.WebAuthnDeviceTypeFromJSON)(json['device_type']),
        'aaguid': json['aaguid'],
        'user': (0, PartialUser_1.PartialUserFromJSON)(json['user']),
    };
}
function WebAuthnDeviceToJSON(json) {
    return WebAuthnDeviceToJSONTyped(json, false);
}
function WebAuthnDeviceToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
    };
}
//# sourceMappingURL=WebAuthnDevice.js.map