Please see https://beam.apache.org/documentation/io/built-in/webapis/ for a step-by-step discussion of code in this example.