From 314ba02bc7a4c88d99b66bee68a1bc1cd9416ec4 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:14:23 +0000 Subject: [PATCH] chore: Integrate new gapic-generator-java and rules_gapic (#40) - [ ] 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 --- .../com/google/cloud/run/v2/RevisionsClient.java | 2 +- .../com/google/cloud/run/v2/ServicesClient.java | 14 +++++++------- .../google/cloud/run/v2/ServicesClientTest.java | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/RevisionsClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/RevisionsClient.java index 7605e03f9942..a2f96dc0e2f9 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/RevisionsClient.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/RevisionsClient.java @@ -398,7 +398,7 @@ public final ListRevisionsPagedResponse listRevisions(ListRevisionsRequest reque * .build(); * while (true) { * ListRevisionsResponse response = revisionsClient.listRevisionsCallable().call(request); - * for (Revision element : response.getResponsesList()) { + * for (Revision element : response.getRevisionsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java index 9599eeb95976..0b771f66dd81 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java @@ -554,7 +554,7 @@ public final ListServicesPagedResponse listServices(ListServicesRequest request) * .build(); * while (true) { * ListServicesResponse response = servicesClient.listServicesCallable().call(request); - * for (Service element : response.getResponsesList()) { + * for (Service element : response.getServicesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -823,7 +823,7 @@ public final UnaryCallable deleteServiceCallabl * try (ServicesClient servicesClient = ServicesClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = servicesClient.getIamPolicy(request); @@ -850,7 +850,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * try (ServicesClient servicesClient = ServicesClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuture future = servicesClient.getIamPolicyCallable().futureCall(request); @@ -875,7 +875,7 @@ public final UnaryCallable getIamPolicyCallable() { * try (ServicesClient servicesClient = ServicesClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -902,7 +902,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * try (ServicesClient servicesClient = ServicesClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -930,7 +930,7 @@ public final UnaryCallable setIamPolicyCallable() { * try (ServicesClient servicesClient = ServicesClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * TestIamPermissionsResponse response = servicesClient.testIamPermissions(request); @@ -958,7 +958,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * try (ServicesClient servicesClient = ServicesClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * ApiFuture future = diff --git a/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/ServicesClientTest.java b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/ServicesClientTest.java index f9393fbdb0a4..128aca2db0ee 100644 --- a/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/ServicesClientTest.java +++ b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/ServicesClientTest.java @@ -718,7 +718,7 @@ public void getIamPolicyTest() throws Exception { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() - .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); @@ -745,7 +745,7 @@ public void getIamPolicyExceptionTest() throws Exception { try { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() - .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); client.getIamPolicy(request); @@ -768,7 +768,7 @@ public void setIamPolicyTest() throws Exception { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() - .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); @@ -797,7 +797,7 @@ public void setIamPolicyExceptionTest() throws Exception { try { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() - .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); @@ -816,7 +816,7 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() - .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) .addAllPermissions(new ArrayList()) .build(); @@ -843,7 +843,7 @@ public void testIamPermissionsExceptionTest() throws Exception { try { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() - .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResource(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) .addAllPermissions(new ArrayList()) .build(); client.testIamPermissions(request);