# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Enums
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors
- Deprecated Enum Constants

Deprecated Classes
Class and Description
com.google.cloud.dataflow.sdk.transforms.Combine.SimpleCombineFn
com.google.cloud.dataflow.sdk.io.DatastoreIO replaced by `DatastoreIO`
com.google.cloud.dataflow.sdk.coders.EntityCoder use `ProtoCoder` instead.
com.google.cloud.dataflow.sdk.coders.KvCoderBase
com.google.cloud.dataflow.sdk.coders.MapCoderBase
com.google.cloud.dataflow.sdk.coders.Proto2Coder Use `ProtoCoder`.
com.google.cloud.dataflow.sdk.transforms.Write

Deprecated Enums
Enum and Description
com.google.cloud.dataflow.sdk.options.DataflowPipelineWorkerPoolOptions.TeardownPolicy Dataflow Service will only support TEARDOWN_ALWAYS policy in the future.

Deprecated Fields
Field and Description
com.google.cloud.dataflow.sdk.io.BigQueryIO.SET_PROJECT_FROM_OPTIONS_WARNING

Deprecated Methods
Method and Description
com.google.cloud.dataflow.sdk.coders.Proto2Coder.addExtensionsFrom(Class<?>...) use `Proto2Coder.withExtensionsFrom(java.lang.Iterable<java.lang.Class<?>>)`
com.google.cloud.dataflow.sdk.coders.Proto2Coder.addExtensionsFrom(Iterable<Class<?>>) use `Proto2Coder.withExtensionsFrom(java.lang.Iterable<java.lang.Class<?>>)`
com.google.cloud.dataflow.sdk.io.PubsubIO.PubsubSubscription.asV1Beta1Path() the v1beta1 API for Cloud Pub/Sub is deprecated.
com.google.cloud.dataflow.sdk.io.PubsubIO.PubsubTopic.asV1Beta1Path() the v1beta1 API for Cloud Pub/Sub is deprecated.
com.google.cloud.dataflow.sdk.io.PubsubIO.PubsubSubscription.asV1Beta2Path() the v1beta2 API for Cloud Pub/Sub is deprecated.
com.google.cloud.dataflow.sdk.io.PubsubIO.PubsubTopic.asV1Beta2Path() the v1beta2 API for Cloud Pub/Sub is deprecated.
com.google.cloud.dataflow.sdk.transforms.Filter.by(PredicateT) use `Filter.byPredicate(PredicateT)`, which returns a `Filter` transform instead of a `ParDo.Bound`.
com.google.cloud.dataflow.sdk.coders.AvroCoder.createDatumReader() For `AvroCoder` internal use only.
com.google.cloud.dataflow.sdk.coders.AvroCoder.createDatumWriter() For `AvroCoder` internal use only.
com.google.cloud.dataflow.sdk.options.PipelineOptionsFactory.createFromSystemProperties() for internal use only
com.google.cloud.dataflow.sdk.transforms.DoFn.getAllowedTimestampSkew() does not interact well with the watermark.
com.google.cloud.dataflow.sdk.runners.inprocess.InProcessPipelineOptions.getClock() the runner manages its own `Clock` as an implementation detail
com.google.cloud.dataflow.sdk.testing.DataflowAssert.IterableAssert.getCoder() instead call `PCollection.getCoder()` on the actual `PCollection` directly
com.google.cloud.dataflow.sdk.testing.DataflowAssert.SingletonAssert.getCoder() instead call `PCollection.getCoder()` on the actual `PCollection` directly
com.google.cloud.dataflow.sdk.coders.CoderRegistry.getDefaultCoders(Class<? extends T>, Class<T>, Map<Type, ? extends Coder<?>>) this method is not part of the public interface and will be made private
com.google.cloud.dataflow.sdk.runners.inprocess.InProcessPipelineOptions.getExecutorServiceFactory() the runner manages its own `ExecutorService` as an implementation detail
com.google.cloud.dataflow.sdk.Pipeline.getFullNameForTesting(PTransform<?, ?>) this method is no longer compatible with the design of `Pipeline`, as `PTransforms` can be applied multiple times, with different names each time.
com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn.getOutputTime(Instant, W) Implement `WindowFn.getOutputTimeFn()` to return one of the appropriate `OutputTimeFns`, or a custom `OutputTimeFn` extending `OutputTimeFn.Defaults`.
com.google.cloud.dataflow.sdk.options.DataflowPipelineDebugOptions.getUpdate() This property is replaced by `DataflowPipelineOptions.getUpdate()`
com.google.cloud.dataflow.sdk.testing.DataflowAssert.SingletonAssert.is(T) instead use `DataflowAssert.SingletonAssert.isEqualTo(Object)`
com.google.cloud.dataflow.sdk.transforms.windowing.AfterDelayFromFirstElement.mappedTo(SerializableFunction<Instant, Instant>) This will be removed in the next major version. Please use only `AfterDelayFromFirstElement.plusDelayOf(org.joda.time.Duration)` and `AfterDelayFromFirstElement.alignedTo(org.joda.time.Duration, org.joda.time.Instant)`.
com.google.cloud.dataflow.sdk.transforms.Combine.SimpleCombineFn.of(SerializableFunction<Iterable<V>, V>)
com.google.cloud.dataflow.sdk.coders.KvCoderBase.of(String, boolean, List<Coder<?>>)
com.google.cloud.dataflow.sdk.coders.MapCoderBase.of(String, List<Coder<?>>)
com.google.cloud.dataflow.sdk.coders.protobuf.ProtoCoder.of(String, List<String>) For JSON deserialization only.
com.google.cloud.dataflow.sdk.io.DatastoreIO.read() the name and return type do not match. Use `DatastoreIO.source()`.
com.google.cloud.dataflow.sdk.io.DatastoreIO.readFrom(String, String, DatastoreV1.Query) prefer `DatastoreIO.source()` with `DatastoreIO.Source.withHost(java.lang.String)`, `DatastoreIO.Source.withDataset(java.lang.String)`, `DatastoreIO.Source.withQuery(com.google.api.services.datastore.DatastoreV1.Query)`s.
com.google.cloud.dataflow.sdk.testing.DataflowAssert.IterableAssert.setCoder(Coder<T>) instead call `PCollection.setCoder(Coder)` on the actual `PCollection` directly.
com.google.cloud.dataflow.sdk.testing.DataflowAssert.SingletonAssert.setCoder(Coder<T>) instead call `PCollection.setCoder(Coder)` on the actual `PCollection` directly.
com.google.cloud.dataflow.sdk.options.DataflowPipelineDebugOptions.setUpdate(boolean)
com.google.cloud.dataflow.sdk.testing.DataflowAssert.thatIterable(PCollectionView<Iterable<T>>) use `DataflowAssert.thatSingletonIterable(PCollection)`, `DataflowAssert.thatSingleton(PCollection)` or `DataflowAssert.that(PCollection)` instead.
com.google.cloud.dataflow.sdk.io.CountingSource.unbounded() use `CountingInput.unbounded()` instead
com.google.cloud.dataflow.sdk.io.CountingSource.unboundedWithTimestampFn(SerializableFunction<Long, Instant>) use `CountingInput.unbounded()` and call `CountingInput.UnboundedCountingInput.withTimestampFn(SerializableFunction)` instead
com.google.cloud.dataflow.sdk.io.CountingSource.upTo(long) use `CountingInput.upTo(long)` instead
com.google.cloud.dataflow.sdk.transforms.View.AsMap.withSingletonValues() this method simply returns this AsMap unmodified

Deprecated Constructors
Constructor and Description
com.google.cloud.dataflow.sdk.io.BigQueryIO.Write.Bound() Should be private. Instead, use one of the factory methods in `BigQueryIO.Write`, such as `BigQueryIO.Write.to(String)`, to create an instance of this class.
com.google.cloud.dataflow.sdk.Pipeline(PipelineRunner<?>) replaced by `Pipeline.Pipeline(PipelineRunner, PipelineOptions)`

Deprecated Enum Constants
Enum Constant and Description
com.google.cloud.dataflow.sdk.options.DataflowPipelineWorkerPoolOptions.AutoscalingAlgorithmType.BASIC