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

/**
 * AccountLockdownStage Serializer
 * @export
 * @interface AccountLockdownStageRequest
 */
export interface AccountLockdownStageRequest {
    /**
     *
     * @type {string}
     * @memberof AccountLockdownStageRequest
     */
    name: string;
    /**
     * Deactivate the user account (set is_active to False)
     * @type {boolean}
     * @memberof AccountLockdownStageRequest
     */
    deactivateUser?: boolean;
    /**
     * Set an unusable password for the user
     * @type {boolean}
     * @memberof AccountLockdownStageRequest
     */
    setUnusablePassword?: boolean;
    /**
     * Delete all active sessions for the user
     * @type {boolean}
     * @memberof AccountLockdownStageRequest
     */
    deleteSessions?: boolean;
    /**
     * Revoke all tokens for the user (API, app password, recovery, verification, OAuth)
     * @type {boolean}
     * @memberof AccountLockdownStageRequest
     */
    revokeTokens?: boolean;
    /**
     * Flow to redirect users to after self-service lockdown. This flow should not require authentication since the user's session is deleted.
     * @type {string}
     * @memberof AccountLockdownStageRequest
     */
    selfServiceCompletionFlow?: string | null;
}

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

export function AccountLockdownStageRequestFromJSON(json: any): AccountLockdownStageRequest {
    return AccountLockdownStageRequestFromJSONTyped(json, false);
}

export function AccountLockdownStageRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): AccountLockdownStageRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        deactivateUser: json["deactivate_user"] == null ? undefined : json["deactivate_user"],
        setUnusablePassword:
            json["set_unusable_password"] == null ? undefined : json["set_unusable_password"],
        deleteSessions: json["delete_sessions"] == null ? undefined : json["delete_sessions"],
        revokeTokens: json["revoke_tokens"] == null ? undefined : json["revoke_tokens"],
        selfServiceCompletionFlow:
            json["self_service_completion_flow"] == null
                ? undefined
                : json["self_service_completion_flow"],
    };
}

export function AccountLockdownStageRequestToJSON(json: any): AccountLockdownStageRequest {
    return AccountLockdownStageRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        deactivate_user: value["deactivateUser"],
        set_unusable_password: value["setUnusablePassword"],
        delete_sessions: value["deleteSessions"],
        revoke_tokens: value["revokeTokens"],
        self_service_completion_flow: value["selfServiceCompletionFlow"],
    };
}
