From 8221095fccc1c3e5281ac5da90c6f9d62051f02a Mon Sep 17 00:00:00 2001 From: Dane Zeke Liergaard Date: Mon, 31 Aug 2020 10:55:43 -0700 Subject: [PATCH] Further rename package and add gson dependency. --- samples/snapshot/pom.xml | 5 +++++ .../{samples => }/clusters/CreateCluster.java | 3 +-- .../{samples => }/clusters/DeleteCluster.java | 2 +- .../{samples => }/clusters/GetCluster.java | 2 +- .../{samples => }/clusters/ListClusters.java | 2 +- .../{samples => }/clusters/UpdateCluster.java | 2 +- .../deployments/CreateDeployment.java | 2 +- .../deployments/DeleteDeployment.java | 2 +- .../{samples => }/deployments/GetDeployment.java | 2 +- .../{samples => }/deployments/ListDeployments.java | 2 +- .../deployments/UpdateDeployment.java | 2 +- .../{samples => }/realms/CreateRealm.java | 2 +- .../{samples => }/realms/DeleteRealm.java | 2 +- .../{samples => }/realms/GetRealm.java | 2 +- .../{samples => }/realms/ListRealms.java | 2 +- .../{samples => }/realms/UpdateRealm.java | 2 +- .../gameservices/{samples => }/ClusterTests.java | 14 +++++++------- .../{samples => }/DeploymentTests.java | 12 ++++++------ .../{samples => }/GameServicesTestUtil.java | 2 +- .../gameservices/{samples => }/RealmTests.java | 12 ++++++------ 20 files changed, 40 insertions(+), 36 deletions(-) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/clusters/CreateCluster.java (97%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/clusters/DeleteCluster.java (97%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/clusters/GetCluster.java (97%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/clusters/ListClusters.java (98%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/clusters/UpdateCluster.java (98%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/deployments/CreateDeployment.java (98%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/deployments/DeleteDeployment.java (97%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/deployments/GetDeployment.java (97%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/deployments/ListDeployments.java (97%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/deployments/UpdateDeployment.java (98%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/realms/CreateRealm.java (98%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/realms/DeleteRealm.java (97%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/realms/GetRealm.java (97%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/realms/ListRealms.java (97%) rename samples/snippets/src/main/java/com/example/gameservices/{samples => }/realms/UpdateRealm.java (98%) rename samples/snippets/src/test/java/com/example/gameservices/{samples => }/ClusterTests.java (90%) rename samples/snippets/src/test/java/com/example/gameservices/{samples => }/DeploymentTests.java (89%) rename samples/snippets/src/test/java/com/example/gameservices/{samples => }/GameServicesTestUtil.java (98%) rename samples/snippets/src/test/java/com/example/gameservices/{samples => }/RealmTests.java (89%) diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 255fd780..f34979e5 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -31,6 +31,11 @@ 0.21.1-SNAPSHOT + + com.google.code.gson + gson + 2.8.6 + junit diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/CreateCluster.java b/samples/snippets/src/main/java/com/example/gameservices/clusters/CreateCluster.java similarity index 97% rename from samples/snippets/src/main/java/com/example/gameservices/samples/clusters/CreateCluster.java rename to samples/snippets/src/main/java/com/example/gameservices/clusters/CreateCluster.java index 4e3c72d8..047ccc30 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/CreateCluster.java +++ b/samples/snippets/src/main/java/com/example/gameservices/clusters/CreateCluster.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.clusters; +package com.example.gameservices.clusters; // [START cloud_game_servers_cluster_create] @@ -25,7 +25,6 @@ import com.google.cloud.gaming.v1.GameServerClustersServiceClient; import com.google.cloud.gaming.v1.GkeClusterReference; import com.google.cloud.gaming.v1.OperationMetadata; -import com.google.protobuf.Empty; import java.io.IOException; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/DeleteCluster.java b/samples/snippets/src/main/java/com/example/gameservices/clusters/DeleteCluster.java similarity index 97% rename from samples/snippets/src/main/java/com/example/gameservices/samples/clusters/DeleteCluster.java rename to samples/snippets/src/main/java/com/example/gameservices/clusters/DeleteCluster.java index 18b8e33a..f89cecee 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/DeleteCluster.java +++ b/samples/snippets/src/main/java/com/example/gameservices/clusters/DeleteCluster.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.clusters; +package com.example.gameservices.clusters; // [START cloud_game_servers_cluster_delete] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/GetCluster.java b/samples/snippets/src/main/java/com/example/gameservices/clusters/GetCluster.java similarity index 97% rename from samples/snippets/src/main/java/com/example/gameservices/samples/clusters/GetCluster.java rename to samples/snippets/src/main/java/com/example/gameservices/clusters/GetCluster.java index bb00db90..760b4ff5 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/GetCluster.java +++ b/samples/snippets/src/main/java/com/example/gameservices/clusters/GetCluster.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.clusters; +package com.example.gameservices.clusters; // [START cloud_game_servers_cluster_get] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/ListClusters.java b/samples/snippets/src/main/java/com/example/gameservices/clusters/ListClusters.java similarity index 98% rename from samples/snippets/src/main/java/com/example/gameservices/samples/clusters/ListClusters.java rename to samples/snippets/src/main/java/com/example/gameservices/clusters/ListClusters.java index 377e383e..418a6af0 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/ListClusters.java +++ b/samples/snippets/src/main/java/com/example/gameservices/clusters/ListClusters.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.clusters; +package com.example.gameservices.clusters; // [START cloud_game_servers_cluster_list] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/UpdateCluster.java b/samples/snippets/src/main/java/com/example/gameservices/clusters/UpdateCluster.java similarity index 98% rename from samples/snippets/src/main/java/com/example/gameservices/samples/clusters/UpdateCluster.java rename to samples/snippets/src/main/java/com/example/gameservices/clusters/UpdateCluster.java index 53fc2090..982aefc2 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/clusters/UpdateCluster.java +++ b/samples/snippets/src/main/java/com/example/gameservices/clusters/UpdateCluster.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.clusters; +package com.example.gameservices.clusters; // [START cloud_game_servers_cluster_update] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/CreateDeployment.java b/samples/snippets/src/main/java/com/example/gameservices/deployments/CreateDeployment.java similarity index 98% rename from samples/snippets/src/main/java/com/example/gameservices/samples/deployments/CreateDeployment.java rename to samples/snippets/src/main/java/com/example/gameservices/deployments/CreateDeployment.java index a26578fc..a31ffbcf 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/CreateDeployment.java +++ b/samples/snippets/src/main/java/com/example/gameservices/deployments/CreateDeployment.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.deployments; +package com.example.gameservices.deployments; // [START cloud_game_servers_deployment_create] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/DeleteDeployment.java b/samples/snippets/src/main/java/com/example/gameservices/deployments/DeleteDeployment.java similarity index 97% rename from samples/snippets/src/main/java/com/example/gameservices/samples/deployments/DeleteDeployment.java rename to samples/snippets/src/main/java/com/example/gameservices/deployments/DeleteDeployment.java index 59e677bd..6344b0d8 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/DeleteDeployment.java +++ b/samples/snippets/src/main/java/com/example/gameservices/deployments/DeleteDeployment.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.deployments; +package com.example.gameservices.deployments; // [START cloud_game_servers_deployment_delete] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/GetDeployment.java b/samples/snippets/src/main/java/com/example/gameservices/deployments/GetDeployment.java similarity index 97% rename from samples/snippets/src/main/java/com/example/gameservices/samples/deployments/GetDeployment.java rename to samples/snippets/src/main/java/com/example/gameservices/deployments/GetDeployment.java index e4909d45..5b9ee1f2 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/GetDeployment.java +++ b/samples/snippets/src/main/java/com/example/gameservices/deployments/GetDeployment.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.deployments; +package com.example.gameservices.deployments; // [START cloud_game_servers_deployment_get] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/ListDeployments.java b/samples/snippets/src/main/java/com/example/gameservices/deployments/ListDeployments.java similarity index 97% rename from samples/snippets/src/main/java/com/example/gameservices/samples/deployments/ListDeployments.java rename to samples/snippets/src/main/java/com/example/gameservices/deployments/ListDeployments.java index ccc1939f..d69769d3 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/ListDeployments.java +++ b/samples/snippets/src/main/java/com/example/gameservices/deployments/ListDeployments.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.deployments; +package com.example.gameservices.deployments; // [START cloud_game_servers_deployment_list] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/UpdateDeployment.java b/samples/snippets/src/main/java/com/example/gameservices/deployments/UpdateDeployment.java similarity index 98% rename from samples/snippets/src/main/java/com/example/gameservices/samples/deployments/UpdateDeployment.java rename to samples/snippets/src/main/java/com/example/gameservices/deployments/UpdateDeployment.java index da19b9e5..12b10df7 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/deployments/UpdateDeployment.java +++ b/samples/snippets/src/main/java/com/example/gameservices/deployments/UpdateDeployment.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.deployments; +package com.example.gameservices.deployments; // [START cloud_game_servers_deployment_update] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/CreateRealm.java b/samples/snippets/src/main/java/com/example/gameservices/realms/CreateRealm.java similarity index 98% rename from samples/snippets/src/main/java/com/example/gameservices/samples/realms/CreateRealm.java rename to samples/snippets/src/main/java/com/example/gameservices/realms/CreateRealm.java index a6a9ea15..28257b09 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/CreateRealm.java +++ b/samples/snippets/src/main/java/com/example/gameservices/realms/CreateRealm.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.realms; +package com.example.gameservices.realms; // [START cloud_game_servers_realm_create] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/DeleteRealm.java b/samples/snippets/src/main/java/com/example/gameservices/realms/DeleteRealm.java similarity index 97% rename from samples/snippets/src/main/java/com/example/gameservices/samples/realms/DeleteRealm.java rename to samples/snippets/src/main/java/com/example/gameservices/realms/DeleteRealm.java index d79de7a9..8ab5dbdd 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/DeleteRealm.java +++ b/samples/snippets/src/main/java/com/example/gameservices/realms/DeleteRealm.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.realms; +package com.example.gameservices.realms; // [START cloud_game_servers_realm_delete] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/GetRealm.java b/samples/snippets/src/main/java/com/example/gameservices/realms/GetRealm.java similarity index 97% rename from samples/snippets/src/main/java/com/example/gameservices/samples/realms/GetRealm.java rename to samples/snippets/src/main/java/com/example/gameservices/realms/GetRealm.java index e0bb6c3e..9e1ab78e 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/GetRealm.java +++ b/samples/snippets/src/main/java/com/example/gameservices/realms/GetRealm.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.realms; +package com.example.gameservices.realms; // [START cloud_game_servers_realm_get] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/ListRealms.java b/samples/snippets/src/main/java/com/example/gameservices/realms/ListRealms.java similarity index 97% rename from samples/snippets/src/main/java/com/example/gameservices/samples/realms/ListRealms.java rename to samples/snippets/src/main/java/com/example/gameservices/realms/ListRealms.java index 89cc0b34..27ac60d0 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/ListRealms.java +++ b/samples/snippets/src/main/java/com/example/gameservices/realms/ListRealms.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.realms; +package com.example.gameservices.realms; // [START cloud_game_servers_realm_list] diff --git a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/UpdateRealm.java b/samples/snippets/src/main/java/com/example/gameservices/realms/UpdateRealm.java similarity index 98% rename from samples/snippets/src/main/java/com/example/gameservices/samples/realms/UpdateRealm.java rename to samples/snippets/src/main/java/com/example/gameservices/realms/UpdateRealm.java index 26558fa3..7c069cd9 100644 --- a/samples/snippets/src/main/java/com/example/gameservices/samples/realms/UpdateRealm.java +++ b/samples/snippets/src/main/java/com/example/gameservices/realms/UpdateRealm.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples.realms; +package com.example.gameservices.realms; // [START cloud_game_servers_realm_update] diff --git a/samples/snippets/src/test/java/com/example/gameservices/samples/ClusterTests.java b/samples/snippets/src/test/java/com/example/gameservices/ClusterTests.java similarity index 90% rename from samples/snippets/src/test/java/com/example/gameservices/samples/ClusterTests.java rename to samples/snippets/src/test/java/com/example/gameservices/ClusterTests.java index 1edb430c..cc54e031 100644 --- a/samples/snippets/src/test/java/com/example/gameservices/samples/ClusterTests.java +++ b/samples/snippets/src/test/java/com/example/gameservices/ClusterTests.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package com.example.gameservices.samples; +package com.example.gameservices; import static org.junit.Assert.assertTrue; -import com.example.gameservices.samples.clusters.CreateCluster; -import com.example.gameservices.samples.clusters.DeleteCluster; -import com.example.gameservices.samples.clusters.GetCluster; -import com.example.gameservices.samples.clusters.ListClusters; -import com.example.gameservices.samples.clusters.UpdateCluster; -import com.example.gameservices.samples.realms.CreateRealm; +import com.example.gameservices.clusters.CreateCluster; +import com.example.gameservices.clusters.DeleteCluster; +import com.example.gameservices.clusters.GetCluster; +import com.example.gameservices.clusters.ListClusters; +import com.example.gameservices.clusters.UpdateCluster; +import com.example.gameservices.realms.CreateRealm; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.junit.After; diff --git a/samples/snippets/src/test/java/com/example/gameservices/samples/DeploymentTests.java b/samples/snippets/src/test/java/com/example/gameservices/DeploymentTests.java similarity index 89% rename from samples/snippets/src/test/java/com/example/gameservices/samples/DeploymentTests.java rename to samples/snippets/src/test/java/com/example/gameservices/DeploymentTests.java index c1046a5c..c6009283 100644 --- a/samples/snippets/src/test/java/com/example/gameservices/samples/DeploymentTests.java +++ b/samples/snippets/src/test/java/com/example/gameservices/DeploymentTests.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package com.example.gameservices.samples; +package com.example.gameservices; import static org.junit.Assert.assertTrue; -import com.example.gameservices.samples.deployments.CreateDeployment; -import com.example.gameservices.samples.deployments.DeleteDeployment; -import com.example.gameservices.samples.deployments.GetDeployment; -import com.example.gameservices.samples.deployments.ListDeployments; -import com.example.gameservices.samples.deployments.UpdateDeployment; +import com.example.gameservices.deployments.CreateDeployment; +import com.example.gameservices.deployments.DeleteDeployment; +import com.example.gameservices.deployments.GetDeployment; +import com.example.gameservices.deployments.ListDeployments; +import com.example.gameservices.deployments.UpdateDeployment; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.junit.After; diff --git a/samples/snippets/src/test/java/com/example/gameservices/samples/GameServicesTestUtil.java b/samples/snippets/src/test/java/com/example/gameservices/GameServicesTestUtil.java similarity index 98% rename from samples/snippets/src/test/java/com/example/gameservices/samples/GameServicesTestUtil.java rename to samples/snippets/src/test/java/com/example/gameservices/GameServicesTestUtil.java index 78883823..007cafa8 100644 --- a/samples/snippets/src/test/java/com/example/gameservices/samples/GameServicesTestUtil.java +++ b/samples/snippets/src/test/java/com/example/gameservices/GameServicesTestUtil.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.gameservices.samples; +package com.example.gameservices; import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.gaming.v1.GameServerCluster; diff --git a/samples/snippets/src/test/java/com/example/gameservices/samples/RealmTests.java b/samples/snippets/src/test/java/com/example/gameservices/RealmTests.java similarity index 89% rename from samples/snippets/src/test/java/com/example/gameservices/samples/RealmTests.java rename to samples/snippets/src/test/java/com/example/gameservices/RealmTests.java index 4107a788..15f8b7ee 100644 --- a/samples/snippets/src/test/java/com/example/gameservices/samples/RealmTests.java +++ b/samples/snippets/src/test/java/com/example/gameservices/RealmTests.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package com.example.gameservices.samples; +package com.example.gameservices; import static org.junit.Assert.assertTrue; -import com.example.gameservices.samples.realms.CreateRealm; -import com.example.gameservices.samples.realms.DeleteRealm; -import com.example.gameservices.samples.realms.GetRealm; -import com.example.gameservices.samples.realms.ListRealms; -import com.example.gameservices.samples.realms.UpdateRealm; +import com.example.gameservices.realms.CreateRealm; +import com.example.gameservices.realms.DeleteRealm; +import com.example.gameservices.realms.GetRealm; +import com.example.gameservices.realms.ListRealms; +import com.example.gameservices.realms.UpdateRealm; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.junit.After;