/* 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 { DigitsEnum } from './DigitsEnum'; import { DigitsEnumFromJSON, DigitsEnumFromJSONTyped, DigitsEnumToJSON, DigitsEnumToJSONTyped, } from './DigitsEnum'; import type { FlowSetRequest } from './FlowSetRequest'; import { FlowSetRequestFromJSON, FlowSetRequestFromJSONTyped, FlowSetRequestToJSON, FlowSetRequestToJSONTyped, } from './FlowSetRequest'; /** * AuthenticatorTOTPStage Serializer * @export * @interface PatchedAuthenticatorTOTPStageRequest */ export interface PatchedAuthenticatorTOTPStageRequest { /** * * @type {string} * @memberof PatchedAuthenticatorTOTPStageRequest */ name?: string; /** * * @type {Array} * @memberof PatchedAuthenticatorTOTPStageRequest */ 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 PatchedAuthenticatorTOTPStageRequest */ configureFlow?: string | null; /** * * @type {string} * @memberof PatchedAuthenticatorTOTPStageRequest */ friendlyName?: string | null; /** * * @type {DigitsEnum} * @memberof PatchedAuthenticatorTOTPStageRequest */ digits?: DigitsEnum; } /** * Check if a given object implements the PatchedAuthenticatorTOTPStageRequest interface. */ export function instanceOfPatchedAuthenticatorTOTPStageRequest(value: object): value is PatchedAuthenticatorTOTPStageRequest { return true; } export function PatchedAuthenticatorTOTPStageRequestFromJSON(json: any): PatchedAuthenticatorTOTPStageRequest { return PatchedAuthenticatorTOTPStageRequestFromJSONTyped(json, false); } export function PatchedAuthenticatorTOTPStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAuthenticatorTOTPStageRequest { if (json == null) { return json; } return { 'name': json['name'] == null ? undefined : 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'], 'digits': json['digits'] == null ? undefined : DigitsEnumFromJSON(json['digits']), }; } export function PatchedAuthenticatorTOTPStageRequestToJSON(json: any): PatchedAuthenticatorTOTPStageRequest { return PatchedAuthenticatorTOTPStageRequestToJSONTyped(json, false); } export function PatchedAuthenticatorTOTPStageRequestToJSONTyped(value?: PatchedAuthenticatorTOTPStageRequest | 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'], 'digits': DigitsEnumToJSON(value['digits']), }; }