mirror of
https://github.com/tribufu/tribufu-js
synced 2026-05-06 06:47:27 +00:00
315 lines
8.4 KiB
TypeScript
315 lines
8.4 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Tribufu API
|
|
* REST API to access Tribufu services.
|
|
*
|
|
* The version of the OpenAPI document: 1.1.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';
|
|
import type { ApplicationType } from './ApplicationType';
|
|
import {
|
|
ApplicationTypeFromJSON,
|
|
ApplicationTypeFromJSONTyped,
|
|
ApplicationTypeToJSON,
|
|
ApplicationTypeToJSONTyped,
|
|
} from './ApplicationType';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface Game
|
|
*/
|
|
export interface Game {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
gamePort?: number | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
queryPort?: number | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
rconPort?: number | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
serverCount?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
steamAppId?: number | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
steamServerAppId?: number | null;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof Game
|
|
*/
|
|
enableServers?: boolean;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
rustGamedigId?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
nodeGamedigId?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
serverConnectUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
serverTags?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
id?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
*
|
|
* @type {ApplicationType}
|
|
* @memberof Game
|
|
*/
|
|
type?: ApplicationType;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
organizationId?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
iconUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
bannerUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
capsuleImageUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
libraryImageUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
parentId?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
slug?: string | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
visibility?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Game
|
|
*/
|
|
password?: string | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
primary?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
userCount?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
achievementCount?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
badgeCount?: number | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Game
|
|
*/
|
|
downloadCount?: number;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Game
|
|
*/
|
|
created?: Date;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Game
|
|
*/
|
|
updated?: Date | null;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Check if a given object implements the Game interface.
|
|
*/
|
|
export function instanceOfGame(value: object): value is Game {
|
|
return true;
|
|
}
|
|
|
|
export function GameFromJSON(json: any): Game {
|
|
return GameFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function GameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Game {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'gamePort': json['game_port'] == null ? undefined : json['game_port'],
|
|
'queryPort': json['query_port'] == null ? undefined : json['query_port'],
|
|
'rconPort': json['rcon_port'] == null ? undefined : json['rcon_port'],
|
|
'serverCount': json['server_count'] == null ? undefined : json['server_count'],
|
|
'steamAppId': json['steam_app_id'] == null ? undefined : json['steam_app_id'],
|
|
'steamServerAppId': json['steam_server_app_id'] == null ? undefined : json['steam_server_app_id'],
|
|
'enableServers': json['enable_servers'] == null ? undefined : json['enable_servers'],
|
|
'rustGamedigId': json['rust_gamedig_id'] == null ? undefined : json['rust_gamedig_id'],
|
|
'nodeGamedigId': json['node_gamedig_id'] == null ? undefined : json['node_gamedig_id'],
|
|
'serverConnectUrl': json['server_connect_url'] == null ? undefined : json['server_connect_url'],
|
|
'serverTags': json['server_tags'] == null ? undefined : json['server_tags'],
|
|
'id': json['id'] == null ? undefined : json['id'],
|
|
'name': json['name'] == null ? undefined : json['name'],
|
|
'description': json['description'] == null ? undefined : json['description'],
|
|
'type': json['type'] == null ? undefined : ApplicationTypeFromJSON(json['type']),
|
|
'organizationId': json['organization_id'] == null ? undefined : json['organization_id'],
|
|
'iconUrl': json['icon_url'] == null ? undefined : json['icon_url'],
|
|
'bannerUrl': json['banner_url'] == null ? undefined : json['banner_url'],
|
|
'capsuleImageUrl': json['capsule_image_url'] == null ? undefined : json['capsule_image_url'],
|
|
'libraryImageUrl': json['library_image_url'] == null ? undefined : json['library_image_url'],
|
|
'parentId': json['parent_id'] == null ? undefined : json['parent_id'],
|
|
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
'visibility': json['visibility'] == null ? undefined : json['visibility'],
|
|
'password': json['password'] == null ? undefined : json['password'],
|
|
'primary': json['primary'] == null ? undefined : json['primary'],
|
|
'userCount': json['user_count'] == null ? undefined : json['user_count'],
|
|
'achievementCount': json['achievement_count'] == null ? undefined : json['achievement_count'],
|
|
'badgeCount': json['badge_count'] == null ? undefined : json['badge_count'],
|
|
'downloadCount': json['download_count'] == null ? undefined : json['download_count'],
|
|
'created': json['created'] == null ? undefined : (new Date(json['created'])),
|
|
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
|
|
};
|
|
}
|
|
|
|
export function GameToJSON(json: any): Game {
|
|
return GameToJSONTyped(json, false);
|
|
}
|
|
|
|
export function GameToJSONTyped(value?: Game | null, ignoreDiscriminator: boolean = false): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
|
|
return {
|
|
|
|
'game_port': value['gamePort'],
|
|
'query_port': value['queryPort'],
|
|
'rcon_port': value['rconPort'],
|
|
'server_count': value['serverCount'],
|
|
'steam_app_id': value['steamAppId'],
|
|
'steam_server_app_id': value['steamServerAppId'],
|
|
'enable_servers': value['enableServers'],
|
|
'rust_gamedig_id': value['rustGamedigId'],
|
|
'node_gamedig_id': value['nodeGamedigId'],
|
|
'server_connect_url': value['serverConnectUrl'],
|
|
'server_tags': value['serverTags'],
|
|
'id': value['id'],
|
|
'name': value['name'],
|
|
'description': value['description'],
|
|
'type': ApplicationTypeToJSON(value['type']),
|
|
'organization_id': value['organizationId'],
|
|
'icon_url': value['iconUrl'],
|
|
'banner_url': value['bannerUrl'],
|
|
'capsule_image_url': value['capsuleImageUrl'],
|
|
'library_image_url': value['libraryImageUrl'],
|
|
'parent_id': value['parentId'],
|
|
'slug': value['slug'],
|
|
'visibility': value['visibility'],
|
|
'password': value['password'],
|
|
'primary': value['primary'],
|
|
'user_count': value['userCount'],
|
|
'achievement_count': value['achievementCount'],
|
|
'badge_count': value['badgeCount'],
|
|
'download_count': value['downloadCount'],
|
|
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
|
|
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
|
|
};
|
|
}
|
|
|