# Generated by cstruct-stubgen
from typing import BinaryIO, TypeAlias, overload

import dissect.cstruct as __cs__

class _c_wevt(__cs__.cstruct):
    class Event_Descriptor(__cs__.Structure):
        ProviderId: __cs__.CharArray
        offset: _c_wevt.uint32
        @overload
        def __init__(self, ProviderId: __cs__.CharArray | None = ..., offset: _c_wevt.uint32 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class CRIM_HEADER(__cs__.Structure):
        signature: __cs__.CharArray
        size: _c_wevt.uint32
        unknown: _c_wevt.uint32
        providers: _c_wevt.uint32
        event_providers: __cs__.Array[c_wevt.Event_Descriptor]
        @overload
        def __init__(
            self,
            signature: __cs__.CharArray | None = ...,
            size: _c_wevt.uint32 | None = ...,
            unknown: _c_wevt.uint32 | None = ...,
            providers: _c_wevt.uint32 | None = ...,
            event_providers: __cs__.Array[c_wevt.Event_Descriptor] | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class WEVT_TYPES(__cs__.Structure):
        type: _c_wevt.uint32
        offset: _c_wevt.uint32
        @overload
        def __init__(self, type: _c_wevt.uint32 | None = ..., offset: _c_wevt.uint32 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class WEVT(__cs__.Structure):
        signature: __cs__.CharArray
        size: _c_wevt.uint32
        message_table_id: _c_wevt.uint32
        nr_of_types: _c_wevt.uint32
        types: __cs__.Array[_c_wevt.WEVT_TYPES]
        @overload
        def __init__(
            self,
            signature: __cs__.CharArray | None = ...,
            size: _c_wevt.uint32 | None = ...,
            message_table_id: _c_wevt.uint32 | None = ...,
            nr_of_types: _c_wevt.uint32 | None = ...,
            types: __cs__.Array[_c_wevt.WEVT_TYPES] | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class WEVT_TYPE(__cs__.Structure):
        signature: __cs__.CharArray
        size: _c_wevt.uint32
        nr_of_items: _c_wevt.uint32
        @overload
        def __init__(
            self,
            signature: __cs__.CharArray | None = ...,
            size: _c_wevt.uint32 | None = ...,
            nr_of_items: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class DATA_ITEM(__cs__.Structure):
        size: _c_wevt.uint32
        name: __cs__.WcharArray
        @overload
        def __init__(self, size: _c_wevt.uint32 | None = ..., name: __cs__.WcharArray | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class CHAN(__cs__.Structure):
        id: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        nr: _c_wevt.uint32
        message_table_id: _c_wevt.uint32
        @overload
        def __init__(
            self,
            id: _c_wevt.uint32 | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
            nr: _c_wevt.uint32 | None = ...,
            message_table_id: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class TEMP(__cs__.Structure):
        signature: __cs__.CharArray
        size: _c_wevt.uint32
        nr_of_items: _c_wevt.uint32
        nr_of_names: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        binxml_fragments: _c_wevt.uint32
        identifier: __cs__.CharArray
        @overload
        def __init__(
            self,
            signature: __cs__.CharArray | None = ...,
            size: _c_wevt.uint32 | None = ...,
            nr_of_items: _c_wevt.uint32 | None = ...,
            nr_of_names: _c_wevt.uint32 | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
            binxml_fragments: _c_wevt.uint32 | None = ...,
            identifier: __cs__.CharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class TEMP_DESCRIPTOR(__cs__.Structure):
        unknown0: _c_wevt.uint32
        input_type: _c_wevt.uint8
        output_type: _c_wevt.uint8
        unknown1: _c_wevt.uint16
        unknown2: _c_wevt.uint32
        unknown3: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        @overload
        def __init__(
            self,
            unknown0: _c_wevt.uint32 | None = ...,
            input_type: _c_wevt.uint8 | None = ...,
            output_type: _c_wevt.uint8 | None = ...,
            unknown1: _c_wevt.uint16 | None = ...,
            unknown2: _c_wevt.uint32 | None = ...,
            unknown3: _c_wevt.uint32 | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class PRVA(__cs__.Structure):
        unknown: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        @overload
        def __init__(self, unknown: _c_wevt.uint32 | None = ..., data_offset: _c_wevt.uint32 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class TASK(__cs__.Structure):
        id: _c_wevt.uint32
        message_table_id: _c_wevt.uint32
        mui_id: __cs__.CharArray
        data_offset: _c_wevt.uint32
        @overload
        def __init__(
            self,
            id: _c_wevt.uint32 | None = ...,
            message_table_id: _c_wevt.uint32 | None = ...,
            mui_id: __cs__.CharArray | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class KEYW(__cs__.Structure):
        bitmask: _c_wevt.uint64
        message_table_id: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        @overload
        def __init__(
            self,
            bitmask: _c_wevt.uint64 | None = ...,
            message_table_id: _c_wevt.uint32 | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class LEVL(__cs__.Structure):
        id: _c_wevt.uint32
        message_table_id: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        @overload
        def __init__(
            self,
            id: _c_wevt.uint32 | None = ...,
            message_table_id: _c_wevt.uint32 | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class EVNT(__cs__.Structure):
        id: _c_wevt.uint16
        version: _c_wevt.uint8
        channel: _c_wevt.uint8
        level: _c_wevt.uint8
        opcode: _c_wevt.uint8
        task: _c_wevt.uint16
        keyword: _c_wevt.uint64
        message_table_id: _c_wevt.uint32
        template_offset: _c_wevt.uint32
        opcode_offset: _c_wevt.uint32
        level_offset: _c_wevt.uint32
        task_offset: _c_wevt.uint32
        data_counter: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        flags: _c_wevt.uint32
        @overload
        def __init__(
            self,
            id: _c_wevt.uint16 | None = ...,
            version: _c_wevt.uint8 | None = ...,
            channel: _c_wevt.uint8 | None = ...,
            level: _c_wevt.uint8 | None = ...,
            opcode: _c_wevt.uint8 | None = ...,
            task: _c_wevt.uint16 | None = ...,
            keyword: _c_wevt.uint64 | None = ...,
            message_table_id: _c_wevt.uint32 | None = ...,
            template_offset: _c_wevt.uint32 | None = ...,
            opcode_offset: _c_wevt.uint32 | None = ...,
            level_offset: _c_wevt.uint32 | None = ...,
            task_offset: _c_wevt.uint32 | None = ...,
            data_counter: _c_wevt.uint32 | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
            flags: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class OPCO(__cs__.Structure):
        task_id: _c_wevt.uint16
        value: _c_wevt.uint16
        message_table_id: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        @overload
        def __init__(
            self,
            task_id: _c_wevt.uint16 | None = ...,
            value: _c_wevt.uint16 | None = ...,
            message_table_id: _c_wevt.uint32 | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class VMAP(__cs__.Structure):
        signature: __cs__.CharArray
        size: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        @overload
        def __init__(
            self,
            signature: __cs__.CharArray | None = ...,
            size: _c_wevt.uint32 | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BMAP(__cs__.Structure):
        signature: __cs__.CharArray
        size: _c_wevt.uint32
        data_offset: _c_wevt.uint32
        @overload
        def __init__(
            self,
            signature: __cs__.CharArray | None = ...,
            size: _c_wevt.uint32 | None = ...,
            data_offset: _c_wevt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

# Technically `c_wevt` is an instance of `_c_wevt`, but then we can't use it in type hints
c_wevt: TypeAlias = _c_wevt
