"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.instanceOfPatchedTokenRequest = instanceOfPatchedTokenRequest;
exports.PatchedTokenRequestFromJSON = PatchedTokenRequestFromJSON;
exports.PatchedTokenRequestFromJSONTyped = PatchedTokenRequestFromJSONTyped;
exports.PatchedTokenRequestToJSON = PatchedTokenRequestToJSON;
exports.PatchedTokenRequestToJSONTyped = PatchedTokenRequestToJSONTyped;
const IntentEnum_1 = require("./IntentEnum");
/**
 * Check if a given object implements the PatchedTokenRequest interface.
 */
function instanceOfPatchedTokenRequest(value) {
    return true;
}
function PatchedTokenRequestFromJSON(json) {
    return PatchedTokenRequestFromJSONTyped(json, false);
}
function PatchedTokenRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'managed': json['managed'] == null ? undefined : json['managed'],
        'identifier': json['identifier'] == null ? undefined : 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 PatchedTokenRequestToJSON(json) {
    return PatchedTokenRequestToJSONTyped(json, false);
}
function PatchedTokenRequestToJSONTyped(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=PatchedTokenRequest.js.map