/**
  * @param string $title
  * @param null   $databaseId
  * @param null   $context
  * @param array  $fields
  *
  * @return Database
  * @throws DataSyncException
  * @throws ForbiddenException
  * @throws IncorrectDataFormatException
  * @throws InvalidArgumentException
  * @throws MaxDatabasesCountException
  * @throws NotFoundException
  * @throws TooManyRequestsException
  * @throws UnauthorizedException
  * @throws UnavailableResourceException
  */
 public function updateDatabaseTitle($title, $databaseId = null, $context = null, $fields = [])
 {
     $response = $this->sendRequest('PATCH', $this->getDatabaseUrl($databaseId, $context, $fields), ['json' => ['title' => $title]]);
     $decodedResponseBody = $this->getDecodedBody($response->getBody());
     $database = new Database($decodedResponseBody);
     $database->setContext($this->getContext());
     return $database;
 }