code: public final AnalyzeEntitySentimentResponse analyzeEntitySentiment(Document document) {
  
      AnalyzeEntitySentimentRequest request =
          AnalyzeEntitySentimentRequest.newBuilder().setDocument(document).build();
      return analyzeEntitySentiment(request);
    }
docs: Finds entities, similar to
  [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and
  analyzes sentiment associated with each entity and its mentions.
  
  <p>Sample code:
  
  <pre><code>
  try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
  Document document = Document.newBuilder().build();
  AnalyzeEntitySentimentResponse response = languageServiceClient.analyzeEntitySentiment(document);
  }
  </code></pre>
  
  @param document Input document.
  @throws com.google.api.gax.rpc.ApiException if the remote call fails