/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2026.8.0-rc7 * 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. */ import { mapValues } from '../runtime'; import type { FlowSet } from './FlowSet'; import { FlowSetFromJSON, FlowSetFromJSONTyped, FlowSetToJSON, FlowSetToJSONTyped, } from './FlowSet'; /** * AccountLockdownStage Serializer * @export * @interface AccountLockdownStage */ export interface AccountLockdownStage { /** * * @type {string} * @memberof AccountLockdownStage */ readonly pk: string; /** * * @type {string} * @memberof AccountLockdownStage */ name: string; /** * Get object type so that we know how to edit the object * @type {string} * @memberof AccountLockdownStage */ readonly component: string; /** * Return object's verbose_name * @type {string} * @memberof AccountLockdownStage */ readonly verboseName: string; /** * Return object's plural verbose_name * @type {string} * @memberof AccountLockdownStage */ readonly verboseNamePlural: string; /** * Return internal model name * @type {string} * @memberof AccountLockdownStage */ readonly metaModelName: string; /** * * @type {Array} * @memberof AccountLockdownStage */ readonly flowSet: Array; /** * Deactivate the user account (set is_active to False) * @type {boolean} * @memberof AccountLockdownStage */ deactivateUser?: boolean; /** * Set an unusable password for the user * @type {boolean} * @memberof AccountLockdownStage */ setUnusablePassword?: boolean; /** * Delete all active sessions for the user * @type {boolean} * @memberof AccountLockdownStage */ deleteSessions?: boolean; /** * Revoke all tokens for the user (API, app password, recovery, verification, OAuth) * @type {boolean} * @memberof AccountLockdownStage */ 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 AccountLockdownStage */ selfServiceCompletionFlow?: string | null; } /** * Check if a given object implements the AccountLockdownStage interface. */ export function instanceOfAccountLockdownStage(value: object): value is AccountLockdownStage { if (!('pk' in value) || value['pk'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('component' in value) || value['component'] === undefined) return false; if (!('verboseName' in value) || value['verboseName'] === undefined) return false; if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; if (!('flowSet' in value) || value['flowSet'] === undefined) return false; return true; } export function AccountLockdownStageFromJSON(json: any): AccountLockdownStage { return AccountLockdownStageFromJSONTyped(json, false); } export function AccountLockdownStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountLockdownStage { if (json == null) { return json; } return { 'pk': json['pk'], 'name': json['name'], 'component': json['component'], 'verboseName': json['verbose_name'], 'verboseNamePlural': json['verbose_name_plural'], 'metaModelName': json['meta_model_name'], 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), '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 AccountLockdownStageToJSON(json: any): AccountLockdownStage { return AccountLockdownStageToJSONTyped(json, false); } export function AccountLockdownStageToJSONTyped(value?: Omit | 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'], }; }