"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.instanceOfMutualTLSStage = instanceOfMutualTLSStage;
exports.MutualTLSStageFromJSON = MutualTLSStageFromJSON;
exports.MutualTLSStageFromJSONTyped = MutualTLSStageFromJSONTyped;
exports.MutualTLSStageToJSON = MutualTLSStageToJSON;
exports.MutualTLSStageToJSONTyped = MutualTLSStageToJSONTyped;
const StageModeEnum_1 = require("./StageModeEnum");
const CertAttributeEnum_1 = require("./CertAttributeEnum");
const FlowSet_1 = require("./FlowSet");
const UserAttributeEnum_1 = require("./UserAttributeEnum");
/**
 * Check if a given object implements the MutualTLSStage interface.
 */
function instanceOfMutualTLSStage(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;
    if (!('certAttribute' in value) || value['certAttribute'] === undefined)
        return false;
    if (!('userAttribute' in value) || value['userAttribute'] === undefined)
        return false;
    return true;
}
function MutualTLSStageFromJSON(json) {
    return MutualTLSStageFromJSONTyped(json, false);
}
function MutualTLSStageFromJSONTyped(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)),
        'mode': (0, StageModeEnum_1.StageModeEnumFromJSON)(json['mode']),
        'certificateAuthorities': json['certificate_authorities'] == null ? undefined : json['certificate_authorities'],
        'certAttribute': (0, CertAttributeEnum_1.CertAttributeEnumFromJSON)(json['cert_attribute']),
        'userAttribute': (0, UserAttributeEnum_1.UserAttributeEnumFromJSON)(json['user_attribute']),
    };
}
function MutualTLSStageToJSON(json) {
    return MutualTLSStageToJSONTyped(json, false);
}
function MutualTLSStageToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'mode': (0, StageModeEnum_1.StageModeEnumToJSON)(value['mode']),
        'certificate_authorities': value['certificateAuthorities'],
        'cert_attribute': (0, CertAttributeEnum_1.CertAttributeEnumToJSON)(value['certAttribute']),
        'user_attribute': (0, UserAttributeEnum_1.UserAttributeEnumToJSON)(value['userAttribute']),
    };
}
//# sourceMappingURL=MutualTLSStage.js.map