wallee
Version:
TypeScript/JavaScript client for wallee
38 lines (37 loc) • 1.45 kB
JavaScript
import { SpaceFromJSON, SpaceToJSON, } from './Space';
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
/**
* Check if a given object implements the SpaceView interface.
*/
export function instanceOfSpaceView(value) {
return true;
}
export function SpaceViewFromJSON(json) {
return SpaceViewFromJSONTyped(json, false);
}
export 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 : CreationEntityStateFromJSON(json['state']),
'version': json['version'] == null ? undefined : json['version'],
'space': json['space'] == null ? undefined : SpaceFromJSON(json['space']),
};
}
export function SpaceViewToJSON(json) {
return SpaceViewToJSONTyped(json, false);
}
export function SpaceViewToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': CreationEntityStateToJSON(value['state']),
'space': SpaceToJSON(value['space']),
};
}