"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.12.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.instanceOfSAMLSource = instanceOfSAMLSource;
exports.SAMLSourceFromJSON = SAMLSourceFromJSON;
exports.SAMLSourceFromJSONTyped = SAMLSourceFromJSONTyped;
exports.SAMLSourceToJSON = SAMLSourceToJSON;
exports.SAMLSourceToJSONTyped = SAMLSourceToJSONTyped;
const PolicyEngineMode_1 = require("./PolicyEngineMode");
const BindingTypeEnum_1 = require("./BindingTypeEnum");
const DigestAlgorithmEnum_1 = require("./DigestAlgorithmEnum");
const UserMatchingModeEnum_1 = require("./UserMatchingModeEnum");
const SignatureAlgorithmEnum_1 = require("./SignatureAlgorithmEnum");
const SAMLNameIDPolicyEnum_1 = require("./SAMLNameIDPolicyEnum");
const GroupMatchingModeEnum_1 = require("./GroupMatchingModeEnum");
/**
 * Check if a given object implements the SAMLSource interface.
 */
function instanceOfSAMLSource(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('slug' in value) || value['slug'] === 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 (!('managed' in value) || value['managed'] === undefined)
        return false;
    if (!('icon' in value) || value['icon'] === undefined)
        return false;
    if (!('preAuthenticationFlow' in value) || value['preAuthenticationFlow'] === undefined)
        return false;
    if (!('ssoUrl' in value) || value['ssoUrl'] === undefined)
        return false;
    return true;
}
function SAMLSourceFromJSON(json) {
    return SAMLSourceFromJSONTyped(json, false);
}
function SAMLSourceFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'name': json['name'],
        'slug': json['slug'],
        'enabled': json['enabled'] == null ? undefined : json['enabled'],
        'promoted': json['promoted'] == null ? undefined : json['promoted'],
        'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'],
        'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'],
        'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'],
        'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'],
        'component': json['component'],
        'verboseName': json['verbose_name'],
        'verboseNamePlural': json['verbose_name_plural'],
        'metaModelName': json['meta_model_name'],
        'policyEngineMode': json['policy_engine_mode'] == null ? undefined : (0, PolicyEngineMode_1.PolicyEngineModeFromJSON)(json['policy_engine_mode']),
        'userMatchingMode': json['user_matching_mode'] == null ? undefined : (0, UserMatchingModeEnum_1.UserMatchingModeEnumFromJSON)(json['user_matching_mode']),
        'managed': json['managed'],
        'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'],
        'icon': json['icon'],
        'groupMatchingMode': json['group_matching_mode'] == null ? undefined : (0, GroupMatchingModeEnum_1.GroupMatchingModeEnumFromJSON)(json['group_matching_mode']),
        'preAuthenticationFlow': json['pre_authentication_flow'],
        'issuer': json['issuer'] == null ? undefined : json['issuer'],
        'ssoUrl': json['sso_url'],
        'sloUrl': json['slo_url'] == null ? undefined : json['slo_url'],
        'allowIdpInitiated': json['allow_idp_initiated'] == null ? undefined : json['allow_idp_initiated'],
        'nameIdPolicy': json['name_id_policy'] == null ? undefined : (0, SAMLNameIDPolicyEnum_1.SAMLNameIDPolicyEnumFromJSON)(json['name_id_policy']),
        'bindingType': json['binding_type'] == null ? undefined : (0, BindingTypeEnum_1.BindingTypeEnumFromJSON)(json['binding_type']),
        'verificationKp': json['verification_kp'] == null ? undefined : json['verification_kp'],
        'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'],
        'digestAlgorithm': json['digest_algorithm'] == null ? undefined : (0, DigestAlgorithmEnum_1.DigestAlgorithmEnumFromJSON)(json['digest_algorithm']),
        'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : (0, SignatureAlgorithmEnum_1.SignatureAlgorithmEnumFromJSON)(json['signature_algorithm']),
        'temporaryUserDeleteAfter': json['temporary_user_delete_after'] == null ? undefined : json['temporary_user_delete_after'],
        'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'],
        'signedAssertion': json['signed_assertion'] == null ? undefined : json['signed_assertion'],
        'signedResponse': json['signed_response'] == null ? undefined : json['signed_response'],
    };
}
function SAMLSourceToJSON(json) {
    return SAMLSourceToJSONTyped(json, false);
}
function SAMLSourceToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'slug': value['slug'],
        'enabled': value['enabled'],
        'promoted': value['promoted'],
        'authentication_flow': value['authenticationFlow'],
        'enrollment_flow': value['enrollmentFlow'],
        'user_property_mappings': value['userPropertyMappings'],
        'group_property_mappings': value['groupPropertyMappings'],
        'policy_engine_mode': (0, PolicyEngineMode_1.PolicyEngineModeToJSON)(value['policyEngineMode']),
        'user_matching_mode': (0, UserMatchingModeEnum_1.UserMatchingModeEnumToJSON)(value['userMatchingMode']),
        'user_path_template': value['userPathTemplate'],
        'group_matching_mode': (0, GroupMatchingModeEnum_1.GroupMatchingModeEnumToJSON)(value['groupMatchingMode']),
        'pre_authentication_flow': value['preAuthenticationFlow'],
        'issuer': value['issuer'],
        'sso_url': value['ssoUrl'],
        'slo_url': value['sloUrl'],
        'allow_idp_initiated': value['allowIdpInitiated'],
        'name_id_policy': (0, SAMLNameIDPolicyEnum_1.SAMLNameIDPolicyEnumToJSON)(value['nameIdPolicy']),
        'binding_type': (0, BindingTypeEnum_1.BindingTypeEnumToJSON)(value['bindingType']),
        'verification_kp': value['verificationKp'],
        'signing_kp': value['signingKp'],
        'digest_algorithm': (0, DigestAlgorithmEnum_1.DigestAlgorithmEnumToJSON)(value['digestAlgorithm']),
        'signature_algorithm': (0, SignatureAlgorithmEnum_1.SignatureAlgorithmEnumToJSON)(value['signatureAlgorithm']),
        'temporary_user_delete_after': value['temporaryUserDeleteAfter'],
        'encryption_kp': value['encryptionKp'],
        'signed_assertion': value['signedAssertion'],
        'signed_response': value['signedResponse'],
    };
}
//# sourceMappingURL=SAMLSource.js.map