/* 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.
 */

import { mapValues } from '../runtime';
import type { PolicyTestResult } from './PolicyTestResult';
import {
    PolicyTestResultFromJSON,
    PolicyTestResultFromJSONTyped,
    PolicyTestResultToJSON,
    PolicyTestResultToJSONTyped,
} from './PolicyTestResult';

/**
 * Base serializer class which doesn't implement create/update methods
 * @export
 * @interface LDAPCheckAccess
 */
export interface LDAPCheckAccess {
    /**
     * 
     * @type {boolean}
     * @memberof LDAPCheckAccess
     */
    hasSearchPermission?: boolean;
    /**
     * 
     * @type {PolicyTestResult}
     * @memberof LDAPCheckAccess
     */
    access: PolicyTestResult;
}

/**
 * Check if a given object implements the LDAPCheckAccess interface.
 */
export function instanceOfLDAPCheckAccess(value: object): value is LDAPCheckAccess {
    if (!('access' in value) || value['access'] === undefined) return false;
    return true;
}

export function LDAPCheckAccessFromJSON(json: any): LDAPCheckAccess {
    return LDAPCheckAccessFromJSONTyped(json, false);
}

export function LDAPCheckAccessFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPCheckAccess {
    if (json == null) {
        return json;
    }
    return {
        
        'hasSearchPermission': json['has_search_permission'] == null ? undefined : json['has_search_permission'],
        'access': PolicyTestResultFromJSON(json['access']),
    };
}

export function LDAPCheckAccessToJSON(json: any): LDAPCheckAccess {
    return LDAPCheckAccessToJSONTyped(json, false);
}

export function LDAPCheckAccessToJSONTyped(value?: LDAPCheckAccess | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'has_search_permission': value['hasSearchPermission'],
        'access': PolicyTestResultToJSON(value['access']),
    };
}

