/* 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 { GetUser200ResponsePayloadSelfInfo } from './GetUser200ResponsePayloadSelfInfo';
import {
    GetUser200ResponsePayloadSelfInfoFromJSON,
    GetUser200ResponsePayloadSelfInfoFromJSONTyped,
    GetUser200ResponsePayloadSelfInfoToJSON,
    GetUser200ResponsePayloadSelfInfoToJSONTyped,
} from './GetUser200ResponsePayloadSelfInfo';

/**
 * 
 * @export
 * @interface GetUser200ResponsePayload
 */
export interface GetUser200ResponsePayload {
    /**
     * 
     * @type {string}
     * @memberof GetUser200ResponsePayload
     */
    name: string;
    /**
     * 
     * @type {string}
     * @memberof GetUser200ResponsePayload
     */
    id: string;
    /**
     * 
     * @type {boolean}
     * @memberof GetUser200ResponsePayload
     */
    guest: boolean;
    /**
     * 
     * @type {string}
     * @memberof GetUser200ResponsePayload
     */
    desc: string;
    /**
     * 
     * @type {GetUser200ResponsePayloadSelfInfo}
     * @memberof GetUser200ResponsePayload
     */
    selfInfo?: GetUser200ResponsePayloadSelfInfo;
}

/**
 * Check if a given object implements the GetUser200ResponsePayload interface.
 */
export function instanceOfGetUser200ResponsePayload(value: object): value is GetUser200ResponsePayload {
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('id' in value) || value['id'] === undefined) return false;
    if (!('guest' in value) || value['guest'] === undefined) return false;
    if (!('desc' in value) || value['desc'] === undefined) return false;
    return true;
}

export function GetUser200ResponsePayloadFromJSON(json: any): GetUser200ResponsePayload {
    return GetUser200ResponsePayloadFromJSONTyped(json, false);
}

export function GetUser200ResponsePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUser200ResponsePayload {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'],
        'id': json['id'],
        'guest': json['guest'],
        'desc': json['desc'],
        'selfInfo': json['selfInfo'] == null ? undefined : GetUser200ResponsePayloadSelfInfoFromJSON(json['selfInfo']),
    };
}

export function GetUser200ResponsePayloadToJSON(json: any): GetUser200ResponsePayload {
    return GetUser200ResponsePayloadToJSONTyped(json, false);
}

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

    return {
        
        'name': value['name'],
        'id': value['id'],
        'guest': value['guest'],
        'desc': value['desc'],
        'selfInfo': GetUser200ResponsePayloadSelfInfoToJSON(value['selfInfo']),
    };
}

