Generate code with openapi-generator (#5)

This commit is contained in:
Guilherme Werner 2025-05-27 08:11:22 -03:00 committed by GitHub
parent 1a8ffe89bc
commit be21a2496e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 8992 additions and 3492 deletions

128
src/models/GroupGame.ts Normal file
View file

@ -0,0 +1,128 @@
/* 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 { Group } from './Group';
import {
GroupFromJSON,
GroupFromJSONTyped,
GroupToJSON,
GroupToJSONTyped,
} from './Group';
import type { Application } from './Application';
import {
ApplicationFromJSON,
ApplicationFromJSONTyped,
ApplicationToJSON,
ApplicationToJSONTyped,
} from './Application';
/**
*
* @export
* @interface GroupGame
*/
export interface GroupGame {
/**
*
* @type {string}
* @memberof GroupGame
*/
groupId?: string;
/**
*
* @type {Group}
* @memberof GroupGame
*/
group?: Group;
/**
*
* @type {string}
* @memberof GroupGame
*/
applicationId?: string;
/**
*
* @type {Application}
* @memberof GroupGame
*/
application?: Application;
/**
*
* @type {any}
* @memberof GroupGame
*/
stats?: any | null;
/**
*
* @type {Date}
* @memberof GroupGame
*/
acquired?: Date;
/**
*
* @type {Date}
* @memberof GroupGame
*/
lastUsed?: Date | null;
}
/**
* Check if a given object implements the GroupGame interface.
*/
export function instanceOfGroupGame(value: object): value is GroupGame {
return true;
}
export function GroupGameFromJSON(json: any): GroupGame {
return GroupGameFromJSONTyped(json, false);
}
export function GroupGameFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupGame {
if (json == null) {
return json;
}
return {
'groupId': json['group_id'] == null ? undefined : json['group_id'],
'group': json['group'] == null ? undefined : GroupFromJSON(json['group']),
'applicationId': json['application_id'] == null ? undefined : json['application_id'],
'application': json['application'] == null ? undefined : ApplicationFromJSON(json['application']),
'stats': json['stats'] == null ? undefined : json['stats'],
'acquired': json['acquired'] == null ? undefined : (new Date(json['acquired'])),
'lastUsed': json['last_used'] == null ? undefined : (new Date(json['last_used'])),
};
}
export function GroupGameToJSON(json: any): GroupGame {
return GroupGameToJSONTyped(json, false);
}
export function GroupGameToJSONTyped(value?: GroupGame | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'group_id': value['groupId'],
'group': GroupToJSON(value['group']),
'application_id': value['applicationId'],
'application': ApplicationToJSON(value['application']),
'stats': value['stats'],
'acquired': value['acquired'] == null ? undefined : ((value['acquired']).toISOString()),
'last_used': value['lastUsed'] == null ? undefined : ((value['lastUsed'] as any).toISOString()),
};
}