UNPKG

wallee

Version:
38 lines (37 loc) 1.53 kB
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState'; import { ConditionTypeFromJSON, ConditionTypeToJSON, } from './ConditionType'; /** * Check if a given object implements the Condition interface. */ export function instanceOfCondition(value) { return true; } export function ConditionFromJSON(json) { return ConditionFromJSONTyped(json, false); } export 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 : ConditionTypeFromJSON(json['conditionType']), 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : CreationEntityStateFromJSON(json['state']), 'version': json['version'] == null ? undefined : json['version'], }; } export function ConditionToJSON(json) { return ConditionToJSONTyped(json, false); } export function ConditionToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'conditionType': ConditionTypeToJSON(value['conditionType']), 'state': CreationEntityStateToJSON(value['state']), }; }