UNPKG

wallee

Version:
45 lines (44 loc) 1.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfCondition = instanceOfCondition; exports.ConditionFromJSON = ConditionFromJSON; exports.ConditionFromJSONTyped = ConditionFromJSONTyped; exports.ConditionToJSON = ConditionToJSON; exports.ConditionToJSONTyped = ConditionToJSONTyped; const CreationEntityState_1 = require("./CreationEntityState"); const ConditionType_1 = require("./ConditionType"); /** * Check if a given object implements the Condition interface. */ function instanceOfCondition(value) { return true; } function ConditionFromJSON(json) { return ConditionFromJSONTyped(json, false); } function ConditionFromJSONTyped(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'])), 'conditionType': json['conditionType'] == null ? undefined : (0, ConditionType_1.ConditionTypeFromJSON)(json['conditionType']), 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']), 'version': json['version'] == null ? undefined : json['version'], }; } function ConditionToJSON(json) { return ConditionToJSONTyped(json, false); } function ConditionToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'conditionType': (0, ConditionType_1.ConditionTypeToJSON)(value['conditionType']), 'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']), }; }