"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.instanceOfFlow = instanceOfFlow;
exports.FlowFromJSON = FlowFromJSON;
exports.FlowFromJSONTyped = FlowFromJSONTyped;
exports.FlowToJSON = FlowToJSON;
exports.FlowToJSONTyped = FlowToJSONTyped;
const DeniedActionEnum_1 = require("./DeniedActionEnum");
const FlowLayoutEnum_1 = require("./FlowLayoutEnum");
const PolicyEngineMode_1 = require("./PolicyEngineMode");
const FlowDesignationEnum_1 = require("./FlowDesignationEnum");
const ThemedUrls_1 = require("./ThemedUrls");
const AuthenticationEnum_1 = require("./AuthenticationEnum");
/**
 * Check if a given object implements the Flow interface.
 */
function instanceOfFlow(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('policybindingmodelPtrId' in value) || value['policybindingmodelPtrId'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('slug' in value) || value['slug'] === undefined)
        return false;
    if (!('title' in value) || value['title'] === undefined)
        return false;
    if (!('designation' in value) || value['designation'] === undefined)
        return false;
    if (!('backgroundUrl' in value) || value['backgroundUrl'] === undefined)
        return false;
    if (!('backgroundThemedUrls' in value) || value['backgroundThemedUrls'] === undefined)
        return false;
    if (!('stages' in value) || value['stages'] === undefined)
        return false;
    if (!('policies' in value) || value['policies'] === undefined)
        return false;
    if (!('cacheCount' in value) || value['cacheCount'] === undefined)
        return false;
    if (!('exportUrl' in value) || value['exportUrl'] === undefined)
        return false;
    return true;
}
function FlowFromJSON(json) {
    return FlowFromJSONTyped(json, false);
}
function FlowFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'policybindingmodelPtrId': json['policybindingmodel_ptr_id'],
        'name': json['name'],
        'slug': json['slug'],
        'title': json['title'],
        'designation': (0, FlowDesignationEnum_1.FlowDesignationEnumFromJSON)(json['designation']),
        'background': json['background'] == null ? undefined : json['background'],
        'backgroundUrl': json['background_url'],
        'backgroundThemedUrls': (0, ThemedUrls_1.ThemedUrlsFromJSON)(json['background_themed_urls']),
        'stages': json['stages'],
        'policies': json['policies'],
        'cacheCount': json['cache_count'],
        'policyEngineMode': json['policy_engine_mode'] == null ? undefined : (0, PolicyEngineMode_1.PolicyEngineModeFromJSON)(json['policy_engine_mode']),
        'compatibilityMode': json['compatibility_mode'] == null ? undefined : json['compatibility_mode'],
        'exportUrl': json['export_url'],
        'layout': json['layout'] == null ? undefined : (0, FlowLayoutEnum_1.FlowLayoutEnumFromJSON)(json['layout']),
        'deniedAction': json['denied_action'] == null ? undefined : (0, DeniedActionEnum_1.DeniedActionEnumFromJSON)(json['denied_action']),
        'authentication': json['authentication'] == null ? undefined : (0, AuthenticationEnum_1.AuthenticationEnumFromJSON)(json['authentication']),
    };
}
function FlowToJSON(json) {
    return FlowToJSONTyped(json, false);
}
function FlowToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'slug': value['slug'],
        'title': value['title'],
        'designation': (0, FlowDesignationEnum_1.FlowDesignationEnumToJSON)(value['designation']),
        'background': value['background'],
        'policy_engine_mode': (0, PolicyEngineMode_1.PolicyEngineModeToJSON)(value['policyEngineMode']),
        'compatibility_mode': value['compatibilityMode'],
        'layout': (0, FlowLayoutEnum_1.FlowLayoutEnumToJSON)(value['layout']),
        'denied_action': (0, DeniedActionEnum_1.DeniedActionEnumToJSON)(value['deniedAction']),
        'authentication': (0, AuthenticationEnum_1.AuthenticationEnumToJSON)(value['authentication']),
    };
}
//# sourceMappingURL=Flow.js.map