From 1f0c8a5df12f26320095bf20796e6baf0b85ee4d Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 25 Oct 2016 16:19:28 -0700 Subject: [PATCH] Add quickstarts to root module. Fixes checkstyle errors in samples. --- pom.xml | 9 +++++++-- .../java/com/example/storage/QuickstartSample.java | 4 ++-- .../java/com/example/translate/QuickstartSample.java | 11 ++++++----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 4a20dcfe128..75f7b6fe8be 100644 --- a/pom.xml +++ b/pom.xml @@ -77,12 +77,13 @@ appengine/users appengine/xmpp bigquery + bigquery/cloud-client compute/cmdline compute/error-reporting compute/mailjet compute/sendgrid datastore - logging + datastore/cloud-client flexible/analytics flexible/async-rest flexible/cloudsql @@ -101,15 +102,19 @@ --> flexible/static-files flexible/twilio + language/analysis + logging monitoring/v2 monitoring/v3 + pubsub/cloud-client speech/grpc + storage/cloud-client storage/json-api storage/storage-transfer storage/xml-api/cmdline-sample storage/xml-api/serviceaccount-appengine-sample taskqueue/deferred - language/analysis + translate/cloud-client unittests vision/face-detection vision/label diff --git a/storage/cloud-client/src/main/java/com/example/storage/QuickstartSample.java b/storage/cloud-client/src/main/java/com/example/storage/QuickstartSample.java index 83dce6ab0f2..403dc67f7a4 100644 --- a/storage/cloud-client/src/main/java/com/example/storage/QuickstartSample.java +++ b/storage/cloud-client/src/main/java/com/example/storage/QuickstartSample.java @@ -18,10 +18,10 @@ // [START storage_quickstart] // Imports the Google Cloud client library -import com.google.cloud.storage.Storage; -import com.google.cloud.storage.StorageOptions; import com.google.cloud.storage.Bucket; import com.google.cloud.storage.BucketInfo; +import com.google.cloud.storage.Storage; +import com.google.cloud.storage.StorageOptions; public class QuickstartSample { public static void main(String... args) throws Exception { diff --git a/translate/cloud-client/src/main/java/com/example/translate/QuickstartSample.java b/translate/cloud-client/src/main/java/com/example/translate/QuickstartSample.java index 1baf95c74d1..f2efd757507 100644 --- a/translate/cloud-client/src/main/java/com/example/translate/QuickstartSample.java +++ b/translate/cloud-client/src/main/java/com/example/translate/QuickstartSample.java @@ -32,11 +32,12 @@ public static void main(String... args) throws Exception { String text = "Hello, world!"; // Translates some text into Russian - Translation translation = translate.translate( - text, - TranslateOption.sourceLanguage("en"), - TranslateOption.targetLanguage("ru") - ); + Translation translation = + translate.translate( + text, + TranslateOption.sourceLanguage("en"), + TranslateOption.targetLanguage("ru")); + System.out.printf("Text: %s%n", text); System.out.printf("Translation: %s%n", translation.translatedText());