wallee
Version:
TypeScript/JavaScript client for wallee
36 lines (35 loc) • 1.38 kB
JavaScript
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
/**
* Check if a given object implements the DunningCondition interface.
*/
export function instanceOfDunningCondition(value) {
return true;
}
export function DunningConditionFromJSON(json) {
return DunningConditionFromJSONTyped(json, false);
}
export function DunningConditionFromJSONTyped(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 : CreationEntityStateFromJSON(json['state']),
'type': json['type'] == null ? undefined : json['type'],
'version': json['version'] == null ? undefined : json['version'],
};
}
export function DunningConditionToJSON(json) {
return DunningConditionToJSONTyped(json, false);
}
export function DunningConditionToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': CreationEntityStateToJSON(value['state']),
};
}