"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.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.instanceOfMutualTLSStageRequest = instanceOfMutualTLSStageRequest;
exports.MutualTLSStageRequestFromJSON = MutualTLSStageRequestFromJSON;
exports.MutualTLSStageRequestFromJSONTyped = MutualTLSStageRequestFromJSONTyped;
exports.MutualTLSStageRequestToJSON = MutualTLSStageRequestToJSON;
exports.MutualTLSStageRequestToJSONTyped = MutualTLSStageRequestToJSONTyped;
const MutualTLSStageModeEnum_1 = require("./MutualTLSStageModeEnum");
const CertAttributeEnum_1 = require("./CertAttributeEnum");
const UserAttributeEnum_1 = require("./UserAttributeEnum");
const FlowSetRequest_1 = require("./FlowSetRequest");
/**
 * Check if a given object implements the MutualTLSStageRequest interface.
 */
function instanceOfMutualTLSStageRequest(value) {
    if (!('name' in value) || value['name'] === 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 MutualTLSStageRequestFromJSON(json) {
    return MutualTLSStageRequestFromJSONTyped(json, false);
}
function MutualTLSStageRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'name': json['name'],
        'flowSet': json['flow_set'] == null ? undefined : (json['flow_set'].map(FlowSetRequest_1.FlowSetRequestFromJSON)),
        'mode': (0, MutualTLSStageModeEnum_1.MutualTLSStageModeEnumFromJSON)(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 MutualTLSStageRequestToJSON(json) {
    return MutualTLSStageRequestToJSONTyped(json, false);
}
function MutualTLSStageRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'flow_set': value['flowSet'] == null ? undefined : (value['flowSet'].map(FlowSetRequest_1.FlowSetRequestToJSON)),
        'mode': (0, MutualTLSStageModeEnum_1.MutualTLSStageModeEnumToJSON)(value['mode']),
        'certificate_authorities': value['certificateAuthorities'],
        'cert_attribute': (0, CertAttributeEnum_1.CertAttributeEnumToJSON)(value['certAttribute']),
        'user_attribute': (0, UserAttributeEnum_1.UserAttributeEnumToJSON)(value['userAttribute']),
    };
}
//# sourceMappingURL=MutualTLSStageRequest.js.map