UNPKG

wallee

Version:
45 lines (44 loc) 1.77 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfSpaceView = instanceOfSpaceView; exports.SpaceViewFromJSON = SpaceViewFromJSON; exports.SpaceViewFromJSONTyped = SpaceViewFromJSONTyped; exports.SpaceViewToJSON = SpaceViewToJSON; exports.SpaceViewToJSONTyped = SpaceViewToJSONTyped; const Space_1 = require("./Space"); const CreationEntityState_1 = require("./CreationEntityState"); /** * Check if a given object implements the SpaceView interface. */ function instanceOfSpaceView(value) { return true; } function SpaceViewFromJSON(json) { return SpaceViewFromJSONTyped(json, false); } function SpaceViewFromJSONTyped(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'])), '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'], 'space': json['space'] == null ? undefined : (0, Space_1.SpaceFromJSON)(json['space']), }; } function SpaceViewToJSON(json) { return SpaceViewToJSONTyped(json, false); } function SpaceViewToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']), 'space': (0, Space_1.SpaceToJSON)(value['space']), }; }