@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * 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(); * EncodingType encodingType = EncodingType.NONE; * AnnotateTextResponse response = languageServiceClient.annotateText(document, features, encodingType); * } * </code></pre> * * @param document Input document. * @param features The enabled features. * @param encodingType The encoding type used by the API to calculate offsets. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AnnotateTextResponse annotateText( Document document, AnnotateTextRequest.Features features, EncodingType encodingType) { AnnotateTextRequest request = AnnotateTextRequest.newBuilder() .setDocument(document) .setFeatures(features) .setEncodingType(encodingType) .build(); return annotateText(request); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * 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(); * EncodingType encodingType = EncodingType.NONE; * AnnotateTextResponse response = languageServiceClient.annotateText(document, features, encodingType); * } * </code></pre> * * @param document Input document. * @param features The enabled features. * @param encodingType The encoding type used by the API to calculate offsets. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AnnotateTextResponse annotateText( Document document, AnnotateTextRequest.Features features, EncodingType encodingType) { AnnotateTextRequest request = AnnotateTextRequest.newBuilder() .setDocument(document) .setFeatures(features) .setEncodingType(encodingType) .build(); return annotateText(request); }