wallee
Version:
TypeScript/JavaScript client for wallee
52 lines (51 loc) • 2.71 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfDebtCollectorConfigurationUpdate = instanceOfDebtCollectorConfigurationUpdate;
exports.DebtCollectorConfigurationUpdateFromJSON = DebtCollectorConfigurationUpdateFromJSON;
exports.DebtCollectorConfigurationUpdateFromJSONTyped = DebtCollectorConfigurationUpdateFromJSONTyped;
exports.DebtCollectorConfigurationUpdateToJSON = DebtCollectorConfigurationUpdateToJSON;
exports.DebtCollectorConfigurationUpdateToJSONTyped = DebtCollectorConfigurationUpdateToJSONTyped;
const CreationEntityState_1 = require("./CreationEntityState");
const DebtCollectorCondition_1 = require("./DebtCollectorCondition");
/**
* Check if a given object implements the DebtCollectorConfigurationUpdate interface.
*/
function instanceOfDebtCollectorConfigurationUpdate(value) {
if (!('version' in value) || value['version'] === undefined)
return false;
return true;
}
function DebtCollectorConfigurationUpdateFromJSON(json) {
return DebtCollectorConfigurationUpdateFromJSONTyped(json, false);
}
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 : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
'conditions': json['conditions'] == null ? undefined : (json['conditions'].map(DebtCollectorCondition_1.DebtCollectorConditionFromJSON)),
'priority': json['priority'] == null ? undefined : json['priority'],
'version': json['version'],
};
}
function DebtCollectorConfigurationUpdateToJSON(json) {
return DebtCollectorConfigurationUpdateToJSONTyped(json, false);
}
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': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
'conditions': value['conditions'] == null ? undefined : (value['conditions'].map(DebtCollectorCondition_1.DebtCollectorConditionToJSON)),
'priority': value['priority'],
'version': value['version'],
};
}