UNPKG

wallee

Version:
39 lines (38 loc) 1.68 kB
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState'; /** * Check if a given object implements the SubscriptionAffiliate interface. */ export function instanceOfSubscriptionAffiliate(value) { return true; } export function SubscriptionAffiliateFromJSON(json) { return SubscriptionAffiliateFromJSONTyped(json, false); } export function SubscriptionAffiliateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'reference': json['reference'] == null ? undefined : json['reference'], 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'metaData': json['metaData'] == null ? undefined : json['metaData'], 'name': json['name'] == null ? undefined : json['name'], 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'externalId': json['externalId'] == null ? undefined : json['externalId'], 'language': json['language'] == null ? undefined : json['language'], 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : CreationEntityStateFromJSON(json['state']), 'version': json['version'] == null ? undefined : json['version'], }; } export function SubscriptionAffiliateToJSON(json) { return SubscriptionAffiliateToJSONTyped(json, false); } export function SubscriptionAffiliateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': CreationEntityStateToJSON(value['state']), }; }