"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.12.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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfEnrollmentToken = instanceOfEnrollmentToken;
exports.EnrollmentTokenFromJSON = EnrollmentTokenFromJSON;
exports.EnrollmentTokenFromJSONTyped = EnrollmentTokenFromJSONTyped;
exports.EnrollmentTokenToJSON = EnrollmentTokenToJSON;
exports.EnrollmentTokenToJSONTyped = EnrollmentTokenToJSONTyped;
const DeviceAccessGroup_1 = require("./DeviceAccessGroup");
/**
 * Check if a given object implements the EnrollmentToken interface.
 */
function instanceOfEnrollmentToken(value) {
    if (!('tokenUuid' in value) || value['tokenUuid'] === undefined)
        return false;
    if (!('deviceGroupObj' in value) || value['deviceGroupObj'] === undefined)
        return false;
    if (!('connector' in value) || value['connector'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    return true;
}
function EnrollmentTokenFromJSON(json) {
    return EnrollmentTokenFromJSONTyped(json, false);
}
function EnrollmentTokenFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'tokenUuid': json['token_uuid'],
        'deviceGroup': json['device_group'] == null ? undefined : json['device_group'],
        'deviceGroupObj': (0, DeviceAccessGroup_1.DeviceAccessGroupFromJSON)(json['device_group_obj']),
        'connector': json['connector'],
        'name': json['name'],
        'expiring': json['expiring'] == null ? undefined : json['expiring'],
        'expires': json['expires'] == null ? undefined : (new Date(json['expires'])),
    };
}
function EnrollmentTokenToJSON(json) {
    return EnrollmentTokenToJSONTyped(json, false);
}
function EnrollmentTokenToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'device_group': value['deviceGroup'],
        'connector': value['connector'],
        'name': value['name'],
        'expiring': value['expiring'],
        'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(),
    };
}
//# sourceMappingURL=EnrollmentToken.js.map