public function updateObjectState($objectStateGroupId, $objectStateId, Request $request)
{
$updateStruct = $this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent()));
$objectState = $this->objectStateService->loadObjectState($objectStateId);
try {
$updatedObjectState = $this->objectStateService->updateObjectState($objectState, $updateStruct);
return new RestObjectState($updatedObjectState, $objectStateGroupId);
} catch (InvalidArgumentException $e) {
throw new ForbiddenException($e->getMessage());
}
}