"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc4
 * 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.instanceOfSAMLProvider = instanceOfSAMLProvider;
exports.SAMLProviderFromJSON = SAMLProviderFromJSON;
exports.SAMLProviderFromJSONTyped = SAMLProviderFromJSONTyped;
exports.SAMLProviderToJSON = SAMLProviderToJSON;
exports.SAMLProviderToJSONTyped = SAMLProviderToJSONTyped;
const DigestAlgorithmEnum_1 = require("./DigestAlgorithmEnum");
const SignatureAlgorithmEnum_1 = require("./SignatureAlgorithmEnum");
const SAMLNameIDPolicyEnum_1 = require("./SAMLNameIDPolicyEnum");
const SAMLLogoutMethods_1 = require("./SAMLLogoutMethods");
const SAMLBindingsEnum_1 = require("./SAMLBindingsEnum");
/**
 * Check if a given object implements the SAMLProvider interface.
 */
function instanceOfSAMLProvider(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined)
        return false;
    if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined)
        return false;
    if (!('component' in value) || value['component'] === undefined)
        return false;
    if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined)
        return false;
    if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined)
        return false;
    if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined)
        return false;
    if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === 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 (!('acsUrl' in value) || value['acsUrl'] === undefined)
        return false;
    if (!('urlDownloadMetadata' in value) || value['urlDownloadMetadata'] === undefined)
        return false;
    if (!('urlSsoPost' in value) || value['urlSsoPost'] === undefined)
        return false;
    if (!('urlSsoRedirect' in value) || value['urlSsoRedirect'] === undefined)
        return false;
    if (!('urlSsoInit' in value) || value['urlSsoInit'] === undefined)
        return false;
    if (!('urlSloPost' in value) || value['urlSloPost'] === undefined)
        return false;
    if (!('urlSloRedirect' in value) || value['urlSloRedirect'] === undefined)
        return false;
    return true;
}
function SAMLProviderFromJSON(json) {
    return SAMLProviderFromJSONTyped(json, false);
}
function SAMLProviderFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'name': json['name'],
        'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'],
        'authorizationFlow': json['authorization_flow'],
        'invalidationFlow': json['invalidation_flow'],
        'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'],
        'component': json['component'],
        'assignedApplicationSlug': json['assigned_application_slug'],
        'assignedApplicationName': json['assigned_application_name'],
        'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'],
        'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'],
        'verboseName': json['verbose_name'],
        'verboseNamePlural': json['verbose_name_plural'],
        'metaModelName': json['meta_model_name'],
        'acsUrl': json['acs_url'],
        'slsUrl': json['sls_url'] == null ? undefined : json['sls_url'],
        'audience': json['audience'] == null ? undefined : json['audience'],
        'issuer': json['issuer'] == null ? undefined : json['issuer'],
        'assertionValidNotBefore': json['assertion_valid_not_before'] == null ? undefined : json['assertion_valid_not_before'],
        'assertionValidNotOnOrAfter': json['assertion_valid_not_on_or_after'] == null ? undefined : json['assertion_valid_not_on_or_after'],
        'sessionValidNotOnOrAfter': json['session_valid_not_on_or_after'] == null ? undefined : json['session_valid_not_on_or_after'],
        'nameIdMapping': json['name_id_mapping'] == null ? undefined : json['name_id_mapping'],
        'authnContextClassRefMapping': json['authn_context_class_ref_mapping'] == null ? undefined : json['authn_context_class_ref_mapping'],
        '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']),
        'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'],
        'verificationKp': json['verification_kp'] == null ? undefined : json['verification_kp'],
        'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'],
        'signAssertion': json['sign_assertion'] == null ? undefined : json['sign_assertion'],
        'signResponse': json['sign_response'] == null ? undefined : json['sign_response'],
        'signLogoutRequest': json['sign_logout_request'] == null ? undefined : json['sign_logout_request'],
        'spBinding': json['sp_binding'] == null ? undefined : (0, SAMLBindingsEnum_1.SAMLBindingsEnumFromJSON)(json['sp_binding']),
        'slsBinding': json['sls_binding'] == null ? undefined : (0, SAMLBindingsEnum_1.SAMLBindingsEnumFromJSON)(json['sls_binding']),
        'logoutMethod': json['logout_method'] == null ? undefined : (0, SAMLLogoutMethods_1.SAMLLogoutMethodsFromJSON)(json['logout_method']),
        'defaultRelayState': json['default_relay_state'] == null ? undefined : json['default_relay_state'],
        'defaultNameIdPolicy': json['default_name_id_policy'] == null ? undefined : (0, SAMLNameIDPolicyEnum_1.SAMLNameIDPolicyEnumFromJSON)(json['default_name_id_policy']),
        'urlDownloadMetadata': json['url_download_metadata'],
        'urlSsoPost': json['url_sso_post'],
        'urlSsoRedirect': json['url_sso_redirect'],
        'urlSsoInit': json['url_sso_init'],
        'urlSloPost': json['url_slo_post'],
        'urlSloRedirect': json['url_slo_redirect'],
    };
}
function SAMLProviderToJSON(json) {
    return SAMLProviderToJSONTyped(json, false);
}
function SAMLProviderToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'authentication_flow': value['authenticationFlow'],
        'authorization_flow': value['authorizationFlow'],
        'invalidation_flow': value['invalidationFlow'],
        'property_mappings': value['propertyMappings'],
        'acs_url': value['acsUrl'],
        'sls_url': value['slsUrl'],
        'audience': value['audience'],
        'issuer': value['issuer'],
        'assertion_valid_not_before': value['assertionValidNotBefore'],
        'assertion_valid_not_on_or_after': value['assertionValidNotOnOrAfter'],
        'session_valid_not_on_or_after': value['sessionValidNotOnOrAfter'],
        'name_id_mapping': value['nameIdMapping'],
        'authn_context_class_ref_mapping': value['authnContextClassRefMapping'],
        'digest_algorithm': (0, DigestAlgorithmEnum_1.DigestAlgorithmEnumToJSON)(value['digestAlgorithm']),
        'signature_algorithm': (0, SignatureAlgorithmEnum_1.SignatureAlgorithmEnumToJSON)(value['signatureAlgorithm']),
        'signing_kp': value['signingKp'],
        'verification_kp': value['verificationKp'],
        'encryption_kp': value['encryptionKp'],
        'sign_assertion': value['signAssertion'],
        'sign_response': value['signResponse'],
        'sign_logout_request': value['signLogoutRequest'],
        'sp_binding': (0, SAMLBindingsEnum_1.SAMLBindingsEnumToJSON)(value['spBinding']),
        'sls_binding': (0, SAMLBindingsEnum_1.SAMLBindingsEnumToJSON)(value['slsBinding']),
        'logout_method': (0, SAMLLogoutMethods_1.SAMLLogoutMethodsToJSON)(value['logoutMethod']),
        'default_relay_state': value['defaultRelayState'],
        'default_name_id_policy': (0, SAMLNameIDPolicyEnum_1.SAMLNameIDPolicyEnumToJSON)(value['defaultNameIdPolicy']),
    };
}
//# sourceMappingURL=SAMLProvider.js.map