/* 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';
/**
 * Group Membership Policy Serializer
 * @export
 * @interface PatchedExpressionPolicyRequest
 */
export interface PatchedExpressionPolicyRequest {
    /**
     * 
     * @type {string}
     * @memberof PatchedExpressionPolicyRequest
     */
    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 PatchedExpressionPolicyRequest
     */
    executionLogging?: boolean;
    /**
     * 
     * @type {string}
     * @memberof PatchedExpressionPolicyRequest
     */
    expression?: string;
}

/**
 * Check if a given object implements the PatchedExpressionPolicyRequest interface.
 */
export function instanceOfPatchedExpressionPolicyRequest(value: object): value is PatchedExpressionPolicyRequest {
    return true;
}

export function PatchedExpressionPolicyRequestFromJSON(json: any): PatchedExpressionPolicyRequest {
    return PatchedExpressionPolicyRequestFromJSONTyped(json, false);
}

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

export function PatchedExpressionPolicyRequestToJSON(json: any): PatchedExpressionPolicyRequest {
    return PatchedExpressionPolicyRequestToJSONTyped(json, false);
}

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

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

