/* tslint:disable */
/* eslint-disable */
/**
 * Tribufu API
 * API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.3.0
 * Contact: contact@tribufu.com
 *
 * 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 LeaderboardItem
 */
export interface LeaderboardItem {
    /**
     * 
     * @type {string}
     * @memberof LeaderboardItem
     */
    name?: string | null;
    /**
     * 
     * @type {string}
     * @memberof LeaderboardItem
     */
    displayName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof LeaderboardItem
     */
    photoUrl?: string | null;
    /**
     * 
     * @type {number}
     * @memberof LeaderboardItem
     */
    level?: number;
    /**
     * 
     * @type {number}
     * @memberof LeaderboardItem
     */
    experience?: number;
    /**
     * 
     * @type {number}
     * @memberof LeaderboardItem
     */
    points?: number;
}

/**
 * Check if a given object implements the LeaderboardItem interface.
 */
export function instanceOfLeaderboardItem(value: object): value is LeaderboardItem {
    return true;
}

export function LeaderboardItemFromJSON(json: any): LeaderboardItem {
    return LeaderboardItemFromJSONTyped(json, false);
}

export function LeaderboardItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeaderboardItem {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'] == null ? undefined : json['name'],
        'displayName': json['display_name'] == null ? undefined : json['display_name'],
        'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'],
        'level': json['level'] == null ? undefined : json['level'],
        'experience': json['experience'] == null ? undefined : json['experience'],
        'points': json['points'] == null ? undefined : json['points'],
    };
}

export function LeaderboardItemToJSON(json: any): LeaderboardItem {
    return LeaderboardItemToJSONTyped(json, false);
}

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

    return {
        
        'name': value['name'],
        'display_name': value['displayName'],
        'photo_url': value['photoUrl'],
        'level': value['level'],
        'experience': value['experience'],
        'points': value['points'],
    };
}

