From f4a234871339920453fb6b77c96fde5c8ce1d335 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 17 Jan 2018 13:58:06 -0800 Subject: [PATCH 1/6] Updated storage/cloud-client. --- storage/cloud-client/README.md | 3 ++ storage/cloud-client/pom.xml | 12 ++++--- .../com/example/storage/QuickstartSample.java | 28 +++++++-------- .../example/storage/QuickstartSampleIT.java | 35 +++++++++---------- 4 files changed, 41 insertions(+), 37 deletions(-) diff --git a/storage/cloud-client/README.md b/storage/cloud-client/README.md index a6a53da067f..794d3fd0b7d 100644 --- a/storage/cloud-client/README.md +++ b/storage/cloud-client/README.md @@ -1,5 +1,8 @@ # Getting Started with Cloud Storage and the Google Cloud Client libraries + +Open in Cloud Shell + [Google Cloud Storage][storage] is unified object storage for developers and enterprises, from live data serving to data analytics/ML to data archival. These sample Java applications demonstrate how to access the Cloud Storage API using diff --git a/storage/cloud-client/pom.xml b/storage/cloud-client/pom.xml index c713b23ac68..d91d58211d8 100644 --- a/storage/cloud-client/pom.xml +++ b/storage/cloud-client/pom.xml @@ -19,12 +19,14 @@ storage-google-cloud-samples jar - + - doc-samples - com.google.cloud - 1.0.0 - ../.. + com.google.cloud.samples + shared-configuration + 1.0.8 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 b1ab07e6a56..3307e183457 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 @@ -1,18 +1,18 @@ /* - Copyright 2016, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.storage; diff --git a/storage/cloud-client/src/test/java/com/example/storage/QuickstartSampleIT.java b/storage/cloud-client/src/test/java/com/example/storage/QuickstartSampleIT.java index ac7e35a7c60..0e84f1291d5 100644 --- a/storage/cloud-client/src/test/java/com/example/storage/QuickstartSampleIT.java +++ b/storage/cloud-client/src/test/java/com/example/storage/QuickstartSampleIT.java @@ -1,18 +1,18 @@ /* - Copyright 2016, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.storage; @@ -20,16 +20,15 @@ import com.google.cloud.storage.Storage; import com.google.cloud.storage.StorageOptions; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.UUID; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.util.UUID; - /** * Tests for quickstart sample. */ From f06b4f000393779d2deff8813a3d846518a355fb Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 17 Jan 2018 14:06:08 -0800 Subject: [PATCH 2/6] Updated storage/json-api --- storage/json-api/README.md | 3 +++ storage/json-api/pom.xml | 18 ++++++++++------- ...CustomerSuppliedEncryptionKeysSamples.java | 19 +++++++++--------- .../src/main/java/StorageFactory.java | 1 - .../json-api/src/main/java/StorageSample.java | 20 ++++++++++--------- .../src/test/java/StorageSampleTest.java | 4 +--- 6 files changed, 36 insertions(+), 29 deletions(-) diff --git a/storage/json-api/README.md b/storage/json-api/README.md index 28255e23ceb..2b547d1b8df 100644 --- a/storage/json-api/README.md +++ b/storage/json-api/README.md @@ -1,5 +1,8 @@ # Google Cloud Storage (GCS) and the Google Java API Client library + +Open in Cloud Shell + Google Cloud Storage Service features a REST-based API that allows developers to store and access arbitrarily-large objects. These sample Java applications demonstrate how to access the Google Cloud Storage JSON API using the Google Java API Client Libraries. For more information, read the [Google Cloud Storage JSON API Overview][1]. ## Quickstart diff --git a/storage/json-api/pom.xml b/storage/json-api/pom.xml index 4dfa9598924..42c5bf308cb 100644 --- a/storage/json-api/pom.xml +++ b/storage/json-api/pom.xml @@ -14,18 +14,21 @@ limitations under the License. --> - - doc-samples - com.google.cloud - 1.0.0 - ../.. - - 4.0.0 com.google.apis-samples storage-json-api 1 + + + com.google.cloud.samples + shared-configuration + 1.0.8 + + 1.8 1.8 @@ -61,6 +64,7 @@ junit junit test + 4.12 com.google.truth diff --git a/storage/json-api/src/main/java/CustomerSuppliedEncryptionKeysSamples.java b/storage/json-api/src/main/java/CustomerSuppliedEncryptionKeysSamples.java index 5d526222d81..df3f5a57717 100644 --- a/storage/json-api/src/main/java/CustomerSuppliedEncryptionKeysSamples.java +++ b/storage/json-api/src/main/java/CustomerSuppliedEncryptionKeysSamples.java @@ -19,7 +19,6 @@ import com.google.api.client.http.InputStreamContent; import com.google.api.services.storage.Storage; import com.google.api.services.storage.model.RewriteResponse; - import java.io.IOException; import java.io.InputStream; @@ -75,17 +74,18 @@ public static InputStream downloadObject( String base64CseKey, String base64CseKeyHash) throws Exception { - Storage.Objects.Get getObject = storage.objects().get(bucketName, objectName); - - // If you're using AppEngine, turn off setDirectDownloadEnabled: - // getObject.getMediaHttpDownloader().setDirectDownloadEnabled(false); - // Now set the CSEK headers + // Set the CSEK headers final HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.set("x-goog-encryption-algorithm", "AES256"); httpHeaders.set("x-goog-encryption-key", base64CseKey); httpHeaders.set("x-goog-encryption-key-sha256", base64CseKeyHash); + Storage.Objects.Get getObject = storage.objects().get(bucketName, objectName); + + // If you're using AppEngine, turn off setDirectDownloadEnabled: + // getObject.getMediaHttpDownloader().setDirectDownloadEnabled(false); + getObject.setRequestHeaders(httpHeaders); try { @@ -166,10 +166,8 @@ public static void rotateKey( String newBase64Key, String newBase64KeyHash) throws Exception { - Storage.Objects.Rewrite rewriteObject = - storage.objects().rewrite(bucketName, objectName, bucketName, objectName, null); - // Now set the CSEK headers + // Set the CSEK headers final HttpHeaders httpHeaders = new HttpHeaders(); // Specify the exiting object's current CSEK. @@ -182,6 +180,9 @@ public static void rotateKey( httpHeaders.set("x-goog-encryption-key", newBase64Key); httpHeaders.set("x-goog-encryption-key-sha256", newBase64KeyHash); + Storage.Objects.Rewrite rewriteObject = + storage.objects().rewrite(bucketName, objectName, bucketName, objectName, null); + rewriteObject.setRequestHeaders(httpHeaders); try { diff --git a/storage/json-api/src/main/java/StorageFactory.java b/storage/json-api/src/main/java/StorageFactory.java index b487edd9c53..fb47188d05f 100644 --- a/storage/json-api/src/main/java/StorageFactory.java +++ b/storage/json-api/src/main/java/StorageFactory.java @@ -21,7 +21,6 @@ import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.storage.Storage; import com.google.api.services.storage.StorageScopes; - import java.io.IOException; import java.security.GeneralSecurityException; import java.util.Collection; diff --git a/storage/json-api/src/main/java/StorageSample.java b/storage/json-api/src/main/java/StorageSample.java index 1332cc7f44b..9ea3a139065 100644 --- a/storage/json-api/src/main/java/StorageSample.java +++ b/storage/json-api/src/main/java/StorageSample.java @@ -1,25 +1,27 @@ -//[START all] /* - * Copyright (c) 2014 Google Inc. + * Copyright 2014 Google Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ +//[START all] + import com.google.api.client.http.InputStreamContent; import com.google.api.services.storage.Storage; import com.google.api.services.storage.model.Bucket; import com.google.api.services.storage.model.ObjectAccessControl; import com.google.api.services.storage.model.Objects; import com.google.api.services.storage.model.StorageObject; - import java.io.File; import java.io.FileInputStream; import java.io.IOException; diff --git a/storage/json-api/src/test/java/StorageSampleTest.java b/storage/json-api/src/test/java/StorageSampleTest.java index 307fb60b71c..9ae66c8b4f5 100644 --- a/storage/json-api/src/test/java/StorageSampleTest.java +++ b/storage/json-api/src/test/java/StorageSampleTest.java @@ -20,14 +20,12 @@ import com.google.api.services.storage.model.Bucket; import com.google.api.services.storage.model.StorageObject; - -import org.junit.Test; - import java.io.File; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.stream.Collectors; +import org.junit.Test; public class StorageSampleTest { private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); From ccdca5b46cd141762a8b3e5e1f1d6bc16278fd44 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 17 Jan 2018 14:12:04 -0800 Subject: [PATCH 3/6] Updated storage/storage-transfer. --- storage/storage-transfer/README.md | 5 ++++- storage/storage-transfer/pom.xml | 17 +++++++++++------ .../storagetransfer/samples/AwsRequester.java | 5 +++-- .../samples/NearlineRequester.java | 5 +++-- .../storagetransfer/samples/RequestChecker.java | 5 +++-- .../samples/RetryHttpInitializerWrapper.java | 5 +++-- .../samples/TransferClientCreator.java | 5 +++-- .../samples/TransferJobUtils.java | 4 +++- .../samples/test/AwsRequesterTest.java | 10 ++++------ .../samples/test/NearlineRequesterTest.java | 12 +++++------- .../samples/test/RequestCheckerTest.java | 1 - .../samples/test/TransferJobUtilsTest.java | 4 +--- 12 files changed, 43 insertions(+), 35 deletions(-) diff --git a/storage/storage-transfer/README.md b/storage/storage-transfer/README.md index e95078b7a8b..42dc2c7638b 100644 --- a/storage/storage-transfer/README.md +++ b/storage/storage-transfer/README.md @@ -1,11 +1,14 @@ # Transfer Service sample using Java + +Open in Cloud Shell + This app creates two types of transfers using the Transfer Service tool. These samples are used on the following documentation pages: -> + * https://cloud.google.com/storage/transfer/create-client * https://cloud.google.com/storage/transfer/create-manage-transfer-program diff --git a/storage/storage-transfer/pom.xml b/storage/storage-transfer/pom.xml index fee26800fae..77cd7f30731 100644 --- a/storage/storage-transfer/pom.xml +++ b/storage/storage-transfer/pom.xml @@ -18,19 +18,24 @@ 4.0.0 - - doc-samples - com.google.cloud - 1.0.0 - ../.. - com.google.storagetransfer.samples storage-transfersample 0.1 jar + + + com.google.cloud.samples + shared-configuration + 1.0.8 + + 1.8 + 1.8 UTF-8 diff --git a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/AwsRequester.java b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/AwsRequester.java index 6feefa79662..e2c0835030a 100644 --- a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/AwsRequester.java +++ b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/AwsRequester.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // [START all] + package com.google.cloud.storage.storagetransfer.samples; import com.google.api.services.storagetransfer.v1.Storagetransfer; @@ -25,7 +27,6 @@ import com.google.api.services.storagetransfer.v1.model.TimeOfDay; import com.google.api.services.storagetransfer.v1.model.TransferJob; import com.google.api.services.storagetransfer.v1.model.TransferSpec; - import java.io.IOException; import java.io.PrintStream; diff --git a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/NearlineRequester.java b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/NearlineRequester.java index b7d89640732..87e98b3d2d6 100644 --- a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/NearlineRequester.java +++ b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/NearlineRequester.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // [START all] + package com.google.cloud.storage.storagetransfer.samples; import com.google.api.services.storagetransfer.v1.Storagetransfer; @@ -25,7 +27,6 @@ import com.google.api.services.storagetransfer.v1.model.TransferJob; import com.google.api.services.storagetransfer.v1.model.TransferOptions; import com.google.api.services.storagetransfer.v1.model.TransferSpec; - import java.io.IOException; import java.io.PrintStream; diff --git a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/RequestChecker.java b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/RequestChecker.java index 6de18a12aa5..f10257e8fb7 100644 --- a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/RequestChecker.java +++ b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/RequestChecker.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // [START all] + package com.google.cloud.storage.storagetransfer.samples; import com.google.api.services.storagetransfer.v1.Storagetransfer; import com.google.api.services.storagetransfer.v1.model.ListOperationsResponse; - import java.io.IOException; import java.util.logging.Logger; diff --git a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/RetryHttpInitializerWrapper.java b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/RetryHttpInitializerWrapper.java index 6d202c5e095..55b11ebb63b 100644 --- a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/RetryHttpInitializerWrapper.java +++ b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/RetryHttpInitializerWrapper.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // [START all] + package com.google.cloud.storage.storagetransfer.samples; import com.google.api.client.auth.oauth2.Credential; @@ -26,7 +28,6 @@ import com.google.api.client.util.ExponentialBackOff; import com.google.api.client.util.Sleeper; import com.google.common.base.Preconditions; - import java.io.IOException; import java.util.logging.Logger; diff --git a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/TransferClientCreator.java b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/TransferClientCreator.java index 769fdb6b962..d64e0619fea 100644 --- a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/TransferClientCreator.java +++ b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/TransferClientCreator.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // [START all] + package com.google.cloud.storage.storagetransfer.samples; import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; @@ -24,7 +26,6 @@ import com.google.api.services.storagetransfer.v1.Storagetransfer; import com.google.api.services.storagetransfer.v1.StoragetransferScopes; import com.google.common.base.Preconditions; - import java.io.IOException; /** diff --git a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/TransferJobUtils.java b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/TransferJobUtils.java index 0fdd94d7d02..ff3b5111250 100644 --- a/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/TransferJobUtils.java +++ b/storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/TransferJobUtils.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // [START all] + package com.google.cloud.storage.storagetransfer.samples; import com.google.api.services.storagetransfer.v1.model.Date; diff --git a/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/AwsRequesterTest.java b/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/AwsRequesterTest.java index 911af55ba25..aed559bc4f5 100644 --- a/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/AwsRequesterTest.java +++ b/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/AwsRequesterTest.java @@ -19,14 +19,12 @@ import static com.google.common.truth.Truth.assertThat; import com.google.cloud.storage.storagetransfer.samples.AwsRequester; - +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - @RunWith(JUnit4.class) public class AwsRequesterTest { @@ -37,8 +35,6 @@ public class AwsRequesterTest { */ @Test public void testRun() throws Exception { - ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); - PrintStream outStream = new PrintStream(outBytes); System.setProperty("projectId", PROJECT_ID); System.setProperty("jobDescription", "Sample transfer job from S3 to GCS."); System.setProperty("awsSourceBucket", "cloud-samples-tests"); @@ -46,6 +42,8 @@ public void testRun() throws Exception { System.setProperty("startDate", "2000-01-01"); System.setProperty("startTime", "00:00:00"); + ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); + PrintStream outStream = new PrintStream(outBytes); AwsRequester.run(outStream); String out = outBytes.toString(); diff --git a/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/NearlineRequesterTest.java b/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/NearlineRequesterTest.java index 7fb9bc05428..df84038d920 100644 --- a/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/NearlineRequesterTest.java +++ b/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/NearlineRequesterTest.java @@ -19,14 +19,12 @@ import static com.google.common.truth.Truth.assertThat; import com.google.cloud.storage.storagetransfer.samples.NearlineRequester; - +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - @RunWith(JUnit4.class) public class NearlineRequesterTest { @@ -37,9 +35,6 @@ public class NearlineRequesterTest { */ @Test public void testRun() throws Exception { - - ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); - PrintStream outStream = new PrintStream(outBytes); System.setProperty("projectId", PROJECT_ID); System.setProperty("jobDescription", "Sample transfer job from GCS to GCS Nearline."); System.setProperty("gcsSourceBucket", PROJECT_ID + "-storagetransfer-source"); @@ -47,6 +42,9 @@ public void testRun() throws Exception { System.setProperty("startDate", "2000-01-01"); System.setProperty("startTime", "00:00:00"); + ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); + PrintStream outStream = new PrintStream(outBytes); + NearlineRequester.run(outStream); String out = outBytes.toString(); diff --git a/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/RequestCheckerTest.java b/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/RequestCheckerTest.java index 6f48ae2ff3a..eb8239ad12b 100644 --- a/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/RequestCheckerTest.java +++ b/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/RequestCheckerTest.java @@ -23,7 +23,6 @@ import com.google.api.services.storagetransfer.v1.Storagetransfer.TransferOperations; import com.google.api.services.storagetransfer.v1.Storagetransfer.TransferOperations.List; import com.google.cloud.storage.storagetransfer.samples.RequestChecker; - import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; diff --git a/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/TransferJobUtilsTest.java b/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/TransferJobUtilsTest.java index 9306545c387..b902be35485 100644 --- a/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/TransferJobUtilsTest.java +++ b/storage/storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/TransferJobUtilsTest.java @@ -21,10 +21,8 @@ import com.google.api.services.storagetransfer.v1.model.Date; import com.google.api.services.storagetransfer.v1.model.TimeOfDay; import com.google.cloud.storage.storagetransfer.samples.TransferJobUtils; - -import org.junit.Test; - import java.util.Random; +import org.junit.Test; public class TransferJobUtilsTest { private Random rand = new Random(); From 6a987f1d5ac74016a04f90554d97356aa2b8b794 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 17 Jan 2018 14:18:52 -0800 Subject: [PATCH 4/6] Updated translate/ --- translate/README.md | 3 ++ translate/cloud-client/README.md | 3 ++ translate/cloud-client/pom.xml | 12 ++++--- .../example/translate/QuickstartSample.java | 28 ++++++++-------- .../example/translate/QuickstartSampleIT.java | 33 +++++++++---------- translate/pom.xml | 19 ++++++----- .../translate/samples/TranslateText.java | 1 - .../translate/samples/TranslateTextTest.java | 7 ++-- 8 files changed, 57 insertions(+), 49 deletions(-) diff --git a/translate/README.md b/translate/README.md index 4dd747ff535..0a4946a7184 100644 --- a/translate/README.md +++ b/translate/README.md @@ -1,5 +1,8 @@ # Google Cloud Translate Sample + +Open in Cloud Shell + This sample demonstrates the use of [Google Cloud Translate API][Translate-Docs] for translating and detecting language text. diff --git a/translate/cloud-client/README.md b/translate/cloud-client/README.md index fd02af6eaeb..6a4aebbc22d 100644 --- a/translate/cloud-client/README.md +++ b/translate/cloud-client/README.md @@ -1,5 +1,8 @@ # Getting Started with Google Translate API and the Google Cloud Client libraries + +Open in Cloud Shell + [Google Translate API][translate] provides a simple programmatic interface for translating an arbitrary string into any supported language. These sample Java applications demonstrate how to access the Google Translate API using diff --git a/translate/cloud-client/pom.xml b/translate/cloud-client/pom.xml index 192cd12bc74..0db2156fe52 100644 --- a/translate/cloud-client/pom.xml +++ b/translate/cloud-client/pom.xml @@ -19,12 +19,14 @@ translate-google-cloud-samples jar - + - doc-samples - com.google.cloud - 1.0.0 - ../.. + com.google.cloud.samples + shared-configuration + 1.0.8 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 ce9c01d4399..bf3aad063e1 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 @@ -1,18 +1,18 @@ /* - Copyright 2016, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.translate; diff --git a/translate/cloud-client/src/test/java/com/example/translate/QuickstartSampleIT.java b/translate/cloud-client/src/test/java/com/example/translate/QuickstartSampleIT.java index 50460defa29..78480b78fc3 100644 --- a/translate/cloud-client/src/test/java/com/example/translate/QuickstartSampleIT.java +++ b/translate/cloud-client/src/test/java/com/example/translate/QuickstartSampleIT.java @@ -1,32 +1,31 @@ /* - Copyright 2016, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.translate; import static com.google.common.truth.Truth.assertThat; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - /** * Tests for quickstart sample. */ diff --git a/translate/pom.xml b/translate/pom.xml index b8f77461d66..cf160a7eb84 100644 --- a/translate/pom.xml +++ b/translate/pom.xml @@ -20,20 +20,23 @@ limitations under the License. 1.0 translate http://maven.apache.org + + + + com.google.cloud.samples + shared-configuration + 1.0.8 + + 1.8 1.8 UTF-8 - - - doc-samples - com.google.cloud - 1.0.0 - .. - - com.google.cloud diff --git a/translate/src/main/java/com/example/cloud/translate/samples/TranslateText.java b/translate/src/main/java/com/example/cloud/translate/samples/TranslateText.java index b5454b0687d..e294c473fc0 100644 --- a/translate/src/main/java/com/example/cloud/translate/samples/TranslateText.java +++ b/translate/src/main/java/com/example/cloud/translate/samples/TranslateText.java @@ -24,7 +24,6 @@ import com.google.cloud.translate.TranslateOptions; import com.google.cloud.translate.Translation; import com.google.common.collect.ImmutableList; - import java.io.PrintStream; import java.util.List; import java.util.Optional; diff --git a/translate/src/test/java/com/example/cloud/translate/samples/TranslateTextTest.java b/translate/src/test/java/com/example/cloud/translate/samples/TranslateTextTest.java index 6e3a6ad412b..1ce8996b484 100644 --- a/translate/src/test/java/com/example/cloud/translate/samples/TranslateTextTest.java +++ b/translate/src/test/java/com/example/cloud/translate/samples/TranslateTextTest.java @@ -18,15 +18,14 @@ import static com.google.common.truth.Truth.assertThat; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.Arrays; import java.util.List; import java.util.Optional; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Unit tests for {@link TranslateText}. From a919e144bd8a2c0eb400a733f0afcf945da51a63 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 17 Jan 2018 14:26:13 -0800 Subject: [PATCH 5/6] Updated unittests/ --- unittests/README.md | 4 ++ unittests/pom.xml | 42 +++++++++---------- .../appengine/samples/AuthenticationTest.java | 1 - .../appengine/samples/DeferredTaskTest.java | 4 +- ...LocalCustomPolicyHighRepDatastoreTest.java | 1 - .../appengine/samples/LocalDatastoreTest.java | 1 - .../samples/LocalHighRepDatastoreTest.java | 1 - .../appengine/samples/LocalMemcacheTest.java | 8 ++-- .../appengine/samples/LocalUrlFetchTest.java | 4 +- .../google/appengine/samples/ShortTest.java | 1 - .../samples/TaskQueueConfigTest.java | 1 - .../appengine/samples/TaskQueueTest.java | 1 - 12 files changed, 29 insertions(+), 40 deletions(-) diff --git a/unittests/README.md b/unittests/README.md index e1ecb197f0f..a8b7ab2d41e 100644 --- a/unittests/README.md +++ b/unittests/README.md @@ -1,5 +1,9 @@ # appengine-ndb-snippets + +Open in Cloud Shell + + ## unittests This subdirectory contains code snippets for [Local Unit Testing for Java](https://cloud.google.com/appengine/docs/java/tools/localunittesting). diff --git a/unittests/pom.xml b/unittests/pom.xml index 4131a8e7a1c..c381de9d5e6 100644 --- a/unittests/pom.xml +++ b/unittests/pom.xml @@ -4,34 +4,32 @@ 4.0.0 war 1.0-SNAPSHOT + com.google.appengine.samples + unittests-appengine-local-testing-samples - + - doc-samples - com.google.cloud - 1.0.0 - .. + com.google.cloud.samples + shared-configuration + 1.0.8 - com.google.appengine.samples - unittests-appengine-local-testing-samples - - 1.7 - 1.7 - 1.9.60 - UTF-8 - 3.2.0 - 2.5.1 - 1.23.0 + 1.8 + 1.8 + + com.google.appengine appengine-api-1.0-sdk - ${appengine.sdk.version} + 1.9.60 javax.servlet @@ -55,25 +53,25 @@ com.google.appengine appengine-testing - ${appengine.sdk.version} + 1.9.60 test com.google.appengine appengine-api-stubs - ${appengine.sdk.version} + 1.9.60 test com.google.appengine appengine-tools-sdk - ${appengine.sdk.version} + 1.9.60 test com.google.api-client google-api-client-appengine - ${google-api-client.version} + 1.23.0 test @@ -83,7 +81,7 @@ org.apache.maven.plugins maven-war-plugin - ${maven-war-plugin-version} + 3.2.0 true @@ -100,7 +98,7 @@ com.google.appengine appengine-maven-plugin - ${appengine.sdk.version} + $1.9.60 diff --git a/unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java b/unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java index c300702fb20..f90a4bd0bbd 100644 --- a/unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java @@ -24,7 +24,6 @@ import com.google.appengine.api.users.UserServiceFactory; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; import com.google.appengine.tools.development.testing.LocalUserServiceTestConfig; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java b/unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java index 3477305210e..57e90712c41 100644 --- a/unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java @@ -25,13 +25,11 @@ import com.google.appengine.api.taskqueue.TaskOptions; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; import com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig; - +import java.util.concurrent.TimeUnit; import org.junit.After; import org.junit.Before; import org.junit.Test; -import java.util.concurrent.TimeUnit; - public class DeferredTaskTest { // Unlike CountDownLatch, TaskCountDownlatch lets us reset. diff --git a/unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java b/unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java index ef889c7579e..bc180310b89 100644 --- a/unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java @@ -29,7 +29,6 @@ import com.google.appengine.api.datastore.dev.HighRepJobPolicy; import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java b/unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java index 2b451c8d65b..6456f1c59ef 100644 --- a/unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java @@ -27,7 +27,6 @@ import com.google.appengine.api.datastore.Query; import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java b/unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java index 8d696ad21d4..a445a9993d0 100644 --- a/unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java @@ -29,7 +29,6 @@ import com.google.appengine.api.datastore.Query; import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java b/unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java index 39186086cc2..70bf25ae1dc 100644 --- a/unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java @@ -19,19 +19,17 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -// [START imports] - import com.google.appengine.api.memcache.MemcacheService; import com.google.appengine.api.memcache.MemcacheServiceFactory; import com.google.appengine.tools.development.testing.LocalMemcacheServiceTestConfig; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; - -// [END imports] - import org.junit.After; import org.junit.Before; import org.junit.Test; +// [START imports] +// [END imports] + // [START NameAndHelper] public class LocalMemcacheTest { diff --git a/unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java b/unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java index b0e616f721e..07ae8b23910 100644 --- a/unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java @@ -28,13 +28,11 @@ import com.google.api.client.testing.http.MockLowLevelHttpResponse; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; import com.google.appengine.tools.development.testing.LocalURLFetchServiceTestConfig; - +import java.io.IOException; import org.junit.After; import org.junit.Before; import org.junit.Test; -import java.io.IOException; - public class LocalUrlFetchTest { private final LocalServiceTestHelper helper = new LocalServiceTestHelper(new LocalURLFetchServiceTestConfig()); diff --git a/unittests/src/test/java/com/google/appengine/samples/ShortTest.java b/unittests/src/test/java/com/google/appengine/samples/ShortTest.java index a024c08bcd3..c53201efe90 100644 --- a/unittests/src/test/java/com/google/appengine/samples/ShortTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/ShortTest.java @@ -29,7 +29,6 @@ import com.google.appengine.tools.development.testing.LocalCapabilitiesServiceTestConfig; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; import com.google.apphosting.api.ApiProxy; - import org.junit.After; import org.junit.Test; diff --git a/unittests/src/test/java/com/google/appengine/samples/TaskQueueConfigTest.java b/unittests/src/test/java/com/google/appengine/samples/TaskQueueConfigTest.java index 84e5d91b15f..2321593d70b 100644 --- a/unittests/src/test/java/com/google/appengine/samples/TaskQueueConfigTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/TaskQueueConfigTest.java @@ -24,7 +24,6 @@ import com.google.appengine.api.taskqueue.dev.QueueStateInfo; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; import com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/unittests/src/test/java/com/google/appengine/samples/TaskQueueTest.java b/unittests/src/test/java/com/google/appengine/samples/TaskQueueTest.java index 3616fb035e2..2d80206fafd 100644 --- a/unittests/src/test/java/com/google/appengine/samples/TaskQueueTest.java +++ b/unittests/src/test/java/com/google/appengine/samples/TaskQueueTest.java @@ -26,7 +26,6 @@ import com.google.appengine.api.taskqueue.dev.QueueStateInfo; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; import com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig; - import org.junit.After; import org.junit.Before; import org.junit.Test; From 0de0e258a4ab3b266c2fe9551d96e0764ba79d02 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 17 Jan 2018 14:29:35 -0800 Subject: [PATCH 6/6] Updated video/ --- video/cloud-client/README.md | 3 ++ video/cloud-client/pom.xml | 12 ++++---- .../main/java/com/example/video/Detect.java | 4 +-- .../com/example/video/QuickstartSample.java | 4 +-- .../test/java/com/example/video/DetectIT.java | 28 +++++++++---------- .../java/com/example/video/QuickstartIT.java | 28 +++++++++---------- 6 files changed, 42 insertions(+), 37 deletions(-) diff --git a/video/cloud-client/README.md b/video/cloud-client/README.md index 63d5920329e..3d95d8a1436 100644 --- a/video/cloud-client/README.md +++ b/video/cloud-client/README.md @@ -1,5 +1,8 @@ # Video Feature Detection Sample + +Open in Cloud Shell + [Google Cloud Video Intelligence API][video] provides feature detection for videos. This API is part of the larger collection of Cloud Machine Learning APIs. diff --git a/video/cloud-client/pom.xml b/video/cloud-client/pom.xml index 054b99664a6..4bac1cfcd40 100644 --- a/video/cloud-client/pom.xml +++ b/video/cloud-client/pom.xml @@ -19,12 +19,14 @@ video-google-cloud-samples jar - + - doc-samples - com.google.cloud - 1.0.0 - ../.. + com.google.cloud.samples + shared-configuration + 1.0.8 diff --git a/video/cloud-client/src/main/java/com/example/video/Detect.java b/video/cloud-client/src/main/java/com/example/video/Detect.java index 35836c3f8f4..0e5ad20d6c7 100644 --- a/video/cloud-client/src/main/java/com/example/video/Detect.java +++ b/video/cloud-client/src/main/java/com/example/video/Detect.java @@ -1,11 +1,11 @@ /* - * Copyright 2017, Google, Inc. + * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/video/cloud-client/src/main/java/com/example/video/QuickstartSample.java b/video/cloud-client/src/main/java/com/example/video/QuickstartSample.java index 7b90c0acc5c..0d2991cc488 100644 --- a/video/cloud-client/src/main/java/com/example/video/QuickstartSample.java +++ b/video/cloud-client/src/main/java/com/example/video/QuickstartSample.java @@ -1,11 +1,11 @@ /* - * Copyright 2017, Google, Inc. + * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/video/cloud-client/src/test/java/com/example/video/DetectIT.java b/video/cloud-client/src/test/java/com/example/video/DetectIT.java index 5c6ccba8e4d..a0d040575fc 100644 --- a/video/cloud-client/src/test/java/com/example/video/DetectIT.java +++ b/video/cloud-client/src/test/java/com/example/video/DetectIT.java @@ -1,18 +1,18 @@ /* - Copyright 2017, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.video; diff --git a/video/cloud-client/src/test/java/com/example/video/QuickstartIT.java b/video/cloud-client/src/test/java/com/example/video/QuickstartIT.java index 94a7969c242..5424752ba58 100644 --- a/video/cloud-client/src/test/java/com/example/video/QuickstartIT.java +++ b/video/cloud-client/src/test/java/com/example/video/QuickstartIT.java @@ -1,18 +1,18 @@ /* - Copyright 2017, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.video;