UNPKG

wallee

Version:
51 lines (50 loc) 2.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfSubscriptionAffiliateCreate = instanceOfSubscriptionAffiliateCreate; exports.SubscriptionAffiliateCreateFromJSON = SubscriptionAffiliateCreateFromJSON; exports.SubscriptionAffiliateCreateFromJSONTyped = SubscriptionAffiliateCreateFromJSONTyped; exports.SubscriptionAffiliateCreateToJSON = SubscriptionAffiliateCreateToJSON; exports.SubscriptionAffiliateCreateToJSONTyped = SubscriptionAffiliateCreateToJSONTyped; const CreationEntityState_1 = require("./CreationEntityState"); /** * Check if a given object implements the SubscriptionAffiliateCreate interface. */ function instanceOfSubscriptionAffiliateCreate(value) { if (!('reference' in value) || value['reference'] === undefined) return false; if (!('externalId' in value) || value['externalId'] === undefined) return false; return true; } function SubscriptionAffiliateCreateFromJSON(json) { return SubscriptionAffiliateCreateFromJSONTyped(json, false); } function SubscriptionAffiliateCreateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'metaData': json['metaData'] == null ? undefined : json['metaData'], 'name': json['name'] == null ? undefined : json['name'], 'language': json['language'] == null ? undefined : json['language'], 'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']), 'reference': json['reference'], 'externalId': json['externalId'], }; } function SubscriptionAffiliateCreateToJSON(json) { return SubscriptionAffiliateCreateToJSONTyped(json, false); } function SubscriptionAffiliateCreateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'metaData': value['metaData'], 'name': value['name'], 'language': value['language'], 'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']), 'reference': value['reference'], 'externalId': value['externalId'], }; }