Skip to content

Commit

Permalink
feat: generate v1 client (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
Neenu1995 authored and Shabirmean committed Nov 15, 2022
1 parent 2650dd7 commit 602459c
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 602459c

Please sign in to comment.