"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.instanceOfUserConsent = instanceOfUserConsent;
exports.UserConsentFromJSON = UserConsentFromJSON;
exports.UserConsentFromJSONTyped = UserConsentFromJSONTyped;
exports.UserConsentToJSON = UserConsentToJSON;
exports.UserConsentToJSONTyped = UserConsentToJSONTyped;
const User_1 = require("./User");
const Application_1 = require("./Application");
/**
 * Check if a given object implements the UserConsent interface.
 */
function instanceOfUserConsent(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('user' in value) || value['user'] === undefined)
        return false;
    if (!('application' in value) || value['application'] === undefined)
        return false;
    return true;
}
function UserConsentFromJSON(json) {
    return UserConsentFromJSONTyped(json, false);
}
function UserConsentFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'expires': json['expires'] == null ? undefined : (new Date(json['expires'])),
        'expiring': json['expiring'] == null ? undefined : json['expiring'],
        'user': (0, User_1.UserFromJSON)(json['user']),
        'application': (0, Application_1.ApplicationFromJSON)(json['application']),
        'permissions': json['permissions'] == null ? undefined : json['permissions'],
    };
}
function UserConsentToJSON(json) {
    return UserConsentToJSONTyped(json, false);
}
function UserConsentToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(),
        'expiring': value['expiring'],
        'user': (0, User_1.UserToJSON)(value['user']),
        'application': (0, Application_1.ApplicationToJSON)(value['application']),
        'permissions': value['permissions'],
    };
}
//# sourceMappingURL=UserConsent.js.map