/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2025.6.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. */ import { mapValues } from '../runtime'; import type { UserVerificationEnum } from './UserVerificationEnum'; import { UserVerificationEnumFromJSON, UserVerificationEnumFromJSONTyped, UserVerificationEnumToJSON, UserVerificationEnumToJSONTyped, } from './UserVerificationEnum'; import type { AuthenticatorAttachmentEnum } from './AuthenticatorAttachmentEnum'; import { AuthenticatorAttachmentEnumFromJSON, AuthenticatorAttachmentEnumFromJSONTyped, AuthenticatorAttachmentEnumToJSON, AuthenticatorAttachmentEnumToJSONTyped, } from './AuthenticatorAttachmentEnum'; import type { ResidentKeyRequirementEnum } from './ResidentKeyRequirementEnum'; import { ResidentKeyRequirementEnumFromJSON, ResidentKeyRequirementEnumFromJSONTyped, ResidentKeyRequirementEnumToJSON, ResidentKeyRequirementEnumToJSONTyped, } from './ResidentKeyRequirementEnum'; import type { FlowSetRequest } from './FlowSetRequest'; import { FlowSetRequestFromJSON, FlowSetRequestFromJSONTyped, FlowSetRequestToJSON, FlowSetRequestToJSONTyped, } from './FlowSetRequest'; /** * AuthenticatorWebAuthnStage Serializer * @export * @interface AuthenticatorWebAuthnStageRequest */ export interface AuthenticatorWebAuthnStageRequest { /** * * @type {string} * @memberof AuthenticatorWebAuthnStageRequest */ name: string; /** * * @type {Array} * @memberof AuthenticatorWebAuthnStageRequest */ flowSet?: Array; /** * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. * @type {string} * @memberof AuthenticatorWebAuthnStageRequest */ configureFlow?: string | null; /** * * @type {string} * @memberof AuthenticatorWebAuthnStageRequest */ friendlyName?: string | null; /** * * @type {UserVerificationEnum} * @memberof AuthenticatorWebAuthnStageRequest */ userVerification?: UserVerificationEnum; /** * * @type {AuthenticatorAttachmentEnum} * @memberof AuthenticatorWebAuthnStageRequest */ authenticatorAttachment?: AuthenticatorAttachmentEnum | null; /** * * @type {ResidentKeyRequirementEnum} * @memberof AuthenticatorWebAuthnStageRequest */ residentKeyRequirement?: ResidentKeyRequirementEnum; /** * * @type {Array} * @memberof AuthenticatorWebAuthnStageRequest */ deviceTypeRestrictions?: Array; /** * * @type {number} * @memberof AuthenticatorWebAuthnStageRequest */ maxAttempts?: number; } /** * Check if a given object implements the AuthenticatorWebAuthnStageRequest interface. */ export function instanceOfAuthenticatorWebAuthnStageRequest(value: object): value is AuthenticatorWebAuthnStageRequest { if (!('name' in value) || value['name'] === undefined) return false; return true; } export function AuthenticatorWebAuthnStageRequestFromJSON(json: any): AuthenticatorWebAuthnStageRequest { return AuthenticatorWebAuthnStageRequestFromJSONTyped(json, false); } export function AuthenticatorWebAuthnStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorWebAuthnStageRequest { if (json == null) { return json; } return { 'name': json['name'], 'flowSet': json['flow_set'] == null ? undefined : ((json['flow_set'] as Array).map(FlowSetRequestFromJSON)), 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], 'userVerification': json['user_verification'] == null ? undefined : UserVerificationEnumFromJSON(json['user_verification']), 'authenticatorAttachment': json['authenticator_attachment'] == null ? undefined : AuthenticatorAttachmentEnumFromJSON(json['authenticator_attachment']), 'residentKeyRequirement': json['resident_key_requirement'] == null ? undefined : ResidentKeyRequirementEnumFromJSON(json['resident_key_requirement']), 'deviceTypeRestrictions': json['device_type_restrictions'] == null ? undefined : json['device_type_restrictions'], 'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'], }; } export function AuthenticatorWebAuthnStageRequestToJSON(json: any): AuthenticatorWebAuthnStageRequest { return AuthenticatorWebAuthnStageRequestToJSONTyped(json, false); } export function AuthenticatorWebAuthnStageRequestToJSONTyped(value?: AuthenticatorWebAuthnStageRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'flow_set': value['flowSet'] == null ? undefined : ((value['flowSet'] as Array).map(FlowSetRequestToJSON)), 'configure_flow': value['configureFlow'], 'friendly_name': value['friendlyName'], 'user_verification': UserVerificationEnumToJSON(value['userVerification']), 'authenticator_attachment': AuthenticatorAttachmentEnumToJSON(value['authenticatorAttachment']), 'resident_key_requirement': ResidentKeyRequirementEnumToJSON(value['residentKeyRequirement']), 'device_type_restrictions': value['deviceTypeRestrictions'], 'max_attempts': value['maxAttempts'], }; }