class_docstr: Retrieve Secrets object from Google Cloud Secrets Manager.
  
  This is a common class reused between SecretsManager and Secrets Hook that
  provides the shared authentication and verification mechanisms. This class
  should not be used directly; use SecretsManager or SecretsHook instead.
  
  :param credentials: Credentials used to authenticate to GCP
docstr: Get secret value from the Secret Manager.
  
  :param secret_id: Secret Key
  :param project_id: Project id to use
  :param secret_version: version of the secret (default is 'latest')
docstr_tok: ["Get","secret","value","from","the","Secret","Manager",".",":","param","secret_id",":","Secret","Key",":","param","project_id",":","Project","id","to","use",":","param","secret_version",":","version","of","the","secret","(","default","is","'latest","'",")"]
code: def get_secret(
      self,
      secret_id: str,
      project_id: str,
      secret_version: str = "latest",
  ) -> str | None:
      """Get secret value from the Secret Manager.
  
      :param secret_id: Secret Key
      :param project_id: Project id to use
      :param secret_version: version of the secret (default is 'latest')
      """
      name = self.client.secret_version_path(
          project_id, secret_id, secret_version
      )
      try:
          response = self.client.access_secret_version(
              request={"name": name}
          )
          value = response.payload.data.decode("UTF-8")
          return value
      except NotFound:
          self.log.debug(
              "Google Cloud API Call Error (NotFound): Secret ID %s not found.",
              secret_id,
          )
          return None
      except PermissionDenied:
          self.log.error(
              """Google Cloud API Call Error (PermissionDenied): No access for Secret ID %s.
                  Did you add 'secretmanager.versions.access' permission?""",
              secret_id,
          )
          return None
      except InvalidArgument:
          self.log.error(
              """Google Cloud API Call Error (InvalidArgument): Invalid secret ID %s.
                  Only ASCII alphabets (a-Z), numbers (0-9), dashes (-), and underscores (_)
                  are allowed in the secret ID.
                  """,
              secret_id,
          )
          return None
  
file_path: airflow/airflow/providers/google/cloud/_internal_client/secret_manager_client.py
imports: from __future__ import annotations
  import re
  from functools import cached_property
  from typing import TYPE_CHECKING
  from google.api_core.exceptions import InvalidArgument, NotFound, PermissionDenied
  from google.cloud.secretmanager_v1 import SecretManagerServiceClient
  from airflow.providers.google.common.consts import CLIENT_INFO
  from airflow.utils.log.logging_mixin import LoggingMixin
label_desc: Use image node_id 4 for calling the _SecretManagerClient obj's underlying member method code with example usage: obj.get_secret(secret_id, project_id, secret_version) and returns: value, None, None, None