# Path: dftimewolf/lib/module.py
# T = TypeVar("T", bound="interface.AttributeContainer")  # pylint: disable=invalid-name,line-too-long
# class BaseModule(object):
# class PreflightModule(BaseModule):
# class ThreadAwareModule(BaseModule):
#   def __init__(self,
#                state: "state.DFTimewolfState",
#                name:Optional[str]=None,
#                critical: Optional[bool]=False):
#   def SetupLogging(self, threaded: bool = False) -> None:
#   def CleanUp(self) -> None:
#   def ModuleError(self, message: str, critical: bool=False) -> None:
#   def Process(self) -> None:
#   def SetUp(self, *args, **kwargs) -> None:  # type: ignore[no-untyped-def]
#   def Process(self) -> None:
#   def SetUp(self, *args, **kwargs) -> None:  # type: ignore[no-untyped-def]
#   def CleanUp(self) -> None:
#   def __init__(self,
#                state: "state.DFTimewolfState",
#                name: Optional[str]=None,
#                critical: Optional[bool]=False) -> None:
#   def PreProcess(self) -> None:
#   def Process(self, container: interface.AttributeContainer) -> None:
#   def PostProcess(self) -> None:
#   def GetThreadOnContainerType() -> Type[interface.AttributeContainer]:
#   def GetThreadPoolSize(self) -> int:
#   def KeepThreadedContainersInState() -> bool:
# 
# Path: dftimewolf/lib/modules/manager.py
# class ModulesManager(object):
#   ALLOW_MODULE_OVERRIDE = False
#   def DeregisterModule(cls, module_class: Type['module.BaseModule']) -> None:
#   def GetModuleByName(cls, name: str) -> Type['module.BaseModule']:
#   def RegisterModule(cls, module_class: Type['module.BaseModule']) -> None:
#   def RegisterModules(
#       cls, module_classes: List[Type['module.BaseModule']]) -> None:


import shutil
import subprocess
from boto3 import session as boto_session
from botocore import exceptions as boto_exceptions
from dftimewolf.lib import module
from dftimewolf.lib.modules import manager as modules_manager

    if not project_name:
      return

    gcloud_path = shutil.which('gcloud')
    if gcloud_path is None:
      self.ModuleError(
          'Could not find path to gcloud tool. Please install gcloud SDK, as it'
          'is required to authenticate to GCP', critical=True)
      return  # required for type checker to know we're bailing
    try:
      subprocess.check_output(
          [gcloud_path,
          'auth',
          'application-default',
          'print-access-token',
          '--project',
          project_name])
    except subprocess.CalledProcessError:
      self.ModuleError(
          'Your GCP application credentials are invalid. Please run '
          'gcloud auth application-default login', critical=True)

  def Process(self) -> None:
    """Processes input and builds the module's output attribute."""

  def CleanUp(self) -> None:
    """Carries out optional cleanup actions at the end of the recipe run."""



# Path: dftimewolf/lib/module.py
# T = TypeVar("T", bound="interface.AttributeContainer")  # pylint: disable=invalid-name,line-too-long
# class BaseModule(object):
# class PreflightModule(BaseModule):
# class ThreadAwareModule(BaseModule):
#   def __init__(self,
#                state: "state.DFTimewolfState",
#                name:Optional[str]=None,
#                critical: Optional[bool]=False):
#   def SetupLogging(self, threaded: bool = False) -> None:
#   def CleanUp(self) -> None:
#   def ModuleError(self, message: str, critical: bool=False) -> None:
#   def Process(self) -> None:
#   def SetUp(self, *args, **kwargs) -> None:  # type: ignore[no-untyped-def]
#   def Process(self) -> None:
#   def SetUp(self, *args, **kwargs) -> None:  # type: ignore[no-untyped-def]
#   def CleanUp(self) -> None:
#   def __init__(self,
#                state: "state.DFTimewolfState",
#                name: Optional[str]=None,
#                critical: Optional[bool]=False) -> None:
#   def PreProcess(self) -> None:
#   def Process(self, container: interface.AttributeContainer) -> None:
#   def PostProcess(self) -> None:
#   def GetThreadOnContainerType() -> Type[interface.AttributeContainer]:
#   def GetThreadPoolSize(self) -> int:
#   def KeepThreadedContainersInState() -> bool:
# 
# Path: dftimewolf/lib/modules/manager.py
# class ModulesManager(object):
#   ALLOW_MODULE_OVERRIDE = False
#   def DeregisterModule(cls, module_class: Type['module.BaseModule']) -> None:
#   def GetModuleByName(cls, name: str) -> Type['module.BaseModule']:
#   def RegisterModule(cls, module_class: Type['module.BaseModule']) -> None:
#   def RegisterModules(
#       cls, module_classes: List[Type['module.BaseModule']]) -> None:


# Path: dftimewolf/lib/preflights/cloud_token.py
import shutil
import subprocess
from boto3 import session as boto_session
from botocore import exceptions as boto_exceptions
from dftimewolf.lib import module
from dftimewolf.lib.modules import manager as modules_manager


    if not project_name:
      return

    gcloud_path = shutil.which('gcloud')
    if gcloud_path is None:
      self.ModuleError(
          'Could not find path to gcloud tool. Please install gcloud SDK, as it'
          'is required to authenticate to GCP', critical=True)
      return  # required for type checker to know we're bailing
    try:
      subprocess.check_output(
          [gcloud_path,
          'auth',
          'application-default',
          'print-access-token',
          '--project',
          project_name])
    except subprocess.CalledProcessError:
      self.ModuleError(
          'Your GCP application credentials are invalid. Please run '
          'gcloud auth application-default login', critical=True)

  def Process(self) -> None:
    """Processes input and builds the module's output attribute."""

  def CleanUp(self) -> None:
    """Carries out optional cleanup actions at the end of the recipe run."""



class AWSAccountCheck(module.PreflightModule):