com.google.cloud.dataflow.sdk.values

## Class PBegin

- java.lang.Object
- - com.google.cloud.dataflow.sdk.values.PBegin

All Implemented Interfaces:
  PInput

    public class PBegin
    extends Object
    implements PInput

`PBegin` is the "input" to a root `PTransform`, such as `Read` or `Create`.

Typically created by calling `Pipeline.begin()` on a Pipeline.

### Constructor Summary

Constructors
`protected` `PBegin(Pipeline pipeline)` Constructs a `PBegin` in the given `Pipeline`.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`<OutputT extends POutput> OutputT` `apply(PTransform<? super PBegin,OutputT> t)` Like `apply(String, PTransform)` but defaulting to the name of the `PTransform`.
`<OutputT extends POutput> OutputT` `apply(String name, PTransform<? super PBegin,OutputT> t)` Applies the given `PTransform` to this input `PBegin`, using `name` to identify this specific application of the transform.
`Collection<? extends PValue>` `expand()` Expands this `PInput` into a list of its component output `PValues`.
`void` `finishSpecifying()` After building, finalizes this `PInput` to make it ready for being used as an input to a `PTransform`.
`Pipeline` `getPipeline()` Returns the owning `Pipeline` of this `PInput`.
`static PBegin` `in(Pipeline pipeline)` Returns a `PBegin` in the given `Pipeline`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PBegin

    protected PBegin(Pipeline pipeline)

Constructs a `PBegin` in the given `Pipeline`.

### Method Detail

#### in

    public static PBegin in(Pipeline pipeline)

Returns a `PBegin` in the given `Pipeline`.

#### apply

    public <OutputT extends POutput> OutputT apply(PTransform<? super PBegin,OutputT> t)

Like `apply(String, PTransform)` but defaulting to the name of the `PTransform`.

#### apply

    public <OutputT extends POutput> OutputT apply(String name,
                                                   PTransform<? super PBegin,OutputT> t)

Applies the given `PTransform` to this input `PBegin`, using `name` to identify this specific application of the transform. This name is used in various places, including the monitoring UI, logging, and to stably identify this application node in the job graph.

#### getPipeline

    public Pipeline getPipeline()

Description copied from interface: `PInput`
Returns the owning `Pipeline` of this `PInput`.

Specified by:
  `getPipeline` in interface `PInput`

#### expand

    public Collection<? extends PValue> expand()

Description copied from interface: `PInput`
Expands this `PInput` into a list of its component output `PValues`.

- A `PValue` expands to itself.
- A tuple or list of `PValues` (such as `PCollectionTuple` or `PCollectionList`) expands to its component `PValue PValues`.

Not intended to be invoked directly by user code.

Specified by:
  `expand` in interface `PInput`

#### finishSpecifying

    public void finishSpecifying()

Description copied from interface: `PInput`

After building, finalizes this `PInput` to make it ready for being used as an input to a `PTransform`.

Automatically invoked whenever `apply()` is invoked on this `PInput`, so users do not normally call this explicitly.

Specified by:
  `finishSpecifying` in interface `PInput`