@fnt-eve/esi-client-typescript
Version:
[](https://www.npmjs.com/package/@fnt-eve/esi-client-typescript)
58 lines (57 loc) • 2.57 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* EVE Swagger Interface
* An OpenAPI for EVE Online
*
* The version of the OpenAPI document: 1.36
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { GetCharactersCharacterIdFwStatsKillsFromJSON, GetCharactersCharacterIdFwStatsKillsToJSON, } from './GetCharactersCharacterIdFwStatsKills';
import { GetCharactersCharacterIdFwStatsVictoryPointsFromJSON, GetCharactersCharacterIdFwStatsVictoryPointsToJSON, } from './GetCharactersCharacterIdFwStatsVictoryPoints';
/**
* Check if a given object implements the GetCharactersCharacterIdFwStatsOk interface.
*/
export function instanceOfGetCharactersCharacterIdFwStatsOk(value) {
if (!('kills' in value) || value['kills'] === undefined)
return false;
if (!('victoryPoints' in value) || value['victoryPoints'] === undefined)
return false;
return true;
}
export function GetCharactersCharacterIdFwStatsOkFromJSON(json) {
return GetCharactersCharacterIdFwStatsOkFromJSONTyped(json, false);
}
export function GetCharactersCharacterIdFwStatsOkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'currentRank': json['current_rank'] == null ? undefined : json['current_rank'],
'enlistedOn': json['enlisted_on'] == null ? undefined : (new Date(json['enlisted_on'])),
'factionId': json['faction_id'] == null ? undefined : json['faction_id'],
'highestRank': json['highest_rank'] == null ? undefined : json['highest_rank'],
'kills': GetCharactersCharacterIdFwStatsKillsFromJSON(json['kills']),
'victoryPoints': GetCharactersCharacterIdFwStatsVictoryPointsFromJSON(json['victory_points']),
};
}
export function GetCharactersCharacterIdFwStatsOkToJSON(json) {
return GetCharactersCharacterIdFwStatsOkToJSONTyped(json, false);
}
export function GetCharactersCharacterIdFwStatsOkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'current_rank': value['currentRank'],
'enlisted_on': value['enlistedOn'] == null ? undefined : ((value['enlistedOn']).toISOString()),
'faction_id': value['factionId'],
'highest_rank': value['highestRank'],
'kills': GetCharactersCharacterIdFwStatsKillsToJSON(value['kills']),
'victory_points': GetCharactersCharacterIdFwStatsVictoryPointsToJSON(value['victoryPoints']),
};
}