From 14357312b389acf7e40f07f1d3f54eae362b9aef 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:30 +0000 Subject: [PATCH] chore: Integrate new gapic-generator-java and rules_gapic (#485) - [ ] 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 --- .../osconfig/v1/OsConfigServiceClient.java | 7 ++-- .../v1/OsConfigZonalServiceClient.java | 32 +++++++++++-------- .../v1alpha/OsConfigZonalServiceClient.java | 13 ++++---- .../v1beta/OsConfigServiceClient.java | 9 +++--- .../v1/OsConfigZonalServiceClientTest.java | 8 ++--- 5 files changed, 39 insertions(+), 30 deletions(-) diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceClient.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceClient.java index 85807324..107dc0c9 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceClient.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceClient.java @@ -522,7 +522,7 @@ public final ListPatchJobsPagedResponse listPatchJobs(PatchJobs.ListPatchJobsReq * while (true) { * PatchJobs.ListPatchJobsResponse response = * osConfigServiceClient.listPatchJobsCallable().call(request); - * for (PatchJobs.PatchJob element : response.getResponsesList()) { + * for (PatchJobs.PatchJob element : response.getPatchJobsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -683,7 +683,8 @@ public final ListPatchJobInstanceDetailsPagedResponse listPatchJobInstanceDetail * while (true) { * PatchJobs.ListPatchJobInstanceDetailsResponse response = * osConfigServiceClient.listPatchJobInstanceDetailsCallable().call(request); - * for (PatchJobs.PatchJobInstanceDetails element : response.getResponsesList()) { + * for (PatchJobs.PatchJobInstanceDetails element : + * response.getPatchJobInstanceDetailsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1095,7 +1096,7 @@ public final ListPatchDeploymentsPagedResponse listPatchDeployments( * while (true) { * PatchDeployments.ListPatchDeploymentsResponse response = * osConfigServiceClient.listPatchDeploymentsCallable().call(request); - * for (PatchDeployments.PatchDeployment element : response.getResponsesList()) { + * for (PatchDeployments.PatchDeployment element : response.getPatchDeploymentsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigZonalServiceClient.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigZonalServiceClient.java index ac8d0d11..dbcb9aef 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigZonalServiceClient.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigZonalServiceClient.java @@ -833,7 +833,7 @@ public final ListOSPolicyAssignmentsPagedResponse listOSPolicyAssignments( * while (true) { * ListOSPolicyAssignmentsResponse response = * osConfigZonalServiceClient.listOSPolicyAssignmentsCallable().call(request); - * for (OSPolicyAssignment element : response.getResponsesList()) { + * for (OSPolicyAssignment element : response.getOsPolicyAssignmentsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1005,7 +1005,7 @@ public final ListOSPolicyAssignmentRevisionsPagedResponse listOSPolicyAssignment * while (true) { * ListOSPolicyAssignmentRevisionsResponse response = * osConfigZonalServiceClient.listOSPolicyAssignmentRevisionsCallable().call(request); - * for (OSPolicyAssignment element : response.getResponsesList()) { + * for (OSPolicyAssignment element : response.getOsPolicyAssignmentsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1546,7 +1546,7 @@ public final ListOSPolicyAssignmentReportsPagedResponse listOSPolicyAssignmentRe * while (true) { * ListOSPolicyAssignmentReportsResponse response = * osConfigZonalServiceClient.listOSPolicyAssignmentReportsCallable().call(request); - * for (OSPolicyAssignmentReport element : response.getResponsesList()) { + * for (OSPolicyAssignmentReport element : response.getOsPolicyAssignmentReportsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1690,7 +1690,7 @@ public final UnaryCallable getInventoryCallable( * try (OsConfigZonalServiceClient osConfigZonalServiceClient = * OsConfigZonalServiceClient.create()) { * InstanceName parent = - * InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]"); + * InstanceName.ofProjectLocationInstanceName("[PROJECT]", "[LOCATION]", "[INSTANCE]"); * for (Inventory element : osConfigZonalServiceClient.listInventories(parent).iterateAll()) { * // doThingsWith(element); * } @@ -1753,7 +1753,8 @@ public final ListInventoriesPagedResponse listInventories(String parent) { * ListInventoriesRequest request = * ListInventoriesRequest.newBuilder() * .setParent( - * InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]") + * InstanceName.ofProjectLocationInstanceName( + * "[PROJECT]", "[LOCATION]", "[INSTANCE]") * .toString()) * .setView(InventoryView.forNumber(0)) * .setPageSize(883849137) @@ -1787,7 +1788,8 @@ public final ListInventoriesPagedResponse listInventories(ListInventoriesRequest * ListInventoriesRequest request = * ListInventoriesRequest.newBuilder() * .setParent( - * InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]") + * InstanceName.ofProjectLocationInstanceName( + * "[PROJECT]", "[LOCATION]", "[INSTANCE]") * .toString()) * .setView(InventoryView.forNumber(0)) * .setPageSize(883849137) @@ -1822,7 +1824,8 @@ public final ListInventoriesPagedResponse listInventories(ListInventoriesRequest * ListInventoriesRequest request = * ListInventoriesRequest.newBuilder() * .setParent( - * InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]") + * InstanceName.ofProjectLocationInstanceName( + * "[PROJECT]", "[LOCATION]", "[INSTANCE]") * .toString()) * .setView(InventoryView.forNumber(0)) * .setPageSize(883849137) @@ -1832,7 +1835,7 @@ public final ListInventoriesPagedResponse listInventories(ListInventoriesRequest * while (true) { * ListInventoriesResponse response = * osConfigZonalServiceClient.listInventoriesCallable().call(request); - * for (Inventory element : response.getResponsesList()) { + * for (Inventory element : response.getInventoriesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1982,7 +1985,7 @@ public final VulnerabilityReport getVulnerabilityReport(GetVulnerabilityReportRe * try (OsConfigZonalServiceClient osConfigZonalServiceClient = * OsConfigZonalServiceClient.create()) { * InstanceName parent = - * InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]"); + * InstanceName.ofProjectLocationInstanceName("[PROJECT]", "[LOCATION]", "[INSTANCE]"); * for (VulnerabilityReport element : * osConfigZonalServiceClient.listVulnerabilityReports(parent).iterateAll()) { * // doThingsWith(element); @@ -2048,7 +2051,8 @@ public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports(Stri * ListVulnerabilityReportsRequest request = * ListVulnerabilityReportsRequest.newBuilder() * .setParent( - * InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]") + * InstanceName.ofProjectLocationInstanceName( + * "[PROJECT]", "[LOCATION]", "[INSTANCE]") * .toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") @@ -2083,7 +2087,8 @@ public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports( * ListVulnerabilityReportsRequest request = * ListVulnerabilityReportsRequest.newBuilder() * .setParent( - * InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]") + * InstanceName.ofProjectLocationInstanceName( + * "[PROJECT]", "[LOCATION]", "[INSTANCE]") * .toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") @@ -2117,7 +2122,8 @@ public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports( * ListVulnerabilityReportsRequest request = * ListVulnerabilityReportsRequest.newBuilder() * .setParent( - * InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]") + * InstanceName.ofProjectLocationInstanceName( + * "[PROJECT]", "[LOCATION]", "[INSTANCE]") * .toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") @@ -2126,7 +2132,7 @@ public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports( * while (true) { * ListVulnerabilityReportsResponse response = * osConfigZonalServiceClient.listVulnerabilityReportsCallable().call(request); - * for (VulnerabilityReport element : response.getResponsesList()) { + * for (VulnerabilityReport element : response.getVulnerabilityReportsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java index b5190c66..1dd4b878 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java @@ -835,7 +835,7 @@ public final ListOSPolicyAssignmentsPagedResponse listOSPolicyAssignments( * while (true) { * ListOSPolicyAssignmentsResponse response = * osConfigZonalServiceClient.listOSPolicyAssignmentsCallable().call(request); - * for (OSPolicyAssignment element : response.getResponsesList()) { + * for (OSPolicyAssignment element : response.getOsPolicyAssignmentsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1007,7 +1007,7 @@ public final ListOSPolicyAssignmentRevisionsPagedResponse listOSPolicyAssignment * while (true) { * ListOSPolicyAssignmentRevisionsResponse response = * osConfigZonalServiceClient.listOSPolicyAssignmentRevisionsCallable().call(request); - * for (OSPolicyAssignment element : response.getResponsesList()) { + * for (OSPolicyAssignment element : response.getOsPolicyAssignmentsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1522,7 +1522,8 @@ public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPolici * while (true) { * ListInstanceOSPoliciesCompliancesResponse response = * osConfigZonalServiceClient.listInstanceOSPoliciesCompliancesCallable().call(request); - * for (InstanceOSPoliciesCompliance element : response.getResponsesList()) { + * for (InstanceOSPoliciesCompliance element : + * response.getInstanceOsPoliciesCompliancesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1865,7 +1866,7 @@ public final ListOSPolicyAssignmentReportsPagedResponse listOSPolicyAssignmentRe * while (true) { * ListOSPolicyAssignmentReportsResponse response = * osConfigZonalServiceClient.listOSPolicyAssignmentReportsCallable().call(request); - * for (OSPolicyAssignmentReport element : response.getResponsesList()) { + * for (OSPolicyAssignmentReport element : response.getOsPolicyAssignmentReportsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2143,7 +2144,7 @@ public final ListInventoriesPagedResponse listInventories(ListInventoriesRequest * while (true) { * ListInventoriesResponse response = * osConfigZonalServiceClient.listInventoriesCallable().call(request); - * for (Inventory element : response.getResponsesList()) { + * for (Inventory element : response.getInventoriesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2429,7 +2430,7 @@ public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports( * while (true) { * ListVulnerabilityReportsResponse response = * osConfigZonalServiceClient.listVulnerabilityReportsCallable().call(request); - * for (VulnerabilityReport element : response.getResponsesList()) { + * for (VulnerabilityReport element : response.getVulnerabilityReportsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java index 848bd01c..8e1f953a 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java @@ -410,7 +410,7 @@ public final ListPatchJobsPagedResponse listPatchJobs(PatchJobs.ListPatchJobsReq * while (true) { * PatchJobs.ListPatchJobsResponse response = * osConfigServiceClient.listPatchJobsCallable().call(request); - * for (PatchJobs.PatchJob element : response.getResponsesList()) { + * for (PatchJobs.PatchJob element : response.getPatchJobsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -540,7 +540,8 @@ public final ListPatchJobInstanceDetailsPagedResponse listPatchJobInstanceDetail * while (true) { * PatchJobs.ListPatchJobInstanceDetailsResponse response = * osConfigServiceClient.listPatchJobInstanceDetailsCallable().call(request); - * for (PatchJobs.PatchJobInstanceDetails element : response.getResponsesList()) { + * for (PatchJobs.PatchJobInstanceDetails element : + * response.getPatchJobInstanceDetailsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -748,7 +749,7 @@ public final ListPatchDeploymentsPagedResponse listPatchDeployments( * while (true) { * PatchDeployments.ListPatchDeploymentsResponse response = * osConfigServiceClient.listPatchDeploymentsCallable().call(request); - * for (PatchDeployments.PatchDeployment element : response.getResponsesList()) { + * for (PatchDeployments.PatchDeployment element : response.getPatchDeploymentsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1486,7 +1487,7 @@ public final ListGuestPoliciesPagedResponse listGuestPolicies( * while (true) { * GuestPolicies.ListGuestPoliciesResponse response = * osConfigServiceClient.listGuestPoliciesCallable().call(request); - * for (GuestPolicies.GuestPolicy element : response.getResponsesList()) { + * for (GuestPolicies.GuestPolicy element : response.getGuestPoliciesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/OsConfigZonalServiceClientTest.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/OsConfigZonalServiceClientTest.java index e39265d1..18a97c47 100644 --- a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/OsConfigZonalServiceClientTest.java +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/OsConfigZonalServiceClientTest.java @@ -961,7 +961,7 @@ public void listInventoriesTest() throws Exception { mockOsConfigZonalService.addResponse(expectedResponse); InstanceName parent = - InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]"); + InstanceName.ofProjectLocationInstanceName("[PROJECT]", "[LOCATION]", "[INSTANCE]"); ListInventoriesPagedResponse pagedListResponse = client.listInventories(parent); @@ -988,7 +988,7 @@ public void listInventoriesExceptionTest() throws Exception { try { InstanceName parent = - InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]"); + InstanceName.ofProjectLocationInstanceName("[PROJECT]", "[LOCATION]", "[INSTANCE]"); client.listInventories(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -1135,7 +1135,7 @@ public void listVulnerabilityReportsTest() throws Exception { mockOsConfigZonalService.addResponse(expectedResponse); InstanceName parent = - InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]"); + InstanceName.ofProjectLocationInstanceName("[PROJECT]", "[LOCATION]", "[INSTANCE]"); ListVulnerabilityReportsPagedResponse pagedListResponse = client.listVulnerabilityReports(parent); @@ -1164,7 +1164,7 @@ public void listVulnerabilityReportsExceptionTest() throws Exception { try { InstanceName parent = - InstanceName.ofProjectZoneInstanceName("[PROJECT]", "[ZONE]", "[INSTANCE]"); + InstanceName.ofProjectLocationInstanceName("[PROJECT]", "[LOCATION]", "[INSTANCE]"); client.listVulnerabilityReports(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) {