Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate language client #4921

Merged
merged 1 commit into from
Apr 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
* <code>
* try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
* Document document = Document.newBuilder().build();
* AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document);
* EncodingType encodingType = EncodingType.NONE;
* AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document, encodingType);
* }
* </code>
* </pre>
Expand Down Expand Up @@ -146,6 +147,35 @@ public LanguageServiceStub getStub() {
return stub;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Analyzes the sentiment of the provided text.
*
* <p>Sample code:
*
* <pre><code>
* try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
* Document document = Document.newBuilder().build();
* EncodingType encodingType = EncodingType.NONE;
* AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document, encodingType);
* }
* </code></pre>
*
* @param document Input document.
* @param encodingType The encoding type used by the API to calculate sentence offsets.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AnalyzeSentimentResponse analyzeSentiment(
Document document, EncodingType encodingType) {

AnalyzeSentimentRequest request =
AnalyzeSentimentRequest.newBuilder()
.setDocument(document)
.setEncodingType(encodingType)
.build();
return analyzeSentiment(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Analyzes the sentiment of the provided text.
Expand Down Expand Up @@ -245,6 +275,30 @@ public final AnalyzeEntitiesResponse analyzeEntities(
return analyzeEntities(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Finds named entities (currently proper names and common nouns) in the text along with entity
* types, salience, mentions for each entity, and other properties.
*
* <p>Sample code:
*
* <pre><code>
* try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
* Document document = Document.newBuilder().build();
* AnalyzeEntitiesResponse response = languageServiceClient.analyzeEntities(document);
* }
* </code></pre>
*
* @param document Input document.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AnalyzeEntitiesResponse analyzeEntities(Document document) {

AnalyzeEntitiesRequest request =
AnalyzeEntitiesRequest.newBuilder().setDocument(document).build();
return analyzeEntities(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Finds named entities (currently proper names and common nouns) in the text along with entity
Expand Down Expand Up @@ -324,6 +378,31 @@ public final AnalyzeEntitySentimentResponse analyzeEntitySentiment(
return analyzeEntitySentiment(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* 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
*/
public final AnalyzeEntitySentimentResponse analyzeEntitySentiment(Document document) {

AnalyzeEntitySentimentRequest request =
AnalyzeEntitySentimentRequest.newBuilder().setDocument(document).build();
return analyzeEntitySentiment(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Finds entities, similar to
Expand Down Expand Up @@ -404,6 +483,29 @@ public final AnalyzeSyntaxResponse analyzeSyntax(Document document, EncodingType
return analyzeSyntax(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Analyzes the syntax of the text and provides sentence boundaries and tokenization along with
* part of speech tags, dependency trees, and other properties.
*
* <p>Sample code:
*
* <pre><code>
* try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
* Document document = Document.newBuilder().build();
* AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(document);
* }
* </code></pre>
*
* @param document Input document.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AnalyzeSyntaxResponse analyzeSyntax(Document document) {

AnalyzeSyntaxRequest request = AnalyzeSyntaxRequest.newBuilder().setDocument(document).build();
return analyzeSyntax(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Analyzes the syntax of the text and provides sentence boundaries and tokenization along with
Expand Down Expand Up @@ -551,6 +653,33 @@ public final AnnotateTextResponse annotateText(
return annotateText(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and
* analyzeSyntax provide in one call.
*
* <p>Sample code:
*
* <pre><code>
* try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
* Document document = Document.newBuilder().build();
* AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build();
* AnnotateTextResponse response = languageServiceClient.annotateText(document, features);
* }
* </code></pre>
*
* @param document Input document.
* @param features The enabled features.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AnnotateTextResponse annotateText(
Document document, AnnotateTextRequest.Features features) {

AnnotateTextRequest request =
AnnotateTextRequest.newBuilder().setDocument(document).setFeatures(features).build();
return annotateText(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
* <code>
* try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
* Document document = Document.newBuilder().build();
* AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document);
* EncodingType encodingType = EncodingType.NONE;
* AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document, encodingType);
* }
* </code>
* </pre>
Expand Down
Loading