UNPKG

@fnt-eve/esi-client-typescript

Version:

[![npm version](https://img.shields.io/npm/v/@fnt-eve/esi-client-typescript)](https://www.npmjs.com/package/@fnt-eve/esi-client-typescript)

55 lines (54 loc) 2.31 kB
/* 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 { GetCharactersCharacterIdMailMailIdRecipientFromJSON, GetCharactersCharacterIdMailMailIdRecipientToJSON, } from './GetCharactersCharacterIdMailMailIdRecipient'; /** * Check if a given object implements the GetCharactersCharacterIdMailMailIdOk interface. */ export function instanceOfGetCharactersCharacterIdMailMailIdOk(value) { return true; } export function GetCharactersCharacterIdMailMailIdOkFromJSON(json) { return GetCharactersCharacterIdMailMailIdOkFromJSONTyped(json, false); } export function GetCharactersCharacterIdMailMailIdOkFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'body': json['body'] == null ? undefined : json['body'], 'from': json['from'] == null ? undefined : json['from'], 'labels': json['labels'] == null ? undefined : json['labels'], 'read': json['read'] == null ? undefined : json['read'], 'recipients': json['recipients'] == null ? undefined : (new Set(json['recipients'].map(GetCharactersCharacterIdMailMailIdRecipientFromJSON))), 'subject': json['subject'] == null ? undefined : json['subject'], 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), }; } export function GetCharactersCharacterIdMailMailIdOkToJSON(json) { return GetCharactersCharacterIdMailMailIdOkToJSONTyped(json, false); } export function GetCharactersCharacterIdMailMailIdOkToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'body': value['body'], 'from': value['from'], 'labels': value['labels'], 'read': value['read'], 'recipients': value['recipients'] == null ? undefined : (Array.from(value['recipients']).map(GetCharactersCharacterIdMailMailIdRecipientToJSON)), 'subject': value['subject'], 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()), }; }