"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc5
 * 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.instanceOfInvitation = instanceOfInvitation;
exports.InvitationFromJSON = InvitationFromJSON;
exports.InvitationFromJSONTyped = InvitationFromJSONTyped;
exports.InvitationToJSON = InvitationToJSON;
exports.InvitationToJSONTyped = InvitationToJSONTyped;
const PartialUser_1 = require("./PartialUser");
const Flow_1 = require("./Flow");
/**
 * Check if a given object implements the Invitation interface.
 */
function instanceOfInvitation(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('createdBy' in value) || value['createdBy'] === undefined)
        return false;
    if (!('flowObj' in value) || value['flowObj'] === undefined)
        return false;
    return true;
}
function InvitationFromJSON(json) {
    return InvitationFromJSONTyped(json, false);
}
function InvitationFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'name': json['name'],
        'expires': json['expires'] == null ? undefined : (new Date(json['expires'])),
        'fixedData': json['fixed_data'] == null ? undefined : json['fixed_data'],
        'createdBy': (0, PartialUser_1.PartialUserFromJSON)(json['created_by']),
        'singleUse': json['single_use'] == null ? undefined : json['single_use'],
        'flow': json['flow'] == null ? undefined : json['flow'],
        'flowObj': (0, Flow_1.FlowFromJSON)(json['flow_obj']),
    };
}
function InvitationToJSON(json) {
    return InvitationToJSONTyped(json, false);
}
function InvitationToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(),
        'fixed_data': value['fixedData'],
        'single_use': value['singleUse'],
        'flow': value['flow'],
    };
}
//# sourceMappingURL=Invitation.js.map