/** * Causes the source to return a PubsubMessage that includes Pubsub attributes, and uses the * given parsing function to transform the PubsubMessage into an output type. A Coder for the * output type T must be registered or set on the output via {@link * PCollection#setCoder(Coder)}. */ private Read<T> withCoderAndParseFn(Coder<T> coder, SimpleFunction<PubsubMessage, T> parseFn) { return toBuilder().setCoder(coder).setParseFn(parseFn).build(); }