"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.instanceOfLDAPSource = instanceOfLDAPSource;
exports.LDAPSourceFromJSON = LDAPSourceFromJSON;
exports.LDAPSourceFromJSONTyped = LDAPSourceFromJSONTyped;
exports.LDAPSourceToJSON = LDAPSourceToJSON;
exports.LDAPSourceToJSONTyped = LDAPSourceToJSONTyped;
const PolicyEngineMode_1 = require("./PolicyEngineMode");
const UserMatchingModeEnum_1 = require("./UserMatchingModeEnum");
/**
 * Check if a given object implements the LDAPSource interface.
 */
function instanceOfLDAPSource(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 (!('serverUri' in value) || value['serverUri'] === undefined)
        return false;
    if (!('baseDn' in value) || value['baseDn'] === undefined)
        return false;
    if (!('connectivity' in value) || value['connectivity'] === undefined)
        return false;
    return true;
}
function LDAPSourceFromJSON(json) {
    return LDAPSourceFromJSONTyped(json, false);
}
function LDAPSourceFromJSONTyped(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'],
        'serverUri': json['server_uri'],
        'peerCertificate': json['peer_certificate'] == null ? undefined : json['peer_certificate'],
        'clientCertificate': json['client_certificate'] == null ? undefined : json['client_certificate'],
        'bindCn': json['bind_cn'] == null ? undefined : json['bind_cn'],
        'startTls': json['start_tls'] == null ? undefined : json['start_tls'],
        'sni': json['sni'] == null ? undefined : json['sni'],
        'baseDn': json['base_dn'],
        'additionalUserDn': json['additional_user_dn'] == null ? undefined : json['additional_user_dn'],
        'additionalGroupDn': json['additional_group_dn'] == null ? undefined : json['additional_group_dn'],
        'userObjectFilter': json['user_object_filter'] == null ? undefined : json['user_object_filter'],
        'groupObjectFilter': json['group_object_filter'] == null ? undefined : json['group_object_filter'],
        'groupMembershipField': json['group_membership_field'] == null ? undefined : json['group_membership_field'],
        'userMembershipAttribute': json['user_membership_attribute'] == null ? undefined : json['user_membership_attribute'],
        'objectUniquenessField': json['object_uniqueness_field'] == null ? undefined : json['object_uniqueness_field'],
        'passwordLoginUpdateInternalPassword': json['password_login_update_internal_password'] == null ? undefined : json['password_login_update_internal_password'],
        'syncUsers': json['sync_users'] == null ? undefined : json['sync_users'],
        'syncUsersPassword': json['sync_users_password'] == null ? undefined : json['sync_users_password'],
        'syncGroups': json['sync_groups'] == null ? undefined : json['sync_groups'],
        'syncParentGroup': json['sync_parent_group'] == null ? undefined : json['sync_parent_group'],
        'connectivity': json['connectivity'],
        'lookupGroupsFromUser': json['lookup_groups_from_user'] == null ? undefined : json['lookup_groups_from_user'],
        'deleteNotFoundObjects': json['delete_not_found_objects'] == null ? undefined : json['delete_not_found_objects'],
    };
}
function LDAPSourceToJSON(json) {
    return LDAPSourceToJSONTyped(json, false);
}
function LDAPSourceToJSONTyped(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'],
        'server_uri': value['serverUri'],
        'peer_certificate': value['peerCertificate'],
        'client_certificate': value['clientCertificate'],
        'bind_cn': value['bindCn'],
        'start_tls': value['startTls'],
        'sni': value['sni'],
        'base_dn': value['baseDn'],
        'additional_user_dn': value['additionalUserDn'],
        'additional_group_dn': value['additionalGroupDn'],
        'user_object_filter': value['userObjectFilter'],
        'group_object_filter': value['groupObjectFilter'],
        'group_membership_field': value['groupMembershipField'],
        'user_membership_attribute': value['userMembershipAttribute'],
        'object_uniqueness_field': value['objectUniquenessField'],
        'password_login_update_internal_password': value['passwordLoginUpdateInternalPassword'],
        'sync_users': value['syncUsers'],
        'sync_users_password': value['syncUsersPassword'],
        'sync_groups': value['syncGroups'],
        'sync_parent_group': value['syncParentGroup'],
        'lookup_groups_from_user': value['lookupGroupsFromUser'],
        'delete_not_found_objects': value['deleteNotFoundObjects'],
    };
}
//# sourceMappingURL=LDAPSource.js.map