Code review comment: I had to add these classes in whitelist. Details in [BEAM-8758](https://issues.apache.org/jira/browse/BEAM-8758?focusedCommentId=17029981&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17029981).  I hope they are acceptable.

Code before review:
public void testGcpApiSurface() throws Exception {
final Package thisPackage = this.getClass().getPackage();
final ClassLoader thisClassLoader = getClass().getClassLoader();
final ApiSurface apiSurface =
ApiSurface.ofPackage(thisPackage, thisClassLoader)
.pruningPattern(BigqueryMatcher.class.getName())
.pruningPattern(BigqueryClient.class.getName())
.pruningPattern("org[.]apache[.]beam[.].*Test.*")
.pruningPattern("org[.]apache[.]beam[.].*IT")
.pruningPattern("java[.]lang.*")
.pruningPattern("java[.]util.*");
@SuppressWarnings("unchecked")
final Set<Matcher<Class<?>>> allowedClasses =
ImmutableSet.of(
classesInPackage("com.google.api.core"),
classesInPackage("com.google.api.client.googleapis"),
classesInPackage("com.google.api.client.http"),
classesInPackage("com.google.api.client.json"),
classesInPackage("com.google.api.client.util"),
classesInPackage("com.google.api.services.bigquery.model"),
classesInPackage("com.google.auth"),
classesInPackage("com.google.bigtable.v2"),
classesInPackage("com.google.cloud.bigquery.storage.v1beta1"),
classesInPackage("com.google.cloud.bigtable.config"),
classesInPackage("com.google.spanner.v1"),
classesInPackage("com.google.pubsub.v1"),
Matchers.equalTo(com.google.api.gax.rpc.ApiException.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.longrunning.OperationFuture.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.longrunning.OperationSnapshot.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.paging.Page.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.retrying.RetryingFuture.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.retrying.RetrySettings.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.retrying.RetrySettings.Builder.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.retrying.TimedAttemptSettings.class),
Matchers.<Class<?>>equalTo(
com.google.api.gax.retrying.TimedAttemptSettings.Builder.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.rpc.StatusCode.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.rpc.StatusCode.Code.class),
Matchers.<Class<?>>equalTo(com.google.cloud.bigtable.grpc.BigtableClusterName.class),
Matchers.<Class<?>>equalTo(com.google.cloud.bigtable.grpc.BigtableInstanceName.class),
Matchers.<Class<?>>equalTo(com.google.cloud.bigtable.grpc.BigtableTableName.class),
Matchers.<Class<?>>equalTo(com.google.cloud.BaseServiceException.class),
Matchers.<Class<?>>equalTo(com.google.cloud.BaseServiceException.Error.class),
Matchers.<Class<?>>equalTo(com.google.cloud.BaseServiceException.ExceptionData.class),
Matchers.<Class<?>>equalTo(
com.google.cloud.BaseServiceException.ExceptionData.Builder.class),
Matchers.<Class<?>>equalTo(com.google.cloud.RetryHelper.RetryHelperException.class),
Matchers.<Class<?>>equalTo(com.google.cloud.grpc.BaseGrpcServiceException.class),
Matchers.<Class<?>>equalTo(com.google.cloud.ByteArray.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Date.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Timestamp.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Identity.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Identity.Type.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Policy.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Policy.Builder.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Policy.Marshaller.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Policy.DefaultMarshaller.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Role.class),
Matchers.<Class<?>>equalTo(com.google.cloud.StringEnumValue.class),
Matchers.<Class<?>>equalTo(com.google.iam.v1.Binding.class),
Matchers.<Class<?>>equalTo(com.google.iam.v1.Binding.Builder.class),
Matchers.<Class<?>>equalTo(com.google.iam.v1.Policy.class),
Matchers.<Class<?>>equalTo(com.google.iam.v1.Policy.Builder.class),
Matchers.<Class<?>>equalTo(com.google.iam.v1.BindingOrBuilder.class),
Matchers.<Class<?>>equalTo(com.google.iam.v1.PolicyOrBuilder.class),
classesInPackage("com.google.cloud.spanner"),
classesInPackage("com.google.spanner.admin.database.v1"),
classesInPackage("com.google.datastore.v1"),
classesInPackage("com.google.protobuf"),
classesInPackage("com.google.type"),
classesInPackage("com.fasterxml.jackson.annotation"),
classesInPackage("com.fasterxml.jackson.core"),
classesInPackage("com.fasterxml.jackson.databind"),
classesInPackage("io.grpc"),
classesInPackage("java"),
classesInPackage("javax"),
classesInPackage("org.apache.avro"),
classesInPackage("org.apache.beam"),
classesInPackage("org.apache.commons.logging"),
classesInPackage("org.codehaus.jackson"),
classesInPackage("org.joda.time"),
classesInPackage("org.threeten.bp"));
assertThat(apiSurface, containsOnlyClassesMatching(allowedClasses));
}

Line under review: Matchers.<Class<?>>equalTo(com.google.iam.v1.PolicyOrBuilder.class),

Code after addressing the review:
public void testGcpApiSurface() throws Exception {
final Package thisPackage = this.getClass().getPackage();
final ClassLoader thisClassLoader = getClass().getClassLoader();
final ApiSurface apiSurface =
ApiSurface.ofPackage(thisPackage, thisClassLoader)
.pruningPattern(BigqueryMatcher.class.getName())
.pruningPattern(BigqueryClient.class.getName())
.pruningPattern("org[.]apache[.]beam[.].*Test.*")
.pruningPattern("org[.]apache[.]beam[.].*IT")
.pruningPattern("java[.]lang.*")
.pruningPattern("java[.]util.*");
@SuppressWarnings("unchecked")
final Set<Matcher<Class<?>>> allowedClasses =
ImmutableSet.of(
classesInPackage("com.google.api.core"),
classesInPackage("com.google.api.client.googleapis"),
classesInPackage("com.google.api.client.http"),
classesInPackage("com.google.api.client.json"),
classesInPackage("com.google.api.client.util"),
classesInPackage("com.google.api.services.bigquery.model"),
classesInPackage("com.google.auth"),
classesInPackage("com.google.bigtable.v2"),
classesInPackage("com.google.cloud.bigquery.storage.v1beta1"),
classesInPackage("com.google.cloud.bigtable.config"),
classesInPackage("com.google.spanner.v1"),
classesInPackage("com.google.pubsub.v1"),
Matchers.equalTo(com.google.api.gax.rpc.ApiException.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.rpc.StatusCode.class),
Matchers.<Class<?>>equalTo(com.google.api.gax.rpc.StatusCode.Code.class),
Matchers.<Class<?>>equalTo(com.google.cloud.bigtable.grpc.BigtableClusterName.class),
Matchers.<Class<?>>equalTo(com.google.cloud.bigtable.grpc.BigtableInstanceName.class),
Matchers.<Class<?>>equalTo(com.google.cloud.bigtable.grpc.BigtableTableName.class),
Matchers.<Class<?>>equalTo(com.google.cloud.BaseServiceException.class),
Matchers.<Class<?>>equalTo(com.google.cloud.BaseServiceException.Error.class),
Matchers.<Class<?>>equalTo(com.google.cloud.BaseServiceException.ExceptionData.class),
Matchers.<Class<?>>equalTo(
com.google.cloud.BaseServiceException.ExceptionData.Builder.class),
Matchers.<Class<?>>equalTo(com.google.cloud.RetryHelper.RetryHelperException.class),
Matchers.<Class<?>>equalTo(com.google.cloud.grpc.BaseGrpcServiceException.class),
Matchers.<Class<?>>equalTo(com.google.cloud.ByteArray.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Date.class),
Matchers.<Class<?>>equalTo(com.google.cloud.Timestamp.class),
classesInPackage("com.google.cloud.spanner"),
classesInPackage("com.google.datastore.v1"),
classesInPackage("com.google.protobuf"),
classesInPackage("com.google.type"),
classesInPackage("com.fasterxml.jackson.annotation"),
classesInPackage("com.fasterxml.jackson.core"),
classesInPackage("com.fasterxml.jackson.databind"),
classesInPackage("io.grpc"),
classesInPackage("java"),
classesInPackage("javax"),
classesInPackage("org.apache.avro"),
classesInPackage("org.apache.beam"),
classesInPackage("org.apache.commons.logging"),
classesInPackage("org.codehaus.jackson"),
classesInPackage("org.joda.time"));
assertThat(apiSurface, containsOnlyClassesMatching(allowedClasses));
}