from typing import (
    Any,
    List,
    NamedTuple,
    Optional,
    Dict,
)

# N.B.:
# These stubs were autogenerated by stubgen and then hacked
# to pieces to ensure we had something other than "Any" types
# where using external classes to instantiate event subclasses
# in events/types.py.
#
# This goes away when we turn mypy on for everything.
#
# Don't trust them too much at all!


class _ReferenceKey(NamedTuple):
    database: Any
    schema: Any
    identifier: Any


class _CachedRelation:
    referenced_by: Any
    inner: Any


class BaseRelation:
    path: Any
    type: Optional[Any]
    quote_character: str
    include_policy: Any
    quote_policy: Any
    dbt_created: bool


class InformationSchema(BaseRelation):
    information_schema_view: Optional[str]


class CompiledNode():
    compiled_sql: Optional[str]
    extra_ctes_injected: bool
    extra_ctes: List[Any]
    relation_name: Optional[str]


class CompiledModelNode(CompiledNode):
    resource_type: Any


class ParsedModelNode():
    resource_type: Any


class ParsedHookNode():
    resource_type: Any
    index: Optional[int]


class RunResult():
    status: str
    timing: List[Any]
    thread_id: str
    execution_time: float
    adapter_response: Dict[str, Any]
    message: Optional[str]
    failures: Optional[int]
    node: Any
