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

import dissect.cstruct as __cs__

class _c_asif(__cs__.cstruct):
    ASIF_HEADER_SIGNATURE: Literal[1936221303] = ...
    ASIF_META_HEADER_SIGNATURE: Literal[1835365473] = ...
    class asif_header(__cs__.Structure):
        header_signature: _c_asif.uint32
        header_version: _c_asif.uint32
        header_size: _c_asif.uint32
        header_flags: _c_asif.uint32
        directory_offsets: __cs__.Array[_c_asif.uint64]
        guid: __cs__.CharArray
        sector_count: _c_asif.uint64
        max_sector_count: _c_asif.uint64
        chunk_size: _c_asif.uint32
        block_size: _c_asif.uint16
        total_segments: _c_asif.uint16
        metadata_chunk: _c_asif.uint64
        unk_50: __cs__.CharArray
        read_only_flags: _c_asif.uint32
        metadata_flags: _c_asif.uint32
        metadata_read_only_flags: _c_asif.uint32
        @overload
        def __init__(
            self,
            header_signature: _c_asif.uint32 | None = ...,
            header_version: _c_asif.uint32 | None = ...,
            header_size: _c_asif.uint32 | None = ...,
            header_flags: _c_asif.uint32 | None = ...,
            directory_offsets: __cs__.Array[_c_asif.uint64] | None = ...,
            guid: __cs__.CharArray | None = ...,
            sector_count: _c_asif.uint64 | None = ...,
            max_sector_count: _c_asif.uint64 | None = ...,
            chunk_size: _c_asif.uint32 | None = ...,
            block_size: _c_asif.uint16 | None = ...,
            total_segments: _c_asif.uint16 | None = ...,
            metadata_chunk: _c_asif.uint64 | None = ...,
            unk_50: __cs__.CharArray | None = ...,
            read_only_flags: _c_asif.uint32 | None = ...,
            metadata_flags: _c_asif.uint32 | None = ...,
            metadata_read_only_flags: _c_asif.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class asif_meta_header(__cs__.Structure):
        header_signature: _c_asif.uint32
        header_version: _c_asif.uint32
        header_size: _c_asif.uint32
        data_size: _c_asif.uint64
        unk_14: _c_asif.uint64
        @overload
        def __init__(
            self,
            header_signature: _c_asif.uint32 | None = ...,
            header_version: _c_asif.uint32 | None = ...,
            header_size: _c_asif.uint32 | None = ...,
            data_size: _c_asif.uint64 | None = ...,
            unk_14: _c_asif.uint64 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

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