UNPKG

wallee

Version:
35 lines (34 loc) 1.11 kB
/** * Check if a given object implements the SubscriptionMetricUpdate interface. */ export function instanceOfSubscriptionMetricUpdate(value) { if (!('version' in value) || value['version'] === undefined) return false; return true; } export function SubscriptionMetricUpdateFromJSON(json) { return SubscriptionMetricUpdateFromJSONTyped(json, false); } export function SubscriptionMetricUpdateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'name': json['name'] == null ? undefined : json['name'], 'description': json['description'] == null ? undefined : json['description'], 'version': json['version'], }; } export function SubscriptionMetricUpdateToJSON(json) { return SubscriptionMetricUpdateToJSONTyped(json, false); } export function SubscriptionMetricUpdateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'name': value['name'], 'description': value['description'], 'version': value['version'], }; }