wallee
Version:
TypeScript/JavaScript client for wallee
45 lines (44 loc) • 2.16 kB
JavaScript
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
import { DebtCollectorConditionFromJSON, DebtCollectorConditionToJSON, } from './DebtCollectorCondition';
/**
* Check if a given object implements the DebtCollectorConfigurationUpdate interface.
*/
export function instanceOfDebtCollectorConfigurationUpdate(value) {
if (!('version' in value) || value['version'] === undefined)
return false;
return true;
}
export function DebtCollectorConfigurationUpdateFromJSON(json) {
return DebtCollectorConfigurationUpdateFromJSONTyped(json, false);
}
export function DebtCollectorConfigurationUpdateFromJSONTyped(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'],
'version': json['version'],
};
}
export function DebtCollectorConfigurationUpdateToJSON(json) {
return DebtCollectorConfigurationUpdateToJSONTyped(json, false);
}
export function DebtCollectorConfigurationUpdateToJSONTyped(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'],
'version': value['version'],
};
}