wallee
Version:
TypeScript/JavaScript client for wallee
47 lines (46 loc) • 2.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfDunningFlow = instanceOfDunningFlow;
exports.DunningFlowFromJSON = DunningFlowFromJSON;
exports.DunningFlowFromJSONTyped = DunningFlowFromJSONTyped;
exports.DunningFlowToJSON = DunningFlowToJSON;
exports.DunningFlowToJSONTyped = DunningFlowToJSONTyped;
const DunningFlowType_1 = require("./DunningFlowType");
const CreationEntityState_1 = require("./CreationEntityState");
/**
* Check if a given object implements the DunningFlow interface.
*/
function instanceOfDunningFlow(value) {
return true;
}
function DunningFlowFromJSON(json) {
return DunningFlowFromJSONTyped(json, false);
}
function DunningFlowFromJSONTyped(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'])),
'id': json['id'] == null ? undefined : json['id'],
'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
'conditions': json['conditions'] == null ? undefined : json['conditions'],
'priority': json['priority'] == null ? undefined : json['priority'],
'type': json['type'] == null ? undefined : (0, DunningFlowType_1.DunningFlowTypeFromJSON)(json['type']),
'version': json['version'] == null ? undefined : json['version'],
};
}
function DunningFlowToJSON(json) {
return DunningFlowToJSONTyped(json, false);
}
function DunningFlowToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
'type': (0, DunningFlowType_1.DunningFlowTypeToJSON)(value['type']),
};
}