"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc5
 * 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.instanceOfLDAPProvider = instanceOfLDAPProvider;
exports.LDAPProviderFromJSON = LDAPProviderFromJSON;
exports.LDAPProviderFromJSONTyped = LDAPProviderFromJSONTyped;
exports.LDAPProviderToJSON = LDAPProviderToJSON;
exports.LDAPProviderToJSONTyped = LDAPProviderToJSONTyped;
const LDAPAPIAccessMode_1 = require("./LDAPAPIAccessMode");
/**
 * Check if a given object implements the LDAPProvider interface.
 */
function instanceOfLDAPProvider(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 (!('outpostSet' in value) || value['outpostSet'] === undefined)
        return false;
    return true;
}
function LDAPProviderFromJSON(json) {
    return LDAPProviderFromJSONTyped(json, false);
}
function LDAPProviderFromJSONTyped(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'],
        'baseDn': json['base_dn'] == null ? undefined : json['base_dn'],
        'certificate': json['certificate'] == null ? undefined : json['certificate'],
        'tlsServerName': json['tls_server_name'] == null ? undefined : json['tls_server_name'],
        'uidStartNumber': json['uid_start_number'] == null ? undefined : json['uid_start_number'],
        'gidStartNumber': json['gid_start_number'] == null ? undefined : json['gid_start_number'],
        'outpostSet': json['outpost_set'],
        'searchMode': json['search_mode'] == null ? undefined : (0, LDAPAPIAccessMode_1.LDAPAPIAccessModeFromJSON)(json['search_mode']),
        'bindMode': json['bind_mode'] == null ? undefined : (0, LDAPAPIAccessMode_1.LDAPAPIAccessModeFromJSON)(json['bind_mode']),
        'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'],
    };
}
function LDAPProviderToJSON(json) {
    return LDAPProviderToJSONTyped(json, false);
}
function LDAPProviderToJSONTyped(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'],
        'base_dn': value['baseDn'],
        'certificate': value['certificate'],
        'tls_server_name': value['tlsServerName'],
        'uid_start_number': value['uidStartNumber'],
        'gid_start_number': value['gidStartNumber'],
        'search_mode': (0, LDAPAPIAccessMode_1.LDAPAPIAccessModeToJSON)(value['searchMode']),
        'bind_mode': (0, LDAPAPIAccessMode_1.LDAPAPIAccessModeToJSON)(value['bindMode']),
        'mfa_support': value['mfaSupport'],
    };
}
//# sourceMappingURL=LDAPProvider.js.map