UNPKG

@bitblit/ratchet-misc

Version:

Ratchet miscellaneous tooling that requires smallish dependant libraries

51 lines 2 kB
import { exists } from '../runtime.js'; import { GetExtendedListAllOfCampaignStatsFromJSON, GetExtendedListAllOfCampaignStatsToJSON } from './GetExtendedListAllOfCampaignStats.js'; export function instanceOfGetExtendedList(value) { let isInstance = true; isInstance = isInstance && 'id' in value; isInstance = isInstance && 'name' in value; isInstance = isInstance && 'totalBlacklisted' in value; isInstance = isInstance && 'totalSubscribers' in value; isInstance = isInstance && 'folderId' in value; isInstance = isInstance && 'createdAt' in value; return isInstance; } export function GetExtendedListFromJSON(json) { return GetExtendedListFromJSONTyped(json, false); } export function GetExtendedListFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { id: json['id'], name: json['name'], totalBlacklisted: json['totalBlacklisted'], totalSubscribers: json['totalSubscribers'], folderId: json['folderId'], createdAt: new Date(json['createdAt']), campaignStats: !exists(json, 'campaignStats') ? undefined : json['campaignStats'].map(GetExtendedListAllOfCampaignStatsFromJSON), dynamicList: !exists(json, 'dynamicList') ? undefined : json['dynamicList'], }; } export function GetExtendedListToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, name: value.name, totalBlacklisted: value.totalBlacklisted, totalSubscribers: value.totalSubscribers, folderId: value.folderId, createdAt: value.createdAt.toISOString(), campaignStats: value.campaignStats === undefined ? undefined : value.campaignStats.map(GetExtendedListAllOfCampaignStatsToJSON), dynamicList: value.dynamicList, }; } //# sourceMappingURL=GetExtendedList.js.map