wallee
Version:
TypeScript/JavaScript client for wallee
46 lines (45 loc) • 2.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfSubscriptionMetric = instanceOfSubscriptionMetric;
exports.SubscriptionMetricFromJSON = SubscriptionMetricFromJSON;
exports.SubscriptionMetricFromJSONTyped = SubscriptionMetricFromJSONTyped;
exports.SubscriptionMetricToJSON = SubscriptionMetricToJSON;
exports.SubscriptionMetricToJSONTyped = SubscriptionMetricToJSONTyped;
const CreationEntityState_1 = require("./CreationEntityState");
const SubscriptionMetricType_1 = require("./SubscriptionMetricType");
/**
* Check if a given object implements the SubscriptionMetric interface.
*/
function instanceOfSubscriptionMetric(value) {
return true;
}
function SubscriptionMetricFromJSON(json) {
return SubscriptionMetricFromJSONTyped(json, false);
}
function SubscriptionMetricFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'name': json['name'] == null ? undefined : json['name'],
'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])),
'description': json['description'] == null ? undefined : json['description'],
'id': json['id'] == null ? undefined : json['id'],
'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
'type': json['type'] == null ? undefined : (0, SubscriptionMetricType_1.SubscriptionMetricTypeFromJSON)(json['type']),
'version': json['version'] == null ? undefined : json['version'],
};
}
function SubscriptionMetricToJSON(json) {
return SubscriptionMetricToJSONTyped(json, false);
}
function SubscriptionMetricToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
'type': (0, SubscriptionMetricType_1.SubscriptionMetricTypeToJSON)(value['type']),
};
}