wallee
Version:
TypeScript/JavaScript client for wallee
38 lines (37 loc) • 1.65 kB
JavaScript
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
import { DebtCollectorConditionTypeFromJSON, DebtCollectorConditionTypeToJSON, } from './DebtCollectorConditionType';
/**
* Check if a given object implements the DebtCollectorCondition interface.
*/
export function instanceOfDebtCollectorCondition(value) {
return true;
}
export function DebtCollectorConditionFromJSON(json) {
return DebtCollectorConditionFromJSONTyped(json, false);
}
export function DebtCollectorConditionFromJSONTyped(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 : DebtCollectorConditionTypeFromJSON(json['type']),
'version': json['version'] == null ? undefined : json['version'],
};
}
export function DebtCollectorConditionToJSON(json) {
return DebtCollectorConditionToJSONTyped(json, false);
}
export function DebtCollectorConditionToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': CreationEntityStateToJSON(value['state']),
'type': DebtCollectorConditionTypeToJSON(value['type']),
};
}