/* 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 PatchedAccountLockdownStageRequest
 */
export interface PatchedAccountLockdownStageRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedAccountLockdownStageRequest
     */
    name?: string;
    /**
     * Deactivate the user account (set is_active to False)
     * @type {boolean}
     * @memberof PatchedAccountLockdownStageRequest
     */
    deactivateUser?: boolean;
    /**
     * Set an unusable password for the user
     * @type {boolean}
     * @memberof PatchedAccountLockdownStageRequest
     */
    setUnusablePassword?: boolean;
    /**
     * Delete all active sessions for the user
     * @type {boolean}
     * @memberof PatchedAccountLockdownStageRequest
     */
    deleteSessions?: boolean;
    /**
     * Revoke all tokens for the user (API, app password, recovery, verification, OAuth)
     * @type {boolean}
     * @memberof PatchedAccountLockdownStageRequest
     */
    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 PatchedAccountLockdownStageRequest
     */
    selfServiceCompletionFlow?: string | null;
}

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

export function PatchedAccountLockdownStageRequestFromJSON(
    json: any,
): PatchedAccountLockdownStageRequest {
    return PatchedAccountLockdownStageRequestFromJSONTyped(json, false);
}

export function PatchedAccountLockdownStageRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedAccountLockdownStageRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"] == null ? undefined : 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 PatchedAccountLockdownStageRequestToJSON(
    json: any,
): PatchedAccountLockdownStageRequest {
    return PatchedAccountLockdownStageRequestToJSONTyped(json, false);
}

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