diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index df097e24..d36cf346 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -33,6 +33,12 @@ + + com.google.protobuf + protobuf-java-util + 3.13.0 + + junit junit diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 0c4d233d..c297314f 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -32,6 +32,12 @@ + + com.google.protobuf + protobuf-java-util + 3.13.0 + + junit junit diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 63e9f308..e37ab9ee 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -44,6 +44,11 @@ + + com.google.protobuf + protobuf-java-util + + junit diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java index a75dff20..7d45ed69 100644 --- a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java @@ -22,6 +22,7 @@ import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; import java.io.IOException; // Sample to update transfer config. @@ -40,7 +41,7 @@ public static void updateTransferConfig(String configId) throws IOException { .setName(configId) .setDisplayName("UPDATED_DISPLAY_NAME") .build(); - FieldMask updateMask = FieldMask.newBuilder().addPaths("display_name").build(); + FieldMask updateMask = FieldMaskUtil.fromString("display_name"); UpdateTransferConfigRequest request = UpdateTransferConfigRequest.newBuilder() .setTransferConfig(transferConfig)