/* tslint:disable */
/* eslint-disable */
/**
 * @fastify/swagger
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 9.6.1
 * 
 *
 * 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';
/**
 * 
 * @export
 * @interface LoginOtpRequest
 */
export interface LoginOtpRequest {
    /**
     * The token given at the login phase
     * @type {string}
     * @memberof LoginOtpRequest
     */
    token: string;
    /**
     * The OTP given by the user
     * @type {string}
     * @memberof LoginOtpRequest
     */
    code: string;
}

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

export function LoginOtpRequestFromJSON(json: any): LoginOtpRequest {
    return LoginOtpRequestFromJSONTyped(json, false);
}

export function LoginOtpRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginOtpRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'token': json['token'],
        'code': json['code'],
    };
}

export function LoginOtpRequestToJSON(json: any): LoginOtpRequest {
    return LoginOtpRequestToJSONTyped(json, false);
}

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

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

