UNPKG

wallee

Version:
43 lines (42 loc) 2.13 kB
import { DebtCollectorFromJSON, DebtCollectorToJSON, } from './DebtCollector'; import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState'; import { DebtCollectorConditionFromJSON, } from './DebtCollectorCondition'; /** * Check if a given object implements the DebtCollectorConfiguration interface. */ export function instanceOfDebtCollectorConfiguration(value) { return true; } export function DebtCollectorConfigurationFromJSON(json) { return DebtCollectorConfigurationFromJSONTyped(json, false); } export function DebtCollectorConfigurationFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'skipReviewEnabled': json['skipReviewEnabled'] == null ? undefined : json['skipReviewEnabled'], 'name': json['name'] == null ? undefined : json['name'], 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'enabledSpaceViews': json['enabledSpaceViews'] == null ? undefined : new Set(json['enabledSpaceViews']), 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : CreationEntityStateFromJSON(json['state']), 'conditions': json['conditions'] == null ? undefined : (json['conditions'].map(DebtCollectorConditionFromJSON)), 'priority': json['priority'] == null ? undefined : json['priority'], 'version': json['version'] == null ? undefined : json['version'], 'collector': json['collector'] == null ? undefined : DebtCollectorFromJSON(json['collector']), }; } export function DebtCollectorConfigurationToJSON(json) { return DebtCollectorConfigurationToJSONTyped(json, false); } export function DebtCollectorConfigurationToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': CreationEntityStateToJSON(value['state']), 'collector': DebtCollectorToJSON(value['collector']), }; }