class_docstr: Hook for Google Dataflow.
  
  All the methods in the hook where project_id is used must be called with
  keyword arguments rather than positional.
class_docstr_tok: ["Hook","for","Google","Dataflow",".","All","the","methods","in","the","hook","where","project_id","is","used","must","be","called","with","keyword","arguments","rather","than","positional","."]
code: def __init__(
      self,
      gcp_conn_id: str = "google_cloud_default",
      poll_sleep: int = 10,
      impersonation_chain: str | Sequence[str] | None = None,
      drain_pipeline: bool = False,
      cancel_timeout: int | None = 5 * 60,
      wait_until_finished: bool | None = None,
      expected_terminal_state: str | None = None,
      **kwargs,
  ) -> None:
      if kwargs.get("delegate_to") is not None:
          raise RuntimeError(
              "The `delegate_to` parameter has been deprecated before and finally removed in this version"
              " of Google Provider. You MUST convert it to `impersonate_chain`"
          )
      self.poll_sleep = poll_sleep
      self.drain_pipeline = drain_pipeline
      self.cancel_timeout = cancel_timeout
      self.wait_until_finished = wait_until_finished
      self.job_id: str | None = None
      self.beam_hook = BeamHook(BeamRunnerType.DataflowRunner)
      self.expected_terminal_state = expected_terminal_state
      super().__init__(
          gcp_conn_id=gcp_conn_id,
          impersonation_chain=impersonation_chain,
      )
  
imports: from __future__ import annotations
  import functools
  import json
  import re
  import shlex
  import subprocess
  import time
  import uuid
  import warnings
  from copy import deepcopy
  from typing import TYPE_CHECKING, Any, Callable, Generator, Sequence, TypeVar, cast
  from google.cloud.dataflow_v1beta3 import GetJobRequest, Job, JobState, JobsV1Beta3AsyncClient, JobView
  from google.cloud.dataflow_v1beta3.types.jobs import ListJobsRequest
  from googleapiclient.discovery import build
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.apache.beam.hooks.beam import BeamHook, BeamRunnerType, beam_options_to_args
  from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook
  from airflow.utils.log.logging_mixin import LoggingMixin
  from airflow.utils.timeout import timeout
label_desc: Use image node_id 1 to create a new DataflowHook object from inherited base classes: GoogleBaseHook with example: obj = DataflowHook(gcp_conn_id, poll_sleep, impersonation_chain, drain_pipeline, cancel_timeout, wait_until_finished, expected_terminal_state)