From 3a4392af5d222d349b2fb8352c041b7889be97b5 Mon Sep 17 00:00:00 2001 From: Sita Lakshmi Sangameswaran Date: Wed, 21 Sep 2022 20:45:12 +0530 Subject: [PATCH] docs(samples): update package names to match v2 (#424) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update package names to match v2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update pom.xml Co-authored-by: Owl Bot --- java-iam/samples/cloud-client/snippets/pom.xml | 7 ++++--- .../snippets/src/main/java/CreateDenyPolicy.java | 10 +++++----- .../snippets/src/main/java/DeleteDenyPolicy.java | 4 ++-- .../snippets/src/main/java/GetDenyPolicy.java | 6 +++--- .../snippets/src/main/java/ListDenyPolicies.java | 4 ++-- .../snippets/src/main/java/UpdateDenyPolicy.java | 10 +++++----- .../cloud-client/snippets/src/test/java/DenyIT.java | 4 ++-- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/java-iam/samples/cloud-client/snippets/pom.xml b/java-iam/samples/cloud-client/snippets/pom.xml index b1fb9963179d..b315a1da073f 100644 --- a/java-iam/samples/cloud-client/snippets/pom.xml +++ b/java-iam/samples/cloud-client/snippets/pom.xml @@ -39,9 +39,10 @@ 1.42.2 - com.google.apis - google-api-services-iam - v2beta-rev20220713-2.0.0 + com.google.cloud + google-iam-policy + 1.6.0 + compile com.google.apis diff --git a/java-iam/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java b/java-iam/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java index 5cbc966e165f..d9ea32daa582 100644 --- a/java-iam/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java +++ b/java-iam/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java @@ -16,11 +16,11 @@ // [START iam_create_deny_policy] -import com.google.iam.v2beta.CreatePolicyRequest; -import com.google.iam.v2beta.DenyRule; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; -import com.google.iam.v2beta.PolicyRule; +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.DenyRule; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyRule; import com.google.longrunning.Operation; import com.google.type.Expr; import java.io.IOException; diff --git a/java-iam/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java b/java-iam/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java index bf98545c22d2..ef0b9d4907fc 100644 --- a/java-iam/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java +++ b/java-iam/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java @@ -16,8 +16,8 @@ // [START iam_delete_deny_policy] -import com.google.iam.v2beta.DeletePolicyRequest; -import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.PoliciesClient; import com.google.longrunning.Operation; import java.io.IOException; import java.net.URLEncoder; diff --git a/java-iam/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java b/java-iam/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java index 10b1b5c24518..0cf4e96c8a48 100644 --- a/java-iam/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java +++ b/java-iam/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java @@ -16,9 +16,9 @@ // [START iam_get_deny_policy] -import com.google.iam.v2beta.GetPolicyRequest; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; +import com.google.iam.v2.GetPolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; import java.io.IOException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; diff --git a/java-iam/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java b/java-iam/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java index b8f89da3d713..566a5946df1d 100644 --- a/java-iam/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java +++ b/java-iam/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java @@ -16,8 +16,8 @@ // [START iam_list_deny_policy] -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; import java.io.IOException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; diff --git a/java-iam/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java b/java-iam/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java index e0846d7c03fe..28e6bb91a70d 100644 --- a/java-iam/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java +++ b/java-iam/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java @@ -16,11 +16,11 @@ // [START iam_update_deny_policy] -import com.google.iam.v2beta.DenyRule; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; -import com.google.iam.v2beta.PolicyRule; -import com.google.iam.v2beta.UpdatePolicyRequest; +import com.google.iam.v2.DenyRule; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyRule; +import com.google.iam.v2.UpdatePolicyRequest; import com.google.longrunning.Operation; import com.google.type.Expr; import java.io.IOException; diff --git a/java-iam/samples/cloud-client/snippets/src/test/java/DenyIT.java b/java-iam/samples/cloud-client/snippets/src/test/java/DenyIT.java index a0af4cbcfb66..76db0dbcd7c7 100644 --- a/java-iam/samples/cloud-client/snippets/src/test/java/DenyIT.java +++ b/java-iam/samples/cloud-client/snippets/src/test/java/DenyIT.java @@ -17,8 +17,8 @@ import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertWithMessage; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream;