/* 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 { PongHistory200ResponsePayloadDataInnerLeft } from './PongHistory200ResponsePayloadDataInnerLeft';
import {
    PongHistory200ResponsePayloadDataInnerLeftFromJSON,
    PongHistory200ResponsePayloadDataInnerLeftFromJSONTyped,
    PongHistory200ResponsePayloadDataInnerLeftToJSON,
    PongHistory200ResponsePayloadDataInnerLeftToJSONTyped,
} from './PongHistory200ResponsePayloadDataInnerLeft';

/**
 * 
 * @export
 * @interface PongHistory200ResponsePayloadDataInner
 */
export interface PongHistory200ResponsePayloadDataInner {
    /**
     * 
     * @type {string}
     * @memberof PongHistory200ResponsePayloadDataInner
     */
    gameId: string;
    /**
     * 
     * @type {PongHistory200ResponsePayloadDataInnerLeft}
     * @memberof PongHistory200ResponsePayloadDataInner
     */
    left: PongHistory200ResponsePayloadDataInnerLeft;
    /**
     * 
     * @type {PongHistory200ResponsePayloadDataInnerLeft}
     * @memberof PongHistory200ResponsePayloadDataInner
     */
    right: PongHistory200ResponsePayloadDataInnerLeft;
    /**
     * 
     * @type {boolean}
     * @memberof PongHistory200ResponsePayloadDataInner
     */
    local: boolean;
    /**
     * 
     * @type {string}
     * @memberof PongHistory200ResponsePayloadDataInner
     */
    date: string;
    /**
     * 
     * @type {string}
     * @memberof PongHistory200ResponsePayloadDataInner
     */
    outcome: PongHistory200ResponsePayloadDataInnerOutcomeEnum;
}


/**
 * @export
 */
export const PongHistory200ResponsePayloadDataInnerOutcomeEnum = {
    WinL: 'winL',
    WinR: 'winR',
    Other: 'other'
} as const;
export type PongHistory200ResponsePayloadDataInnerOutcomeEnum = typeof PongHistory200ResponsePayloadDataInnerOutcomeEnum[keyof typeof PongHistory200ResponsePayloadDataInnerOutcomeEnum];


/**
 * Check if a given object implements the PongHistory200ResponsePayloadDataInner interface.
 */
export function instanceOfPongHistory200ResponsePayloadDataInner(value: object): value is PongHistory200ResponsePayloadDataInner {
    if (!('gameId' in value) || value['gameId'] === undefined) return false;
    if (!('left' in value) || value['left'] === undefined) return false;
    if (!('right' in value) || value['right'] === undefined) return false;
    if (!('local' in value) || value['local'] === undefined) return false;
    if (!('date' in value) || value['date'] === undefined) return false;
    if (!('outcome' in value) || value['outcome'] === undefined) return false;
    return true;
}

export function PongHistory200ResponsePayloadDataInnerFromJSON(json: any): PongHistory200ResponsePayloadDataInner {
    return PongHistory200ResponsePayloadDataInnerFromJSONTyped(json, false);
}

export function PongHistory200ResponsePayloadDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PongHistory200ResponsePayloadDataInner {
    if (json == null) {
        return json;
    }
    return {
        
        'gameId': json['gameId'],
        'left': PongHistory200ResponsePayloadDataInnerLeftFromJSON(json['left']),
        'right': PongHistory200ResponsePayloadDataInnerLeftFromJSON(json['right']),
        'local': json['local'],
        'date': json['date'],
        'outcome': json['outcome'],
    };
}

export function PongHistory200ResponsePayloadDataInnerToJSON(json: any): PongHistory200ResponsePayloadDataInner {
    return PongHistory200ResponsePayloadDataInnerToJSONTyped(json, false);
}

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

    return {
        
        'gameId': value['gameId'],
        'left': PongHistory200ResponsePayloadDataInnerLeftToJSON(value['left']),
        'right': PongHistory200ResponsePayloadDataInnerLeftToJSON(value['right']),
        'local': value['local'],
        'date': value['date'],
        'outcome': value['outcome'],
    };
}

