/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.0-rc1
 * 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';
/**
 * TOTP Challenge response, device is set by get_response_instance
 * @export
 * @interface AuthenticatorTOTPChallengeResponseRequest
 */
export interface AuthenticatorTOTPChallengeResponseRequest {
    /**
     * 
     * @type {string}
     * @memberof AuthenticatorTOTPChallengeResponseRequest
     */
    component?: string;
    /**
     * 
     * @type {number}
     * @memberof AuthenticatorTOTPChallengeResponseRequest
     */
    code: number;
}

/**
 * Check if a given object implements the AuthenticatorTOTPChallengeResponseRequest interface.
 */
export function instanceOfAuthenticatorTOTPChallengeResponseRequest(value: object): value is AuthenticatorTOTPChallengeResponseRequest {
    if (!('code' in value) || value['code'] === undefined) return false;
    return true;
}

export function AuthenticatorTOTPChallengeResponseRequestFromJSON(json: any): AuthenticatorTOTPChallengeResponseRequest {
    return AuthenticatorTOTPChallengeResponseRequestFromJSONTyped(json, false);
}

export function AuthenticatorTOTPChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorTOTPChallengeResponseRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'component': json['component'] == null ? undefined : json['component'],
        'code': json['code'],
    };
}

export function AuthenticatorTOTPChallengeResponseRequestToJSON(json: any): AuthenticatorTOTPChallengeResponseRequest {
    return AuthenticatorTOTPChallengeResponseRequestToJSONTyped(json, false);
}

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

    return {
        
        'component': value['component'],
        'code': value['code'],
    };
}

