"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.instanceOfRedirectStage = instanceOfRedirectStage;
exports.RedirectStageFromJSON = RedirectStageFromJSON;
exports.RedirectStageFromJSONTyped = RedirectStageFromJSONTyped;
exports.RedirectStageToJSON = RedirectStageToJSON;
exports.RedirectStageToJSONTyped = RedirectStageToJSONTyped;
const FlowSet_1 = require("./FlowSet");
const RedirectStageModeEnum_1 = require("./RedirectStageModeEnum");
/**
 * Check if a given object implements the RedirectStage interface.
 */
function instanceOfRedirectStage(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('component' in value) || value['component'] === undefined)
        return false;
    if (!('verboseName' in value) || value['verboseName'] === undefined)
        return false;
    if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined)
        return false;
    if (!('metaModelName' in value) || value['metaModelName'] === undefined)
        return false;
    if (!('flowSet' in value) || value['flowSet'] === undefined)
        return false;
    if (!('mode' in value) || value['mode'] === undefined)
        return false;
    return true;
}
function RedirectStageFromJSON(json) {
    return RedirectStageFromJSONTyped(json, false);
}
function RedirectStageFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'name': json['name'],
        'component': json['component'],
        'verboseName': json['verbose_name'],
        'verboseNamePlural': json['verbose_name_plural'],
        'metaModelName': json['meta_model_name'],
        'flowSet': (json['flow_set'].map(FlowSet_1.FlowSetFromJSON)),
        'keepContext': json['keep_context'] == null ? undefined : json['keep_context'],
        'mode': (0, RedirectStageModeEnum_1.RedirectStageModeEnumFromJSON)(json['mode']),
        'targetStatic': json['target_static'] == null ? undefined : json['target_static'],
        'targetFlow': json['target_flow'] == null ? undefined : json['target_flow'],
    };
}
function RedirectStageToJSON(json) {
    return RedirectStageToJSONTyped(json, false);
}
function RedirectStageToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'keep_context': value['keepContext'],
        'mode': (0, RedirectStageModeEnum_1.RedirectStageModeEnumToJSON)(value['mode']),
        'target_static': value['targetStatic'],
        'target_flow': value['targetFlow'],
    };
}
//# sourceMappingURL=RedirectStage.js.map