From 3f49a2129219ebecd3562d34c114fb8c2ead8728 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 --- iam/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 +++++----- iam/cloud-client/snippets/src/test/java/DenyIT.java | 4 ++-- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/iam/cloud-client/snippets/pom.xml b/iam/cloud-client/snippets/pom.xml index b1fb9963179..b315a1da073 100644 --- a/iam/cloud-client/snippets/pom.xml +++ b/iam/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/iam/cloud-client/snippets/src/main/java/CreateDenyPolicy.java b/iam/cloud-client/snippets/src/main/java/CreateDenyPolicy.java index 5cbc966e165..d9ea32daa58 100644 --- a/iam/cloud-client/snippets/src/main/java/CreateDenyPolicy.java +++ b/iam/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/iam/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java b/iam/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java index bf98545c22d..ef0b9d4907f 100644 --- a/iam/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java +++ b/iam/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/iam/cloud-client/snippets/src/main/java/GetDenyPolicy.java b/iam/cloud-client/snippets/src/main/java/GetDenyPolicy.java index 10b1b5c2451..0cf4e96c8a4 100644 --- a/iam/cloud-client/snippets/src/main/java/GetDenyPolicy.java +++ b/iam/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/iam/cloud-client/snippets/src/main/java/ListDenyPolicies.java b/iam/cloud-client/snippets/src/main/java/ListDenyPolicies.java index b8f89da3d71..566a5946df1 100644 --- a/iam/cloud-client/snippets/src/main/java/ListDenyPolicies.java +++ b/iam/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/iam/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java b/iam/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java index e0846d7c03f..28e6bb91a70 100644 --- a/iam/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java +++ b/iam/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/iam/cloud-client/snippets/src/test/java/DenyIT.java b/iam/cloud-client/snippets/src/test/java/DenyIT.java index a0af4cbcfb6..76db0dbcd7c 100644 --- a/iam/cloud-client/snippets/src/test/java/DenyIT.java +++ b/iam/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;