@fnt-eve/esi-client-typescript
Version:
[](https://www.npmjs.com/package/@fnt-eve/esi-client-typescript)
82 lines (81 loc) • 3.3 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* EVE Swagger Interface
* An OpenAPI for EVE Online
*
* The version of the OpenAPI document: 1.33
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { GetSovereigntyCampaignsParticipantFromJSON, GetSovereigntyCampaignsParticipantToJSON, } from './GetSovereigntyCampaignsParticipant';
/**
* @export
*/
export const GetSovereigntyCampaigns200OkEventTypeEnum = {
TcuDefense: 'tcu_defense',
IhubDefense: 'ihub_defense',
StationDefense: 'station_defense',
StationFreeport: 'station_freeport'
};
/**
* Check if a given object implements the GetSovereigntyCampaigns200Ok interface.
*/
export function instanceOfGetSovereigntyCampaigns200Ok(value) {
if (!('campaignId' in value) || value['campaignId'] === undefined)
return false;
if (!('constellationId' in value) || value['constellationId'] === undefined)
return false;
if (!('eventType' in value) || value['eventType'] === undefined)
return false;
if (!('solarSystemId' in value) || value['solarSystemId'] === undefined)
return false;
if (!('startTime' in value) || value['startTime'] === undefined)
return false;
if (!('structureId' in value) || value['structureId'] === undefined)
return false;
return true;
}
export function GetSovereigntyCampaigns200OkFromJSON(json) {
return GetSovereigntyCampaigns200OkFromJSONTyped(json, false);
}
export function GetSovereigntyCampaigns200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'attackersScore': json['attackers_score'] == null ? undefined : json['attackers_score'],
'campaignId': json['campaign_id'],
'constellationId': json['constellation_id'],
'defenderId': json['defender_id'] == null ? undefined : json['defender_id'],
'defenderScore': json['defender_score'] == null ? undefined : json['defender_score'],
'eventType': json['event_type'],
'participants': json['participants'] == null ? undefined : (json['participants'].map(GetSovereigntyCampaignsParticipantFromJSON)),
'solarSystemId': json['solar_system_id'],
'startTime': (new Date(json['start_time'])),
'structureId': json['structure_id'],
};
}
export function GetSovereigntyCampaigns200OkToJSON(json) {
return GetSovereigntyCampaigns200OkToJSONTyped(json, false);
}
export function GetSovereigntyCampaigns200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'attackers_score': value['attackersScore'],
'campaign_id': value['campaignId'],
'constellation_id': value['constellationId'],
'defender_id': value['defenderId'],
'defender_score': value['defenderScore'],
'event_type': value['eventType'],
'participants': value['participants'] == null ? undefined : (value['participants'].map(GetSovereigntyCampaignsParticipantToJSON)),
'solar_system_id': value['solarSystemId'],
'start_time': ((value['startTime']).toISOString()),
'structure_id': value['structureId'],
};
}