diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java index 066c763e6f30..edf8b4186f9b 100644 --- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java +++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java @@ -371,7 +371,9 @@ public String extractNextToken(ListDatasetsResponse payload) { @Override public Iterable extractResources(ListDatasetsResponse payload) { - return payload.getDatasetsList(); + return payload.getDatasetsList() != null + ? payload.getDatasetsList() + : ImmutableList.of(); } }; @@ -405,7 +407,9 @@ public String extractNextToken(ListModelsResponse payload) { @Override public Iterable extractResources(ListModelsResponse payload) { - return payload.getModelList(); + return payload.getModelList() != null + ? payload.getModelList() + : ImmutableList.of(); } }; @@ -444,7 +448,9 @@ public String extractNextToken(ListModelEvaluationsResponse payload) { @Override public Iterable extractResources( ListModelEvaluationsResponse payload) { - return payload.getModelEvaluationList(); + return payload.getModelEvaluationList() != null + ? payload.getModelEvaluationList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStubSettings.java b/google-cloud-clients/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStubSettings.java index b3e2881f9f68..8ead53dbbf49 100644 --- a/google-cloud-clients/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStubSettings.java +++ b/google-cloud-clients/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStubSettings.java @@ -329,7 +329,9 @@ public String extractNextToken(ListDataSourcesResponse payload) { @Override public Iterable extractResources(ListDataSourcesResponse payload) { - return payload.getDataSourcesList(); + return payload.getDataSourcesList() != null + ? payload.getDataSourcesList() + : ImmutableList.of(); } }; @@ -367,7 +369,9 @@ public String extractNextToken(ListTransferConfigsResponse payload) { @Override public Iterable extractResources(ListTransferConfigsResponse payload) { - return payload.getTransferConfigsList(); + return payload.getTransferConfigsList() != null + ? payload.getTransferConfigsList() + : ImmutableList.of(); } }; @@ -405,7 +409,9 @@ public String extractNextToken(ListTransferRunsResponse payload) { @Override public Iterable extractResources(ListTransferRunsResponse payload) { - return payload.getTransferRunsList(); + return payload.getTransferRunsList() != null + ? payload.getTransferRunsList() + : ImmutableList.of(); } }; @@ -443,7 +449,9 @@ public String extractNextToken(ListTransferLogsResponse payload) { @Override public Iterable extractResources(ListTransferLogsResponse payload) { - return payload.getTransferMessagesList(); + return payload.getTransferMessagesList() != null + ? payload.getTransferMessagesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java index 652a428be167..2f591436e728 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java @@ -421,7 +421,9 @@ public String extractNextToken(ListAppProfilesResponse payload) { @Override public Iterable extractResources(ListAppProfilesResponse payload) { - return payload.getAppProfilesList(); + return payload.getAppProfilesList() != null + ? payload.getAppProfilesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java index ad6034d6c922..4ee935113e58 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java @@ -347,7 +347,9 @@ public String extractNextToken(ListTablesResponse payload) { @Override public Iterable extractResources(ListTablesResponse payload) { - return payload.getTablesList(); + return payload.getTablesList() != null + ? payload.getTablesList() + : ImmutableList.
of(); } }; @@ -381,7 +383,9 @@ public String extractNextToken(ListSnapshotsResponse payload) { @Override public Iterable extractResources(ListSnapshotsResponse payload) { - return payload.getSnapshotsList(); + return payload.getSnapshotsList() != null + ? payload.getSnapshotsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AcceleratorTypeStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AcceleratorTypeStubSettings.java index d29f00a0a695..099d5983abd9 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AcceleratorTypeStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AcceleratorTypeStubSettings.java @@ -250,7 +250,9 @@ public String extractNextToken(AcceleratorTypeAggregatedList payload) { @Override public Iterable extractResources( AcceleratorTypeAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -292,7 +294,9 @@ public String extractNextToken(AcceleratorTypeList payload) { @Override public Iterable extractResources(AcceleratorTypeList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AddressStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AddressStubSettings.java index e733e46cbb4f..b6f69e97dbd2 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AddressStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AddressStubSettings.java @@ -258,7 +258,9 @@ public String extractNextToken(AddressAggregatedList payload) { @Override public Iterable extractResources(AddressAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -294,7 +296,9 @@ public String extractNextToken(AddressList payload) { @Override public Iterable
extractResources(AddressList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.
of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AutoscalerStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AutoscalerStubSettings.java index 4b0798f46bb4..e9c2f93ef490 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AutoscalerStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AutoscalerStubSettings.java @@ -278,7 +278,9 @@ public String extractNextToken(AutoscalerAggregatedList payload) { @Override public Iterable extractResources( AutoscalerAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -314,7 +316,9 @@ public String extractNextToken(AutoscalerList payload) { @Override public Iterable extractResources(AutoscalerList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/BackendBucketStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/BackendBucketStubSettings.java index 81d6c7ee2e92..22e4fe2f3e74 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/BackendBucketStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/BackendBucketStubSettings.java @@ -288,7 +288,9 @@ public String extractNextToken(BackendBucketList payload) { @Override public Iterable extractResources(BackendBucketList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/BackendServiceStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/BackendServiceStubSettings.java index 070b57df28c1..2bb258460d52 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/BackendServiceStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/BackendServiceStubSettings.java @@ -335,7 +335,9 @@ public String extractNextToken(BackendServiceAggregatedList payload) { @Override public Iterable extractResources( BackendServiceAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -375,7 +377,9 @@ public String extractNextToken(BackendServiceList payload) { @Override public Iterable extractResources(BackendServiceList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/DiskStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/DiskStubSettings.java index fb9537e6e517..077821ff48a9 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/DiskStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/DiskStubSettings.java @@ -279,7 +279,9 @@ public String extractNextToken(DiskAggregatedList payload) { @Override public Iterable extractResources(DiskAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -313,7 +315,9 @@ public String extractNextToken(DiskList payload) { @Override public Iterable extractResources(DiskList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/DiskTypeStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/DiskTypeStubSettings.java index 8cd7818f1c6e..6d4d6a414027 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/DiskTypeStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/DiskTypeStubSettings.java @@ -242,7 +242,9 @@ public String extractNextToken(DiskTypeAggregatedList payload) { @Override public Iterable extractResources(DiskTypeAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -278,7 +280,9 @@ public String extractNextToken(DiskTypeList payload) { @Override public Iterable extractResources(DiskTypeList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/FirewallStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/FirewallStubSettings.java index 9e7af23a14f8..a8c19ccd8a02 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/FirewallStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/FirewallStubSettings.java @@ -252,7 +252,9 @@ public String extractNextToken(FirewallList payload) { @Override public Iterable extractResources(FirewallList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ForwardingRuleStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ForwardingRuleStubSettings.java index 81707a48cd42..ed7877683728 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ForwardingRuleStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ForwardingRuleStubSettings.java @@ -281,7 +281,9 @@ public String extractNextToken(ForwardingRuleAggregatedList payload) { @Override public Iterable extractResources( ForwardingRuleAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -321,7 +323,9 @@ public String extractNextToken(ForwardingRuleList payload) { @Override public Iterable extractResources(ForwardingRuleList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalAddressStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalAddressStubSettings.java index 409943639634..e0b77e17371b 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalAddressStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalAddressStubSettings.java @@ -244,7 +244,9 @@ public String extractNextToken(AddressList payload) { @Override public Iterable
extractResources(AddressList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.
of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalForwardingRuleStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalForwardingRuleStubSettings.java index 019b57dfeb79..77c2a0707107 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalForwardingRuleStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalForwardingRuleStubSettings.java @@ -266,7 +266,9 @@ public String extractNextToken(ForwardingRuleList payload) { @Override public Iterable extractResources(ForwardingRuleList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalOperationStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalOperationStubSettings.java index 8dfeea1ad6b0..7b52e7d92180 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalOperationStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/GlobalOperationStubSettings.java @@ -257,7 +257,9 @@ public String extractNextToken(OperationAggregatedList payload) { @Override public Iterable extractResources( OperationAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -298,7 +300,9 @@ public String extractNextToken(OperationList payload) { @Override public Iterable extractResources(OperationList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HealthCheckStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HealthCheckStubSettings.java index 11cdb64541fa..a31d115f77f6 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HealthCheckStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HealthCheckStubSettings.java @@ -260,7 +260,9 @@ public String extractNextToken(HealthCheckList payload) { @Override public Iterable extractResources(HealthCheckList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpHealthCheckStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpHealthCheckStubSettings.java index 6ce448ba8aed..3187e71da07e 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpHealthCheckStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpHealthCheckStubSettings.java @@ -270,7 +270,9 @@ public String extractNextToken(HttpHealthCheckList payload) { @Override public Iterable extractResources(HttpHealthCheckList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpsHealthCheckStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpsHealthCheckStubSettings.java index e32cc939ca47..5383e0566c3f 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpsHealthCheckStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpsHealthCheckStubSettings.java @@ -272,7 +272,9 @@ public String extractNextToken(HttpsHealthCheckList payload) { @Override public Iterable extractResources(HttpsHealthCheckList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ImageStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ImageStubSettings.java index 79e43f7cad0b..e3c32ae4c562 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ImageStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ImageStubSettings.java @@ -258,7 +258,9 @@ public String extractNextToken(ImageList payload) { @Override public Iterable extractResources(ImageList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStubSettings.java index 44a165ecc5c1..9fff6f166fc6 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStubSettings.java @@ -367,7 +367,9 @@ public String extractNextToken(InstanceGroupManagerAggregatedList payload) { @Override public Iterable extractResources( InstanceGroupManagerAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -411,7 +413,9 @@ public String extractNextToken(InstanceGroupManagerList payload) { @Override public Iterable extractResources( InstanceGroupManagerList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupStubSettings.java index 320cad8331f7..67f82374265e 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupStubSettings.java @@ -320,7 +320,9 @@ public String extractNextToken(InstanceGroupAggregatedList payload) { @Override public Iterable extractResources( InstanceGroupAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -360,7 +362,9 @@ public String extractNextToken(InstanceGroupList payload) { @Override public Iterable extractResources(InstanceGroupList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; @@ -405,7 +409,9 @@ public String extractNextToken(InstanceGroupsListInstances payload) { @Override public Iterable extractResources( InstanceGroupsListInstances payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java index c061f6f268ee..7e3ce14f64aa 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java @@ -494,7 +494,9 @@ public String extractNextToken(InstanceAggregatedList payload) { @Override public Iterable extractResources(InstanceAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -530,7 +532,9 @@ public String extractNextToken(InstanceList payload) { @Override public Iterable extractResources(InstanceList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; @@ -572,7 +576,9 @@ public String extractNextToken(InstanceListReferrers payload) { @Override public Iterable extractResources(InstanceListReferrers payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceTemplateStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceTemplateStubSettings.java index 819de6dde783..e0fab0744c17 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceTemplateStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceTemplateStubSettings.java @@ -252,7 +252,9 @@ public String extractNextToken(InstanceTemplateList payload) { @Override public Iterable extractResources(InstanceTemplateList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectAttachmentStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectAttachmentStubSettings.java index 8721864b995e..d06aaa591cb3 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectAttachmentStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectAttachmentStubSettings.java @@ -291,7 +291,9 @@ public String extractNextToken(InterconnectAttachmentAggregatedList payload) { @Override public Iterable extractResources( InterconnectAttachmentAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -336,7 +338,9 @@ public String extractNextToken(InterconnectAttachmentList payload) { @Override public Iterable extractResources( InterconnectAttachmentList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectLocationStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectLocationStubSettings.java index 2d8929b980de..fabb6e5f9de7 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectLocationStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectLocationStubSettings.java @@ -234,7 +234,9 @@ public String extractNextToken(InterconnectLocationList payload) { @Override public Iterable extractResources( InterconnectLocationList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectStubSettings.java index 7f7d7d43ee8a..5f6cdf330cda 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectStubSettings.java @@ -252,7 +252,9 @@ public String extractNextToken(InterconnectList payload) { @Override public Iterable extractResources(InterconnectList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/LicenseStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/LicenseStubSettings.java index 1fc3748ed609..e5593a950bb0 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/LicenseStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/LicenseStubSettings.java @@ -247,7 +247,9 @@ public String extractNextToken(LicensesListResponse payload) { @Override public Iterable extractResources(LicensesListResponse payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/MachineTypeStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/MachineTypeStubSettings.java index fdd22baca8b8..67399ce3b07b 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/MachineTypeStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/MachineTypeStubSettings.java @@ -247,7 +247,9 @@ public String extractNextToken(MachineTypeAggregatedList payload) { @Override public Iterable extractResources( MachineTypeAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -286,7 +288,9 @@ public String extractNextToken(MachineTypeList payload) { @Override public Iterable extractResources(MachineTypeList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkStubSettings.java index e025cedc2c13..900d2f55491f 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkStubSettings.java @@ -272,7 +272,9 @@ public String extractNextToken(NetworkList payload) { @Override public Iterable extractResources(NetworkList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStubSettings.java index 552a430f9178..c847ad3b3c99 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStubSettings.java @@ -305,7 +305,9 @@ public String extractNextToken(NodeGroupAggregatedList payload) { @Override public Iterable extractResources( NodeGroupAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -341,7 +343,9 @@ public String extractNextToken(NodeGroupList payload) { @Override public Iterable extractResources(NodeGroupList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; @@ -381,7 +385,9 @@ public String extractNextToken(NodeGroupsListNodes payload) { @Override public Iterable extractResources(NodeGroupsListNodes payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeTemplateStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeTemplateStubSettings.java index 61b0a8f3999a..211e6ad7a603 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeTemplateStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeTemplateStubSettings.java @@ -267,7 +267,9 @@ public String extractNextToken(NodeTemplateAggregatedList payload) { @Override public Iterable extractResources( NodeTemplateAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -306,7 +308,9 @@ public String extractNextToken(NodeTemplateList payload) { @Override public Iterable extractResources(NodeTemplateList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeTypeStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeTypeStubSettings.java index bb7f94471a27..64a788ed5d72 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeTypeStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeTypeStubSettings.java @@ -242,7 +242,9 @@ public String extractNextToken(NodeTypeAggregatedList payload) { @Override public Iterable extractResources(NodeTypeAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -278,7 +280,9 @@ public String extractNextToken(NodeTypeList payload) { @Override public Iterable extractResources(NodeTypeList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ProjectStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ProjectStubSettings.java index f5e5a246ddc6..77970912150b 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ProjectStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ProjectStubSettings.java @@ -343,7 +343,9 @@ public String extractNextToken(ProjectsGetXpnResources payload) { @Override public Iterable extractResources(ProjectsGetXpnResources payload) { - return payload.getResourcesList(); + return payload.getResourcesList() != null + ? payload.getResourcesList() + : ImmutableList.of(); } }; @@ -383,7 +385,9 @@ public String extractNextToken(XpnHostList payload) { @Override public Iterable extractResources(XpnHostList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionAutoscalerStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionAutoscalerStubSettings.java index 4e81bac5cdc1..70a37d30458b 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionAutoscalerStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionAutoscalerStubSettings.java @@ -272,7 +272,9 @@ public String extractNextToken(RegionAutoscalerList payload) { @Override public Iterable extractResources(RegionAutoscalerList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionBackendServiceStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionBackendServiceStubSettings.java index 46aca507d5a1..355ccbb9093a 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionBackendServiceStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionBackendServiceStubSettings.java @@ -289,7 +289,9 @@ public String extractNextToken(BackendServiceList payload) { @Override public Iterable extractResources(BackendServiceList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionCommitmentStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionCommitmentStubSettings.java index 4f93e74feedc..9d402966b895 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionCommitmentStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionCommitmentStubSettings.java @@ -261,7 +261,9 @@ public String extractNextToken(CommitmentAggregatedList payload) { @Override public Iterable extractResources( CommitmentAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -302,7 +304,9 @@ public String extractNextToken(CommitmentList payload) { @Override public Iterable extractResources(CommitmentList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionDiskStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionDiskStubSettings.java index b2f9119eff36..60d74ec4f644 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionDiskStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionDiskStubSettings.java @@ -277,7 +277,9 @@ public String extractNextToken(DiskList payload) { @Override public Iterable extractResources(DiskList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionDiskTypeStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionDiskTypeStubSettings.java index 05f773d9ef49..8bbd57201f52 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionDiskTypeStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionDiskTypeStubSettings.java @@ -224,7 +224,9 @@ public String extractNextToken(RegionDiskTypeList payload) { @Override public Iterable extractResources(RegionDiskTypeList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStubSettings.java index 601d37d866fa..86b2b3d309d9 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStubSettings.java @@ -361,7 +361,9 @@ public String extractNextToken(RegionInstanceGroupManagerList payload) { @Override public Iterable extractResources( RegionInstanceGroupManagerList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupStubSettings.java index 17d4c0d42d97..e38683be254f 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupStubSettings.java @@ -261,7 +261,9 @@ public String extractNextToken(RegionInstanceGroupList payload) { @Override public Iterable extractResources(RegionInstanceGroupList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; @@ -306,7 +308,9 @@ public String extractNextToken(RegionInstanceGroupsListInstances payload) { @Override public Iterable extractResources( RegionInstanceGroupsListInstances payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionOperationStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionOperationStubSettings.java index 270ec87bf321..bf56763152c7 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionOperationStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionOperationStubSettings.java @@ -236,7 +236,9 @@ public String extractNextToken(OperationList payload) { @Override public Iterable extractResources(OperationList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionStubSettings.java index 45044fc42d3a..6768a9123426 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RegionStubSettings.java @@ -218,7 +218,9 @@ public String extractNextToken(RegionList payload) { @Override public Iterable extractResources(RegionList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RouteStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RouteStubSettings.java index f37082e4f972..5aeabc21a44b 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RouteStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RouteStubSettings.java @@ -234,7 +234,9 @@ public String extractNextToken(RouteList payload) { @Override public Iterable extractResources(RouteList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RouterStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RouterStubSettings.java index 1c379f2dc19a..d513b97d8473 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RouterStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/RouterStubSettings.java @@ -296,7 +296,9 @@ public String extractNextToken(RouterAggregatedList payload) { @Override public Iterable extractResources(RouterAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -332,7 +334,9 @@ public String extractNextToken(RouterList payload) { @Override public Iterable extractResources(RouterList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SecurityPolicyStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SecurityPolicyStubSettings.java index 1244eca214d6..290ff2eb0410 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SecurityPolicyStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SecurityPolicyStubSettings.java @@ -301,7 +301,9 @@ public String extractNextToken(SecurityPolicyList payload) { @Override public Iterable extractResources(SecurityPolicyList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SnapshotStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SnapshotStubSettings.java index a7646118c60d..4139d24dcb11 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SnapshotStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SnapshotStubSettings.java @@ -237,7 +237,9 @@ public String extractNextToken(SnapshotList payload) { @Override public Iterable extractResources(SnapshotList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SslCertificateStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SslCertificateStubSettings.java index fe0cf6eafb07..f1ac3b87aa72 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SslCertificateStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SslCertificateStubSettings.java @@ -248,7 +248,9 @@ public String extractNextToken(SslCertificateList payload) { @Override public Iterable extractResources(SslCertificateList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SslPolicyStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SslPolicyStubSettings.java index 48096607a206..501adab34abb 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SslPolicyStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SslPolicyStubSettings.java @@ -259,7 +259,9 @@ public String extractNextToken(SslPoliciesList payload) { @Override public Iterable extractResources(SslPoliciesList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SubnetworkStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SubnetworkStubSettings.java index 3a57b4df4fa9..a932375cfb86 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SubnetworkStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/SubnetworkStubSettings.java @@ -309,7 +309,9 @@ public String extractNextToken(SubnetworkAggregatedList payload) { @Override public Iterable extractResources( SubnetworkAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -345,7 +347,9 @@ public String extractNextToken(SubnetworkList payload) { @Override public Iterable extractResources(SubnetworkList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; @@ -389,7 +393,9 @@ public String extractNextToken(UsableSubnetworksAggregatedList payload) { @Override public Iterable extractResources( UsableSubnetworksAggregatedList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetHttpProxyStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetHttpProxyStubSettings.java index adf9b921b5dd..e877db9c7c74 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetHttpProxyStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetHttpProxyStubSettings.java @@ -260,7 +260,9 @@ public String extractNextToken(TargetHttpProxyList payload) { @Override public Iterable extractResources(TargetHttpProxyList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetHttpsProxyStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetHttpsProxyStubSettings.java index c006b8b28df4..788d33478ae4 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetHttpsProxyStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetHttpsProxyStubSettings.java @@ -295,7 +295,9 @@ public String extractNextToken(TargetHttpsProxyList payload) { @Override public Iterable extractResources(TargetHttpsProxyList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetInstanceStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetInstanceStubSettings.java index 4ada09b98847..0345621f5879 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetInstanceStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetInstanceStubSettings.java @@ -271,7 +271,9 @@ public String extractNextToken(TargetInstanceAggregatedList payload) { @Override public Iterable extractResources( TargetInstanceAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -311,7 +313,9 @@ public String extractNextToken(TargetInstanceList payload) { @Override public Iterable extractResources(TargetInstanceList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetPoolStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetPoolStubSettings.java index 239def189ab1..1a4293a01143 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetPoolStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetPoolStubSettings.java @@ -324,7 +324,9 @@ public String extractNextToken(TargetPoolAggregatedList payload) { @Override public Iterable extractResources( TargetPoolAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -360,7 +362,9 @@ public String extractNextToken(TargetPoolList payload) { @Override public Iterable extractResources(TargetPoolList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetSslProxyStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetSslProxyStubSettings.java index 1b9d9d804bce..99cd6a9cbf27 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetSslProxyStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetSslProxyStubSettings.java @@ -294,7 +294,9 @@ public String extractNextToken(TargetSslProxyList payload) { @Override public Iterable extractResources(TargetSslProxyList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetTcpProxyStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetTcpProxyStubSettings.java index 211cb213e68e..b9e1ffaca8ae 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetTcpProxyStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetTcpProxyStubSettings.java @@ -272,7 +272,9 @@ public String extractNextToken(TargetTcpProxyList payload) { @Override public Iterable extractResources(TargetTcpProxyList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetVpnGatewayStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetVpnGatewayStubSettings.java index c25b3c56abdf..3b7e08cf76b8 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetVpnGatewayStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/TargetVpnGatewayStubSettings.java @@ -273,7 +273,9 @@ public String extractNextToken(TargetVpnGatewayAggregatedList payload) { @Override public Iterable extractResources( TargetVpnGatewayAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -315,7 +317,9 @@ public String extractNextToken(TargetVpnGatewayList payload) { @Override public Iterable extractResources(TargetVpnGatewayList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/UrlMapStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/UrlMapStubSettings.java index 9be5fe064fb2..6127ec98aca7 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/UrlMapStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/UrlMapStubSettings.java @@ -272,7 +272,9 @@ public String extractNextToken(UrlMapList payload) { @Override public Iterable extractResources(UrlMapList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/VpnTunnelStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/VpnTunnelStubSettings.java index e62fa9c01226..73223955caab 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/VpnTunnelStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/VpnTunnelStubSettings.java @@ -261,7 +261,9 @@ public String extractNextToken(VpnTunnelAggregatedList payload) { @Override public Iterable extractResources( VpnTunnelAggregatedList payload) { - return payload.getItemsMap().values(); + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); } }; @@ -297,7 +299,9 @@ public String extractNextToken(VpnTunnelList payload) { @Override public Iterable extractResources(VpnTunnelList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ZoneOperationStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ZoneOperationStubSettings.java index dc9421bdf3c9..cb5d1499bd1d 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ZoneOperationStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ZoneOperationStubSettings.java @@ -231,7 +231,9 @@ public String extractNextToken(OperationList payload) { @Override public Iterable extractResources(OperationList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ZoneStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ZoneStubSettings.java index cf5ac03aa4e0..b797979493ef 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ZoneStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/ZoneStubSettings.java @@ -216,7 +216,9 @@ public String extractNextToken(ZoneList payload) { @Override public Iterable extractResources(ZoneList payload) { - return payload.getItemsList(); + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/stub/ContainerAnalysisV1Beta1StubSettings.java b/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/stub/ContainerAnalysisV1Beta1StubSettings.java index ace17ac7200c..0db203d39adc 100644 --- a/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/stub/ContainerAnalysisV1Beta1StubSettings.java +++ b/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/stub/ContainerAnalysisV1Beta1StubSettings.java @@ -245,7 +245,9 @@ public String extractNextToken(ListScanConfigsResponse payload) { @Override public Iterable extractResources(ListScanConfigsResponse payload) { - return payload.getScanConfigsList(); + return payload.getScanConfigsList() != null + ? payload.getScanConfigsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/stub/GrafeasV1Beta1StubSettings.java b/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/stub/GrafeasV1Beta1StubSettings.java index 419ecfe0d5ed..e9240bdef06f 100644 --- a/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/stub/GrafeasV1Beta1StubSettings.java +++ b/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/stub/GrafeasV1Beta1StubSettings.java @@ -336,7 +336,9 @@ public String extractNextToken(ListOccurrencesResponse payload) { @Override public Iterable extractResources(ListOccurrencesResponse payload) { - return payload.getOccurrencesList(); + return payload.getOccurrencesList() != null + ? payload.getOccurrencesList() + : ImmutableList.of(); } }; @@ -370,7 +372,9 @@ public String extractNextToken(ListNotesResponse payload) { @Override public Iterable extractResources(ListNotesResponse payload) { - return payload.getNotesList(); + return payload.getNotesList() != null + ? payload.getNotesList() + : ImmutableList.of(); } }; @@ -408,7 +412,9 @@ public String extractNextToken(ListNoteOccurrencesResponse payload) { @Override public Iterable extractResources(ListNoteOccurrencesResponse payload) { - return payload.getOccurrencesList(); + return payload.getOccurrencesList() != null + ? payload.getOccurrencesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java index 85b2d5e65b39..ee4eca3d3a5b 100644 --- a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java +++ b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java @@ -283,7 +283,9 @@ public String extractNextToken(ListClustersResponse payload) { @Override public Iterable extractResources(ListClustersResponse payload) { - return payload.getClustersList(); + return payload.getClustersList() != null + ? payload.getClustersList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java index 509a5121f2d5..8e86809108cf 100644 --- a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java +++ b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java @@ -235,7 +235,9 @@ public String extractNextToken(ListJobsResponse payload) { @Override public Iterable extractResources(ListJobsResponse payload) { - return payload.getJobsList(); + return payload.getJobsList() != null + ? payload.getJobsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java index 691e2e00f732..5e1da5df3131 100644 --- a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java +++ b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java @@ -283,7 +283,9 @@ public String extractNextToken(ListClustersResponse payload) { @Override public Iterable extractResources(ListClustersResponse payload) { - return payload.getClustersList(); + return payload.getClustersList() != null + ? payload.getClustersList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java index 9ec7538a4627..e645d2d7e28f 100644 --- a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java +++ b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java @@ -235,7 +235,9 @@ public String extractNextToken(ListJobsResponse payload) { @Override public Iterable extractResources(ListJobsResponse payload) { - return payload.getJobsList(); + return payload.getJobsList() != null + ? payload.getJobsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStubSettings.java b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStubSettings.java index d0915d036d6f..07e55b175947 100644 --- a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStubSettings.java +++ b/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStubSettings.java @@ -272,7 +272,9 @@ public String extractNextToken(ListWorkflowTemplatesResponse payload) { @Override public Iterable extractResources( ListWorkflowTemplatesResponse payload) { - return payload.getTemplatesList(); + return payload.getTemplatesList() != null + ? payload.getTemplatesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStubSettings.java index 0a2c3699c540..7ab25a63b13a 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStubSettings.java @@ -278,7 +278,9 @@ public String extractNextToken(SearchAgentsResponse payload) { @Override public Iterable extractResources(SearchAgentsResponse payload) { - return payload.getAgentsList(); + return payload.getAgentsList() != null + ? payload.getAgentsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStubSettings.java index c4ed27094f81..8f883dae3947 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStubSettings.java @@ -235,7 +235,9 @@ public String extractNextToken(ListContextsResponse payload) { @Override public Iterable extractResources(ListContextsResponse payload) { - return payload.getContextsList(); + return payload.getContextsList() != null + ? payload.getContextsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStubSettings.java index 894cae3c3d8a..069ec3342d0d 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStubSettings.java @@ -343,7 +343,9 @@ public String extractNextToken(ListEntityTypesResponse payload) { @Override public Iterable extractResources(ListEntityTypesResponse payload) { - return payload.getEntityTypesList(); + return payload.getEntityTypesList() != null + ? payload.getEntityTypesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStubSettings.java index d5b02b07e881..0e7ba5ca03a1 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStubSettings.java @@ -271,7 +271,9 @@ public String extractNextToken(ListIntentsResponse payload) { @Override public Iterable extractResources(ListIntentsResponse payload) { - return payload.getIntentsList(); + return payload.getIntentsList() != null + ? payload.getIntentsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStubSettings.java index 34578fe8a735..be6e0322e13d 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStubSettings.java @@ -246,7 +246,9 @@ public String extractNextToken(ListSessionEntityTypesResponse payload) { @Override public Iterable extractResources( ListSessionEntityTypesResponse payload) { - return payload.getSessionEntityTypesList(); + return payload.getSessionEntityTypesList() != null + ? payload.getSessionEntityTypesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/AgentsStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/AgentsStubSettings.java index 903679697993..ca5e87afe6de 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/AgentsStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/AgentsStubSettings.java @@ -278,7 +278,9 @@ public String extractNextToken(SearchAgentsResponse payload) { @Override public Iterable extractResources(SearchAgentsResponse payload) { - return payload.getAgentsList(); + return payload.getAgentsList() != null + ? payload.getAgentsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ContextsStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ContextsStubSettings.java index 9696b4eb22b9..146c9332b74d 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ContextsStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ContextsStubSettings.java @@ -235,7 +235,9 @@ public String extractNextToken(ListContextsResponse payload) { @Override public Iterable extractResources(ListContextsResponse payload) { - return payload.getContextsList(); + return payload.getContextsList() != null + ? payload.getContextsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/DocumentsStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/DocumentsStubSettings.java index b7c14c5a4ec8..2f3be7ded502 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/DocumentsStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/DocumentsStubSettings.java @@ -245,7 +245,9 @@ public String extractNextToken(ListDocumentsResponse payload) { @Override public Iterable extractResources(ListDocumentsResponse payload) { - return payload.getDocumentsList(); + return payload.getDocumentsList() != null + ? payload.getDocumentsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EntityTypesStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EntityTypesStubSettings.java index b89de7ad6286..c34ce42daabc 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EntityTypesStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EntityTypesStubSettings.java @@ -343,7 +343,9 @@ public String extractNextToken(ListEntityTypesResponse payload) { @Override public Iterable extractResources(ListEntityTypesResponse payload) { - return payload.getEntityTypesList(); + return payload.getEntityTypesList() != null + ? payload.getEntityTypesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/IntentsStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/IntentsStubSettings.java index e0f9267bd893..ededdc6d5492 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/IntentsStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/IntentsStubSettings.java @@ -271,7 +271,9 @@ public String extractNextToken(ListIntentsResponse payload) { @Override public Iterable extractResources(ListIntentsResponse payload) { - return payload.getIntentsList(); + return payload.getIntentsList() != null + ? payload.getIntentsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/KnowledgeBasesStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/KnowledgeBasesStubSettings.java index 989875767d4a..4294f52f4aa8 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/KnowledgeBasesStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/KnowledgeBasesStubSettings.java @@ -227,7 +227,9 @@ public String extractNextToken(ListKnowledgeBasesResponse payload) { @Override public Iterable extractResources(ListKnowledgeBasesResponse payload) { - return payload.getKnowledgeBasesList(); + return payload.getKnowledgeBasesList() != null + ? payload.getKnowledgeBasesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/SessionEntityTypesStubSettings.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/SessionEntityTypesStubSettings.java index d515014c0716..a3a4fce3f92f 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/SessionEntityTypesStubSettings.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/SessionEntityTypesStubSettings.java @@ -246,7 +246,9 @@ public String extractNextToken(ListSessionEntityTypesResponse payload) { @Override public Iterable extractResources( ListSessionEntityTypesResponse payload) { - return payload.getSessionEntityTypesList(); + return payload.getSessionEntityTypesList() != null + ? payload.getSessionEntityTypesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java b/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java index e8cafcd8c575..9ed4f2cc88f9 100644 --- a/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java +++ b/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java @@ -495,7 +495,9 @@ public String extractNextToken(ListInspectTemplatesResponse payload) { @Override public Iterable extractResources( ListInspectTemplatesResponse payload) { - return payload.getInspectTemplatesList(); + return payload.getInspectTemplatesList() != null + ? payload.getInspectTemplatesList() + : ImmutableList.of(); } }; @@ -537,7 +539,9 @@ public String extractNextToken(ListDeidentifyTemplatesResponse payload) { @Override public Iterable extractResources( ListDeidentifyTemplatesResponse payload) { - return payload.getDeidentifyTemplatesList(); + return payload.getDeidentifyTemplatesList() != null + ? payload.getDeidentifyTemplatesList() + : ImmutableList.of(); } }; @@ -571,7 +575,9 @@ public String extractNextToken(ListDlpJobsResponse payload) { @Override public Iterable extractResources(ListDlpJobsResponse payload) { - return payload.getJobsList(); + return payload.getJobsList() != null + ? payload.getJobsList() + : ImmutableList.of(); } }; @@ -608,7 +614,9 @@ public String extractNextToken(ListJobTriggersResponse payload) { @Override public Iterable extractResources(ListJobTriggersResponse payload) { - return payload.getJobTriggersList(); + return payload.getJobTriggersList() != null + ? payload.getJobTriggersList() + : ImmutableList.of(); } }; @@ -646,7 +654,9 @@ public String extractNextToken(ListStoredInfoTypesResponse payload) { @Override public Iterable extractResources(ListStoredInfoTypesResponse payload) { - return payload.getStoredInfoTypesList(); + return payload.getStoredInfoTypesList() != null + ? payload.getStoredInfoTypesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStubSettings.java b/google-cloud-clients/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStubSettings.java index 5a44d666c8f2..777fce58d494 100644 --- a/google-cloud-clients/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStubSettings.java +++ b/google-cloud-clients/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStubSettings.java @@ -222,7 +222,9 @@ public String extractNextToken(ListGroupStatsResponse payload) { @Override public Iterable extractResources(ListGroupStatsResponse payload) { - return payload.getErrorGroupStatsList(); + return payload.getErrorGroupStatsList() != null + ? payload.getErrorGroupStatsList() + : ImmutableList.of(); } }; @@ -256,7 +258,9 @@ public String extractNextToken(ListEventsResponse payload) { @Override public Iterable extractResources(ListEventsResponse payload) { - return payload.getErrorEventsList(); + return payload.getErrorEventsList() != null + ? payload.getErrorEventsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStubSettings.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStubSettings.java index 36eac47a77c8..43366fcc07c1 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStubSettings.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStubSettings.java @@ -312,7 +312,9 @@ public String extractNextToken(ListDocumentsResponse payload) { @Override public Iterable extractResources(ListDocumentsResponse payload) { - return payload.getDocumentsList(); + return payload.getDocumentsList() != null + ? payload.getDocumentsList() + : ImmutableList.of(); } }; @@ -349,7 +351,9 @@ public String extractNextToken(ListCollectionIdsResponse payload) { @Override public Iterable extractResources(ListCollectionIdsResponse payload) { - return payload.getCollectionIdsList(); + return payload.getCollectionIdsList() != null + ? payload.getCollectionIdsList() + : ImmutableList.of(); } }; @@ -566,7 +570,7 @@ private static Builder initDefaults(Builder builder) { builder .runQuerySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("streaming")); builder .listCollectionIdsSettings() diff --git a/google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/KeyManagementServiceStubSettings.java b/google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/KeyManagementServiceStubSettings.java index 6167c54a1311..4937a2cfa5bd 100644 --- a/google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/KeyManagementServiceStubSettings.java +++ b/google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/KeyManagementServiceStubSettings.java @@ -405,7 +405,9 @@ public String extractNextToken(ListKeyRingsResponse payload) { @Override public Iterable extractResources(ListKeyRingsResponse payload) { - return payload.getKeyRingsList(); + return payload.getKeyRingsList() != null + ? payload.getKeyRingsList() + : ImmutableList.of(); } }; @@ -440,7 +442,9 @@ public String extractNextToken(ListCryptoKeysResponse payload) { @Override public Iterable extractResources(ListCryptoKeysResponse payload) { - return payload.getCryptoKeysList(); + return payload.getCryptoKeysList() != null + ? payload.getCryptoKeysList() + : ImmutableList.of(); } }; @@ -479,7 +483,9 @@ public String extractNextToken(ListCryptoKeyVersionsResponse payload) { @Override public Iterable extractResources( ListCryptoKeyVersionsResponse payload) { - return payload.getCryptoKeyVersionsList(); + return payload.getCryptoKeyVersionsList() != null + ? payload.getCryptoKeyVersionsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java b/google-cloud-clients/google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java index 462c2ac52c5c..2a63e8c9cc9c 100644 --- a/google-cloud-clients/google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java +++ b/google-cloud-clients/google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java @@ -26,7 +26,6 @@ import com.google.api.gax.grpc.testing.MockServiceHelper; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose; import com.google.common.collect.Lists; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; diff --git a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java index 8916f2ab8922..abe760a9a13d 100644 --- a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java +++ b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java @@ -280,7 +280,9 @@ public String extractNextToken(ListSinksResponse payload) { @Override public Iterable extractResources(ListSinksResponse payload) { - return payload.getSinksList(); + return payload.getSinksList() != null + ? payload.getSinksList() + : ImmutableList.of(); } }; @@ -316,7 +318,9 @@ public String extractNextToken(ListExclusionsResponse payload) { @Override public Iterable extractResources(ListExclusionsResponse payload) { - return payload.getExclusionsList(); + return payload.getExclusionsList() != null + ? payload.getExclusionsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java index 097f634aba94..e1353f8a61e6 100644 --- a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java +++ b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java @@ -262,7 +262,9 @@ public String extractNextToken(ListLogEntriesResponse payload) { @Override public Iterable extractResources(ListLogEntriesResponse payload) { - return payload.getEntriesList(); + return payload.getEntriesList() != null + ? payload.getEntriesList() + : ImmutableList.of(); } }; @@ -307,7 +309,9 @@ public String extractNextToken(ListMonitoredResourceDescriptorsResponse payload) @Override public Iterable extractResources( ListMonitoredResourceDescriptorsResponse payload) { - return payload.getResourceDescriptorsList(); + return payload.getResourceDescriptorsList() != null + ? payload.getResourceDescriptorsList() + : ImmutableList.of(); } }; @@ -341,7 +345,9 @@ public String extractNextToken(ListLogsResponse payload) { @Override public Iterable extractResources(ListLogsResponse payload) { - return payload.getLogNamesList(); + return payload.getLogNamesList() != null + ? payload.getLogNamesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java index 6f62a06191f2..9a6af63de6bd 100644 --- a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java +++ b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java @@ -236,7 +236,9 @@ public String extractNextToken(ListLogMetricsResponse payload) { @Override public Iterable extractResources(ListLogMetricsResponse payload) { - return payload.getMetricsList(); + return payload.getMetricsList() != null + ? payload.getMetricsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java index 0456e15fbf03..ee9d0576162f 100644 --- a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java +++ b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java @@ -264,7 +264,9 @@ public String extractNextToken(ListInstancesResponse payload) { @Override public Iterable extractResources(ListInstancesResponse payload) { - return payload.getInstancesList(); + return payload.getInstancesList() != null + ? payload.getInstancesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java index 9b7dffae786d..ab731babfad4 100644 --- a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java +++ b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java @@ -264,7 +264,9 @@ public String extractNextToken(ListInstancesResponse payload) { @Override public Iterable extractResources(ListInstancesResponse payload) { - return payload.getInstancesList(); + return payload.getInstancesList() != null + ? payload.getInstancesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java b/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java index 2975ba212f9f..3d61eb5467db 100644 --- a/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java +++ b/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java @@ -25,7 +25,6 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; -import com.google.cloud.redis.v1.Instance.Tier; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.Any; diff --git a/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/CloudRedisClientTest.java b/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/CloudRedisClientTest.java index 29c1bd58e2bb..9871362ea9fb 100644 --- a/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/CloudRedisClientTest.java +++ b/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/CloudRedisClientTest.java @@ -25,7 +25,6 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; -import com.google.cloud.redis.v1beta1.Instance.Tier; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.Any; diff --git a/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java b/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java index 99413454e524..7c4112eff81f 100644 --- a/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java +++ b/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java @@ -252,7 +252,9 @@ public String extractNextToken(ListJobsResponse payload) { @Override public Iterable extractResources(ListJobsResponse payload) { - return payload.getJobsList(); + return payload.getJobsList() != null + ? payload.getJobsList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java b/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java index 330c93f91bd4..69a1e7e78037 100644 --- a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java +++ b/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java @@ -27,7 +27,6 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.securitycenter.v1beta1.Finding.State; import com.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult; import com.google.cloud.securitycenter.v1beta1.stub.SecurityCenterStub; import com.google.cloud.securitycenter.v1beta1.stub.SecurityCenterStubSettings; diff --git a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java b/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java index 40b734310c72..3e7a4641f0ca 100644 --- a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java +++ b/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java @@ -382,7 +382,9 @@ public String extractNextToken(GroupAssetsResponse payload) { @Override public Iterable extractResources(GroupAssetsResponse payload) { - return payload.getGroupByResultsList(); + return payload.getGroupByResultsList() != null + ? payload.getGroupByResultsList() + : ImmutableList.of(); } }; @@ -416,7 +418,9 @@ public String extractNextToken(GroupFindingsResponse payload) { @Override public Iterable extractResources(GroupFindingsResponse payload) { - return payload.getGroupByResultsList(); + return payload.getGroupByResultsList() != null + ? payload.getGroupByResultsList() + : ImmutableList.of(); } }; @@ -453,7 +457,9 @@ public String extractNextToken(ListAssetsResponse payload) { @Override public Iterable extractResources( ListAssetsResponse payload) { - return payload.getListAssetsResultsList(); + return payload.getListAssetsResultsList() != null + ? payload.getListAssetsResultsList() + : ImmutableList.of(); } }; @@ -487,7 +493,9 @@ public String extractNextToken(ListFindingsResponse payload) { @Override public Iterable extractResources(ListFindingsResponse payload) { - return payload.getFindingsList(); + return payload.getFindingsList() != null + ? payload.getFindingsList() + : ImmutableList.of(); } }; @@ -521,7 +529,9 @@ public String extractNextToken(ListSourcesResponse payload) { @Override public Iterable extractResources(ListSourcesResponse payload) { - return payload.getSourcesList(); + return payload.getSourcesList() != null + ? payload.getSourcesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java b/google-cloud-clients/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java index cd1c1c9856b1..4322a27d5b30 100644 --- a/google-cloud-clients/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java +++ b/google-cloud-clients/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java @@ -26,7 +26,6 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; -import com.google.cloud.securitycenter.v1beta1.Finding.State; import com.google.common.collect.Lists; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java index b0bac76fc0a1..0b131a4a3e5a 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java @@ -297,7 +297,9 @@ public String extractNextToken(ListDatabasesResponse payload) { @Override public Iterable extractResources(ListDatabasesResponse payload) { - return payload.getDatabasesList(); + return payload.getDatabasesList() != null + ? payload.getDatabasesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java index 7a33417a3bdb..7aa44918a333 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java @@ -314,7 +314,9 @@ public String extractNextToken(ListInstanceConfigsResponse payload) { @Override public Iterable extractResources(ListInstanceConfigsResponse payload) { - return payload.getInstanceConfigsList(); + return payload.getInstanceConfigsList() != null + ? payload.getInstanceConfigsList() + : ImmutableList.of(); } }; @@ -348,7 +350,9 @@ public String extractNextToken(ListInstancesResponse payload) { @Override public Iterable extractResources(ListInstancesResponse payload) { - return payload.getInstancesList(); + return payload.getInstancesList() != null + ? payload.getInstancesList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java index 6cf3c210e11f..f9d42de35cfd 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java @@ -300,7 +300,9 @@ public String extractNextToken(ListSessionsResponse payload) { @Override public Iterable extractResources(ListSessionsResponse payload) { - return payload.getSessionsList(); + return payload.getSessionsList() != null + ? payload.getSessionsList() + : ImmutableList.of(); } }; @@ -380,6 +382,17 @@ public static class Builder extends StubSettings.Builder extractResources(ListQueuesResponse payload) { - return payload.getQueuesList(); + return payload.getQueuesList() != null + ? payload.getQueuesList() + : ImmutableList.of(); } }; @@ -391,7 +393,9 @@ public String extractNextToken(ListTasksResponse payload) { @Override public Iterable extractResources(ListTasksResponse payload) { - return payload.getTasksList(); + return payload.getTasksList() != null + ? payload.getTasksList() + : ImmutableList.of(); } }; diff --git a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java index fcf4f0eaa744..0f666bcb7f42 100644 --- a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java +++ b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java @@ -324,7 +324,9 @@ public String extractNextToken(ListQueuesResponse payload) { @Override public Iterable extractResources(ListQueuesResponse payload) { - return payload.getQueuesList(); + return payload.getQueuesList() != null + ? payload.getQueuesList() + : ImmutableList.of(); } }; @@ -358,7 +360,9 @@ public String extractNextToken(ListTasksResponse payload) { @Override public Iterable extractResources(ListTasksResponse payload) { - return payload.getTasksList(); + return payload.getTasksList() != null + ? payload.getTasksList() + : ImmutableList.of(); } };