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

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

export function DummyPolicyRequestFromJSON(json: any): DummyPolicyRequest {
    return DummyPolicyRequestFromJSONTyped(json, false);
}

export function DummyPolicyRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): DummyPolicyRequest {
    if (json == null) {
        return json;
    }
    return {
        name: 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 DummyPolicyRequestToJSON(json: any): DummyPolicyRequest {
    return DummyPolicyRequestToJSONTyped(json, false);
}

export function DummyPolicyRequestToJSONTyped(
    value?: DummyPolicyRequest | 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"],
    };
}
