class ActionSpatial implements Sc2ApiSerializable<Spatial.ActionSpatial>, GeneralizableAbility<ActionSpatial> {

    @Override
    public Spatial.ActionSpatial toSc2Api() {
        Spatial.ActionSpatial.Builder aSc2ApiActionSpatial = Spatial.ActionSpatial.newBuilder();

        getUnitCommand().map(ActionSpatialUnitCommand::toSc2Api).ifPresent(aSc2ApiActionSpatial::setUnitCommand);
        getCameraMove().map(ActionSpatialCameraMove::toSc2Api).ifPresent(aSc2ApiActionSpatial::setCameraMove);
        getUnitSelectionPoint().map(ActionSpatialUnitSelectionPoint::toSc2Api)
                .ifPresent(aSc2ApiActionSpatial::setUnitSelectionPoint);
        getUnitSelectionRect().map(ActionSpatialUnitSelectionRect::toSc2Api)
                .ifPresent(aSc2ApiActionSpatial::setUnitSelectionRect);

        return aSc2ApiActionSpatial.build();
    }

    private  ActionSpatial(Spatial.ActionSpatial sc2ApiActionSpatial);
    private  ActionSpatial(ActionSpatialUnitCommand unitCommand);
    private  ActionSpatial(ActionSpatialCameraMove cameraMove);
    private  ActionSpatial(ActionSpatialUnitSelectionPoint unitSelectionPoint);
    private  ActionSpatial(ActionSpatialUnitSelectionRect unitSelectionRect);

}