From 602459c9d075f811bba2c78de494984b11a1713b Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Wed, 14 Apr 2021 16:46:03 -0400 Subject: [PATCH] feat: generate v1 client (#421) --- .../src/main/java/documentai/v1beta2/SetEndPointBeta.java | 3 +-- .../java/documentai/v1beta3/BatchProcessDocumentBeta.java | 1 - .../test/java/documentai/v1beta2/BatchParseFormBetaTest.java | 4 ++-- .../java/documentai/v1beta2/BatchParseTableBetaTest.java | 5 ++--- .../src/test/java/documentai/v1beta2/ParseFormBetaTest.java | 4 ++-- .../src/test/java/documentai/v1beta2/ParseTableBetaTest.java | 4 ++-- .../test/java/documentai/v1beta2/ParseWithModelBetaTest.java | 5 ++--- .../src/test/java/documentai/v1beta2/QuickStartTest.java | 4 ++-- .../src/test/java/documentai/v1beta2/SetEndpointTest.java | 4 ++-- 9 files changed, 15 insertions(+), 19 deletions(-) diff --git a/document-ai/snippets/src/main/java/documentai/v1beta2/SetEndPointBeta.java b/document-ai/snippets/src/main/java/documentai/v1beta2/SetEndPointBeta.java index 23718850561..e3651084b08 100644 --- a/document-ai/snippets/src/main/java/documentai/v1beta2/SetEndPointBeta.java +++ b/document-ai/snippets/src/main/java/documentai/v1beta2/SetEndPointBeta.java @@ -56,8 +56,7 @@ public static void setEndpoint(String projectId, String location, String inputGc // mime_type can be application/pdf, image/tiff, // and image/gif, or application/json InputConfig config = - InputConfig.newBuilder().setGcsSource(uri) - .setMimeType("application/pdf").build(); + InputConfig.newBuilder().setGcsSource(uri).setMimeType("application/pdf").build(); ProcessDocumentRequest request = ProcessDocumentRequest.newBuilder().setParent(parent).setInputConfig(config).build(); diff --git a/document-ai/snippets/src/main/java/documentai/v1beta3/BatchProcessDocumentBeta.java b/document-ai/snippets/src/main/java/documentai/v1beta3/BatchProcessDocumentBeta.java index e0db24d04f6..360a38f2cce 100644 --- a/document-ai/snippets/src/main/java/documentai/v1beta3/BatchProcessDocumentBeta.java +++ b/document-ai/snippets/src/main/java/documentai/v1beta3/BatchProcessDocumentBeta.java @@ -20,7 +20,6 @@ import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.Page; -import com.google.api.gax.rpc.UnknownException; import com.google.cloud.documentai.v1beta3.BatchProcessMetadata; import com.google.cloud.documentai.v1beta3.BatchProcessRequest; import com.google.cloud.documentai.v1beta3.BatchProcessResponse; diff --git a/document-ai/snippets/src/test/java/documentai/v1beta2/BatchParseFormBetaTest.java b/document-ai/snippets/src/test/java/documentai/v1beta2/BatchParseFormBetaTest.java index 091cc359faa..c16720ea955 100644 --- a/document-ai/snippets/src/test/java/documentai/v1beta2/BatchParseFormBetaTest.java +++ b/document-ai/snippets/src/test/java/documentai/v1beta2/BatchParseFormBetaTest.java @@ -44,8 +44,8 @@ public class BatchParseFormBetaTest { private static void requireEnvVar(String varName) { assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } @Before diff --git a/document-ai/snippets/src/test/java/documentai/v1beta2/BatchParseTableBetaTest.java b/document-ai/snippets/src/test/java/documentai/v1beta2/BatchParseTableBetaTest.java index 7d3e21db861..7de6df5c78f 100644 --- a/document-ai/snippets/src/test/java/documentai/v1beta2/BatchParseTableBetaTest.java +++ b/document-ai/snippets/src/test/java/documentai/v1beta2/BatchParseTableBetaTest.java @@ -31,7 +31,6 @@ import java.util.concurrent.TimeoutException; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; public class BatchParseTableBetaTest { @@ -45,8 +44,8 @@ public class BatchParseTableBetaTest { private static void requireEnvVar(String varName) { assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } @Before diff --git a/document-ai/snippets/src/test/java/documentai/v1beta2/ParseFormBetaTest.java b/document-ai/snippets/src/test/java/documentai/v1beta2/ParseFormBetaTest.java index 6035188a2b0..4418e42d637 100644 --- a/document-ai/snippets/src/test/java/documentai/v1beta2/ParseFormBetaTest.java +++ b/document-ai/snippets/src/test/java/documentai/v1beta2/ParseFormBetaTest.java @@ -36,8 +36,8 @@ public class ParseFormBetaTest { private static void requireEnvVar(String varName) { assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } @Before diff --git a/document-ai/snippets/src/test/java/documentai/v1beta2/ParseTableBetaTest.java b/document-ai/snippets/src/test/java/documentai/v1beta2/ParseTableBetaTest.java index cefe288e67a..fb691956bc9 100644 --- a/document-ai/snippets/src/test/java/documentai/v1beta2/ParseTableBetaTest.java +++ b/document-ai/snippets/src/test/java/documentai/v1beta2/ParseTableBetaTest.java @@ -35,8 +35,8 @@ public class ParseTableBetaTest { private static void requireEnvVar(String varName) { assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } @Before diff --git a/document-ai/snippets/src/test/java/documentai/v1beta2/ParseWithModelBetaTest.java b/document-ai/snippets/src/test/java/documentai/v1beta2/ParseWithModelBetaTest.java index 423e4fafa81..ae3f7013c10 100644 --- a/document-ai/snippets/src/test/java/documentai/v1beta2/ParseWithModelBetaTest.java +++ b/document-ai/snippets/src/test/java/documentai/v1beta2/ParseWithModelBetaTest.java @@ -34,11 +34,10 @@ public class ParseWithModelBetaTest { private ByteArrayOutputStream bout; private PrintStream out; - private static void requireEnvVar(String varName) { assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } @Before diff --git a/document-ai/snippets/src/test/java/documentai/v1beta2/QuickStartTest.java b/document-ai/snippets/src/test/java/documentai/v1beta2/QuickStartTest.java index 302f471d23b..597a3a8b788 100644 --- a/document-ai/snippets/src/test/java/documentai/v1beta2/QuickStartTest.java +++ b/document-ai/snippets/src/test/java/documentai/v1beta2/QuickStartTest.java @@ -35,8 +35,8 @@ public class QuickStartTest { private static void requireEnvVar(String varName) { assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } @Before diff --git a/document-ai/snippets/src/test/java/documentai/v1beta2/SetEndpointTest.java b/document-ai/snippets/src/test/java/documentai/v1beta2/SetEndpointTest.java index 953600a7042..f3d64dfcd35 100644 --- a/document-ai/snippets/src/test/java/documentai/v1beta2/SetEndpointTest.java +++ b/document-ai/snippets/src/test/java/documentai/v1beta2/SetEndpointTest.java @@ -35,8 +35,8 @@ public class SetEndpointTest { private static void requireEnvVar(String varName) { assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } @Before