UNPKG

wallee

Version:
37 lines (36 loc) 1.14 kB
/** * Check if a given object implements the SubscriptionMetricCreate interface. */ export function instanceOfSubscriptionMetricCreate(value) { if (!('name' in value) || value['name'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; return true; } export function SubscriptionMetricCreateFromJSON(json) { return SubscriptionMetricCreateFromJSONTyped(json, false); } export function SubscriptionMetricCreateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'name': json['name'], 'description': json['description'] == null ? undefined : json['description'], 'type': json['type'], }; } export function SubscriptionMetricCreateToJSON(json) { return SubscriptionMetricCreateToJSONTyped(json, false); } export function SubscriptionMetricCreateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'name': value['name'], 'description': value['description'], 'type': value['type'], }; }