/* 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';
import type { Login202ResponsePayload } from './Login202ResponsePayload';
import {
    Login202ResponsePayloadFromJSON,
    Login202ResponsePayloadFromJSONTyped,
    Login202ResponsePayloadToJSON,
    Login202ResponsePayloadToJSONTyped,
} from './Login202ResponsePayload';

/**
 * 
 * @export
 * @interface Login202Response
 */
export interface Login202Response {
    /**
     * 
     * @type {string}
     * @memberof Login202Response
     */
    kind: Login202ResponseKindEnum;
    /**
     * 
     * @type {string}
     * @memberof Login202Response
     */
    msg: Login202ResponseMsgEnum;
    /**
     * 
     * @type {Login202ResponsePayload}
     * @memberof Login202Response
     */
    payload: Login202ResponsePayload;
}


/**
 * @export
 */
export const Login202ResponseKindEnum = {
    OtpRequired: 'otpRequired'
} as const;
export type Login202ResponseKindEnum = typeof Login202ResponseKindEnum[keyof typeof Login202ResponseKindEnum];

/**
 * @export
 */
export const Login202ResponseMsgEnum = {
    LoginOtpRequired: 'login.otpRequired'
} as const;
export type Login202ResponseMsgEnum = typeof Login202ResponseMsgEnum[keyof typeof Login202ResponseMsgEnum];


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

export function Login202ResponseFromJSON(json: any): Login202Response {
    return Login202ResponseFromJSONTyped(json, false);
}

export function Login202ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Login202Response {
    if (json == null) {
        return json;
    }
    return {
        
        'kind': json['kind'],
        'msg': json['msg'],
        'payload': Login202ResponsePayloadFromJSON(json['payload']),
    };
}

export function Login202ResponseToJSON(json: any): Login202Response {
    return Login202ResponseToJSONTyped(json, false);
}

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

    return {
        
        'kind': value['kind'],
        'msg': value['msg'],
        'payload': Login202ResponsePayloadToJSON(value['payload']),
    };
}

