diff --git a/google-cloud-clients/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/stub/WebSecurityScannerStubSettings.java b/google-cloud-clients/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/stub/WebSecurityScannerStubSettings.java index 0b25d16dd829..126f98a68447 100644 --- a/google-cloud-clients/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/stub/WebSecurityScannerStubSettings.java +++ b/google-cloud-clients/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/stub/WebSecurityScannerStubSettings.java @@ -319,7 +319,9 @@ public String extractNextToken(ListScanConfigsResponse payload) { @Override public Iterable extractResources(ListScanConfigsResponse payload) { - return payload.getScanConfigsList(); + return payload.getScanConfigsList() != null + ? payload.getScanConfigsList() + : ImmutableList.of(); } }; @@ -353,7 +355,9 @@ public String extractNextToken(ListScanRunsResponse payload) { @Override public Iterable extractResources(ListScanRunsResponse payload) { - return payload.getScanRunsList(); + return payload.getScanRunsList() != null + ? payload.getScanRunsList() + : ImmutableList.of(); } }; @@ -390,7 +394,9 @@ public String extractNextToken(ListCrawledUrlsResponse payload) { @Override public Iterable extractResources(ListCrawledUrlsResponse payload) { - return payload.getCrawledUrlsList(); + return payload.getCrawledUrlsList() != null + ? payload.getCrawledUrlsList() + : ImmutableList.of(); } }; @@ -424,7 +430,9 @@ public String extractNextToken(ListFindingsResponse payload) { @Override public Iterable extractResources(ListFindingsResponse payload) { - return payload.getFindingsList(); + return payload.getFindingsList() != null + ? payload.getFindingsList() + : ImmutableList.of(); } };