"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import dbtlabs.proto.public.v1.events.fusion.phase.phase_pb2
import google.protobuf.descriptor
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _HookType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _HookTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_HookType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    HOOK_TYPE_UNSPECIFIED: _HookType.ValueType  # 0
    HOOK_TYPE_ON_RUN_START: _HookType.ValueType  # 1
    """on-run-start hook configured in the project"""
    HOOK_TYPE_ON_RUN_END: _HookType.ValueType  # 2
    """on-run-end hook configured in the project"""
    HOOK_TYPE_PRE_HOOK: _HookType.ValueType  # 3
    """pre-hook executed before a specific node"""
    HOOK_TYPE_POST_HOOK: _HookType.ValueType  # 4
    """post-hook executed after a specific node"""

class HookType(_HookType, metaclass=_HookTypeEnumTypeWrapper):
    """Hook type indicating which hook this is"""

HOOK_TYPE_UNSPECIFIED: HookType.ValueType  # 0
HOOK_TYPE_ON_RUN_START: HookType.ValueType  # 1
"""on-run-start hook configured in the project"""
HOOK_TYPE_ON_RUN_END: HookType.ValueType  # 2
"""on-run-end hook configured in the project"""
HOOK_TYPE_PRE_HOOK: HookType.ValueType  # 3
"""pre-hook executed before a specific node"""
HOOK_TYPE_POST_HOOK: HookType.ValueType  # 4
"""post-hook executed after a specific node"""
Global___HookType: typing_extensions.TypeAlias = HookType

class _HookOutcome:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _HookOutcomeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_HookOutcome.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    HOOK_OUTCOME_UNSPECIFIED: _HookOutcome.ValueType  # 0
    HOOK_OUTCOME_SUCCESS: _HookOutcome.ValueType  # 1
    """Hook completed successfully"""
    HOOK_OUTCOME_ERROR: _HookOutcome.ValueType  # 2
    """Hook failed with an error"""
    HOOK_OUTCOME_CANCELED: _HookOutcome.ValueType  # 3
    """Hook was canceled (e.g. user-initiated cancellation)"""

class HookOutcome(_HookOutcome, metaclass=_HookOutcomeEnumTypeWrapper):
    """Hook outcome for a single hook execution"""

HOOK_OUTCOME_UNSPECIFIED: HookOutcome.ValueType  # 0
HOOK_OUTCOME_SUCCESS: HookOutcome.ValueType  # 1
"""Hook completed successfully"""
HOOK_OUTCOME_ERROR: HookOutcome.ValueType  # 2
"""Hook failed with an error"""
HOOK_OUTCOME_CANCELED: HookOutcome.ValueType  # 3
"""Hook was canceled (e.g. user-initiated cancellation)"""
Global___HookOutcome: typing_extensions.TypeAlias = HookOutcome

@typing.final
class HookProcessed(google.protobuf.message.Message):
    """Span event tracking execution of a single hook (operation).
    Maps to dbt-core's LogHookStartLine (Q032) and LogHookEndLine (Q033) events.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PACKAGE_NAME_FIELD_NUMBER: builtins.int
    NAME_FIELD_NUMBER: builtins.int
    HOOK_TYPE_FIELD_NUMBER: builtins.int
    HOOK_INDEX_FIELD_NUMBER: builtins.int
    UNIQUE_ID_FIELD_NUMBER: builtins.int
    HOOK_OUTCOME_FIELD_NUMBER: builtins.int
    DBT_CORE_EVENT_CODE_FIELD_NUMBER: builtins.int
    PHASE_FIELD_NUMBER: builtins.int
    package_name: builtins.str
    """Package name that owns this hook."""
    name: builtins.str
    """Hook name (applicable for on-run-start/on-run-end hooks)"""
    hook_type: Global___HookType.ValueType
    """Type of hook being executed"""
    hook_index: builtins.int
    """0-based index in the execution order of this hook category (for example, within on-run-start).
    This index is global across dependencies and current project.
    """
    unique_id: builtins.str
    """unique_id of the associated node (for pre/post hooks)
    unique_id of the hook itself for on-run-start/on-run-end hooks
    """
    hook_outcome: Global___HookOutcome.ValueType
    """Outcome of the hook execution"""
    dbt_core_event_code: builtins.str
    """Legacy dbt core event code. Set to Q032 for start, Q033 for end."""
    phase: dbtlabs.proto.public.v1.events.fusion.phase.phase_pb2.ExecutionPhase.ValueType
    """Execution phase in which this hook ran."""
    def __init__(
        self,
        *,
        package_name: builtins.str = ...,
        name: builtins.str | None = ...,
        hook_type: Global___HookType.ValueType = ...,
        hook_index: builtins.int = ...,
        unique_id: builtins.str = ...,
        hook_outcome: Global___HookOutcome.ValueType = ...,
        dbt_core_event_code: builtins.str = ...,
        phase: dbtlabs.proto.public.v1.events.fusion.phase.phase_pb2.ExecutionPhase.ValueType = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_name", b"_name", "name", b"name"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_name", b"_name", "dbt_core_event_code", b"dbt_core_event_code", "hook_index", b"hook_index", "hook_outcome", b"hook_outcome", "hook_type", b"hook_type", "name", b"name", "package_name", b"package_name", "phase", b"phase", "unique_id", b"unique_id"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["_name", b"_name"]) -> typing.Literal["name"] | None: ...

Global___HookProcessed: typing_extensions.TypeAlias = HookProcessed
