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

import dissect.cstruct as __cs__

class _bxml_struct(__cs__.cstruct):
    class BXML_FRAGMENT_HEADER(__cs__.Structure):
        major_version: _bxml_struct.uint8
        minor_version: _bxml_struct.uint8
        flags: _bxml_struct.uint8
        @overload
        def __init__(
            self,
            major_version: _bxml_struct.uint8 | None = ...,
            minor_version: _bxml_struct.uint8 | None = ...,
            flags: _bxml_struct.uint8 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BXML_ELEMENT_START_TPL(__cs__.Structure):
        dependency_id: _bxml_struct.uint16
        data_size: _bxml_struct.uint32
        @overload
        def __init__(
            self, dependency_id: _bxml_struct.uint16 | None = ..., data_size: _bxml_struct.uint32 | None = ...
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BXML_ELEMENT_START(__cs__.Structure):
        data_size: _bxml_struct.uint32
        @overload
        def __init__(self, data_size: _bxml_struct.uint32 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BXML_NAME(__cs__.Structure):
        unknown: _bxml_struct.uint32
        hash: _bxml_struct.uint16
        size: _bxml_struct.uint16
        value: __cs__.WcharArray
        @overload
        def __init__(
            self,
            unknown: _bxml_struct.uint32 | None = ...,
            hash: _bxml_struct.uint16 | None = ...,
            size: _bxml_struct.uint16 | None = ...,
            value: __cs__.WcharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BXML_ATTR(__cs__.Structure):
        token: _bxml_struct.uint8
        @overload
        def __init__(self, token: _bxml_struct.uint8 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BXML_VALUE_TEXT(__cs__.Structure):
        size: _bxml_struct.uint16
        value: __cs__.WcharArray
        @overload
        def __init__(self, size: _bxml_struct.uint16 | None = ..., value: __cs__.WcharArray | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BXML_TEMPLATE_REFERENCE(__cs__.Structure):
        a: _bxml_struct.uint8
        template_id: _bxml_struct.uint32
        offset: _bxml_struct.uint32
        @overload
        def __init__(
            self,
            a: _bxml_struct.uint8 | None = ...,
            template_id: _bxml_struct.uint32 | None = ...,
            offset: _bxml_struct.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BXML_TEMPLATE_DEFINITION(__cs__.Structure):
        next_template: _bxml_struct.uint32
        identifier: __cs__.CharArray
        data_size: _bxml_struct.uint32
        @overload
        def __init__(
            self,
            next_template: _bxml_struct.uint32 | None = ...,
            identifier: __cs__.CharArray | None = ...,
            data_size: _bxml_struct.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BXML_OPTIONAL_SUBSTITUTION(__cs__.Structure):
        sub_id: _bxml_struct.uint16
        value_type: _bxml_struct.uint8
        @overload
        def __init__(self, sub_id: _bxml_struct.uint16 | None = ..., value_type: _bxml_struct.uint8 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class BXML_TEMPLATE_VALUE_DESC(__cs__.Structure):
        size: _bxml_struct.uint16
        type_id: _bxml_struct.uint8
        a: _bxml_struct.uint8
        @overload
        def __init__(
            self,
            size: _bxml_struct.uint16 | None = ...,
            type_id: _bxml_struct.uint8 | None = ...,
            a: _bxml_struct.uint8 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class SID(__cs__.Structure):
        revision: _bxml_struct.uint8
        subAuthorityCount: _bxml_struct.uint8
        authority: __cs__.CharArray
        subAuthorities: __cs__.Array[_bxml_struct.uint32]
        @overload
        def __init__(
            self,
            revision: _bxml_struct.uint8 | None = ...,
            subAuthorityCount: _bxml_struct.uint8 | None = ...,
            authority: __cs__.CharArray | None = ...,
            subAuthorities: __cs__.Array[_bxml_struct.uint32] | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class SYSTEMTIME(__cs__.Structure):
        wYear: _bxml_struct.uint16
        wMonth: _bxml_struct.uint16
        wDayOfWeek: _bxml_struct.uint16
        wDay: _bxml_struct.uint16
        wHour: _bxml_struct.uint16
        wMinute: _bxml_struct.uint16
        wSecond: _bxml_struct.uint16
        wMilliseconds: _bxml_struct.uint16
        @overload
        def __init__(
            self,
            wYear: _bxml_struct.uint16 | None = ...,
            wMonth: _bxml_struct.uint16 | None = ...,
            wDayOfWeek: _bxml_struct.uint16 | None = ...,
            wDay: _bxml_struct.uint16 | None = ...,
            wHour: _bxml_struct.uint16 | None = ...,
            wMinute: _bxml_struct.uint16 | None = ...,
            wSecond: _bxml_struct.uint16 | None = ...,
            wMilliseconds: _bxml_struct.uint16 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

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