"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.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.instanceOfFlowStageBinding = instanceOfFlowStageBinding;
exports.FlowStageBindingFromJSON = FlowStageBindingFromJSON;
exports.FlowStageBindingFromJSONTyped = FlowStageBindingFromJSONTyped;
exports.FlowStageBindingToJSON = FlowStageBindingToJSON;
exports.FlowStageBindingToJSONTyped = FlowStageBindingToJSONTyped;
const InvalidResponseActionEnum_1 = require("./InvalidResponseActionEnum");
const PolicyEngineMode_1 = require("./PolicyEngineMode");
const Stage_1 = require("./Stage");
/**
 * Check if a given object implements the FlowStageBinding interface.
 */
function instanceOfFlowStageBinding(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('policybindingmodelPtrId' in value) || value['policybindingmodelPtrId'] === undefined)
        return false;
    if (!('target' in value) || value['target'] === undefined)
        return false;
    if (!('stage' in value) || value['stage'] === undefined)
        return false;
    if (!('stageObj' in value) || value['stageObj'] === undefined)
        return false;
    if (!('order' in value) || value['order'] === undefined)
        return false;
    return true;
}
function FlowStageBindingFromJSON(json) {
    return FlowStageBindingFromJSONTyped(json, false);
}
function FlowStageBindingFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'policybindingmodelPtrId': json['policybindingmodel_ptr_id'],
        'target': json['target'],
        'stage': json['stage'],
        'stageObj': (0, Stage_1.StageFromJSON)(json['stage_obj']),
        'evaluateOnPlan': json['evaluate_on_plan'] == null ? undefined : json['evaluate_on_plan'],
        'reEvaluatePolicies': json['re_evaluate_policies'] == null ? undefined : json['re_evaluate_policies'],
        'order': json['order'],
        'policyEngineMode': json['policy_engine_mode'] == null ? undefined : (0, PolicyEngineMode_1.PolicyEngineModeFromJSON)(json['policy_engine_mode']),
        'invalidResponseAction': json['invalid_response_action'] == null ? undefined : (0, InvalidResponseActionEnum_1.InvalidResponseActionEnumFromJSON)(json['invalid_response_action']),
    };
}
function FlowStageBindingToJSON(json) {
    return FlowStageBindingToJSONTyped(json, false);
}
function FlowStageBindingToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'target': value['target'],
        'stage': value['stage'],
        'evaluate_on_plan': value['evaluateOnPlan'],
        're_evaluate_policies': value['reEvaluatePolicies'],
        'order': value['order'],
        'policy_engine_mode': (0, PolicyEngineMode_1.PolicyEngineModeToJSON)(value['policyEngineMode']),
        'invalid_response_action': (0, InvalidResponseActionEnum_1.InvalidResponseActionEnumToJSON)(value['invalidResponseAction']),
    };
}
//# sourceMappingURL=FlowStageBinding.js.map