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

import dissect.cstruct as __cs__

class _c_vmfs(__cs__.cstruct):
    rootDirDescAddr: Literal[4] = ...
    fbbDescAddr: Literal[4194308] = ...
    fdbcDescAddr: Literal[8388612] = ...
    pbcDescAddr: Literal[12582916] = ...
    sbDescAddr: Literal[16777220] = ...
    vhDescAddr: Literal[20971524] = ...
    pb2DescAddr: Literal[25165828] = ...
    sdDirDescAddr: Literal[29360132] = ...
    jbDescAddr: Literal[33554436] = ...
    unmapDescAddr: Literal[37748740] = ...
    dfDirDescAddr: Literal[41943044] = ...
    FS3_FS_HEADER_OFFSET: Literal[2097152] = ...
    FS3_VMFS6_MAJOR_VERSION: Literal[24] = ...
    VMFS_MAGIC_NUMBER: Literal[799797598] = ...
    VMFSL_MAGIC_NUMBER: Literal[799797599] = ...
    VMFS6_MAGIC_NUMBER: Literal[799797600] = ...
    VMFS6L_MAGIC_NUMBER: Literal[799797601] = ...
    FS3_RFMD_SIGNATURE: Literal[1919315300] = ...
    FS3_RCMD_SIGNATURE: Literal[1919118692] = ...
    FS3_FDMD_SIGNATURE: Literal[1717857636] = ...
    FS3_MAX_FILE_NAME_LENGTH: Literal[128] = ...
    FS6_MAX_FILE_NAME_LENGTH: Literal[256] = ...
    FS6_DIR_HEADER_VERSION: Literal[16056321] = ...
    FS6_DIR_HEADER_DEBUG_VERSION: Literal[16629761] = ...
    FS6_DIR_HEADER_BLOCK_SIZE: Literal[65536] = ...
    FS6_DIR_HASH_MAX_ENTRIES: Literal[16001] = ...
    FS6_DIR_HASH_ROOT_RESERVED: Literal[28] = ...
    FS6_DIR_HASH_MAX_ROOT_ENTRIES: Literal[15973] = ...
    FS6_DIR_LINKS_PER_GROUP: Literal[12] = ...
    class UUID(__cs__.Structure):
        timeLo: _c_vmfs.uint32
        timeHi: _c_vmfs.uint32
        rand: _c_vmfs.uint16
        macAddr: __cs__.CharArray
        @overload
        def __init__(
            self,
            timeLo: _c_vmfs.uint32 | None = ...,
            timeHi: _c_vmfs.uint32 | None = ...,
            rand: _c_vmfs.uint16 | None = ...,
            macAddr: __cs__.CharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class SCSI_DiskId(__cs__.Structure):
        type: _c_vmfs.uint8
        len: _c_vmfs.uint8
        lun: _c_vmfs.uint16
        deviceType: _c_vmfs.uint8
        scsiLevel: _c_vmfs.uint8
        vendor: __cs__.CharArray
        model: __cs__.CharArray
        revision: __cs__.CharArray
        id: __cs__.CharArray
        @overload
        def __init__(
            self,
            type: _c_vmfs.uint8 | None = ...,
            len: _c_vmfs.uint8 | None = ...,
            lun: _c_vmfs.uint16 | None = ...,
            deviceType: _c_vmfs.uint8 | None = ...,
            scsiLevel: _c_vmfs.uint8 | None = ...,
            vendor: __cs__.CharArray | None = ...,
            model: __cs__.CharArray | None = ...,
            revision: __cs__.CharArray | None = ...,
            id: __cs__.CharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    FS3_Address: TypeAlias = _c_vmfs.uint32
    FS3_FileBlockAddr: TypeAlias = _c_vmfs.uint32
    FS3_FDAddr: TypeAlias = _c_vmfs.uint32
    class FS3_VolAddress(__cs__.Structure):
        offset: _c_vmfs.uint64
        @overload
        def __init__(self, offset: _c_vmfs.uint64 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_DescriptorType(__cs__.Enum):
        INVALID = ...
        VOLUME = ...
        DIRECTORY = ...
        REGFILE = ...
        SYMLINK = ...
        SYSFILE = ...
        RDM = ...
        SENTINEL = ...

    class FS3_AddrType(__cs__.Enum):
        INVALID = ...
        FILE_BLOCK = ...
        SMALL_FILE_BLOCK = ...
        SUB_BLOCK = ...
        POINTER_BLOCK = ...
        FILE_DESCRIPTOR = ...
        POINTER2_BLOCK = ...
        JOURNAL_BLOCK = ...
        LARGE_FILE_BLOCK = ...
        SENTINEL = ...

    class FS3_ZeroLevelAddrType(__cs__.Enum):
        INVALID = ...
        FILE_BLOCK = ...
        SUB_BLOCK = ...
        POINTER_BLOCK = ...
        POINTER2_BLOCK = ...
        POINTER_BLOCK_DOUBLE = ...
        FILE_DESCRIPTOR_RESIDENT = ...

    class FS3_Config(__cs__.Flag):
        UNKNOWN1 = ...
        UNKNOWN2 = ...
        DENSE_SBPC = ...
        MAINTENANCE = ...
        UNKNOWN10 = ...
        UNKNOWN20 = ...
        UNKNOWN40 = ...
        UNKNOWN80 = ...
        LOCAL = ...
        UNKNOWN200 = ...
        SHARED = ...
        OSDATA = ...
        VSAN = ...
        UNKNOWN2000 = ...
        UNKNOWN4000 = ...

    class FDS_VolInfo(__cs__.Structure):
        id: __cs__.CharArray
        @overload
        def __init__(self, id: __cs__.CharArray | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_Checksum(__cs__.Structure):
        value: _c_vmfs.uint64
        checksumGen: _c_vmfs.uint64
        @overload
        def __init__(self, value: _c_vmfs.uint64 | None = ..., checksumGen: _c_vmfs.uint64 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_UnmapPriority(__cs__.Enum):
        NONE = ...
        LOW = ...
        MEDIUM = ...
        HIGH = ...

    class FS3_UnmapMethod(__cs__.Enum):
        PRIORITY = ...
        FIXED = ...

    class FS3_Descriptor(__cs__.Structure):
        magic: _c_vmfs.uint32
        majorVersion: _c_vmfs.uint32
        minorVersion: _c_vmfs.uint8
        uuid: _c_vmfs.UUID
        config: _c_vmfs.FS3_Config
        fsLabel: __cs__.CharArray
        diskBlockSize: _c_vmfs.uint32
        fileBlockSize: _c_vmfs.uint64
        creationTime: _c_vmfs.uint32
        snapID: _c_vmfs.uint32
        volInfo: _c_vmfs.FDS_VolInfo
        fdcClusterGroupOffset: _c_vmfs.uint32
        fdcClustersPerGroup: _c_vmfs.uint32
        subBlockSize: _c_vmfs.uint32
        maxJournalSlotsPerTxn: _c_vmfs.uint32
        pb2VolAddr: _c_vmfs.uint64
        pb2FDAddr: _c_vmfs.uint32
        hostUuid: __cs__.CharArray
        gblGeneration: _c_vmfs.uint64
        sddVolAddr: _c_vmfs.uint64
        sddFDAddr: _c_vmfs.uint32
        checksumType: _c_vmfs.uint8
        unmapPriority: _c_vmfs.FS3_UnmapPriority
        pad1: __cs__.CharArray
        checksumGen: _c_vmfs.uint64
        checksum: _c_vmfs.FS3_Checksum
        physDiskBlockSize: _c_vmfs.uint32
        mdAlignment: _c_vmfs.uint32
        sfbToLfbShift: _c_vmfs.uint16
        reserved16_1: _c_vmfs.uint16
        reserved16_2: _c_vmfs.uint16
        ptrBlockShift: _c_vmfs.uint16
        sfbAddrBits: _c_vmfs.uint16
        reserved16_3: _c_vmfs.uint16
        tbzGranularity: _c_vmfs.uint32
        journalBlockSize: _c_vmfs.uint32
        leaseIntervalMs: _c_vmfs.uint32
        reclaimWindowMs: _c_vmfs.uint32
        localStampUS: _c_vmfs.uint64
        localMountOwnerMacAddr: __cs__.CharArray
        unmapMethod: _c_vmfs.FS3_UnmapMethod
        unmapBandwidth: _c_vmfs.uint32
        unmapBandwidthMin: _c_vmfs.uint32
        unmapBandwidthMax: _c_vmfs.uint32
        @overload
        def __init__(
            self,
            magic: _c_vmfs.uint32 | None = ...,
            majorVersion: _c_vmfs.uint32 | None = ...,
            minorVersion: _c_vmfs.uint8 | None = ...,
            uuid: _c_vmfs.UUID | None = ...,
            config: _c_vmfs.FS3_Config | None = ...,
            fsLabel: __cs__.CharArray | None = ...,
            diskBlockSize: _c_vmfs.uint32 | None = ...,
            fileBlockSize: _c_vmfs.uint64 | None = ...,
            creationTime: _c_vmfs.uint32 | None = ...,
            snapID: _c_vmfs.uint32 | None = ...,
            volInfo: _c_vmfs.FDS_VolInfo | None = ...,
            fdcClusterGroupOffset: _c_vmfs.uint32 | None = ...,
            fdcClustersPerGroup: _c_vmfs.uint32 | None = ...,
            subBlockSize: _c_vmfs.uint32 | None = ...,
            maxJournalSlotsPerTxn: _c_vmfs.uint32 | None = ...,
            pb2VolAddr: _c_vmfs.uint64 | None = ...,
            pb2FDAddr: _c_vmfs.uint32 | None = ...,
            hostUuid: __cs__.CharArray | None = ...,
            gblGeneration: _c_vmfs.uint64 | None = ...,
            sddVolAddr: _c_vmfs.uint64 | None = ...,
            sddFDAddr: _c_vmfs.uint32 | None = ...,
            checksumType: _c_vmfs.uint8 | None = ...,
            unmapPriority: _c_vmfs.FS3_UnmapPriority | None = ...,
            pad1: __cs__.CharArray | None = ...,
            checksumGen: _c_vmfs.uint64 | None = ...,
            checksum: _c_vmfs.FS3_Checksum | None = ...,
            physDiskBlockSize: _c_vmfs.uint32 | None = ...,
            mdAlignment: _c_vmfs.uint32 | None = ...,
            sfbToLfbShift: _c_vmfs.uint16 | None = ...,
            reserved16_1: _c_vmfs.uint16 | None = ...,
            reserved16_2: _c_vmfs.uint16 | None = ...,
            ptrBlockShift: _c_vmfs.uint16 | None = ...,
            sfbAddrBits: _c_vmfs.uint16 | None = ...,
            reserved16_3: _c_vmfs.uint16 | None = ...,
            tbzGranularity: _c_vmfs.uint32 | None = ...,
            journalBlockSize: _c_vmfs.uint32 | None = ...,
            leaseIntervalMs: _c_vmfs.uint32 | None = ...,
            reclaimWindowMs: _c_vmfs.uint32 | None = ...,
            localStampUS: _c_vmfs.uint64 | None = ...,
            localMountOwnerMacAddr: __cs__.CharArray | None = ...,
            unmapMethod: _c_vmfs.FS3_UnmapMethod | None = ...,
            unmapBandwidth: _c_vmfs.uint32 | None = ...,
            unmapBandwidthMin: _c_vmfs.uint32 | None = ...,
            unmapBandwidthMax: _c_vmfs.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_ResourceTypeID(__cs__.Enum):
        INVALID = ...
        FILE_BLOCK = ...
        SMALL_FILE_BLOCK = ...
        SUB_BLOCK = ...
        PTR_BLOCK = ...
        FILE_DESC = ...
        PTR2_BLOCK = ...
        JOURNAL_BLOCK = ...
        LARGE_FILE_BLOCK = ...
        SENTINEL = ...

    class Res3PriorityType(__cs__.Enum):
        DEFAULT = ...
        JOURNAL = ...
        MAX = ...

    class FS3_ResFileMetadata(__cs__.Structure):
        resourcesPerCluster: _c_vmfs.uint32
        clustersPerGroup: _c_vmfs.uint32
        clusterGroupOffset: _c_vmfs.uint32
        resourceSize: _c_vmfs.uint32
        clusterGroupSize: _c_vmfs.uint32
        numResourcesLo: _c_vmfs.uint32
        numClusterGroups: _c_vmfs.uint32
        numResourcesHi: _c_vmfs.uint32
        signature: _c_vmfs.uint32
        version: _c_vmfs.uint32
        flags: _c_vmfs.uint32
        affinityPerCluster: _c_vmfs.uint16
        affinityPerResource: _c_vmfs.uint16
        bitsPerResource: _c_vmfs.uint32
        childMetaOffset: _c_vmfs.uint32
        parentResourcesPerCluster: _c_vmfs.uint32
        parentClustersPerGroup: _c_vmfs.uint32
        parentClusterGroupSize: _c_vmfs.uint32
        _unknown: __cs__.CharArray
        convertedClusters: _c_vmfs.uint32
        @overload
        def __init__(
            self,
            resourcesPerCluster: _c_vmfs.uint32 | None = ...,
            clustersPerGroup: _c_vmfs.uint32 | None = ...,
            clusterGroupOffset: _c_vmfs.uint32 | None = ...,
            resourceSize: _c_vmfs.uint32 | None = ...,
            clusterGroupSize: _c_vmfs.uint32 | None = ...,
            numResourcesLo: _c_vmfs.uint32 | None = ...,
            numClusterGroups: _c_vmfs.uint32 | None = ...,
            numResourcesHi: _c_vmfs.uint32 | None = ...,
            signature: _c_vmfs.uint32 | None = ...,
            version: _c_vmfs.uint32 | None = ...,
            flags: _c_vmfs.uint32 | None = ...,
            affinityPerCluster: _c_vmfs.uint16 | None = ...,
            affinityPerResource: _c_vmfs.uint16 | None = ...,
            bitsPerResource: _c_vmfs.uint32 | None = ...,
            childMetaOffset: _c_vmfs.uint32 | None = ...,
            parentResourcesPerCluster: _c_vmfs.uint32 | None = ...,
            parentClustersPerGroup: _c_vmfs.uint32 | None = ...,
            parentClusterGroupSize: _c_vmfs.uint32 | None = ...,
            _unknown: __cs__.CharArray | None = ...,
            convertedClusters: _c_vmfs.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_ResourceClusterMD(__cs__.Structure):
        clusterNum: _c_vmfs.uint32
        totalResources: _c_vmfs.uint32
        freeResources: _c_vmfs.uint32
        nextFreeIdx: _c_vmfs.uint32
        bitmap: __cs__.Array[_c_vmfs.uint8]
        typeData: __cs__.Array[_c_vmfs.uint8]
        priority: _c_vmfs.Res3PriorityType
        @overload
        def __init__(
            self,
            clusterNum: _c_vmfs.uint32 | None = ...,
            totalResources: _c_vmfs.uint32 | None = ...,
            freeResources: _c_vmfs.uint32 | None = ...,
            nextFreeIdx: _c_vmfs.uint32 | None = ...,
            bitmap: __cs__.Array[_c_vmfs.uint8] | None = ...,
            typeData: __cs__.Array[_c_vmfs.uint8] | None = ...,
            priority: _c_vmfs.Res3PriorityType | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class Res3_ClusterMetaVMFS6(__cs__.Structure):
        _pad: __cs__.CharArray
        signature: _c_vmfs.uint32
        priority: _c_vmfs.uint32
        clusterNum: _c_vmfs.uint64
        totalResources: _c_vmfs.uint16
        freeResources: _c_vmfs.uint16
        unk1: _c_vmfs.uint16
        affinityCount: _c_vmfs.uint16
        _unk: __cs__.CharArray
        @overload
        def __init__(
            self,
            _pad: __cs__.CharArray | None = ...,
            signature: _c_vmfs.uint32 | None = ...,
            priority: _c_vmfs.uint32 | None = ...,
            clusterNum: _c_vmfs.uint64 | None = ...,
            totalResources: _c_vmfs.uint16 | None = ...,
            freeResources: _c_vmfs.uint16 | None = ...,
            unk1: _c_vmfs.uint16 | None = ...,
            affinityCount: _c_vmfs.uint16 | None = ...,
            _unk: __cs__.CharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_HBGen(__cs__.Structure):
        gen: _c_vmfs.uint64
        @overload
        def __init__(self, gen: _c_vmfs.uint64 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_LockHolder(__cs__.Structure):
        hbAddr: _c_vmfs.FS3_VolAddress
        hbGen: _c_vmfs.FS3_HBGen
        uid: _c_vmfs.UUID
        @overload
        def __init__(
            self,
            hbAddr: _c_vmfs.FS3_VolAddress | None = ...,
            hbGen: _c_vmfs.FS3_HBGen | None = ...,
            uid: _c_vmfs.UUID | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_DiskLock(__cs__.Structure):
        type: _c_vmfs.uint32
        addr: _c_vmfs.FS3_VolAddress
        hbAddr: _c_vmfs.FS3_VolAddress
        hbGen: _c_vmfs.FS3_HBGen
        token: _c_vmfs.uint64
        mode: _c_vmfs.uint32
        owner: _c_vmfs.UUID
        mtime: _c_vmfs.uint64
        numHolders: _c_vmfs.uint32
        class FS3_LockHolder(__cs__.Structure):
            hbAddr: _c_vmfs.FS3_VolAddress
            hbGen: _c_vmfs.FS3_HBGen
            uid: _c_vmfs.UUID
            @overload
            def __init__(
                self,
                hbAddr: _c_vmfs.FS3_VolAddress | None = ...,
                hbGen: _c_vmfs.FS3_HBGen | None = ...,
                uid: _c_vmfs.UUID | None = ...,
            ): ...
            @overload
            def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

        holders: __cs__.Array[FS3_LockHolder]
        _unk: __cs__.CharArray
        gblNumHolders: _c_vmfs.uint32
        gblGen: _c_vmfs.uint64
        gblBrk: _c_vmfs.uint32
        @overload
        def __init__(
            self,
            type: _c_vmfs.uint32 | None = ...,
            addr: _c_vmfs.FS3_VolAddress | None = ...,
            hbAddr: _c_vmfs.FS3_VolAddress | None = ...,
            hbGen: _c_vmfs.FS3_HBGen | None = ...,
            token: _c_vmfs.uint64 | None = ...,
            mode: _c_vmfs.uint32 | None = ...,
            owner: _c_vmfs.UUID | None = ...,
            mtime: _c_vmfs.uint64 | None = ...,
            numHolders: _c_vmfs.uint32 | None = ...,
            holders: __cs__.Array[FS3_LockHolder] | None = ...,
            _unk: __cs__.CharArray | None = ...,
            gblNumHolders: _c_vmfs.uint32 | None = ...,
            gblGen: _c_vmfs.uint64 | None = ...,
            gblBrk: _c_vmfs.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_Heartbeat(__cs__.Structure):
        state: _c_vmfs.uint32
        addr: _c_vmfs.FS3_VolAddress
        hbGen: _c_vmfs.FS3_HBGen
        stamp: _c_vmfs.uint64
        owner: _c_vmfs.UUID
        journalAddr: _c_vmfs.uint32
        driveX: _c_vmfs.uint32
        driveY: _c_vmfs.uint8
        lockImpl: _c_vmfs.uint8
        ip: __cs__.CharArray
        journalVolAddr: _c_vmfs.uint64
        replayHost: _c_vmfs.UUID
        _unk: __cs__.CharArray
        replayHostHB: _c_vmfs.uint64
        replayHostHBgen: _c_vmfs.FS3_HBGen
        @overload
        def __init__(
            self,
            state: _c_vmfs.uint32 | None = ...,
            addr: _c_vmfs.FS3_VolAddress | None = ...,
            hbGen: _c_vmfs.FS3_HBGen | None = ...,
            stamp: _c_vmfs.uint64 | None = ...,
            owner: _c_vmfs.UUID | None = ...,
            journalAddr: _c_vmfs.uint32 | None = ...,
            driveX: _c_vmfs.uint32 | None = ...,
            driveY: _c_vmfs.uint8 | None = ...,
            lockImpl: _c_vmfs.uint8 | None = ...,
            ip: __cs__.CharArray | None = ...,
            journalVolAddr: _c_vmfs.uint64 | None = ...,
            replayHost: _c_vmfs.UUID | None = ...,
            _unk: __cs__.CharArray | None = ...,
            replayHostHB: _c_vmfs.uint64 | None = ...,
            replayHostHBgen: _c_vmfs.FS3_HBGen | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_FileMetadata(__cs__.Structure):
        descAddr: _c_vmfs.uint32
        generation: _c_vmfs.uint32
        linkCount: _c_vmfs.uint32
        type: _c_vmfs.FS3_DescriptorType
        flags: _c_vmfs.uint32
        fileLength: _c_vmfs.uint64
        blockSize: _c_vmfs.uint64
        numBlocks: _c_vmfs.uint64
        mtime: _c_vmfs.uint32
        ctime: _c_vmfs.uint32
        atime: _c_vmfs.uint32
        uid: _c_vmfs.uint32
        gid: _c_vmfs.uint32
        mode: _c_vmfs.uint32
        zeroLevelAddrType: _c_vmfs.uint32
        numTBZBlocksLo: _c_vmfs.uint32
        numCOWBlocksLo: _c_vmfs.uint32
        newSinceEpochLo: _c_vmfs.uint32
        numTBZBlocksHi: _c_vmfs.uint32
        numCOWBlocksHi: _c_vmfs.uint32
        numPointerBlocks: _c_vmfs.uint32
        newSinceEpochHi: _c_vmfs.uint32
        signature: _c_vmfs.uint32
        affinityFD: _c_vmfs.uint32
        tbzGranularityShift: _c_vmfs.uint32
        parentFD: _c_vmfs.uint32
        lastSFBClusterNum: _c_vmfs.uint32
        _unk4: _c_vmfs.uint32
        _unk5: _c_vmfs.uint32
        affinityBitmap: _c_vmfs.uint32
        numPreAllocBlocks: _c_vmfs.uint8
        _unk7: _c_vmfs.uint8
        _unk8: _c_vmfs.uint8
        _unk9: _c_vmfs.uint8
        _unk10: _c_vmfs.uint8
        blockOffsetShift: _c_vmfs.uint8
        numTracked: _c_vmfs.uint8
        _unk12: _c_vmfs.uint8
        numLFB: _c_vmfs.uint32
        _unk13: __cs__.CharArray
        lastFreeSFBC: _c_vmfs.uint32
        @overload
        def __init__(
            self,
            descAddr: _c_vmfs.uint32 | None = ...,
            generation: _c_vmfs.uint32 | None = ...,
            linkCount: _c_vmfs.uint32 | None = ...,
            type: _c_vmfs.FS3_DescriptorType | None = ...,
            flags: _c_vmfs.uint32 | None = ...,
            fileLength: _c_vmfs.uint64 | None = ...,
            blockSize: _c_vmfs.uint64 | None = ...,
            numBlocks: _c_vmfs.uint64 | None = ...,
            mtime: _c_vmfs.uint32 | None = ...,
            ctime: _c_vmfs.uint32 | None = ...,
            atime: _c_vmfs.uint32 | None = ...,
            uid: _c_vmfs.uint32 | None = ...,
            gid: _c_vmfs.uint32 | None = ...,
            mode: _c_vmfs.uint32 | None = ...,
            zeroLevelAddrType: _c_vmfs.uint32 | None = ...,
            numTBZBlocksLo: _c_vmfs.uint32 | None = ...,
            numCOWBlocksLo: _c_vmfs.uint32 | None = ...,
            newSinceEpochLo: _c_vmfs.uint32 | None = ...,
            numTBZBlocksHi: _c_vmfs.uint32 | None = ...,
            numCOWBlocksHi: _c_vmfs.uint32 | None = ...,
            numPointerBlocks: _c_vmfs.uint32 | None = ...,
            newSinceEpochHi: _c_vmfs.uint32 | None = ...,
            signature: _c_vmfs.uint32 | None = ...,
            affinityFD: _c_vmfs.uint32 | None = ...,
            tbzGranularityShift: _c_vmfs.uint32 | None = ...,
            parentFD: _c_vmfs.uint32 | None = ...,
            lastSFBClusterNum: _c_vmfs.uint32 | None = ...,
            _unk4: _c_vmfs.uint32 | None = ...,
            _unk5: _c_vmfs.uint32 | None = ...,
            affinityBitmap: _c_vmfs.uint32 | None = ...,
            numPreAllocBlocks: _c_vmfs.uint8 | None = ...,
            _unk7: _c_vmfs.uint8 | None = ...,
            _unk8: _c_vmfs.uint8 | None = ...,
            _unk9: _c_vmfs.uint8 | None = ...,
            _unk10: _c_vmfs.uint8 | None = ...,
            blockOffsetShift: _c_vmfs.uint8 | None = ...,
            numTracked: _c_vmfs.uint8 | None = ...,
            _unk12: _c_vmfs.uint8 | None = ...,
            numLFB: _c_vmfs.uint32 | None = ...,
            _unk13: __cs__.CharArray | None = ...,
            lastFreeSFBC: _c_vmfs.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_RawDiskMap(__cs__.Structure):
        diskId: _c_vmfs.SCSI_DiskId
        @overload
        def __init__(self, diskId: _c_vmfs.SCSI_DiskId | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS3_DirEntry(__cs__.Structure):
        type: _c_vmfs.FS3_DescriptorType
        descAddr: _c_vmfs.uint32
        generation: _c_vmfs.uint32
        name: __cs__.CharArray
        @overload
        def __init__(
            self,
            type: _c_vmfs.FS3_DescriptorType | None = ...,
            descAddr: _c_vmfs.uint32 | None = ...,
            generation: _c_vmfs.uint32 | None = ...,
            name: __cs__.CharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS6_DirBlockType(__cs__.Enum):
        DIRENT = ...
        LINK = ...
        ALLOCATION_MAP = ...

    class FS6_DirEntry(__cs__.Structure):
        type: _c_vmfs.FS3_DescriptorType
        address: _c_vmfs.uint32
        generation: _c_vmfs.uint32
        hashIndex: _c_vmfs.uint16
        linkHash: _c_vmfs.uint16
        offset: _c_vmfs.uint64
        name: __cs__.CharArray
        _unk1: _c_vmfs.uint64
        @overload
        def __init__(
            self,
            type: _c_vmfs.FS3_DescriptorType | None = ...,
            address: _c_vmfs.uint32 | None = ...,
            generation: _c_vmfs.uint32 | None = ...,
            hashIndex: _c_vmfs.uint16 | None = ...,
            linkHash: _c_vmfs.uint16 | None = ...,
            offset: _c_vmfs.uint64 | None = ...,
            name: __cs__.CharArray | None = ...,
            _unk1: _c_vmfs.uint64 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS6_DirHeader(__cs__.Structure):
        version: _c_vmfs.uint32
        numEntries: _c_vmfs.uint32
        numAllocated: _c_vmfs.uint32
        numAllocationMapBlocks: _c_vmfs.uint32
        allocationMapBlocks: __cs__.Array[_c_vmfs.uint32]
        _gap0: __cs__.CharArray
        checksum: _c_vmfs.uint64
        checksumGen: _c_vmfs.uint64
        selfEntry: _c_vmfs.FS6_DirEntry
        parentEntry: _c_vmfs.FS6_DirEntry
        @overload
        def __init__(
            self,
            version: _c_vmfs.uint32 | None = ...,
            numEntries: _c_vmfs.uint32 | None = ...,
            numAllocated: _c_vmfs.uint32 | None = ...,
            numAllocationMapBlocks: _c_vmfs.uint32 | None = ...,
            allocationMapBlocks: __cs__.Array[_c_vmfs.uint32] | None = ...,
            _gap0: __cs__.CharArray | None = ...,
            checksum: _c_vmfs.uint64 | None = ...,
            checksumGen: _c_vmfs.uint64 | None = ...,
            selfEntry: _c_vmfs.FS6_DirEntry | None = ...,
            parentEntry: _c_vmfs.FS6_DirEntry | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS6_DirBlockHeader(__cs__.Structure):
        version: _c_vmfs.uint16
        type: _c_vmfs.uint16
        totalSlots: _c_vmfs.uint16
        freeSlots: _c_vmfs.uint16
        bitmap: __cs__.CharArray
        @overload
        def __init__(
            self,
            version: _c_vmfs.uint16 | None = ...,
            type: _c_vmfs.uint16 | None = ...,
            totalSlots: _c_vmfs.uint16 | None = ...,
            freeSlots: _c_vmfs.uint16 | None = ...,
            bitmap: __cs__.CharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS6_DirLink(__cs__.Structure):
        location: _c_vmfs.uint32
        hash: _c_vmfs.uint16
        @overload
        def __init__(self, location: _c_vmfs.uint32 | None = ..., hash: _c_vmfs.uint16 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class FS6_DirLinkGroup(__cs__.Structure):
        hashIndex: _c_vmfs.uint16
        totalLinks: _c_vmfs.uint8
        freeLinks: _c_vmfs.uint8
        nextFreeIdx: _c_vmfs.uint8
        pad1: _c_vmfs.uint8
        class FS6_DirLink(__cs__.Structure):
            location: _c_vmfs.uint32
            hash: _c_vmfs.uint16
            @overload
            def __init__(self, location: _c_vmfs.uint32 | None = ..., hash: _c_vmfs.uint16 | None = ...): ...
            @overload
            def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

        links: __cs__.Array[FS6_DirLink]
        nextGroup: _c_vmfs.uint32
        pad2: _c_vmfs.uint16
        @overload
        def __init__(
            self,
            hashIndex: _c_vmfs.uint16 | None = ...,
            totalLinks: _c_vmfs.uint8 | None = ...,
            freeLinks: _c_vmfs.uint8 | None = ...,
            nextFreeIdx: _c_vmfs.uint8 | None = ...,
            pad1: _c_vmfs.uint8 | None = ...,
            links: __cs__.Array[FS6_DirLink] | None = ...,
            nextGroup: _c_vmfs.uint32 | None = ...,
            pad2: _c_vmfs.uint16 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

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

FS3_Config = c_vmfs.FS3_Config
FS3_AddrType = c_vmfs.FS3_AddrType
FS3_ResourceTypeID = c_vmfs.FS3_ResourceTypeID
FS3_ZeroLevelAddrType = c_vmfs.FS3_ZeroLevelAddrType
FS3_DescriptorType = c_vmfs.FS3_DescriptorType
FS6_DirBlockType = c_vmfs.FS6_DirBlockType
