Add method to extract all errors of a partial failure status at once
This is useful because getting all errors via their operation index is inefficient. In #getGoogleAdsErrors(long, GoogleAdsFailureT) the error paths for all failures are build just to pick those for the requested operation index. That leads creation of many ErrorPath objects for all not requested operation indexes which. Those are immediately discarded what leads to avoidable GC pressure.
This can already be achieved with the current API, but I think it belongs into the error util. The code (Java 11) I currently use as supplement: status.getDetailsList().stream() .map(errorUtils::getGoogleAdsFailure) .map(errorUtils::getGoogleAdsErrors) .flatMap(List::stream) .collect(toSet());
When implementing this PR I wondered why the errors in AbstractErrorUtils#getGoogleAdsErrors(long, GoogleAdsFailureT) are deduplicated via if (!result.contains(error)) result.add(error)? Using a java.util.Set in this case would IMO be more efficient because the duplicate check performance currently decreases with the length of the java.util.List used for result. This IMO needs an incompatible API change of AbstractErrorUtils though.
This applies to other methods too, e.g. AbstractErrorUtils#getFailedOperationIndices where .distinct().collect(toList()) is used what first internally creates a set to convert it to a list afterwards.