TribufuJS/src/models/GroupGame.ts
2025-08-09 20:29:17 -03:00

129 lines
3.2 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Tribufu API
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.2.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 {
if (!('groupId' in value) || value['groupId'] === undefined) return false;
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'],
'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()),
};
}