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

/**
 * Payload to create and email a recovery link
 * @export
 * @interface UserRecoveryEmailRequest
 */
export interface UserRecoveryEmailRequest {
    /**
     *
     * @type {string}
     * @memberof UserRecoveryEmailRequest
     */
    tokenDuration?: string;
    /**
     *
     * @type {string}
     * @memberof UserRecoveryEmailRequest
     */
    emailStage: string;
}

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

export function UserRecoveryEmailRequestFromJSON(json: any): UserRecoveryEmailRequest {
    return UserRecoveryEmailRequestFromJSONTyped(json, false);
}

export function UserRecoveryEmailRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): UserRecoveryEmailRequest {
    if (json == null) {
        return json;
    }
    return {
        tokenDuration: json["token_duration"] == null ? undefined : json["token_duration"],
        emailStage: json["email_stage"],
    };
}

export function UserRecoveryEmailRequestToJSON(json: any): UserRecoveryEmailRequest {
    return UserRecoveryEmailRequestToJSONTyped(json, false);
}

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

    return {
        token_duration: value["tokenDuration"],
        email_stage: value["emailStage"],
    };
}
