From be3132c1b9a7337158d6eadd88c60a400ccdbcb4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 20:16:25 +0000 Subject: [PATCH] chore: Integrate new gapic-generator-java and rules_gapic (#223) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 454027580 Source-Link: https://github.com/googleapis/googleapis/commit/1b222777baa702e7135610355706570ed2b56318 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e04cea20d0d12eb5c3bdb360a9e72b654edcb638 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA0Y2VhMjBkMGQxMmViNWMzYmRiMzYwYTllNzJiNjU0ZWRjYjYzOCJ9 --- .../v1beta1/BinauthzManagementServiceV1Beta1Client.java | 2 +- .../v1beta1/SystemPolicyV1Beta1Client.java | 8 ++++---- .../cloud/binaryauthorization/v1beta1/package-info.java | 2 +- .../v1/BinauthzManagementServiceV1Client.java | 2 +- .../binaryauthorization/v1/SystemPolicyV1Client.java | 8 ++++---- .../google/cloud/binaryauthorization/v1/package-info.java | 2 +- .../v1beta1/SystemPolicyV1Beta1ClientTest.java | 8 ++++---- .../binaryauthorization/v1/SystemPolicyV1ClientTest.java | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java index fccbdb5784bf..ca587ae1b96e 100644 --- a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java +++ b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java @@ -870,7 +870,7 @@ public final ListAttestorsPagedResponse listAttestors(ListAttestorsRequest reque * while (true) { * ListAttestorsResponse response = * binauthzManagementServiceV1Beta1Client.listAttestorsCallable().call(request); - * for (Attestor element : response.getResponsesList()) { + * for (Attestor element : response.getAttestorsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java index 97668fc9abd7..5fb4e06277ab 100644 --- a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java +++ b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java @@ -36,7 +36,7 @@ * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); * } * } @@ -155,7 +155,7 @@ public SystemPolicyV1Beta1Stub getStub() { * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); * } * } @@ -206,7 +206,7 @@ public final Policy getSystemPolicy(String name) { * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { * GetSystemPolicyRequest request = * GetSystemPolicyRequest.newBuilder() - * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .setName(PolicyName.ofLocationName("[LOCATION]").toString()) * .build(); * Policy response = systemPolicyV1Beta1Client.getSystemPolicy(request); * } @@ -231,7 +231,7 @@ public final Policy getSystemPolicy(GetSystemPolicyRequest request) { * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { * GetSystemPolicyRequest request = * GetSystemPolicyRequest.newBuilder() - * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .setName(PolicyName.ofLocationName("[LOCATION]").toString()) * .build(); * ApiFuture future = * systemPolicyV1Beta1Client.getSystemPolicyCallable().futureCall(request); diff --git a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java index 0b43613d4d56..c9ab463fdf21 100644 --- a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java +++ b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java @@ -51,7 +51,7 @@ * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); * } * } diff --git a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java index e754f33033f3..dce518a83736 100644 --- a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java +++ b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java @@ -875,7 +875,7 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque * while (true) { * Service.ListAttestorsResponse response = * binauthzManagementServiceV1Client.listAttestorsCallable().call(request); - * for (Resources.Attestor element : response.getResponsesList()) { + * for (Resources.Attestor element : response.getAttestorsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java index c0d107b00fce..c55d857ecb01 100644 --- a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java +++ b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java @@ -35,7 +35,7 @@ * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); * } * } @@ -150,7 +150,7 @@ public SystemPolicyV1Stub getStub() { * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); * } * } @@ -204,7 +204,7 @@ public final Resources.Policy getSystemPolicy(String name) { * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { * Service.GetSystemPolicyRequest request = * Service.GetSystemPolicyRequest.newBuilder() - * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .setName(PolicyName.ofLocationName("[LOCATION]").toString()) * .build(); * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(request); * } @@ -229,7 +229,7 @@ public final Resources.Policy getSystemPolicy(Service.GetSystemPolicyRequest req * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { * Service.GetSystemPolicyRequest request = * Service.GetSystemPolicyRequest.newBuilder() - * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .setName(PolicyName.ofLocationName("[LOCATION]").toString()) * .build(); * ApiFuture future = * systemPolicyV1Client.getSystemPolicyCallable().futureCall(request); diff --git a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java index 4e133d046f92..62b205e3a1cd 100644 --- a/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java +++ b/java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java @@ -53,7 +53,7 @@ * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); * } * } diff --git a/java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java b/java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java index f5249ac5e0fa..01d53e3bc6b5 100644 --- a/java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java +++ b/java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java @@ -82,7 +82,7 @@ public void tearDown() throws Exception { public void getSystemPolicyTest() throws Exception { Policy expectedResponse = Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) @@ -94,7 +94,7 @@ public void getSystemPolicyTest() throws Exception { .build(); mockSystemPolicyV1Beta1.addResponse(expectedResponse); - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); Policy actualResponse = client.getSystemPolicy(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -116,7 +116,7 @@ public void getSystemPolicyExceptionTest() throws Exception { mockSystemPolicyV1Beta1.addException(exception); try { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); client.getSystemPolicy(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -128,7 +128,7 @@ public void getSystemPolicyExceptionTest() throws Exception { public void getSystemPolicyTest2() throws Exception { Policy expectedResponse = Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) diff --git a/java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java b/java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java index 4d5904b12bc3..4be86f688b10 100644 --- a/java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java +++ b/java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java @@ -82,7 +82,7 @@ public void tearDown() throws Exception { public void getSystemPolicyTest() throws Exception { Resources.Policy expectedResponse = Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) @@ -96,7 +96,7 @@ public void getSystemPolicyTest() throws Exception { .build(); mockSystemPolicyV1.addResponse(expectedResponse); - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); Resources.Policy actualResponse = client.getSystemPolicy(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -119,7 +119,7 @@ public void getSystemPolicyExceptionTest() throws Exception { mockSystemPolicyV1.addException(exception); try { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); client.getSystemPolicy(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -131,7 +131,7 @@ public void getSystemPolicyExceptionTest() throws Exception { public void getSystemPolicyTest2() throws Exception { Resources.Policy expectedResponse = Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap())