/* 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';
/**
 * Policy Serializer
 * @export
 * @interface PolicyRequest
 */
export interface PolicyRequest {
    /**
     * 
     * @type {string}
     * @memberof PolicyRequest
     */
    name: string;
    /**
     * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.
     * @type {boolean}
     * @memberof PolicyRequest
     */
    executionLogging?: boolean;
}

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

export function PolicyRequestFromJSON(json: any): PolicyRequest {
    return PolicyRequestFromJSONTyped(json, false);
}

export function PolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'],
        'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'],
    };
}

export function PolicyRequestToJSON(json: any): PolicyRequest {
    return PolicyRequestToJSONTyped(json, false);
}

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

    return {
        
        'name': value['name'],
        'execution_logging': value['executionLogging'],
    };
}

