class_docstr: Hook for accessing Google Pub/Sub.
  
  The Google Cloud project against which actions are applied is determined by
  the project embedded in the Connection referenced by gcp_conn_id.
class_docstr_tok: ["Hook","for","accessing","Google","Pub\/Sub",".","The","Google","Cloud","project","against","which","actions","are","applied","is","determined","by","the","project","embedded","in","the","Connection","referenced","by","gcp_conn_id","."]
code: def __init__(
      self,
      gcp_conn_id: str = "google_cloud_default",
      impersonation_chain: str | Sequence[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`"
          )
      super().__init__(
          gcp_conn_id=gcp_conn_id,
          impersonation_chain=impersonation_chain,
      )
      self._client = None
  
imports: from __future__ import annotations
  import warnings
  from base64 import b64decode
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Sequence
  from uuid import uuid4
  from google.api_core.exceptions import AlreadyExists, GoogleAPICallError
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
  from google.cloud.exceptions import NotFound
  from google.cloud.pubsub_v1 import PublisherClient, SubscriberClient
  from google.pubsub_v1.services.subscriber.async_client import SubscriberAsyncClient
  from googleapiclient.errors import HttpError
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.providers.google.common.consts import CLIENT_INFO
  from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook
  from airflow.version import version
label_desc: Use image node_id 1 to create a new PubSubHook object from inherited base classes: GoogleBaseHook with example: obj = PubSubHook(gcp_conn_id, impersonation_chain)