# generated by datamodel-codegen:
#   filename:  manifest_v7.json

from __future__ import annotations

from datetime import datetime
from enum import Enum
from typing import Any
from typing import Optional
from typing import Union

from pydantic import ConfigDict
from pydantic import Field
from pydantic import constr

from vendor.dbt_artifacts_parser.parsers.base import BaseParserModel


class ManifestMetadata(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    dbt_schema_version: Optional[str] = "https://schemas.getdbt.com/dbt/manifest/v7.json"
    dbt_version: Optional[str] = "1.3.0b2"
    generated_at: Optional[datetime] = "2022-09-14T20:35:15.346636Z"
    invocation_id: Optional[str] = "c59a8269-533c-4b78-a709-5094045afd4d"
    env: Optional[dict[str, str]] = {}
    project_id: Optional[str] = Field(None, description="A unique identifier for the project")
    user_id: Optional[constr(pattern=r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")] = Field(
        None, description="A unique identifier for the user"
    )
    send_anonymous_usage_stats: Optional[bool] = Field(None, description="Whether dbt is configured to send anonymous usage statistics")
    adapter_type: Optional[str] = Field(None, description="The type name of the adapter")


class ResourceType(Enum):
    analysis = "analysis"


class FileHash(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    name: str
    checksum: str


class Hook(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    sql: str
    transaction: Optional[bool] = True
    index: Optional[int] = None


class Docs(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    show: Optional[bool] = True
    node_color: Optional[str] = None


class DependsOn(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    macros: Optional[list[str]] = []
    nodes: Optional[list[str]] = []


class ColumnInfo(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    name: str
    description: Optional[str] = ""
    meta: Optional[dict[str, Any]] = {}
    data_type: Optional[str] = None
    quote: Optional[bool] = None
    tags: Optional[list[str]] = []


class InjectedCTE(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    id: str
    sql: str


class ResourceType1(Enum):
    test = "test"


class TestConfig(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    enabled: Optional[bool] = True
    alias: Optional[str] = None
    schema_: Optional[str] = Field("dbt_test__audit", alias="schema")
    database: Optional[str] = None
    tags: Optional[Union[list[str], str]] = []
    meta: Optional[dict[str, Any]] = {}
    materialized: Optional[str] = "test"
    severity: Optional[constr(pattern=r"^([Ww][Aa][Rr][Nn]|[Ee][Rr][Rr][Oo][Rr])$")] = "ERROR"
    store_failures: Optional[bool] = None
    where: Optional[str] = None
    limit: Optional[int] = None
    fail_calc: Optional[str] = "count(*)"
    warn_if: Optional[str] = "!= 0"
    error_if: Optional[str] = "!= 0"


class ResourceType2(Enum):
    model = "model"


class ResourceType3(Enum):
    operation = "operation"


class ResourceType4(Enum):
    rpc = "rpc"


class ResourceType5(Enum):
    sql_operation = "sql operation"


class ResourceType6(Enum):
    test = "test"


class TestMetadata(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    name: str
    kwargs: Optional[dict[str, Any]] = {}
    namespace: Optional[str] = None


class ResourceType7(Enum):
    seed = "seed"


class SeedConfig(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    enabled: Optional[bool] = True
    alias: Optional[str] = None
    schema_: Optional[str] = Field(None, alias="schema")
    database: Optional[str] = None
    tags: Optional[Union[list[str], str]] = []
    meta: Optional[dict[str, Any]] = {}
    materialized: Optional[str] = "seed"
    incremental_strategy: Optional[str] = None
    persist_docs: Optional[dict[str, Any]] = {}
    post_hook: Optional[list[Hook]] = Field([], alias="post-hook")
    pre_hook: Optional[list[Hook]] = Field([], alias="pre-hook")
    quoting: Optional[dict[str, Any]] = {}
    column_types: Optional[dict[str, Any]] = {}
    full_refresh: Optional[bool] = None
    unique_key: Optional[Union[str, list[str]]] = None
    on_schema_change: Optional[str] = "ignore"
    grants: Optional[dict[str, Any]] = {}
    packages: Optional[list[str]] = []
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    quote_columns: Optional[bool] = None


class ResourceType8(Enum):
    snapshot = "snapshot"


class ResourceType9(Enum):
    analysis = "analysis"


class ResourceType10(Enum):
    test = "test"


class ParsedSingularTestNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType10
    alias: str
    checksum: FileHash
    config: Optional[TestConfig] = Field(
        default_factory=lambda: TestConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": "dbt_test__audit",
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "test",
                "severity": "ERROR",
                "store_failures": None,
                "where": None,
                "limit": None,
                "fail_calc": "count(*)",
                "warn_if": "!= 0",
                "error_if": "!= 0",
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.370925
    config_call_dict: Optional[dict[str, Any]] = {}


class ResourceType11(Enum):
    operation = "operation"


class ResourceType12(Enum):
    model = "model"


class ResourceType13(Enum):
    rpc = "rpc"


class ResourceType14(Enum):
    sql_operation = "sql operation"


class ResourceType15(Enum):
    test = "test"


class ParsedGenericTestNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    test_metadata: TestMetadata
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType15
    alias: str
    checksum: FileHash
    config: Optional[TestConfig] = Field(
        default_factory=lambda: TestConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": "dbt_test__audit",
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "test",
                "severity": "ERROR",
                "store_failures": None,
                "where": None,
                "limit": None,
                "fail_calc": "count(*)",
                "warn_if": "!= 0",
                "error_if": "!= 0",
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.3784761
    config_call_dict: Optional[dict[str, Any]] = {}
    column_name: Optional[str] = None
    file_key_name: Optional[str] = None


class ResourceType16(Enum):
    seed = "seed"


class ParsedSeedNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType16
    alias: str
    checksum: FileHash
    config: Optional[SeedConfig] = Field(
        default_factory=lambda: SeedConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "seed",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "quote_columns": None,
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.380325
    config_call_dict: Optional[dict[str, Any]] = {}


class ResourceType17(Enum):
    snapshot = "snapshot"


class SnapshotConfig(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    enabled: Optional[bool] = True
    alias: Optional[str] = None
    schema_: Optional[str] = Field(None, alias="schema")
    database: Optional[str] = None
    tags: Optional[Union[list[str], str]] = []
    meta: Optional[dict[str, Any]] = {}
    materialized: Optional[str] = "snapshot"
    incremental_strategy: Optional[str] = None
    persist_docs: Optional[dict[str, Any]] = {}
    post_hook: Optional[list[Hook]] = Field([], alias="post-hook")
    pre_hook: Optional[list[Hook]] = Field([], alias="pre-hook")
    quoting: Optional[dict[str, Any]] = {}
    column_types: Optional[dict[str, Any]] = {}
    full_refresh: Optional[bool] = None
    unique_key: Optional[str] = None
    on_schema_change: Optional[str] = "ignore"
    grants: Optional[dict[str, Any]] = {}
    packages: Optional[list[str]] = []
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    strategy: Optional[str] = None
    target_schema: Optional[str] = None
    target_database: Optional[str] = None
    updated_at: Optional[str] = None
    check_cols: Optional[Union[str, list[str]]] = None


class ResourceType18(Enum):
    source = "source"


class Quoting(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    database: Optional[bool] = None
    schema_: Optional[bool] = Field(None, alias="schema")
    identifier: Optional[bool] = None
    column: Optional[bool] = None


class FreshnessMetadata(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    dbt_schema_version: Optional[str] = "https://schemas.getdbt.com/dbt/sources/v3.json"
    dbt_version: Optional[str] = "1.3.0b2"
    generated_at: Optional[datetime] = "2022-09-14T20:35:15.341700Z"
    invocation_id: Optional[str] = "c59a8269-533c-4b78-a709-5094045afd4d"
    env: Optional[dict[str, str]] = {}


class Status(Enum):
    runtime_error = "runtime error"


class SourceFreshnessRuntimeError(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    unique_id: str
    error: Optional[Union[str, int]] = None
    status: Status


class Status1(Enum):
    pass_ = "pass"
    warn = "warn"
    error = "error"
    runtime_error = "runtime error"


class Period(Enum):
    minute = "minute"
    hour = "hour"
    day = "day"


class Time(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    count: Optional[int] = None
    period: Optional[Period] = None


class TimingInfo(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    name: str
    started_at: Optional[datetime] = None
    completed_at: Optional[datetime] = None


class ExternalPartition(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    name: Optional[str] = ""
    description: Optional[str] = ""
    data_type: Optional[str] = ""
    meta: Optional[dict[str, Any]] = {}


class SourceConfig(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    enabled: Optional[bool] = True


class ResourceType19(Enum):
    macro = "macro"


class SupportedLanguage(Enum):
    python = "python"
    sql = "sql"


class MacroDependsOn(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    macros: Optional[list[str]] = []


class MacroArgument(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    name: str
    type: Optional[str] = None
    description: Optional[str] = ""


class ParsedDocumentation(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    unique_id: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    block_contents: str


class Type(Enum):
    dashboard = "dashboard"
    notebook = "notebook"
    analysis = "analysis"
    ml = "ml"
    application = "application"


class ResourceType20(Enum):
    model = "model"
    analysis = "analysis"
    test = "test"
    snapshot = "snapshot"
    operation = "operation"
    seed = "seed"
    rpc = "rpc"
    sql_operation = "sql operation"
    docs_block = "docs block"
    source = "source"
    macro = "macro"
    exposure = "exposure"
    metric = "metric"


class Maturity(Enum):
    low = "low"
    medium = "medium"
    high = "high"


class ExposureOwner(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    email: str
    name: Optional[str] = None


class ExposureConfig(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    enabled: Optional[bool] = True


class MetricFilter(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    field: str
    operator: str
    value: str


class Period1(Enum):
    day = "day"
    week = "week"
    month = "month"
    year = "year"


class MetricTime(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    count: Optional[int] = None
    period: Optional[Period1] = None


class MetricConfig(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    enabled: Optional[bool] = True


class NodeConfig(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    enabled: Optional[bool] = True
    alias: Optional[str] = None
    schema_: Optional[str] = Field(None, alias="schema")
    database: Optional[str] = None
    tags: Optional[Union[list[str], str]] = []
    meta: Optional[dict[str, Any]] = {}
    materialized: Optional[str] = "view"
    incremental_strategy: Optional[str] = None
    persist_docs: Optional[dict[str, Any]] = {}
    post_hook: Optional[list[Hook]] = Field([], alias="post-hook")
    pre_hook: Optional[list[Hook]] = Field([], alias="pre-hook")
    quoting: Optional[dict[str, Any]] = {}
    column_types: Optional[dict[str, Any]] = {}
    full_refresh: Optional[bool] = None
    unique_key: Optional[Union[str, list[str]]] = None
    on_schema_change: Optional[str] = "ignore"
    grants: Optional[dict[str, Any]] = {}
    packages: Optional[list[str]] = []
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))


class CompiledSingularTestNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    compiled: bool
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType1
    alias: str
    checksum: FileHash
    config: Optional[TestConfig] = Field(
        default_factory=lambda: TestConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": "dbt_test__audit",
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "test",
                "severity": "ERROR",
                "store_failures": None,
                "where": None,
                "limit": None,
                "fail_calc": "count(*)",
                "warn_if": "!= 0",
                "error_if": "!= 0",
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.35441
    config_call_dict: Optional[dict[str, Any]] = {}
    compiled_code: Optional[str] = None
    extra_ctes_injected: Optional[bool] = False
    extra_ctes: Optional[list[InjectedCTE]] = []
    relation_name: Optional[str] = None


class CompiledModelNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    compiled: bool
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType2
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.356541
    config_call_dict: Optional[dict[str, Any]] = {}
    compiled_code: Optional[str] = None
    extra_ctes_injected: Optional[bool] = False
    extra_ctes: Optional[list[InjectedCTE]] = []
    relation_name: Optional[str] = None


class CompiledHookNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    compiled: bool
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType3
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.3582149
    config_call_dict: Optional[dict[str, Any]] = {}
    compiled_code: Optional[str] = None
    extra_ctes_injected: Optional[bool] = False
    extra_ctes: Optional[list[InjectedCTE]] = []
    relation_name: Optional[str] = None
    index: Optional[int] = None


class CompiledRPCNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    compiled: bool
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType4
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.359935
    config_call_dict: Optional[dict[str, Any]] = {}
    compiled_code: Optional[str] = None
    extra_ctes_injected: Optional[bool] = False
    extra_ctes: Optional[list[InjectedCTE]] = []
    relation_name: Optional[str] = None


class CompiledSqlNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    compiled: bool
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType5
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.361423
    config_call_dict: Optional[dict[str, Any]] = {}
    compiled_code: Optional[str] = None
    extra_ctes_injected: Optional[bool] = False
    extra_ctes: Optional[list[InjectedCTE]] = []
    relation_name: Optional[str] = None


class CompiledGenericTestNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    test_metadata: TestMetadata
    compiled: bool
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType6
    alias: str
    checksum: FileHash
    config: Optional[TestConfig] = Field(
        default_factory=lambda: TestConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": "dbt_test__audit",
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "test",
                "severity": "ERROR",
                "store_failures": None,
                "where": None,
                "limit": None,
                "fail_calc": "count(*)",
                "warn_if": "!= 0",
                "error_if": "!= 0",
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.363411
    config_call_dict: Optional[dict[str, Any]] = {}
    compiled_code: Optional[str] = None
    extra_ctes_injected: Optional[bool] = False
    extra_ctes: Optional[list[InjectedCTE]] = []
    relation_name: Optional[str] = None
    column_name: Optional[str] = None
    file_key_name: Optional[str] = None


class CompiledSeedNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    compiled: bool
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType7
    alias: str
    checksum: FileHash
    config: Optional[SeedConfig] = Field(
        default_factory=lambda: SeedConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "seed",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "quote_columns": None,
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.366584
    config_call_dict: Optional[dict[str, Any]] = {}
    compiled_code: Optional[str] = None
    extra_ctes_injected: Optional[bool] = False
    extra_ctes: Optional[list[InjectedCTE]] = []
    relation_name: Optional[str] = None


class CompiledSnapshotNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    compiled: bool
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType8
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.3682182
    config_call_dict: Optional[dict[str, Any]] = {}
    compiled_code: Optional[str] = None
    extra_ctes_injected: Optional[bool] = False
    extra_ctes: Optional[list[InjectedCTE]] = []
    relation_name: Optional[str] = None


class ParsedAnalysisNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType9
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.369675
    config_call_dict: Optional[dict[str, Any]] = {}


class ParsedHookNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType11
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.372257
    config_call_dict: Optional[dict[str, Any]] = {}
    index: Optional[int] = None


class ParsedModelNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType12
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.373705
    config_call_dict: Optional[dict[str, Any]] = {}


class ParsedRPCNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType13
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.375131
    config_call_dict: Optional[dict[str, Any]] = {}


class ParsedSqlNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType14
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.376405
    config_call_dict: Optional[dict[str, Any]] = {}


class ParsedSnapshotNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType17
    alias: str
    checksum: FileHash
    config: SnapshotConfig
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.3832462
    config_call_dict: Optional[dict[str, Any]] = {}


class FreshnessThreshold(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    warn_after: Optional[Time] = {"count": None, "period": None}
    error_after: Optional[Time] = {"count": None, "period": None}
    filter: Optional[str] = None


class SourceFreshnessOutput(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    unique_id: str
    max_loaded_at: datetime
    snapshotted_at: datetime
    max_loaded_at_time_ago_in_s: float
    status: Status1
    criteria: FreshnessThreshold
    adapter_response: dict[str, Any]
    timing: list[TimingInfo]
    thread_id: str
    execution_time: float


class ExternalTable(BaseParserModel):
    model_config = ConfigDict(
        extra="allow",
    )
    location: Optional[str] = None
    file_format: Optional[str] = None
    row_format: Optional[str] = None
    tbl_properties: Optional[str] = None
    partitions: Optional[list[ExternalPartition]] = None


class ParsedMacro(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    unique_id: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    macro_sql: str
    resource_type: ResourceType19
    tags: Optional[list[str]] = []
    depends_on: Optional[MacroDependsOn] = Field(default_factory=lambda: MacroDependsOn.model_validate({"macros": []}))
    description: Optional[str] = ""
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    arguments: Optional[list[MacroArgument]] = []
    created_at: Optional[float] = 1663187715.386226
    supported_languages: Optional[list[SupportedLanguage]] = None


class ParsedExposure(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    fqn: list[str]
    unique_id: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    type: Type
    owner: ExposureOwner
    resource_type: Optional[ResourceType20] = "exposure"
    description: Optional[str] = ""
    label: Optional[str] = None
    maturity: Optional[Maturity] = None
    meta: Optional[dict[str, Any]] = {}
    tags: Optional[list[str]] = []
    config: Optional[ExposureConfig] = Field(default_factory=lambda: ExposureConfig.model_validate({"enabled": True}))
    unrendered_config: Optional[dict[str, Any]] = {}
    url: Optional[str] = None
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    created_at: Optional[float] = 1663187715.3878772


class ParsedMetric(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    fqn: list[str]
    unique_id: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    description: str
    label: str
    calculation_method: str
    expression: str
    timestamp: Optional[str] = None
    filters: list[MetricFilter]
    time_grains: list[str]
    dimensions: list[str]
    window: Optional[MetricTime] = None
    model: Optional[str] = None
    model_unique_id: Optional[str] = None
    resource_type: Optional[ResourceType20] = "metric"
    meta: Optional[dict[str, Any]] = {}
    tags: Optional[list[str]] = []
    config: Optional[MetricConfig] = Field(default_factory=lambda: MetricConfig.model_validate({"enabled": True}))
    unrendered_config: Optional[dict[str, Any]] = {}
    sources: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    refs: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    created_at: Optional[float] = 1663187715.38939


class CompiledAnalysisNode(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    compiled: bool
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    fqn: list[str]
    unique_id: str
    raw_code: str
    language: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    resource_type: ResourceType
    alias: str
    checksum: FileHash
    config: Optional[NodeConfig] = Field(
        default_factory=lambda: NodeConfig.model_validate(
            {
                "enabled": True,
                "alias": None,
                "schema": None,
                "database": None,
                "tags": [],
                "meta": {},
                "materialized": "view",
                "incremental_strategy": None,
                "persist_docs": {},
                "quoting": {},
                "column_types": {},
                "full_refresh": None,
                "unique_key": None,
                "on_schema_change": "ignore",
                "grants": {},
                "packages": [],
                "docs": {"show": True, "node_color": None},
                "post-hook": [],
                "pre-hook": [],
            }
        )
    )
    tags: Optional[list[str]] = []
    refs: Optional[list[list[str]]] = []
    sources: Optional[list[list[str]]] = []
    metrics: Optional[list[list[str]]] = []
    depends_on: Optional[DependsOn] = Field(default_factory=lambda: DependsOn.model_validate({"macros": [], "nodes": []}))
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    docs: Optional[Docs] = Field(default_factory=lambda: Docs.model_validate({"show": True, "node_color": None}))
    patch_path: Optional[str] = None
    compiled_path: Optional[str] = None
    build_path: Optional[str] = None
    deferred: Optional[bool] = False
    unrendered_config: Optional[dict[str, Any]] = {}
    created_at: Optional[float] = 1663187715.3517282
    config_call_dict: Optional[dict[str, Any]] = {}
    compiled_code: Optional[str] = None
    extra_ctes_injected: Optional[bool] = False
    extra_ctes: Optional[list[InjectedCTE]] = []
    relation_name: Optional[str] = None


class ParsedSourceDefinition(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    fqn: list[str]
    database: Optional[str] = None
    schema_: str = Field(..., alias="schema")
    unique_id: str
    package_name: str
    root_path: str
    path: str
    original_file_path: str
    name: str
    source_name: str
    source_description: str
    loader: str
    identifier: str
    resource_type: ResourceType18
    quoting: Optional[Quoting] = Field(
        default_factory=lambda: Quoting.model_validate({"database": None, "schema": None, "identifier": None, "column": None})
    )
    loaded_at_field: Optional[str] = None
    freshness: Optional[FreshnessThreshold] = None
    external: Optional[ExternalTable] = None
    description: Optional[str] = ""
    columns: Optional[dict[str, ColumnInfo]] = {}
    meta: Optional[dict[str, Any]] = {}
    source_meta: Optional[dict[str, Any]] = {}
    tags: Optional[list[str]] = []
    config: Optional[SourceConfig] = Field(default_factory=lambda: SourceConfig.model_validate({"enabled": True}))
    patch_path: Optional[str] = None
    unrendered_config: Optional[dict[str, Any]] = {}
    relation_name: Optional[str] = None
    created_at: Optional[float] = 1663187715.3854342


class ManifestV7(BaseParserModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    metadata: ManifestMetadata = Field(..., description="Metadata about the manifest")
    nodes: dict[
        str,
        Union[
            CompiledAnalysisNode,
            CompiledSingularTestNode,
            CompiledModelNode,
            CompiledHookNode,
            CompiledRPCNode,
            CompiledSqlNode,
            CompiledGenericTestNode,
            CompiledSeedNode,
            CompiledSnapshotNode,
            ParsedAnalysisNode,
            ParsedSingularTestNode,
            ParsedHookNode,
            ParsedModelNode,
            ParsedRPCNode,
            ParsedSqlNode,
            ParsedGenericTestNode,
            ParsedSeedNode,
            ParsedSnapshotNode,
        ],
    ] = Field(..., description="The nodes defined in the dbt project and its dependencies")
    sources: dict[str, ParsedSourceDefinition] = Field(..., description="The sources defined in the dbt project and its dependencies")
    macros: dict[str, ParsedMacro] = Field(..., description="The macros defined in the dbt project and its dependencies")
    docs: dict[str, ParsedDocumentation] = Field(..., description="The docs defined in the dbt project and its dependencies")
    exposures: dict[str, ParsedExposure] = Field(..., description="The exposures defined in the dbt project and its dependencies")
    metrics: dict[str, ParsedMetric] = Field(..., description="The metrics defined in the dbt project and its dependencies")
    selectors: dict[str, Any] = Field(..., description="The selectors defined in selectors.yml")
    disabled: Optional[
        dict[
            str,
            list[
                Union[
                    CompiledAnalysisNode,
                    CompiledSingularTestNode,
                    CompiledModelNode,
                    CompiledHookNode,
                    CompiledRPCNode,
                    CompiledSqlNode,
                    CompiledGenericTestNode,
                    CompiledSeedNode,
                    CompiledSnapshotNode,
                    ParsedAnalysisNode,
                    ParsedSingularTestNode,
                    ParsedHookNode,
                    ParsedModelNode,
                    ParsedRPCNode,
                    ParsedSqlNode,
                    ParsedGenericTestNode,
                    ParsedSeedNode,
                    ParsedSnapshotNode,
                    ParsedSourceDefinition,
                ]
            ],
        ]
    ] = Field(None, description="A mapping of the disabled nodes in the target")
    parent_map: Optional[dict[str, list[str]]] = Field(None, description="A mapping from\xa0child nodes to their dependencies")
    child_map: Optional[dict[str, list[str]]] = Field(None, description="A mapping from parent nodes to their dependents")
