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

/**
 * DenyStage Serializer
 * @export
 * @interface DenyStageRequest
 */
export interface DenyStageRequest {
    /**
     *
     * @type {string}
     * @memberof DenyStageRequest
     */
    name: string;
    /**
     *
     * @type {string}
     * @memberof DenyStageRequest
     */
    denyMessage?: string;
}

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

export function DenyStageRequestFromJSON(json: any): DenyStageRequest {
    return DenyStageRequestFromJSONTyped(json, false);
}

export function DenyStageRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): DenyStageRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        denyMessage: json["deny_message"] == null ? undefined : json["deny_message"],
    };
}

export function DenyStageRequestToJSON(json: any): DenyStageRequest {
    return DenyStageRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        deny_message: value["denyMessage"],
    };
}
