"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.instanceOfTokenRequest = instanceOfTokenRequest;
exports.TokenRequestFromJSON = TokenRequestFromJSON;
exports.TokenRequestFromJSONTyped = TokenRequestFromJSONTyped;
exports.TokenRequestToJSON = TokenRequestToJSON;
exports.TokenRequestToJSONTyped = TokenRequestToJSONTyped;
const IntentEnum_1 = require("./IntentEnum");
/**
 * Check if a given object implements the TokenRequest interface.
 */
function instanceOfTokenRequest(value) {
    if (!('identifier' in value) || value['identifier'] === undefined)
        return false;
    return true;
}
function TokenRequestFromJSON(json) {
    return TokenRequestFromJSONTyped(json, false);
}
function TokenRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'managed': json['managed'] == null ? undefined : json['managed'],
        'identifier': json['identifier'],
        'intent': json['intent'] == null ? undefined : (0, IntentEnum_1.IntentEnumFromJSON)(json['intent']),
        'user': json['user'] == null ? undefined : json['user'],
        'description': json['description'] == null ? undefined : json['description'],
        'expires': json['expires'] == null ? undefined : (new Date(json['expires'])),
        'expiring': json['expiring'] == null ? undefined : json['expiring'],
    };
}
function TokenRequestToJSON(json) {
    return TokenRequestToJSONTyped(json, false);
}
function TokenRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'managed': value['managed'],
        'identifier': value['identifier'],
        'intent': (0, IntentEnum_1.IntentEnumToJSON)(value['intent']),
        'user': value['user'],
        'description': value['description'],
        'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(),
        'expiring': value['expiring'],
    };
}
//# sourceMappingURL=TokenRequest.js.map