wallee
Version:
TypeScript/JavaScript client for wallee
45 lines (44 loc) • 2.17 kB
JavaScript
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
import { DebtCollectorConditionFromJSON, DebtCollectorConditionToJSON, } from './DebtCollectorCondition';
/**
* Check if a given object implements the DebtCollectorConfigurationCreate interface.
*/
export function instanceOfDebtCollectorConfigurationCreate(value) {
if (!('collector' in value) || value['collector'] === undefined)
return false;
return true;
}
export function DebtCollectorConfigurationCreateFromJSON(json) {
return DebtCollectorConfigurationCreateFromJSONTyped(json, false);
}
export function DebtCollectorConfigurationCreateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'skipReviewEnabled': json['skipReviewEnabled'] == null ? undefined : json['skipReviewEnabled'],
'name': json['name'] == null ? undefined : json['name'],
'enabledSpaceViews': json['enabledSpaceViews'] == null ? undefined : new Set(json['enabledSpaceViews']),
'state': json['state'] == null ? undefined : CreationEntityStateFromJSON(json['state']),
'conditions': json['conditions'] == null ? undefined : (json['conditions'].map(DebtCollectorConditionFromJSON)),
'priority': json['priority'] == null ? undefined : json['priority'],
'collector': json['collector'],
};
}
export function DebtCollectorConfigurationCreateToJSON(json) {
return DebtCollectorConfigurationCreateToJSONTyped(json, false);
}
export function DebtCollectorConfigurationCreateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'skipReviewEnabled': value['skipReviewEnabled'],
'name': value['name'],
'enabledSpaceViews': value['enabledSpaceViews'] == null ? undefined : Array.from(value['enabledSpaceViews']),
'state': CreationEntityStateToJSON(value['state']),
'conditions': value['conditions'] == null ? undefined : (value['conditions'].map(DebtCollectorConditionToJSON)),
'priority': value['priority'],
'collector': value['collector'],
};
}