/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.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.
 */

/**
 * Dummy Policy Serializer
 * @export
 * @interface PatchedDummyPolicyRequest
 */
export interface PatchedDummyPolicyRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedDummyPolicyRequest
     */
    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 PatchedDummyPolicyRequest
     */
    executionLogging?: boolean;
    /**
     *
     * @type {boolean}
     * @memberof PatchedDummyPolicyRequest
     */
    result?: boolean;
    /**
     *
     * @type {number}
     * @memberof PatchedDummyPolicyRequest
     */
    waitMin?: number;
    /**
     *
     * @type {number}
     * @memberof PatchedDummyPolicyRequest
     */
    waitMax?: number;
}

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

export function PatchedDummyPolicyRequestFromJSON(json: any): PatchedDummyPolicyRequest {
    return PatchedDummyPolicyRequestFromJSONTyped(json, false);
}

export function PatchedDummyPolicyRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedDummyPolicyRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"] == null ? undefined : json["name"],
        executionLogging: json["execution_logging"] == null ? undefined : json["execution_logging"],
        result: json["result"] == null ? undefined : json["result"],
        waitMin: json["wait_min"] == null ? undefined : json["wait_min"],
        waitMax: json["wait_max"] == null ? undefined : json["wait_max"],
    };
}

export function PatchedDummyPolicyRequestToJSON(json: any): PatchedDummyPolicyRequest {
    return PatchedDummyPolicyRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        execution_logging: value["executionLogging"],
        result: value["result"],
        wait_min: value["waitMin"],
        wait_max: value["waitMax"],
    };
}
