diff --git a/java-language/README.md b/java-language/README.md index 16ef183730e6..d12ecbfd101b 100644 --- a/java-language/README.md +++ b/java-language/README.md @@ -63,13 +63,13 @@ implementation 'com.google.cloud:google-cloud-language' If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-language:2.6.0' +implementation 'com.google.cloud:google-cloud-language:2.7.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-language" % "2.6.0" +libraryDependencies += "com.google.cloud" % "google-cloud-language" % "2.7.0" ``` ## Authentication diff --git a/java-language/google-cloud-language-bom/pom.xml b/java-language/google-cloud-language-bom/pom.xml index c09ad678b1d4..44e6ce47ac20 100644 --- a/java-language/google-cloud-language-bom/pom.xml +++ b/java-language/google-cloud-language-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.5.3 + 1.5.4 Google Cloud language BOM diff --git a/java-language/pom.xml b/java-language/pom.xml index 305adb402b4a..e80d5bca5d8a 100644 --- a/java-language/pom.xml +++ b/java-language/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.5.3 + 1.5.4 @@ -87,7 +87,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.0.4 + 3.0.5 pom import diff --git a/java-language/samples/snippets/src/main/java/com/example/language/Analyze.java b/java-language/samples/snippets/src/main/java/com/example/language/Analyze.java index 04aaef4a887d..545f7ce20823 100644 --- a/java-language/samples/snippets/src/main/java/com/example/language/Analyze.java +++ b/java-language/samples/snippets/src/main/java/com/example/language/Analyze.java @@ -282,7 +282,8 @@ public static void classifyText(String text) throws Exception { try (LanguageServiceClient language = LanguageServiceClient.create()) { // Set content to the text string Document doc = Document.newBuilder().setContent(text).setType(Type.PLAIN_TEXT).build(); - V2Model v2Model = V2Model.setContentCategoriesVersion(ContentCategoriesVersion.V2).build(); + V2Model v2Model = + V2Model.newBuilder().setContentCategoriesVersion(ContentCategoriesVersion.V2).build(); ClassificationModelOptions options = ClassificationModelOptions.newBuilder().setV2Model(v2Model).build(); ClassifyTextRequest request =