Files
csgowtf/src/api/models/Match.ts
2022-03-22 10:08:24 +01:00

172 lines
3.2 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* csgoWTF API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
* Contact: api@csgow.tf
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists } from "@/api/runtime";
/**
*
* @export
* @interface Match
*/
export interface Match {
/**
*
* @type {string}
* @memberof Match
*/
matchId: string;
/**
*
* @type {string}
* @memberof Match
*/
shareCode?: string;
/**
*
* @type {string}
* @memberof Match
*/
map: string;
/**
*
* @type {number}
* @memberof Match
*/
date: number;
/**
*
* @type {Array<number>}
* @memberof Match
*/
score: Array<number>;
/**
*
* @type {number}
* @memberof Match
*/
duration: number;
/**
*
* @type {number}
* @memberof Match
*/
matchResult: MatchMatchResultEnum;
/**
*
* @type {number}
* @memberof Match
*/
maxRounds?: number;
/**
*
* @type {boolean}
* @memberof Match
*/
parsed: boolean;
/**
*
* @type {string}
* @memberof Match
*/
replayUrl?: string;
/**
*
* @type {boolean}
* @memberof Match
*/
vac: boolean;
/**
*
* @type {boolean}
* @memberof Match
*/
gameBan: boolean;
/**
*
* @type {number}
* @memberof Match
*/
avgRank?: number;
/**
*
* @type {number}
* @memberof Match
*/
tickRate?: number;
}
/**
* @export
* @enum {string}
*/
export enum MatchMatchResultEnum {
NUMBER_0 = 0,
NUMBER_1 = 1,
NUMBER_2 = 2,
}
export function MatchFromJSON(json: any): Match {
return MatchFromJSONTyped(json, false);
}
export function MatchFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): Match {
if (json === undefined || json === null) {
return json;
}
return {
matchId: json["match_id"],
shareCode: !exists(json, "share_code") ? undefined : json["share_code"],
map: json["map"],
date: json["date"],
score: json["score"],
duration: json["duration"],
matchResult: json["match_result"],
maxRounds: !exists(json, "max_rounds") ? undefined : json["max_rounds"],
parsed: json["parsed"],
replayUrl: !exists(json, "replay_url") ? undefined : json["replay_url"],
vac: json["vac"],
gameBan: json["game_ban"],
avgRank: !exists(json, "avg_rank") ? undefined : json["avg_rank"],
tickRate: !exists(json, "tick_rate") ? undefined : json["tick_rate"],
};
}
export function MatchToJSON(value?: Match | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
match_id: value.matchId,
share_code: value.shareCode,
map: value.map,
date: value.date,
score: value.score,
duration: value.duration,
match_result: value.matchResult,
max_rounds: value.maxRounds,
parsed: value.parsed,
replay_url: value.replayUrl,
vac: value.vac,
game_ban: value.gameBan,
avg_rank: value.avgRank,
tick_rate: value.tickRate,
};
}